Skip to content
Snippets Groups Projects
Commit 624b9bed authored by WAUTELET Philippe's avatar WAUTELET Philippe
Browse files

Philippe 25/09/2020: add new parameters for dimensions

parent ac64663d
No related branches found
No related tags found
No related merge requests found
...@@ -16,7 +16,7 @@ module modd_field ...@@ -16,7 +16,7 @@ module modd_field
use modd_parameters, only: NGRIDUNKNOWN, NMNHNAMELGTMAX, NSTDNAMELGTMAX use modd_parameters, only: NGRIDUNKNOWN, NMNHNAMELGTMAX, NSTDNAMELGTMAX
use modd_type_date, only: date_time use modd_type_date, only: date_time
#if defined(MNH_IOCDF4) #ifdef MNH_IOCDF4
use NETCDF, only: NF90_FILL_INT, NF90_FILL_REAL use NETCDF, only: NF90_FILL_INT, NF90_FILL_REAL
#endif #endif
...@@ -27,31 +27,48 @@ INTEGER,PARAMETER :: MAXFIELDS = 250 ...@@ -27,31 +27,48 @@ INTEGER,PARAMETER :: MAXFIELDS = 250
INTEGER,PARAMETER :: TYPEUNDEF = -1, TYPEINT = 1, TYPELOG = 2, TYPEREAL = 3, TYPECHAR = 4, TYPEDATE = 5 INTEGER,PARAMETER :: TYPEUNDEF = -1, TYPEINT = 1, TYPELOG = 2, TYPEREAL = 3, TYPECHAR = 4, TYPEDATE = 5
! !
integer, parameter :: NMNHDIM_UNKNOWN = -2 integer, parameter :: NMNHDIM_UNKNOWN = -2
integer, parameter :: NMNHDIM_ONE = 10 integer, parameter :: NMNHDIM_ONE = 10
integer, parameter :: NMNHDIM_COMPLEX = 11 integer, parameter :: NMNHDIM_COMPLEX = 11
integer, parameter :: NMNHDIM_BUDGET_CART_NI = 20
integer, parameter :: NMNHDIM_BUDGET_CART_NJ = 21 integer, parameter :: NMNHDIM_NI = 21
integer, parameter :: NMNHDIM_BUDGET_CART_NI_U = 22 integer, parameter :: NMNHDIM_NJ = 22
integer, parameter :: NMNHDIM_BUDGET_CART_NJ_U = 23 integer, parameter :: NMNHDIM_NI_U = 23
integer, parameter :: NMNHDIM_BUDGET_CART_NI_V = 24 integer, parameter :: NMNHDIM_NJ_U = 24
integer, parameter :: NMNHDIM_BUDGET_CART_NJ_V = 25 integer, parameter :: NMNHDIM_NI_V = 25
integer, parameter :: NMNHDIM_BUDGET_CART_LEVEL = 26 integer, parameter :: NMNHDIM_NJ_V = 26
integer, parameter :: NMNHDIM_BUDGET_CART_LEVEL_W = 27 integer, parameter :: NMNHDIM_LEVEL = 27
integer, parameter :: NMNHDIM_BUDGET_MASK_LEVEL = 30 integer, parameter :: NMNHDIM_LEVEL_W = 28
integer, parameter :: NMNHDIM_BUDGET_MASK_LEVEL_W = 31 integer, parameter :: NMNHDIM_TIME = 29
integer, parameter :: NMNHDIM_BUDGET_MASK_TIME = 32
integer, parameter :: NMNHDIM_BUDGET_MASK_NBUMASK = 33 integer, parameter :: NMNHDIM_BUDGET_CART_NI = 30
integer, parameter :: NMNHDIM_BUDGET_LES_TIME = 40 integer, parameter :: NMNHDIM_BUDGET_CART_NJ = 31
integer, parameter :: NMNHDIM_BUDGET_LES_AVG_TIME = 41 integer, parameter :: NMNHDIM_BUDGET_CART_NI_U = 32
integer, parameter :: NMNHDIM_BUDGET_LES_LEVEL = 42 integer, parameter :: NMNHDIM_BUDGET_CART_NJ_U = 33
integer, parameter :: NMNHDIM_BUDGET_LES_SV = 43 integer, parameter :: NMNHDIM_BUDGET_CART_NI_V = 34
integer, parameter :: NMNHDIM_BUDGET_LES_MASK = 44 integer, parameter :: NMNHDIM_BUDGET_CART_NJ_V = 35
integer, parameter :: NMNHDIM_SPECTRA_2PTS_NI = 50 integer, parameter :: NMNHDIM_BUDGET_CART_LEVEL = 36
integer, parameter :: NMNHDIM_SPECTRA_2PTS_NJ = 51 integer, parameter :: NMNHDIM_BUDGET_CART_LEVEL_W = 37
integer, parameter :: NMNHDIM_SPECTRA_SPEC_NI = 52
integer, parameter :: NMNHDIM_SPECTRA_SPEC_NJ = 53 integer, parameter :: NMNHDIM_BUDGET_MASK_LEVEL = 40
integer, parameter :: NMNHDIM_SPECTRA_LEVEL = 54 integer, parameter :: NMNHDIM_BUDGET_MASK_LEVEL_W = 41
integer, parameter :: NMNHDIM_BUDGET_MASK_TIME = 42
integer, parameter :: NMNHDIM_BUDGET_MASK_NBUMASK = 43
integer, parameter :: NMNHDIM_BUDGET_LES_TIME = 50
integer, parameter :: NMNHDIM_BUDGET_LES_AVG_TIME = 51
integer, parameter :: NMNHDIM_BUDGET_LES_LEVEL = 52
integer, parameter :: NMNHDIM_BUDGET_LES_SV = 53
integer, parameter :: NMNHDIM_BUDGET_LES_MASK = 54
integer, parameter :: NMNHDIM_SPECTRA_2PTS_NI = 60
integer, parameter :: NMNHDIM_SPECTRA_2PTS_NJ = 61
integer, parameter :: NMNHDIM_SPECTRA_SPEC_NI = 62
integer, parameter :: NMNHDIM_SPECTRA_SPEC_NJ = 63
integer, parameter :: NMNHDIM_SPECTRA_LEVEL = 64
integer, parameter :: NMNHDIM_BUDGET_NGROUPS = 100 ! This is not a true dimension integer, parameter :: NMNHDIM_BUDGET_NGROUPS = 100 ! This is not a true dimension
integer, parameter :: NMNHDIM_UNUSED = 200 integer, parameter :: NMNHDIM_UNUSED = 200
! !
TYPE TFIELDPTR_C0D TYPE TFIELDPTR_C0D
...@@ -133,7 +150,7 @@ type, abstract :: tfield_metadata_base ...@@ -133,7 +150,7 @@ type, abstract :: tfield_metadata_base
INTEGER :: NDIMS = 0 !Number of dimensions INTEGER :: NDIMS = 0 !Number of dimensions
INTEGER, DIMENSION(NMNHMAXDIMS) :: NDIMLIST = NMNHDIM_UNKNOWN ! List of dimensions of the data field INTEGER, DIMENSION(NMNHMAXDIMS) :: NDIMLIST = NMNHDIM_UNKNOWN ! List of dimensions of the data field
! !
#if defined(MNH_IOCDF4) #ifdef MNH_IOCDF4
INTEGER :: NFILLVALUE = NF90_FILL_INT !Fill value for integer fields INTEGER :: NFILLVALUE = NF90_FILL_INT !Fill value for integer fields
REAL :: XFILLVALUE = NF90_FILL_REAL !Fill value for real fields REAL :: XFILLVALUE = NF90_FILL_REAL !Fill value for real fields
!NF90_FILL_REAL is the default fill value !NF90_FILL_REAL is the default fill value
......
...@@ -446,6 +446,8 @@ END SUBROUTINE IO_Iocdf_dealloc_nc4 ...@@ -446,6 +446,8 @@ END SUBROUTINE IO_Iocdf_dealloc_nc4
SUBROUTINE IO_Vdims_fill_nc4(TPFILE, TPFIELD, KSHAPE, KVDIMS) SUBROUTINE IO_Vdims_fill_nc4(TPFILE, TPFIELD, KSHAPE, KVDIMS)
use modd_field, only: NMNHDIM_UNKNOWN, NMNHDIM_ONE, NMNHDIM_COMPLEX, & use modd_field, only: NMNHDIM_UNKNOWN, NMNHDIM_ONE, NMNHDIM_COMPLEX, &
NMNHDIM_NI, NMNHDIM_NJ, NMNHDIM_NI_U, NMNHDIM_NJ_U, NMNHDIM_NI_V, NMNHDIM_NJ_V, &
NMNHDIM_LEVEL, NMNHDIM_LEVEL_W, NMNHDIM_TIME, &
NMNHDIM_BUDGET_CART_NI, NMNHDIM_BUDGET_CART_NJ, NMNHDIM_BUDGET_CART_NI_U, & NMNHDIM_BUDGET_CART_NI, NMNHDIM_BUDGET_CART_NJ, NMNHDIM_BUDGET_CART_NI_U, &
NMNHDIM_BUDGET_CART_NJ_U, NMNHDIM_BUDGET_CART_NI_V, NMNHDIM_BUDGET_CART_NJ_V, & NMNHDIM_BUDGET_CART_NJ_U, NMNHDIM_BUDGET_CART_NI_V, NMNHDIM_BUDGET_CART_NJ_V, &
NMNHDIM_BUDGET_CART_LEVEL, NMNHDIM_BUDGET_CART_LEVEL_W, & NMNHDIM_BUDGET_CART_LEVEL, NMNHDIM_BUDGET_CART_LEVEL_W, &
...@@ -515,6 +517,33 @@ if ( Any( tpfield%ndimlist(:) /= NMNHDIM_UNKNOWN ) ) then ...@@ -515,6 +517,33 @@ if ( Any( tpfield%ndimlist(:) /= NMNHDIM_UNKNOWN ) ) then
case ( NMNHDIM_COMPLEX ) case ( NMNHDIM_COMPLEX )
ydimname = 'real_imaginary' ydimname = 'real_imaginary'
case ( NMNHDIM_NI )
ydimname = 'ni'
case ( NMNHDIM_NJ )
ydimname = 'nj'
case ( NMNHDIM_NI_U )
ydimname = 'ni_u'
case ( NMNHDIM_NJ_U )
ydimname = 'nj_u'
case ( NMNHDIM_NI_V )
ydimname = 'ni_v'
case ( NMNHDIM_NJ_V )
ydimname = 'nj_v'
case ( NMNHDIM_LEVEL )
ydimname = 'level'
case ( NMNHDIM_LEVEL_W )
ydimname = 'level_w'
case ( NMNHDIM_TIME )
ydimname = 'time'
case ( NMNHDIM_BUDGET_CART_NI ) case ( NMNHDIM_BUDGET_CART_NI )
ydimname = 'cart_ni' ydimname = 'cart_ni'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment