diff --git a/src/MNH/mode_les_diachro.f90 b/src/MNH/mode_les_diachro.f90 index 489e35fff4e8ad548ef17e16612b2b65d6ac4d08..ba8129e71e08250d057c7b5fa3b7956fc726ceec 100644 --- a/src/MNH/mode_les_diachro.f90 +++ b/src/MNH/mode_les_diachro.f90 @@ -1077,6 +1077,7 @@ if ( iresp == 0 .and. any( zfield /= XUNDEF ) ) then tzbudiachro%lleveluse(NLVL_NORM) = .true. if ( onorm ) then tzbudiachro%clevels (NLVL_NORM) = 'Normalized' + !Type of normalization is stored in the attribute "normalization" in Write_diachro tzbudiachro%ccomments(NLVL_NORM) = 'Values are normalized' else tzbudiachro%clevels (NLVL_NORM) = 'Not normalized' @@ -1104,6 +1105,10 @@ if ( iresp == 0 .and. any( zfield /= XUNDEF ) ) then tzbudiachro%nih = iih tzbudiachro%njl = ijl tzbudiachro%njh = ijh + !nkl and nkh values have no real meaning here except if all levels from ikl to ikh are used (and are correctly ordered) + !and if xles_altitudes is not used + !These values are not written in the netCDF files + !These values are written in the LFI files. They are kept for backward compatibility (and not set to default values) tzbudiachro%nkl = ikl tzbudiachro%nkh = ikh @@ -1122,6 +1127,8 @@ if ( iresp == 0 .and. any( zfield /= XUNDEF ) ) then call Write_diachro( tpdiafile, tzbudiachro, [ tzfields(jp) ], tzdates, zwork6(:,:,:,:,:,jp:jp) ) end do else + !Set to the same value ('cart') than for the fields with no mask in Write_les_n + !to put the fields in the same position of the netCDF file tzbudiachro%clevels(NLVL_MASK) = 'cart' call Write_diachro( tpdiafile, tzbudiachro, tzfields, tzdates, zwork6 ) @@ -1320,6 +1327,9 @@ else tzbudiachro%cdirection = 'J' end if tzbudiachro%lmobile = .false. +!i/j/k compression has no meaning here as it is 2-point correlations +!These values are not written in the netCDF files +!These values are written in the LFI files. They are kept for backward compatibility with these values tzbudiachro%licompress = .false. tzbudiachro%ljcompress = .false. tzbudiachro%lkcompress = .false. @@ -1329,6 +1339,9 @@ tzbudiachro%nil = iil tzbudiachro%nih = iih tzbudiachro%njl = ijl tzbudiachro%njh = ijh +!nkl and nkh values have no real meaning here +!These values are not written in the netCDF files +!These values are written in the LFI files. They are kept for backward compatibility (and not set to default values) tzbudiachro%nkl = ikl tzbudiachro%nkh = ikh @@ -1500,6 +1513,9 @@ else tzbudiachro%cdirection = 'J' end if tzbudiachro%lmobile = .false. +!i/j/k compression has no meaning here as it is spectrum +!These values are not written in the netCDF files +!These values are written in the LFI files. They are kept for backward compatibility with these values tzbudiachro%licompress = .false. tzbudiachro%ljcompress = .false. tzbudiachro%lkcompress = .false. @@ -1509,6 +1525,9 @@ tzbudiachro%nil = iil tzbudiachro%nih = iih tzbudiachro%njl = ijl tzbudiachro%njh = ijh +!nkl and nkh values have no real meaning here +!These values are not written in the netCDF files +!These values are written in the LFI files. They are kept for backward compatibility (and not set to default values) tzbudiachro%nkl = ikl tzbudiachro%nkh = ikh @@ -1556,6 +1575,9 @@ else tzbudiachro%cdirection = 'J' end if tzbudiachro%lmobile = .false. +!i/j/k compression has no meaning here as it is spectrum +!These values are not written in the netCDF files +!These values are written in the LFI files. They are kept for backward compatibility with these values tzbudiachro%licompress = .false. tzbudiachro%ljcompress = .false. tzbudiachro%lkcompress = .false. @@ -1565,6 +1587,9 @@ tzbudiachro%nil = iil tzbudiachro%nih = iih tzbudiachro%njl = ijl tzbudiachro%njh = ijh +!nkl and nkh values have no real meaning here +!These values are not written in the netCDF files +!These values are written in the LFI files. They are kept for backward compatibility (and not set to default values) tzbudiachro%nkl = ikl tzbudiachro%nkh = ikh diff --git a/src/MNH/write_aircraft_balloon.f90 b/src/MNH/write_aircraft_balloon.f90 index 62df99c8d7a13d25868d26ce18b2d0bfc01d3b8b..e103f1b5b50c989bc32dcd141f402b2fe8cfa958 100644 --- a/src/MNH/write_aircraft_balloon.f90 +++ b/src/MNH/write_aircraft_balloon.f90 @@ -882,12 +882,17 @@ tzbudiachro%ccomments(NLVL_NORM) = '' tzbudiachro%lleveluse(NLVL_MASK) = .false. tzbudiachro%clevels (NLVL_MASK) = '' tzbudiachro%ccomments(NLVL_MASK) = '' + tzbudiachro%lmobile = .true. +!Compression does not make sense here ! tzbudiachro%licompress = NOT SET (default values) ! tzbudiachro%ljcompress = NOT SET (default values) ! tzbudiachro%lkcompress = NOT SET (default values) tzbudiachro%ltcompress = .false. tzbudiachro%lnorm = .false. +!Boundaries in physical domain does not make sense here (but flyer position does) +!These values are not written in the netCDF files +!These values are written in the LFI files ! tzbudiachro%nil = NOT SET (default values) ! tzbudiachro%nih = NOT SET (default values) ! tzbudiachro%njl = NOT SET (default values) @@ -946,15 +951,24 @@ tzbudiachro%clevels (NLVL_MASK) = '' tzbudiachro%ccomments(NLVL_MASK) = '' tzbudiachro%lmobile = .true. +!Compression does not make sense here +!Keep these values for backward compatibility of LFI files tzbudiachro%licompress = .true. tzbudiachro%ljcompress = .true. tzbudiachro%lkcompress = .false. tzbudiachro%ltcompress = .false. tzbudiachro%lnorm = .false. +!Horizontal boundaries in physical domain does not make sense here (but flyer position does) +!These values are not written in the netCDF files +!These values are written in the LFI files. They are kept for backward compatibility (and not set to default values) tzbudiachro%nil = 1 tzbudiachro%nih = 1 tzbudiachro%njl = 1 tzbudiachro%njh = 1 +!1->iku includes non-physical levels (IKU=NKMAX+2*JPVEXT) +!This does not conform to documentation (limits are in the physical domain) +!These values are not written in the netCDF files +!These values are written in the LFI files. They are kept for backward compatibility (and not set to default values) tzbudiachro%nkl = 1 tzbudiachro%nkh = iku diff --git a/src/MNH/write_budget.f90 b/src/MNH/write_budget.f90 index e87e4b0c68355cab9fca5ea1eab5be98daa22ab5..e761b21c94febdcc4a5e7058e069c8ee4bc74f09 100644 --- a/src/MNH/write_budget.f90 +++ b/src/MNH/write_budget.f90 @@ -548,7 +548,7 @@ subroutine Store_one_budget_rho( tpdiafile, tpdates, tprhodj, knocompress, prhod tzbudiachro%lleveluse(NLVL_GROUP) = .true. tzbudiachro%clevels (NLVL_GROUP) = 'RhodJ' - tzbudiachro%ccomments(NLVL_GROUP) = '' + tzbudiachro%ccomments(NLVL_GROUP) = 'mass of dry air contained in the mesh cells' tzbudiachro%lleveluse(NLVL_SHAPE) = .false. if ( ybutype == 'CART' ) then @@ -587,6 +587,9 @@ subroutine Store_one_budget_rho( tpdiafile, tpdates, tprhodj, knocompress, prhod tzbudiachro%lkcompress = lbu_kcp tzbudiachro%ltcompress = .true. !Data is temporally averaged tzbudiachro%lnorm = .false. + !Boundaries in physical domain does not make sense here if 'MASK' + !In that case, these values are not written in the netCDF files + !But they are always written in the LFI files. They are kept (in the MASK case) for backward compatibility. tzbudiachro%nil = nbuil tzbudiachro%nih = nbuih tzbudiachro%njl = nbujl @@ -874,8 +877,13 @@ subroutine Store_one_budget( tpdiafile, tpdates, tpbudget, prhodjn, knocompress, tzbudiachro%licompress = lbu_icp tzbudiachro%ljcompress = lbu_jcp tzbudiachro%lkcompress = lbu_kcp + !Remark: ltcompress should be false for INIF and ENDF fields + ! but if set to false these fields should be separated and stored somewhere else tzbudiachro%ltcompress = .true. !Data is temporally averaged tzbudiachro%lnorm = .false. + !Boundaries in physical domain does not make sense here if 'MASK' + !In that case, these values are not written in the netCDF files + !But they are always written in the LFI files. They are kept (in the MASK case) for backward compatibility. tzbudiachro%nil = nbuil tzbudiachro%nih = nbuih tzbudiachro%njl = nbujl diff --git a/src/MNH/write_diachro.f90 b/src/MNH/write_diachro.f90 index d0dce98792def8970391188ce0330c32b06ca48b..0c3eca9ce17a8c6b2bfc59f045185b69a266ef93 100644 --- a/src/MNH/write_diachro.f90 +++ b/src/MNH/write_diachro.f90 @@ -916,6 +916,7 @@ MASTER: if ( isp == tzfile%nmaster_rank) then .or. tpbudiachro%clevels(NLVL_GROUP) == 'TSERIES' & .or. tpbudiachro%clevels(NLVL_GROUP) == 'ZTSERIES' & .or. tpbudiachro%clevels(NLVL_GROUP)(1:8) == 'XTSERIES' ) then + !Disabled for LES budgets because no real meaning on that case (vertical levels are stored in the level_les variable) call Att_write( ylevelname, ilevelid, 'min K index in physical domain', ikl ) call Att_write( ylevelname, ilevelid, 'max K index in physical domain', ikh ) end if @@ -991,10 +992,8 @@ MASTER: if ( isp == tzfile%nmaster_rank) then call Att_write( ylevelname, ilevelid, 'masks are stored in variable', tpbudiachro%clevels(NLVL_MASK) ) end if - end if MASTER - !Determine the number of dimensions and do some verifications do jp = 1, Size( tpfields ) if ( Any( tpfields(jp)%ndimlist(:) == NMNHDIM_UNKNOWN ) ) & @@ -1475,14 +1474,9 @@ if ( Present( tpflyer ) ) then call IO_Field_write( tzfile, tzfield, tpflyer%y ) end if - - - - - - end subroutine Write_diachro_nc4 + subroutine Diachro_one_field_write_nc4( tpfile, tpbudiachro, tpfield, pvar, kdims, osplit, odistributed, & kil, kih, kjl, kjh, kkl, kkh ) use modd_budget, only: NLVL_CATEGORY, NLVL_GROUP, NLVL_SHAPE, nbutshift, nbusubwrite, tbudiachrometadata diff --git a/src/MNH/write_profilern.f90 b/src/MNH/write_profilern.f90 index 4393ffa9e8e149057fefd8d9567ea7304694c015..cb341f90cf0f56534682be6057df6adeee58d369 100644 --- a/src/MNH/write_profilern.f90 +++ b/src/MNH/write_profilern.f90 @@ -680,15 +680,24 @@ tzbudiachro%clevels (NLVL_MASK) = '' tzbudiachro%ccomments(NLVL_MASK) = '' tzbudiachro%lmobile = .false. +!Compression does not make sense here +!Keep these values for backward compatibility of LFI files tzbudiachro%licompress = .true. tzbudiachro%ljcompress = .true. tzbudiachro%lkcompress = .false. tzbudiachro%ltcompress = .false. tzbudiachro%lnorm = .false. +!Horizontal boundaries in physical domain does not make sense here (but flyer position does) +!These values are not written in the netCDF files +!These values are written in the LFI files. They are kept for backward compatibility (and not set to default values) tzbudiachro%nil = 1 tzbudiachro%nih = 1 tzbudiachro%njl = 1 tzbudiachro%njh = 1 +!1->iku includes non-physical levels (IKU=NKMAX+2*JPVEXT) +!This does not conform to documentation (limits are in the physical domain) +!These values are not written in the netCDF files +!These values are written in the LFI files. They are kept for backward compatibility (and not set to default values) tzbudiachro%nkl = 1 tzbudiachro%nkh = iku diff --git a/src/MNH/write_seriesn.f90 b/src/MNH/write_seriesn.f90 index c8424aba1682cf049acc98c6cdd470f479e5a014..153b7a4e0ecc60a6dc4f69012a564edcc5cd44cb 100644 --- a/src/MNH/write_seriesn.f90 +++ b/src/MNH/write_seriesn.f90 @@ -288,7 +288,7 @@ tzbudiachro%ccomments(NLVL_NORM) = 'Values are not normalized' tzbudiachro%lleveluse(NLVL_MASK) = .true. ! tzbudiachro%clevels (NLVL_MASK) = DONE LATER -tzbudiachro%ccomments(NLVL_MASK) = '' +! tzbudiachro%ccomments(NLVL_MASK) = DONE LATER tzbudiachro%lmobile = .false. tzbudiachro%licompress = .true. @@ -307,6 +307,7 @@ tzbudiachro%nkh = ikmax ! Do not provide all tzfields once because they can be stored in different HDF groups (based on masks) do jp = 1 , nstemp_serie1 tzbudiachro%clevels(NLVL_MASK) = Trim( csmask1(jp) ) + tzbudiachro%ccomments(NLVL_MASK) = '' call Write_diachro( tpdiafile, tzbudiachro, [ tzfields(jp) ], tpsdates(1:nsnbstept), & xsseries1(1:1,1:1,1:1,1:nsnbstept,1:1,jp:jp) ) @@ -415,7 +416,7 @@ tzbudiachro%ccomments(NLVL_NORM) = 'Values are not normalized' tzbudiachro%lleveluse(NLVL_MASK) = .true. ! tzbudiachro%clevels (NLVL_MASK) = DONE LATER -tzbudiachro%ccomments(NLVL_MASK) = '' +! tzbudiachro%ccomments(NLVL_MASK) = DONE LATER tzbudiachro%lmobile = .false. tzbudiachro%licompress = .true. @@ -434,6 +435,7 @@ tzbudiachro%nkh = ikmax ! Do not provide all tzfields once because they can be stored in different HDF groups (based on masks) do jp = 1 , nstemp_serie2 tzbudiachro%clevels(NLVL_MASK) = csmask2(jp) + tzbudiachro%ccomments(NLVL_MASK) = '' call Write_diachro( tpdiafile, tzbudiachro, [ tzfields(jp) ], tpsdates(1:nsnbstept), & xsseries2(1:1,1:1,1:ikmax,1:nsnbstept,1:1,jp:jp) ) diff --git a/src/MNH/write_stationn.f90 b/src/MNH/write_stationn.f90 index 364b4ed1122d521c5a025617d74d6fd9d6ad69be..b89b12c2152686284b3620e830fa745b9137c9bf 100644 --- a/src/MNH/write_stationn.f90 +++ b/src/MNH/write_stationn.f90 @@ -765,11 +765,16 @@ tzbudiachro%clevels (NLVL_MASK) = '' tzbudiachro%ccomments(NLVL_MASK) = '' tzbudiachro%lmobile = .false. +!Compression does not make sense here +!Keep these values for backward compatibility of LFI files tzbudiachro%licompress = .true. tzbudiachro%ljcompress = .true. tzbudiachro%lkcompress = .false. tzbudiachro%ltcompress = .false. tzbudiachro%lnorm = .false. +!Boundaries in physical domain does not make sense here +!These values are not written in the netCDF files +!These values are written in the LFI files. Kept for backward compatibility of LFI files tzbudiachro%nil = 1 tzbudiachro%nih = 1 tzbudiachro%njl = 1