diff --git a/src/MNH/write_diachro.f90 b/src/MNH/write_diachro.f90 index 8ad7c453850bb1409087333d0c8ed12fcb1bfd0b..8175eb1d84072a822001f956ec6483e7b8551023 100644 --- a/src/MNH/write_diachro.f90 +++ b/src/MNH/write_diachro.f90 @@ -89,6 +89,7 @@ subroutine Write_diachro( tpdiafile, tpbudiachro, tpfields, & ! P. Wautelet 03/03/2021: add tbudiachrometadata type (useful to pass more information to Write_diachro) ! P. Wautelet 11/03/2021: remove ptrajx/y/z optional dummy arguments of Write_diachro ! + get the trajectory data for LFI files differently +! P. Wautelet 01/09/2021: allow NMNHDIM_LEVEL and NMNHDIM_LEVEL_W simultaneously !------------------------------------------------------------------------------- ! !* 0. DECLARATIONS @@ -1035,7 +1036,10 @@ do jp = 2, Size( tpfields ) if ( tpfields(jp)%ndimlist(ji) /= tpfields(1)%ndimlist(ji) ) then !For SERIES: it is possible to have NMNHDIM_NI and NMNHDIM_NI_U in the different tpfields !For SERIES: it is possible to have NMNHDIM_SERIES_LEVEL and NMNHDIM_SERIES_LEVEL_W in the different tpfields - if ( tpfields(jp)%ndimlist(ji) /= NMNHDIM_NI .and. tpfields(jp)%ndimlist(ji) /= NMNHDIM_NI_U .and. & + !For profiles: it is possible to have NMNHDIM_LEVEL and NMNHDIM_LEVEL_W in the different tpfields + !This check is not perfect but should catch most problems + if ( tpfields(jp)%ndimlist(ji) /= NMNHDIM_NI .and. tpfields(jp)%ndimlist(ji) /= NMNHDIM_NI_U .and. & + tpfields(jp)%ndimlist(ji) /= NMNHDIM_LEVEL .and. tpfields(jp)%ndimlist(ji) /= NMNHDIM_LEVEL_W .and. & tpfields(jp)%ndimlist(ji) /= NMNHDIM_SERIES_LEVEL .and. tpfields(jp)%ndimlist(ji) /= NMNHDIM_SERIES_LEVEL_W ) then 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) ) diff --git a/src/MNH/write_profilern.f90 b/src/MNH/write_profilern.f90 index 486978e1c2accda7b8125d056c48166d2a5f201c..2df0ca92191b958c852448445005e7efd9d0273f 100644 --- a/src/MNH/write_profilern.f90 +++ b/src/MNH/write_profilern.f90 @@ -17,6 +17,7 @@ ! P. Wautelet 11/03/2021: bugfix: correct name for NSV_LIMA_IMM_NUCL ! P. Wautelet 05/07/2021: reorganisation to store point values correctly (not in vertical profiles) ! M. Taufour 07/2021: modify RARE for hydrometeors containing ice and add bright band calculation for RARE +! P. Wautelet 01/09/2021: fix: correct vertical dimension for ALT and W !----------------------------------------------------------------- ! ########################### MODULE MODE_WRITE_PROFILER_n @@ -85,7 +86,7 @@ USE MODD_CH_AEROSOL, ONLY: CAERONAMES, LORILAM, JPMODE USE MODD_CH_M9_n, ONLY: CNAMES USE MODD_CST, ONLY: XRV USE MODD_ELEC_DESCR, ONLY: CELECNAMES -use modd_field, only: NMNHDIM_LEVEL, NMNHDIM_PROFILER_TIME, NMNHDIM_PROFILER_PROC, NMNHDIM_UNUSED, & +use modd_field, only: NMNHDIM_LEVEL, NMNHDIM_LEVEL_W, NMNHDIM_PROFILER_TIME, NMNHDIM_PROFILER_PROC, NMNHDIM_UNUSED, & tfield_metadata_base, TYPEREAL USE MODD_ICE_C1R3_DESCR, ONLY: C1R3NAMES USE MODD_IO, ONLY: TFILEDATA @@ -118,6 +119,7 @@ CHARACTER(LEN=:), allocatable :: YGROUP ! group title INTEGER :: IKU INTEGER :: IPROC ! number of variables records INTEGER :: JPROC +integer :: jproc_alt, jproc_w INTEGER :: JRR ! loop counter INTEGER :: JSV ! loop counter integer :: ji @@ -161,11 +163,15 @@ call Add_profile( 'RARE', 'Radar reflectivity', 'dBZ', tprofil call Add_profile( 'RAREatt', 'Radar attenuated reflectivity', 'dBZ', tprofiler%crare_att ) call Add_profile( 'P', 'Pressure', 'Pa', tprofiler%p ) call Add_profile( 'ALT', 'Altitude', 'm', tprofiler%zz ) +!Store position of ALT in the field list. Useful because it is not computed on the same Arakawa-grid points +jproc_alt = jproc call Add_profile( 'ZON_WIND', 'Zonal wind', 'm s-1', tprofiler%zon ) call Add_profile( 'MER_WIND', 'Meridional wind', 'm s-1', tprofiler%mer ) call Add_profile( 'FF', 'Wind intensity', 'm s-1', tprofiler%ff ) call Add_profile( 'DD', 'Wind direction', 'degree', tprofiler%dd ) call Add_profile( 'W', 'Air vertical speed', 'm s-1', tprofiler%w ) +!Store position of W in the field list. Useful because it is not computed on the same Arakawa-grid points +jproc_w = jproc if ( ldiag_in_run ) & call Add_profile( 'TKE_DISS', 'TKE dissipation rate', 'm2 s-2', tprofiler% tke_diss ) @@ -389,6 +395,8 @@ tzfields(:)%ndims = 3 tzfields(:)%ndimlist(1) = NMNHDIM_UNUSED tzfields(:)%ndimlist(2) = NMNHDIM_UNUSED tzfields(:)%ndimlist(3) = NMNHDIM_LEVEL +tzfields(jproc_alt)%ndimlist(3) = NMNHDIM_LEVEL_W +tzfields(jproc_w)%ndimlist(3) = NMNHDIM_LEVEL_W tzfields(:)%ndimlist(4) = NMNHDIM_PROFILER_TIME tzfields(:)%ndimlist(5) = NMNHDIM_UNUSED tzfields(:)%ndimlist(6) = NMNHDIM_PROFILER_PROC