Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Méso-NH code
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package 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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RODIER Quentin
Méso-NH code
Commits
942dad2f
Commit
942dad2f
authored
4 years ago
by
WAUTELET Philippe
Browse files
Options
Downloads
Patches
Plain Diff
Philippe 04/11/2020: IO: write_diachro: add some verifications
parent
30b073a6
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
src/MNH/write_diachro.f90
+71
-15
71 additions, 15 deletions
src/MNH/write_diachro.f90
with
71 additions
and
15 deletions
src/MNH/write_diachro.f90
+
71
−
15
View file @
942dad2f
...
@@ -432,6 +432,9 @@ DO J = 1,IP
...
@@ -432,6 +432,9 @@ DO J = 1,IP
end
do
end
do
if
(
tzfield
%
ndimlist
(
4
)
==
NMNHDIM_FLYER_TIME
)
tzfield
%
ndimlist
(
4
)
=
NMNHDIM_NOTLISTED
if
(
tzfield
%
ndimlist
(
4
)
==
NMNHDIM_FLYER_TIME
)
tzfield
%
ndimlist
(
4
)
=
NMNHDIM_NOTLISTED
tzfield
%
ndimlist
(
6
:)
=
NMNHDIM_UNUSED
tzfield
%
ndimlist
(
6
:)
=
NMNHDIM_UNUSED
else
call
Print_msg
(
NVERB_ERROR
,
'IO'
,
'Write_diachro_lfi'
,
&
'some dimensions are unknown for variable '
//
trim
(
tpfields
(
1
)
%
cmnhname
)
)
end
if
end
if
YJ
=
' '
YJ
=
' '
...
@@ -627,7 +630,9 @@ integer, intent(in), optional :: kkl
...
@@ -627,7 +630,9 @@ integer, intent(in), optional :: kkl
character
(
len
=
3
)
::
ynum
character
(
len
=
3
)
::
ynum
integer
::
icompx
,
icompy
,
icompz
integer
::
icompx
,
icompy
,
icompz
integer
::
idims
integer
::
idims
integer
::
icount
integer
::
ji
integer
::
ji
integer
::
jp
integer
(
kind
=
CDFINT
)
::
isavencid
integer
(
kind
=
CDFINT
)
::
isavencid
integer
(
kind
=
CDFINT
)
::
idimid
integer
(
kind
=
CDFINT
)
::
idimid
integer
(
kind
=
CDFINT
)
::
igrpid
integer
(
kind
=
CDFINT
)
::
igrpid
...
@@ -643,7 +648,6 @@ real, dimension(:,:,:,:,:,:), allocatable :: zdata6d
...
@@ -643,7 +648,6 @@ real, dimension(:,:,:,:,:,:), allocatable :: zdata6d
type
(
tfielddata
)
::
tzfield
type
(
tfielddata
)
::
tzfield
type
(
tfiledata
)
::
tzfile
type
(
tfiledata
)
::
tzfile
if
(
trim
(
htype
)
==
'CART'
.or.
trim
(
htype
)
==
'MASK'
.or.
trim
(
htype
)
==
'SPXY'
)
then
if
(
trim
(
htype
)
==
'CART'
.or.
trim
(
htype
)
==
'MASK'
.or.
trim
(
htype
)
==
'SPXY'
)
then
if
(
.not.
Present
(
kil
)
.or.
.not.
Present
(
kih
)
&
if
(
.not.
Present
(
kil
)
.or.
.not.
Present
(
kih
)
&
.or.
.not.
Present
(
kjl
)
.or.
.not.
Present
(
kjh
)
&
.or.
.not.
Present
(
kjl
)
.or.
.not.
Present
(
kjh
)
&
...
@@ -655,6 +659,9 @@ end if
...
@@ -655,6 +659,9 @@ end if
tzfile
=
tpdiafile
tzfile
=
tpdiafile
!Write only in netCDF files
tzfile
%
cformat
=
'NETCDF4'
if
(
oicp
)
then
if
(
oicp
)
then
icompx
=
1
icompx
=
1
else
else
...
@@ -685,9 +692,6 @@ MASTER: if ( isp == tzfile%nmaster_rank) then
...
@@ -685,9 +692,6 @@ MASTER: if ( isp == tzfile%nmaster_rank) then
isavencid
=
tzfile
%
nncid
isavencid
=
tzfile
%
nncid
tzfile
%
nncid
=
igrpid
tzfile
%
nncid
=
igrpid
!Write only in netCDF files
tzfile
%
cformat
=
'NETCDF4'
istatus
=
NF90_PUT_ATT
(
igrpid
,
NF90_GLOBAL
,
'type'
,
trim
(
htype
)
)
istatus
=
NF90_PUT_ATT
(
igrpid
,
NF90_GLOBAL
,
'type'
,
trim
(
htype
)
)
if
(
istatus
/
=
NF90_NOERR
)
&
if
(
istatus
/
=
NF90_NOERR
)
&
call
IO_Err_handle_nc4
(
istatus
,
'Write_diachro_nc4'
,
'NF90_PUT_ATT'
,
'type for '
//
trim
(
hgroup
)//
' group'
)
call
IO_Err_handle_nc4
(
istatus
,
'Write_diachro_nc4'
,
'NF90_PUT_ATT'
,
'type for '
//
trim
(
hgroup
)//
' group'
)
...
@@ -736,24 +740,37 @@ MASTER: if ( isp == tzfile%nmaster_rank) then
...
@@ -736,24 +740,37 @@ MASTER: if ( isp == tzfile%nmaster_rank) then
end
if
MASTER
end
if
MASTER
if
(
Count
(
tpfields
(
1
)
%
ndimlist
(:)
==
NMNHDIM_UNKNOWN
)
/
=
0
)
&
call
Print_msg
(
NVERB_ERROR
,
'IO'
,
'Write_diachro_nc4'
,
&
'some dimensions are unknown for variable '
//
trim
(
tpfields
(
1
)
%
cmnhname
)
)
idims
=
Count
(
tpfields
(
1
)
%
ndimlist
(:)
/
=
NMNHDIM_UNUSED
)
!Determine the number of dimensions and do some verifications
do
jp
=
1
,
Size
(
tpfields
)
if
(
Any
(
tpfields
(
jp
)
%
ndimlist
(:)
==
NMNHDIM_UNKNOWN
)
)
&
call
Print_msg
(
NVERB_ERROR
,
'IO'
,
'Write_diachro_nc4'
,
&
'some dimensions are unknown for variable '
//
trim
(
tpfields
(
jp
)
%
cmnhname
)
)
if
(
tpfields
(
1
)
%
ndims
/
=
idims
)
&
icount
=
Count
(
tpfields
(
jp
)
%
ndimlist
(:)
/
=
NMNHDIM_UNUSED
)
call
Print_msg
(
NVERB_ERROR
,
'IO'
,
'Write_diachro_nc4'
,
&
'ndims is not coherent with ndimlist for variable '
//
trim
(
tpfields
(
1
)
%
cmnhname
)
)
do
ji
=
2
,
NMNHMAXDIMS
if
(
tpfields
(
jp
)
%
ndims
/
=
icount
)
&
if
(
tpfields
(
1
)
%
ndimlist
(
ji
)
==
NMNHDIM_UNKNOWN
)
then
call
Print_msg
(
NVERB_ERROR
,
'IO'
,
'Write_diachro_nc4'
,
&
call
Print_msg
(
NVERB_ERROR
,
'IO'
,
'Write_diachro_nc4'
,
&
'NMNHDIM_UNKNOWN for some dimensions of variable '
//
trim
(
tpfields
(
1
)
%
cmnhname
)
)
'ndims is not coherent with ndimlist for variable '
//
trim
(
tpfields
(
jp
)
%
cmnhname
)
)
idims
=
6
if
(
jp
==
1
)
then
idims
=
icount
else
if
(
idims
/
=
icount
)
&
call
Print_msg
(
NVERB_ERROR
,
'IO'
,
'Write_diachro_nc4'
,
&
'number of dimensions not the same for all tpfields for variable '
//
trim
(
tpfields
(
jp
)
%
cmnhname
)
)
end
if
end
if
end
do
end
do
!The dimension list should be the same for all tpfields entries
do
jp
=
2
,
Size
(
tpfields
)
do
ji
=
1
,
NMNHMAXDIMS
if
(
tpfields
(
jp
)
%
ndimlist
(
ji
)
/
=
tpfields
(
1
)
%
ndimlist
(
ji
)
)
&
call
Print_msg
(
NVERB_ERROR
,
'IO'
,
'Write_diachro_nc4'
,
&
'some dimensions are not the same for all tpfields entries for variable '
//
trim
(
tpfields
(
jp
)
%
cmnhname
)
)
end
do
end
do
!Check that if 'CART' and no horizontal compression, parameters are as expected
!Check that if 'CART' and no horizontal compression, parameters are as expected
if
(
htype
==
'CART'
.and.
.not.
oicp
.and.
.not.
ojcp
)
then
if
(
htype
==
'CART'
.and.
.not.
oicp
.and.
.not.
ojcp
)
then
if
(
idims
/
=
3
.and.
idims
/
=
4
)
then
if
(
idims
/
=
3
.and.
idims
/
=
4
)
then
...
@@ -799,6 +816,9 @@ select case ( idims )
...
@@ -799,6 +816,9 @@ select case ( idims )
CALL
IO_Field_write
(
tzfile
,
tzfield
,
zdata0d
)
CALL
IO_Field_write
(
tzfile
,
tzfield
,
zdata0d
)
case
(
1
)
case
(
1
)
if
(
Size
(
tpfields
)
/
=
1
)
call
Print_msg
(
NVERB_FATAL
,
'IO'
,
'Write_diachro_nc4'
,
&
'wrong size of tpfields (variable '
//
trim
(
tpfields
(
1
)
%
cmnhname
)//
')'
)
if
(
tpfields
(
1
)
%
ndimlist
(
4
)
==
NMNHDIM_BUDGET_LES_TIME
.or.
tpfields
(
1
)
%
ndimlist
(
4
)
==
NMNHDIM_BUDGET_LES_AVG_TIME
)
then
if
(
tpfields
(
1
)
%
ndimlist
(
4
)
==
NMNHDIM_BUDGET_LES_TIME
.or.
tpfields
(
1
)
%
ndimlist
(
4
)
==
NMNHDIM_BUDGET_LES_AVG_TIME
)
then
tzfield
%
ndimlist
(
1
)
=
tpfields
(
1
)
%
ndimlist
(
4
)
tzfield
%
ndimlist
(
1
)
=
tpfields
(
1
)
%
ndimlist
(
4
)
tzfield
%
ndimlist
(
2
:)
=
NMNHDIM_UNUSED
tzfield
%
ndimlist
(
2
:)
=
NMNHDIM_UNUSED
...
@@ -911,6 +931,9 @@ select case ( idims )
...
@@ -911,6 +931,9 @@ select case ( idims )
tpfields
(
1
)
%
ndimlist
(
2
)
==
NMNHDIM_NJ_V
.or.
tpfields
(
1
)
%
ndimlist
(
2
)
==
NMNHDIM_BUDGET_CART_NJ
.or.
&
tpfields
(
1
)
%
ndimlist
(
2
)
==
NMNHDIM_NJ_V
.or.
tpfields
(
1
)
%
ndimlist
(
2
)
==
NMNHDIM_BUDGET_CART_NJ
.or.
&
tpfields
(
1
)
%
ndimlist
(
2
)
==
NMNHDIM_BUDGET_CART_NJ_U
&
tpfields
(
1
)
%
ndimlist
(
2
)
==
NMNHDIM_BUDGET_CART_NJ_U
&
.or.
tpfields
(
1
)
%
ndimlist
(
2
)
==
NMNHDIM_BUDGET_CART_NJ_V
)
)
then
.or.
tpfields
(
1
)
%
ndimlist
(
2
)
==
NMNHDIM_BUDGET_CART_NJ_V
)
)
then
if
(
Size
(
tpfields
)
/
=
1
)
call
Print_msg
(
NVERB_FATAL
,
'IO'
,
'Write_diachro_nc4'
,
&
'wrong size of tpfields (variable '
//
trim
(
tpfields
(
1
)
%
cmnhname
)//
')'
)
tzfield
%
ndimlist
(
1
)
=
tpfields
(
1
)
%
ndimlist
(
1
)
tzfield
%
ndimlist
(
1
)
=
tpfields
(
1
)
%
ndimlist
(
1
)
tzfield
%
ndimlist
(
2
)
=
tpfields
(
1
)
%
ndimlist
(
2
)
tzfield
%
ndimlist
(
2
)
=
tpfields
(
1
)
%
ndimlist
(
2
)
tzfield
%
ndimlist
(
3
:)
=
NMNHDIM_UNUSED
tzfield
%
ndimlist
(
3
:)
=
NMNHDIM_UNUSED
...
@@ -940,6 +963,9 @@ select case ( idims )
...
@@ -940,6 +963,9 @@ select case ( idims )
.and.
(
tpfields
(
1
)
%
ndimlist
(
3
)
==
NMNHDIM_LEVEL
.or.
tpfields
(
1
)
%
ndimlist
(
3
)
==
NMNHDIM_LEVEL_W
&
.and.
(
tpfields
(
1
)
%
ndimlist
(
3
)
==
NMNHDIM_LEVEL
.or.
tpfields
(
1
)
%
ndimlist
(
3
)
==
NMNHDIM_LEVEL_W
&
.or.
tpfields
(
1
)
%
ndimlist
(
3
)
==
NMNHDIM_BUDGET_CART_LEVEL
&
.or.
tpfields
(
1
)
%
ndimlist
(
3
)
==
NMNHDIM_BUDGET_CART_LEVEL
&
.or.
tpfields
(
1
)
%
ndimlist
(
3
)
==
NMNHDIM_BUDGET_CART_LEVEL_W
)
)
then
.or.
tpfields
(
1
)
%
ndimlist
(
3
)
==
NMNHDIM_BUDGET_CART_LEVEL_W
)
)
then
if
(
Size
(
tpfields
)
/
=
1
)
call
Print_msg
(
NVERB_FATAL
,
'IO'
,
'Write_diachro_nc4'
,
&
'wrong size of tpfields (variable '
//
trim
(
tpfields
(
1
)
%
cmnhname
)//
')'
)
tzfield
%
ndimlist
(
1
)
=
tpfields
(
1
)
%
ndimlist
(
1
)
tzfield
%
ndimlist
(
1
)
=
tpfields
(
1
)
%
ndimlist
(
1
)
tzfield
%
ndimlist
(
2
)
=
tpfields
(
1
)
%
ndimlist
(
3
)
tzfield
%
ndimlist
(
2
)
=
tpfields
(
1
)
%
ndimlist
(
3
)
tzfield
%
ndimlist
(
3
:)
=
NMNHDIM_UNUSED
tzfield
%
ndimlist
(
3
:)
=
NMNHDIM_UNUSED
...
@@ -969,6 +995,9 @@ select case ( idims )
...
@@ -969,6 +995,9 @@ select case ( idims )
.and.
(
tpfields
(
1
)
%
ndimlist
(
3
)
==
NMNHDIM_LEVEL
.or.
tpfields
(
1
)
%
ndimlist
(
3
)
==
NMNHDIM_LEVEL_W
&
.and.
(
tpfields
(
1
)
%
ndimlist
(
3
)
==
NMNHDIM_LEVEL
.or.
tpfields
(
1
)
%
ndimlist
(
3
)
==
NMNHDIM_LEVEL_W
&
.or.
tpfields
(
1
)
%
ndimlist
(
3
)
==
NMNHDIM_BUDGET_CART_LEVEL
&
.or.
tpfields
(
1
)
%
ndimlist
(
3
)
==
NMNHDIM_BUDGET_CART_LEVEL
&
.or.
tpfields
(
1
)
%
ndimlist
(
3
)
==
NMNHDIM_BUDGET_CART_LEVEL_W
)
)
then
.or.
tpfields
(
1
)
%
ndimlist
(
3
)
==
NMNHDIM_BUDGET_CART_LEVEL_W
)
)
then
if
(
Size
(
tpfields
)
/
=
1
)
call
Print_msg
(
NVERB_FATAL
,
'IO'
,
'Write_diachro_nc4'
,
&
'wrong size of tpfields (variable '
//
trim
(
tpfields
(
1
)
%
cmnhname
)//
')'
)
tzfield
%
ndimlist
(
1
)
=
tpfields
(
1
)
%
ndimlist
(
2
)
tzfield
%
ndimlist
(
1
)
=
tpfields
(
1
)
%
ndimlist
(
2
)
tzfield
%
ndimlist
(
2
)
=
tpfields
(
1
)
%
ndimlist
(
3
)
tzfield
%
ndimlist
(
2
)
=
tpfields
(
1
)
%
ndimlist
(
3
)
tzfield
%
ndimlist
(
3
:)
=
NMNHDIM_UNUSED
tzfield
%
ndimlist
(
3
:)
=
NMNHDIM_UNUSED
...
@@ -994,6 +1023,9 @@ select case ( idims )
...
@@ -994,6 +1023,9 @@ select case ( idims )
else
if
(
tpfields
(
1
)
%
ndimlist
(
3
)
==
NMNHDIM_BUDGET_LES_LEVEL
&
else
if
(
tpfields
(
1
)
%
ndimlist
(
3
)
==
NMNHDIM_BUDGET_LES_LEVEL
&
.and.
(
tpfields
(
1
)
%
ndimlist
(
4
)
==
NMNHDIM_BUDGET_LES_TIME
&
.and.
(
tpfields
(
1
)
%
ndimlist
(
4
)
==
NMNHDIM_BUDGET_LES_TIME
&
.or.
tpfields
(
1
)
%
ndimlist
(
4
)
==
NMNHDIM_BUDGET_LES_AVG_TIME
)
)
then
.or.
tpfields
(
1
)
%
ndimlist
(
4
)
==
NMNHDIM_BUDGET_LES_AVG_TIME
)
)
then
if
(
Size
(
tpfields
)
/
=
1
)
call
Print_msg
(
NVERB_FATAL
,
'IO'
,
'Write_diachro_nc4'
,
&
'wrong size of tpfields (variable '
//
trim
(
tpfields
(
1
)
%
cmnhname
)//
')'
)
tzfield
%
ndimlist
(
1
)
=
tpfields
(
1
)
%
ndimlist
(
3
)
tzfield
%
ndimlist
(
1
)
=
tpfields
(
1
)
%
ndimlist
(
3
)
tzfield
%
ndimlist
(
2
)
=
tpfields
(
1
)
%
ndimlist
(
4
)
tzfield
%
ndimlist
(
2
)
=
tpfields
(
1
)
%
ndimlist
(
4
)
tzfield
%
ndimlist
(
3
:)
=
NMNHDIM_UNUSED
tzfield
%
ndimlist
(
3
:)
=
NMNHDIM_UNUSED
...
@@ -1019,6 +1051,9 @@ select case ( idims )
...
@@ -1019,6 +1051,9 @@ select case ( idims )
else
if
(
(
tpfields
(
1
)
%
ndimlist
(
4
)
==
NMNHDIM_BUDGET_LES_TIME
&
else
if
(
(
tpfields
(
1
)
%
ndimlist
(
4
)
==
NMNHDIM_BUDGET_LES_TIME
&
.or.
tpfields
(
1
)
%
ndimlist
(
4
)
==
NMNHDIM_BUDGET_LES_AVG_TIME
)
&
.or.
tpfields
(
1
)
%
ndimlist
(
4
)
==
NMNHDIM_BUDGET_LES_AVG_TIME
)
&
.and.
tpfields
(
1
)
%
ndimlist
(
5
)
==
NMNHDIM_BUDGET_LES_SV
)
then
.and.
tpfields
(
1
)
%
ndimlist
(
5
)
==
NMNHDIM_BUDGET_LES_SV
)
then
if
(
Size
(
tpfields
)
/
=
1
)
call
Print_msg
(
NVERB_FATAL
,
'IO'
,
'Write_diachro_nc4'
,
&
'wrong size of tpfields (variable '
//
trim
(
tpfields
(
1
)
%
cmnhname
)//
')'
)
tzfield
%
ndimlist
(
1
)
=
tpfields
(
1
)
%
ndimlist
(
4
)
tzfield
%
ndimlist
(
1
)
=
tpfields
(
1
)
%
ndimlist
(
4
)
tzfield
%
ndimlist
(
2
)
=
tpfields
(
1
)
%
ndimlist
(
5
)
tzfield
%
ndimlist
(
2
)
=
tpfields
(
1
)
%
ndimlist
(
5
)
tzfield
%
ndimlist
(
3
:)
=
NMNHDIM_UNUSED
tzfield
%
ndimlist
(
3
:)
=
NMNHDIM_UNUSED
...
@@ -1146,6 +1181,9 @@ select case ( idims )
...
@@ -1146,6 +1181,9 @@ select case ( idims )
.and.
(
tpfields
(
1
)
%
ndimlist
(
3
)
==
NMNHDIM_LEVEL
.or.
tpfields
(
1
)
%
ndimlist
(
3
)
==
NMNHDIM_LEVEL_W
&
.and.
(
tpfields
(
1
)
%
ndimlist
(
3
)
==
NMNHDIM_LEVEL
.or.
tpfields
(
1
)
%
ndimlist
(
3
)
==
NMNHDIM_LEVEL_W
&
.or.
tpfields
(
1
)
%
ndimlist
(
3
)
==
NMNHDIM_BUDGET_CART_LEVEL
&
.or.
tpfields
(
1
)
%
ndimlist
(
3
)
==
NMNHDIM_BUDGET_CART_LEVEL
&
.or.
tpfields
(
1
)
%
ndimlist
(
3
)
==
NMNHDIM_BUDGET_CART_LEVEL_W
)
)
then
.or.
tpfields
(
1
)
%
ndimlist
(
3
)
==
NMNHDIM_BUDGET_CART_LEVEL_W
)
)
then
if
(
Size
(
tpfields
)
/
=
1
)
call
Print_msg
(
NVERB_FATAL
,
'IO'
,
'Write_diachro_nc4'
,
&
'wrong size of tpfields (variable '
//
trim
(
tpfields
(
1
)
%
cmnhname
)//
')'
)
tzfield
%
ndimlist
(
1
)
=
tpfields
(
1
)
%
ndimlist
(
1
)
tzfield
%
ndimlist
(
1
)
=
tpfields
(
1
)
%
ndimlist
(
1
)
tzfield
%
ndimlist
(
2
)
=
tpfields
(
1
)
%
ndimlist
(
2
)
tzfield
%
ndimlist
(
2
)
=
tpfields
(
1
)
%
ndimlist
(
2
)
tzfield
%
ndimlist
(
3
)
=
tpfields
(
1
)
%
ndimlist
(
3
)
tzfield
%
ndimlist
(
3
)
=
tpfields
(
1
)
%
ndimlist
(
3
)
...
@@ -1181,6 +1219,9 @@ select case ( idims )
...
@@ -1181,6 +1219,9 @@ select case ( idims )
.and.
tpfields
(
1
)
%
ndimlist
(
4
)
==
NMNHDIM_BUDGET_MASK_TIME
&
.and.
tpfields
(
1
)
%
ndimlist
(
4
)
==
NMNHDIM_BUDGET_MASK_TIME
&
.and.
tpfields
(
1
)
%
ndimlist
(
5
)
==
NMNHDIM_BUDGET_MASK_NBUMASK
)
then
.and.
tpfields
(
1
)
%
ndimlist
(
5
)
==
NMNHDIM_BUDGET_MASK_NBUMASK
)
then
!Correspond to Store_one_budget_rho (MASK)
!Correspond to Store_one_budget_rho (MASK)
if
(
Size
(
tpfields
)
/
=
1
)
call
Print_msg
(
NVERB_FATAL
,
'IO'
,
'Write_diachro_nc4'
,
&
'wrong size of tpfields (variable '
//
trim
(
tpfields
(
1
)
%
cmnhname
)//
')'
)
tzfield
%
ndimlist
(
1
)
=
tpfields
(
1
)
%
ndimlist
(
3
)
tzfield
%
ndimlist
(
1
)
=
tpfields
(
1
)
%
ndimlist
(
3
)
tzfield
%
ndimlist
(
2
)
=
tpfields
(
1
)
%
ndimlist
(
4
)
tzfield
%
ndimlist
(
2
)
=
tpfields
(
1
)
%
ndimlist
(
4
)
tzfield
%
ndimlist
(
3
)
=
tpfields
(
1
)
%
ndimlist
(
5
)
tzfield
%
ndimlist
(
3
)
=
tpfields
(
1
)
%
ndimlist
(
5
)
...
@@ -1268,6 +1309,9 @@ select case ( idims )
...
@@ -1268,6 +1309,9 @@ select case ( idims )
.and.
(
tpfields
(
1
)
%
ndimlist
(
4
)
==
NMNHDIM_BUDGET_LES_TIME
&
.and.
(
tpfields
(
1
)
%
ndimlist
(
4
)
==
NMNHDIM_BUDGET_LES_TIME
&
.or.
tpfields
(
1
)
%
ndimlist
(
4
)
==
NMNHDIM_BUDGET_LES_AVG_TIME
)
&
.or.
tpfields
(
1
)
%
ndimlist
(
4
)
==
NMNHDIM_BUDGET_LES_AVG_TIME
)
&
.and.
tpfields
(
1
)
%
ndimlist
(
5
)
==
NMNHDIM_BUDGET_LES_SV
)
then
.and.
tpfields
(
1
)
%
ndimlist
(
5
)
==
NMNHDIM_BUDGET_LES_SV
)
then
if
(
Size
(
tpfields
)
/
=
1
)
call
Print_msg
(
NVERB_FATAL
,
'IO'
,
'Write_diachro_nc4'
,
&
'wrong size of tpfields (variable '
//
trim
(
tpfields
(
1
)
%
cmnhname
)//
')'
)
!Correspond to Les_diachro_sv_new
!Correspond to Les_diachro_sv_new
tzfield
%
ndimlist
(
1
)
=
tpfields
(
1
)
%
ndimlist
(
3
)
tzfield
%
ndimlist
(
1
)
=
tpfields
(
1
)
%
ndimlist
(
3
)
tzfield
%
ndimlist
(
2
)
=
tpfields
(
1
)
%
ndimlist
(
4
)
tzfield
%
ndimlist
(
2
)
=
tpfields
(
1
)
%
ndimlist
(
4
)
...
@@ -1295,6 +1339,9 @@ select case ( idims )
...
@@ -1295,6 +1339,9 @@ select case ( idims )
.and.
tpfields
(
1
)
%
ndimlist
(
3
)
==
NMNHDIM_SPECTRA_LEVEL
&
.and.
tpfields
(
1
)
%
ndimlist
(
3
)
==
NMNHDIM_SPECTRA_LEVEL
&
.and.
(
tpfields
(
1
)
%
ndimlist
(
4
)
==
NMNHDIM_BUDGET_LES_TIME
&
.and.
(
tpfields
(
1
)
%
ndimlist
(
4
)
==
NMNHDIM_BUDGET_LES_TIME
&
.or.
tpfields
(
1
)
%
ndimlist
(
4
)
==
NMNHDIM_BUDGET_LES_AVG_TIME
)
)
then
.or.
tpfields
(
1
)
%
ndimlist
(
4
)
==
NMNHDIM_BUDGET_LES_AVG_TIME
)
)
then
if
(
Size
(
tpfields
)
/
=
1
)
call
Print_msg
(
NVERB_FATAL
,
'IO'
,
'Write_diachro_nc4'
,
&
'wrong size of tpfields (variable '
//
trim
(
tpfields
(
1
)
%
cmnhname
)//
')'
)
tzfield
%
ndimlist
(
1
)
=
tpfields
(
1
)
%
ndimlist
(
1
)
tzfield
%
ndimlist
(
1
)
=
tpfields
(
1
)
%
ndimlist
(
1
)
tzfield
%
ndimlist
(
2
)
=
tpfields
(
1
)
%
ndimlist
(
3
)
tzfield
%
ndimlist
(
2
)
=
tpfields
(
1
)
%
ndimlist
(
3
)
tzfield
%
ndimlist
(
3
)
=
tpfields
(
1
)
%
ndimlist
(
4
)
tzfield
%
ndimlist
(
3
)
=
tpfields
(
1
)
%
ndimlist
(
4
)
...
@@ -1321,6 +1368,9 @@ select case ( idims )
...
@@ -1321,6 +1368,9 @@ select case ( idims )
.and.
tpfields
(
1
)
%
ndimlist
(
3
)
==
NMNHDIM_SPECTRA_LEVEL
&
.and.
tpfields
(
1
)
%
ndimlist
(
3
)
==
NMNHDIM_SPECTRA_LEVEL
&
.and.
(
tpfields
(
1
)
%
ndimlist
(
4
)
==
NMNHDIM_BUDGET_LES_TIME
&
.and.
(
tpfields
(
1
)
%
ndimlist
(
4
)
==
NMNHDIM_BUDGET_LES_TIME
&
.or.
tpfields
(
1
)
%
ndimlist
(
4
)
==
NMNHDIM_BUDGET_LES_AVG_TIME
)
)
then
.or.
tpfields
(
1
)
%
ndimlist
(
4
)
==
NMNHDIM_BUDGET_LES_AVG_TIME
)
)
then
if
(
Size
(
tpfields
)
/
=
1
)
call
Print_msg
(
NVERB_FATAL
,
'IO'
,
'Write_diachro_nc4'
,
&
'wrong size of tpfields (variable '
//
trim
(
tpfields
(
1
)
%
cmnhname
)//
')'
)
tzfield
%
ndimlist
(
1
)
=
tpfields
(
1
)
%
ndimlist
(
2
)
tzfield
%
ndimlist
(
1
)
=
tpfields
(
1
)
%
ndimlist
(
2
)
tzfield
%
ndimlist
(
2
)
=
tpfields
(
1
)
%
ndimlist
(
3
)
tzfield
%
ndimlist
(
2
)
=
tpfields
(
1
)
%
ndimlist
(
3
)
tzfield
%
ndimlist
(
3
)
=
tpfields
(
1
)
%
ndimlist
(
4
)
tzfield
%
ndimlist
(
3
)
=
tpfields
(
1
)
%
ndimlist
(
4
)
...
@@ -1616,6 +1666,9 @@ select case ( idims )
...
@@ -1616,6 +1666,9 @@ select case ( idims )
.or.
tpfields
(
1
)
%
ndimlist
(
4
)
==
NMNHDIM_BUDGET_LES_AVG_TIME
)
&
.or.
tpfields
(
1
)
%
ndimlist
(
4
)
==
NMNHDIM_BUDGET_LES_AVG_TIME
)
&
.and.
tpfields
(
1
)
%
ndimlist
(
5
)
==
NMNHDIM_COMPLEX
)
then
.and.
tpfields
(
1
)
%
ndimlist
(
5
)
==
NMNHDIM_COMPLEX
)
then
!Correspond to LES_DIACHRO_SPEC
!Correspond to LES_DIACHRO_SPEC
if
(
Size
(
tpfields
)
/
=
1
)
call
Print_msg
(
NVERB_FATAL
,
'IO'
,
'Write_diachro_nc4'
,
&
'wrong size of tpfields (variable '
//
trim
(
tpfields
(
1
)
%
cmnhname
)//
')'
)
tzfield
%
ndimlist
(
1
)
=
tpfields
(
1
)
%
ndimlist
(
1
)
tzfield
%
ndimlist
(
1
)
=
tpfields
(
1
)
%
ndimlist
(
1
)
tzfield
%
ndimlist
(
2
)
=
tpfields
(
1
)
%
ndimlist
(
3
)
tzfield
%
ndimlist
(
2
)
=
tpfields
(
1
)
%
ndimlist
(
3
)
tzfield
%
ndimlist
(
3
)
=
tpfields
(
1
)
%
ndimlist
(
4
)
tzfield
%
ndimlist
(
3
)
=
tpfields
(
1
)
%
ndimlist
(
4
)
...
@@ -1645,6 +1698,9 @@ select case ( idims )
...
@@ -1645,6 +1698,9 @@ select case ( idims )
.or.
tpfields
(
1
)
%
ndimlist
(
4
)
==
NMNHDIM_BUDGET_LES_AVG_TIME
)
&
.or.
tpfields
(
1
)
%
ndimlist
(
4
)
==
NMNHDIM_BUDGET_LES_AVG_TIME
)
&
.and.
tpfields
(
1
)
%
ndimlist
(
5
)
==
NMNHDIM_COMPLEX
)
then
.and.
tpfields
(
1
)
%
ndimlist
(
5
)
==
NMNHDIM_COMPLEX
)
then
!Correspond to LES_DIACHRO_SPEC
!Correspond to LES_DIACHRO_SPEC
if
(
Size
(
tpfields
)
/
=
1
)
call
Print_msg
(
NVERB_FATAL
,
'IO'
,
'Write_diachro_nc4'
,
&
'wrong size of tpfields (variable '
//
trim
(
tpfields
(
1
)
%
cmnhname
)//
')'
)
tzfield
%
ndimlist
(
1
)
=
tpfields
(
1
)
%
ndimlist
(
2
)
tzfield
%
ndimlist
(
1
)
=
tpfields
(
1
)
%
ndimlist
(
2
)
tzfield
%
ndimlist
(
2
)
=
tpfields
(
1
)
%
ndimlist
(
3
)
tzfield
%
ndimlist
(
2
)
=
tpfields
(
1
)
%
ndimlist
(
3
)
tzfield
%
ndimlist
(
3
)
=
tpfields
(
1
)
%
ndimlist
(
4
)
tzfield
%
ndimlist
(
3
)
=
tpfields
(
1
)
%
ndimlist
(
4
)
...
...
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