Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Flexpart
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Benjamin Püschel
Flexpart
Commits
41a29817
Commit
41a29817
authored
Apr 8, 2017
by
Don Morton
Browse files
Options
Downloads
Patches
Plain Diff
Incremental save in branch fp9.3.1-20161214-nc4
parent
7e5f1dcd
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
flexpart_code/fpmetbinary_mod.F90
+52
-4
52 additions, 4 deletions
flexpart_code/fpmetbinary_mod.F90
with
52 additions
and
4 deletions
flexpart_code/fpmetbinary_mod.F90
+
52
−
4
View file @
41a29817
...
...
@@ -43,7 +43,8 @@ MODULE fpmetbinary_mod
USE
com_mod
USE
conv_mod
USE
par_mod
,
ONLY
:
nxmax
,
nymax
,
nzmax
,
nuvzmax
,
nwzmax
,
numclass
,
maxspec
USE
par_mod
,
ONLY
:
nxmax
,
nymax
,
nzmax
,
nuvzmax
,
nwzmax
,
numclass
,
maxspec
,
&
&
maxnests
,
nxmaxn
,
nymaxn
USE
netcdf
...
...
@@ -305,7 +306,8 @@ CONTAINS
INTEGER
::
ncret
! Return value from NetCDF calls
INTEGER
::
ncvarid
! NetCDF variable ID
INTEGER
::
nxmax_dimid
,
nymax_dimid
,
nzmax_dimid
,
nuvzmax_dimid
,
nwzmax_dimid
INTEGER
::
nxmax_dimid
,
nymax_dimid
,
nzmax_dimid
,
nuvzmax_dimid
,
nwzmax_dimid
,
&
&
maxnests_dimid
,
nxmaxn_dimid
,
nymaxn_dimid
INTEGER
,
DIMENSION
(
1
)
::
dim1dids
! Dimension IDs for 1D arrays
INTEGER
,
DIMENSION
(
2
)
::
dim2dids
! Dimension IDs for 2D arrays
...
...
@@ -313,12 +315,14 @@ CONTAINS
! These are used when loading in dimensions from NC file
CHARACTER
(
LEN
=
NF90_MAX_NAME
)
::
nxmax_dimname
,
nymax_dimname
,
nzmax_dimname
,
&
&
nuvzmax_dimname
,
nwzmax_dimname
&
nuvzmax_dimname
,
nwzmax_dimname
,&
&
maxnests_dimname
,
nxmaxn_dimname
,
nymaxn_dimname
! These are temporary variables, used in the LOAD option, for
! comparing against the current values in FLEXPART of nxmax, nymax, ...
INTEGER
::
temp_nxmax
,
temp_nymax
,
temp_nzmax
,
&
&
temp_nuvzmax
,
temp_nwzmax
&
temp_nuvzmax
,
temp_nwzmax
,
&
&
temp_maxnests
,
temp_nxmaxn
,
temp_nymaxn
CHARACTER
(
LEN
=
12
)
::
temp_preproc_format_version_str
...
...
@@ -935,6 +939,14 @@ CONTAINS
! Getting ready to add in nested code
! These are compiled max dimensions from par_mod - these are
! not meant to be reassigned during a LOAD, but used as "header"
! information to provide the structure of arrays
ncret
=
nf90_def_dim
(
ncid
,
'maxnests'
,
maxnests
,
maxnests_dimid
)
ncret
=
nf90_def_dim
(
ncid
,
'nxmaxn'
,
nxmaxn
,
nxmaxn_dimid
)
ncret
=
nf90_def_dim
(
ncid
,
'nymaxn'
,
nymaxn
,
nymaxn_dimid
)
! Nested, scalar values (for each nest)
WRITE
(
iounit
)
nxn
(:)
...
...
@@ -1090,6 +1102,8 @@ CONTAINS
END
IF
! Scalar values
READ
(
iounit
)
nx
,
ny
,
nxmin1
,
nymin1
,
nxfield
READ
(
iounit
)
nuvz
,
nwz
,
nz
,
nmixz
,
nlev_ec
...
...
@@ -1386,6 +1400,40 @@ CONTAINS
! Now the nested input grid variables
! Get the compiled values that were written into the FP file, and
! make sure they are equal to the current compiled values, to make
! sure we are working with consistent arrays
ncret
=
nf90_inq_dimid
(
ncid
,
'maxnests'
,
maxnests_dimid
)
ncret
=
nf90_inquire_dimension
(
ncid
,
maxnests_dimid
,
maxnests_dimname
,
&
&
temp_maxnests
)
PRINT
*
,
'temp_maxnests: '
,
temp_maxnests
ncret
=
nf90_inq_dimid
(
ncid
,
'nxmaxn'
,
nxmaxn_dimid
)
ncret
=
nf90_inquire_dimension
(
ncid
,
nxmaxn_dimid
,
nxmaxn_dimname
,
&
&
temp_nxmaxn
)
PRINT
*
,
'temp_nxmaxn: '
,
temp_nxmaxn
ncret
=
nf90_inq_dimid
(
ncid
,
'nymaxn'
,
nymaxn_dimid
)
ncret
=
nf90_inquire_dimension
(
ncid
,
nymaxn_dimid
,
nymaxn_dimname
,
&
&
temp_nymaxn
)
PRINT
*
,
'temp_nymaxn: '
,
temp_nymaxn
IF
(
(
temp_nxmaxn
==
nxmaxn
)
.AND.
(
temp_nymaxn
==
nymaxn
)
.AND.
&
&
(
temp_maxnests
==
maxnests
)
)
THEN
CONTINUE
ELSE
PRINT
*
,
'Incompatible dimensions between fp file and current FLEXPART!'
! PRINT *, ''
PRINT
*
,
' FP file Compiled FP'
PRINT
*
,
'nxmaxn: '
,
temp_nxmaxn
,
' '
,
nxmaxn
PRINT
*
,
'nymaxn: '
,
temp_nymaxn
,
' '
,
nymaxn
PRINT
*
,
'maxnests: '
,
temp_maxnests
,
' '
,
maxnests
STOP
END
IF
! Nested, scalar values (for each nest)
READ
(
iounit
)
nxn
(:)
...
...
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