Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
Detection eddies
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IPSL
LMD
DPAO
Detection eddies
Commits
7e171939
Commit
7e171939
authored
2 years ago
by
Lionel GUEZ
Browse files
Options
Downloads
Patches
Plain Diff
Add argument iostat to `shpc_open`
parent
47f0fea9
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Common/shpc_open.f90
+35
-22
35 additions, 22 deletions
Common/shpc_open.f90
with
35 additions
and
22 deletions
Common/shpc_open.f90
+
35
−
22
View file @
7e171939
...
...
@@ -4,7 +4,7 @@ module shpc_open_m
contains
subroutine
shpc_open
(
hshp
,
shpc_dir
,
pszaccess
)
subroutine
shpc_open
(
hshp
,
shpc_dir
,
pszaccess
,
iostat
)
! Libraries:
USE
jumble
,
only
:
new_unit
...
...
@@ -16,34 +16,47 @@ contains
TYPE
(
shpc_slice_handler
),
intent
(
out
)::
hshp
character
(
len
=
*
),
intent
(
in
)::
shpc_dir
character
(
len
=
*
),
intent
(
in
)::
pszaccess
! should be "rb" or "rb+"
integer
,
optional
,
intent
(
out
)::
iostat
! Local:
integer
unit
integer
unit
,
iostat_extr
character
(
len
=
12
)
orientation
!--------------------------------------------------------------------
call
shp_open_03
(
hshp
%
extremum
,
shpc_dir
//
"/extremum"
,
pszaccess
)
call
shp_open_03
(
hshp
%
outermost
,
shpc_dir
//
"/outermost_contour"
,
&
pszaccess
)
call
shp_open_03
(
hshp
%
max_speed
,
shpc_dir
//
"/max_speed_contour"
,
&
pszaccess
)
call
read_field_indices
(
hshp
)
call
new_unit
(
unit
)
open
(
unit
,
file
=
shpc_dir
//
"/orientation.txt"
,
status
=
"old"
,
&
action
=
"read"
,
position
=
"rewind"
)
read
(
unit
,
fmt
=
*
)
orientation
close
(
unit
)
hshp
%
cyclone
=
trim
(
adjustl
(
orientation
))
==
"cyclones"
hshp
%
dir
=
shpc_dir
call
new_unit
(
hshp
%
unit
)
if
(
pszaccess
==
"rb"
)
then
open
(
hshp
%
unit
,
file
=
hshp
%
dir
//
"/ishape_last.txt"
,
&
status
=
"old"
,
action
=
"read"
,
position
=
"rewind"
)
call
shp_open_03
(
hshp
%
extremum
,
shpc_dir
//
"/extremum"
,
pszaccess
,
&
iostat_extr
)
if
(
present
(
iostat
))
iostat
=
iostat_extr
if
(
iostat_extr
==
0
)
then
call
shp_open_03
(
hshp
%
outermost
,
shpc_dir
//
"/outermost_contour"
,
&
pszaccess
)
call
shp_open_03
(
hshp
%
max_speed
,
shpc_dir
//
"/max_speed_contour"
,
&
pszaccess
)
call
read_field_indices
(
hshp
)
call
new_unit
(
unit
)
open
(
unit
,
file
=
shpc_dir
//
"/orientation.txt"
,
status
=
"old"
,
&
action
=
"read"
,
position
=
"rewind"
)
read
(
unit
,
fmt
=
*
)
orientation
close
(
unit
)
hshp
%
cyclone
=
trim
(
adjustl
(
orientation
))
==
"cyclones"
hshp
%
dir
=
shpc_dir
call
new_unit
(
hshp
%
unit
)
if
(
pszaccess
==
"rb"
)
then
open
(
hshp
%
unit
,
file
=
hshp
%
dir
//
"/ishape_last.txt"
,
&
status
=
"old"
,
action
=
"read"
,
position
=
"rewind"
)
else
open
(
hshp
%
unit
,
file
=
hshp
%
dir
//
"/ishape_last.txt"
,
&
status
=
"old"
,
action
=
"readwrite"
,
position
=
"append"
)
end
if
else
open
(
hshp
%
unit
,
file
=
hshp
%
dir
//
"/ishape_last.txt"
,
&
status
=
"old"
,
action
=
"readwrite"
,
position
=
"append"
)
if
(
.not.
present
(
iostat
))
then
print
*
,
"shpc_open: failed"
print
*
,
"shpc_dir = "
,
shpc_dir
print
*
,
"pszaccess = "
,
pszaccess
stop
1
end
if
end
if
end
subroutine
shpc_open
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment