diff --git a/LIBTOOLS/tools/lfi2cdf/src/lfi2cdf.f90 b/LIBTOOLS/tools/lfi2cdf/src/lfi2cdf.f90 index 3b757c3bc97d5f5d9b8f21bebc65bb8909973480..7045305af0df0c782426b1819f74ae1b9449f46d 100644 --- a/LIBTOOLS/tools/lfi2cdf/src/lfi2cdf.f90 +++ b/LIBTOOLS/tools/lfi2cdf/src/lfi2cdf.f90 @@ -96,7 +96,7 @@ program LFI2CDF CALL OPEN_FILES(infiles, outfiles, nfiles_out, hinfile, houtfile, nbvar_infile, options, runmode) IF (options(OPTLIST)%set) STOP - !Set and initialize parallel variables (necessary to read splitted files) + !Set and initialize parallel variables (necessary to read split files) CALL SET_JP_ll(1,JPHEXT,JPVEXT,JPHEXT) CALL SET_DAD0_ll() CALL SET_DIM_ll(NIMAX_ll, NJMAX_ll, NKMAX) diff --git a/MY_RUN/KTEST/013_Iroise_ideal_case_coupling/A_RUN_MNH_TOY/run_mesonh_xyz b/MY_RUN/KTEST/013_Iroise_ideal_case_coupling/A_RUN_MNH_TOY/run_mesonh_xyz index 61d9446dc67cdeb183afe66005dfed70c7e5fec7..0e64c7a0705e944d9fe35db4186926307274a48b 100755 --- a/MY_RUN/KTEST/013_Iroise_ideal_case_coupling/A_RUN_MNH_TOY/run_mesonh_xyz +++ b/MY_RUN/KTEST/013_Iroise_ideal_case_coupling/A_RUN_MNH_TOY/run_mesonh_xyz @@ -25,4 +25,5 @@ ln -sf ../2_INPUT_TOY/TOYNAMELIST.nam_${TYPE_TOY} TOYNAMELIST.nam #~~~~~ OASIS ln -fs ../3_INPUT_OASIS/namcouple_${TYPE_TOY} namcouple -time Mpirun -np 1 MESONH${XYZ} : -np 1 $PATH_EXETOY/toy_model +#time Mpirun -np 1 MESONH${XYZ} : -np 1 $PATH_EXETOY/toy_model +time Mpirun -np 1 $PATH_EXETOY/toy_model : -np 1 totalview MESONH${XYZ} diff --git a/src/LIB/SURCOUCHE/src/modd_io.f90 b/src/LIB/SURCOUCHE/src/modd_io.f90 index a27528eebe0f92b06e94ef1464a3f3f11396d382..a444205e588f1b25d1bd91e8c5b09ffd8873b932 100644 --- a/src/LIB/SURCOUCHE/src/modd_io.f90 +++ b/src/LIB/SURCOUCHE/src/modd_io.f90 @@ -65,7 +65,7 @@ TYPE TOUTBAK REAL :: XTIME !Time from start of the segment (in seconds and rounded to a timestep) INTEGER :: NOUTDAD = -1 !Index of the corresponding dad file (file with same time) TYPE(TFILEDATA),POINTER :: TFILE => NULL() !Corresponding file - TYPE(TFILE_ELT),DIMENSION(:),ALLOCATABLE :: TFILE_IOZ !Corresponding Z-splitted files + TYPE(TFILE_ELT),DIMENSION(:),ALLOCATABLE :: TFILE_IOZ !Corresponding Z-split files INTEGER,DIMENSION(:),POINTER :: NFIELDLIST => NULL() !List of the fields to read or write END TYPE TOUTBAK @@ -86,10 +86,10 @@ TYPE TFILEDATA LOGICAL :: LMASTER = .FALSE. !True if process is master of the file (process that open/read/write/close) LOGICAL :: LMULTIMASTERS = .FALSE. !True if several processes may access the file ! - INTEGER :: NSUBFILES_IOZ = 0 !Number of sub-files (Z-splitted files based on this file) + INTEGER :: NSUBFILES_IOZ = 0 !Number of sub-files (Z-split files based on this file) !For example if 2 sub-files and this file is abcd, !the 2 sub-files are abcd.Z001 and abcd.Z002 - TYPE(TFILE_ELT),DIMENSION(:),ALLOCATABLE :: TFILES_IOZ !Corresponding Z-splitted files + TYPE(TFILE_ELT),DIMENSION(:),ALLOCATABLE :: TFILES_IOZ !Corresponding Z-split files ! INTEGER :: NMODEL = 0 !Model number corresponding to the file (field not always set) INTEGER,DIMENSION(3) :: NMNHVERSION = (/0,0,0/) !MesoNH version used to create the file diff --git a/src/LIB/SURCOUCHE/src/mode_io_manage_struct.f90 b/src/LIB/SURCOUCHE/src/mode_io_manage_struct.f90 index 1787cac1005bbf5f988de57cc19590c469bae1ce..444cca2a7c057b95fc695d35f9deadddba2a019b 100644 --- a/src/LIB/SURCOUCHE/src/mode_io_manage_struct.f90 +++ b/src/LIB/SURCOUCHE/src/mode_io_manage_struct.f90 @@ -591,7 +591,7 @@ SUBROUTINE POPULATE_STRUCT(TPFILE_FIRST,TPFILE_LAST,KSTEPS,HFILETYPE,TPBAKOUTN) CALL PRINT_MSG(NVERB_FATAL,'IO','POPULATE_STRUCT','unknown backup/output fileformat') ENDIF ! - !Create file structures if Z-splitted files + !Create file structures if Z-split files IF (NB_PROCIO_W>1) THEN TPBAKOUTN(IPOS)%TFILE%NSUBFILES_IOZ = NB_PROCIO_W ALLOCATE(TPBAKOUTN(IPOS)%TFILE%TFILES_IOZ(NB_PROCIO_W)) diff --git a/src/LIB/SURCOUCHE/src/mode_io_write_lfi.f90 b/src/LIB/SURCOUCHE/src/mode_io_write_lfi.f90 index 26f18bc04cee5ec685bbc4d1d07d1c83964aa6fa..955efcaac1ba4d8936ac153ce1eee3096362d7e4 100644 --- a/src/LIB/SURCOUCHE/src/mode_io_write_lfi.f90 +++ b/src/LIB/SURCOUCHE/src/mode_io_write_lfi.f90 @@ -137,8 +137,8 @@ TYPE(TFILEDATA),TARGET,INTENT(IN) :: TPFILE TYPE(TFIELDDATA), INTENT(IN) :: TPFIELD REAL,DIMENSION(:,:), INTENT(IN) :: PFIELD ! array containing the data field INTEGER, INTENT(OUT):: KRESP ! return-code if problems araised -INTEGER,OPTIONAL, INTENT(IN) :: KVERTLEVEL ! Number of the vertical level (needed for Z-level splitted files) -INTEGER,OPTIONAL, INTENT(IN) :: KZFILE ! Number of the Z-level splitted file +INTEGER,OPTIONAL, INTENT(IN) :: KVERTLEVEL ! Number of the vertical level (needed for Z-level split files) +INTEGER,OPTIONAL, INTENT(IN) :: KZFILE ! Number of the Z-level split file ! !* 0.2 Declarations of local variables ! diff --git a/src/LIB/SURCOUCHE/src/mode_io_write_nc4.f90 b/src/LIB/SURCOUCHE/src/mode_io_write_nc4.f90 index 3b9baf962260afda560afe2ad691604513aeb276..9da88e2ee73d98b09467871c37bd5e27dccac724 100644 --- a/src/LIB/SURCOUCHE/src/mode_io_write_nc4.f90 +++ b/src/LIB/SURCOUCHE/src/mode_io_write_nc4.f90 @@ -473,8 +473,8 @@ TYPE(TFILEDATA),TARGET,INTENT(IN) :: TPFILE TYPE(TFIELDDATA), INTENT(IN) :: TPFIELD REAL,DIMENSION(:,:), INTENT(IN) :: PFIELD ! array containing the data field INTEGER, INTENT(OUT):: KRESP -INTEGER,OPTIONAL, INTENT(IN) :: KVERTLEVEL ! Number of the vertical level (needed for Z-level splitted files) -INTEGER,OPTIONAL, INTENT(IN) :: KZFILE ! Number of the Z-level splitted file +INTEGER,OPTIONAL, INTENT(IN) :: KVERTLEVEL ! Number of the vertical level (needed for Z-level split files) +INTEGER,OPTIONAL, INTENT(IN) :: KZFILE ! Number of the Z-level split file LOGICAL,OPTIONAL, INTENT(IN) :: OISCOORD ! Is a coordinate variable (->do not write coordinates attribute) ! INTEGER(KIND=CDFINT) :: STATUS diff --git a/src/LIB/SURCOUCHE/src/mode_scatter.f90 b/src/LIB/SURCOUCHE/src/mode_scatter.f90 index 32eaa729052794702023468e113cecabaa913449..b81b5a29422b5bdcd6e3fdb2f40eb2bd7cde2c1b 100644 --- a/src/LIB/SURCOUCHE/src/mode_scatter.f90 +++ b/src/LIB/SURCOUCHE/src/mode_scatter.f90 @@ -1,4 +1,4 @@ -!MNH_LIC Copyright 1994-2019 CNRS, Meteo-France and Universite Paul Sabatier +!MNH_LIC Copyright 1994-2020 CNRS, Meteo-France and Universite Paul Sabatier !MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence !MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt !MNH_LIC for details. version 1. @@ -7,6 +7,7 @@ ! J. Escobar 10/02/2012: bug in MPI_RECV: replace MPI_STATUSES_IGNORE with MPI_STATUS_IGNORE ! P. Wautelet 26/04/2019: use modd_precision parameters for datatypes of MPI communications ! P. Wautelet 25/06/2019: added IO_Field_read for 3D integer arrays (SCATTERXX_N3 and SCATTERXY_N3) +! J. Escobar 21/07/2020: for reduction of MPI_BUFFER_SIZE, in SCATTERXY_X3 replace MPI_BSEND -> MPI_ISEND !----------------------------------------------------------------- MODULE MODE_SCATTER_ll @@ -467,7 +468,8 @@ END IF END SUBROUTINE SCATTERXY_X2 SUBROUTINE SCATTERXY_X3(PSEND,PRECV,KROOT,KCOMM) -USE MODD_IO, ONLY: ISP, ISNPROC +USE MODD_IO, ONLY: ISP, ISNPROC +USE MODD_VAR_ll, ONLY: MNH_STATUSES_IGNORE REAL,DIMENSION(:,:,:),TARGET,INTENT(IN) :: PSEND REAL,DIMENSION(:,:,:), INTENT(INOUT):: PRECV @@ -475,25 +477,45 @@ INTEGER, INTENT(IN) :: KROOT INTEGER, INTENT(IN) :: KCOMM INTEGER :: IERR -INTEGER :: JI +INTEGER :: JI,JKU INTEGER :: IXO,IXE,IYO,IYE REAL,DIMENSION(:,:,:), POINTER :: TX3DP + +INTEGER,ALLOCATABLE,DIMENSION(:) :: REQ_TAB +INTEGER :: NB_REQ +TYPE TX_3DP + REAL,DIMENSION(:,:,:), POINTER :: X +END TYPE TX_3DP +TYPE(TX_3DP),ALLOCATABLE,DIMENSION(:) :: T_TX3DP + +JKU = SIZE(PSEND,3) IF (ISP == KROOT) THEN - DO JI = 1,ISNPROC - CALL GET_DOMREAD_ll(JI,IXO,IXE,IYO,IYE) - TX3DP=>PSEND(IXO:IXE,IYO:IYE,:) - - IF (ISP /= JI) THEN - CALL MPI_BSEND(TX3DP,SIZE(TX3DP),MNHREAL_MPI,JI-1,199+KROOT,KCOMM& - & ,IERR) - ELSE - PRECV(:,:,:) = TX3DP(:,:,:) - END IF - END DO + NB_REQ=0 + ALLOCATE(REQ_TAB(ISNPROC-1)) + ALLOCATE(T_TX3DP(ISNPROC-1)) + DO JI = 1,ISNPROC + CALL GET_DOMREAD_ll(JI,IXO,IXE,IYO,IYE) + TX3DP=>PSEND(IXO:IXE,IYO:IYE,:) + IF (ISP /= JI) THEN + NB_REQ = NB_REQ + 1 + ALLOCATE(T_TX3DP(NB_REQ)%X(IXO:IXE,IYO:IYE,JKU)) + T_TX3DP(NB_REQ)%X=TX3DP + CALL MPI_ISEND(T_TX3DP(NB_REQ)%X,SIZE(TX3DP),MNHREAL_MPI,JI-1,199+KROOT,KCOMM& + & ,REQ_TAB(NB_REQ),IERR) + !CALL MPI_BSEND(TX3DP,SIZE(TX3DP),MNHREAL_MPI,JI-1,199+KROOT,KCOMM& + ! & ,IERR) + ELSE + PRECV(:,:,:) = TX3DP(:,:,:) + END IF + END DO + IF (NB_REQ .GT.0 ) THEN + CALL MPI_WAITALL(NB_REQ,REQ_TAB,MNH_STATUSES_IGNORE,IERR) + DO JI=1,NB_REQ ; DEALLOCATE(T_TX3DP(JI)%X) ; ENDDO + END IF ELSE - CALL MPI_RECV(PRECV,SIZE(PRECV),MNHREAL_MPI,KROOT-1,199+KROOT,KCOMM& - & ,MPI_STATUS_IGNORE,IERR) + CALL MPI_RECV(PRECV,SIZE(PRECV),MNHREAL_MPI,KROOT-1,199+KROOT,KCOMM& + & ,MPI_STATUS_IGNORE,IERR) END IF END SUBROUTINE SCATTERXY_X3 diff --git a/src/LIB/SURCOUCHE/src/mode_tools_ll.f90 b/src/LIB/SURCOUCHE/src/mode_tools_ll.f90 index b5fbe7198a2e4bd55d549e75aa671f105bef252e..6736a75bd4ce68d5d2d8060d0f123ac49991c54c 100644 --- a/src/LIB/SURCOUCHE/src/mode_tools_ll.f90 +++ b/src/LIB/SURCOUCHE/src/mode_tools_ll.f90 @@ -1,4 +1,4 @@ -!MNH_LIC Copyright 1998-2019 CNRS, Meteo-France and Universite Paul Sabatier +!MNH_LIC Copyright 1998-2020 CNRS, Meteo-France and Universite Paul Sabatier !MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence !MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt !MNH_LIC for details. version 1. @@ -2486,7 +2486,7 @@ ENDIF ! INTEGER, INTENT(IN) :: K ! Number of elements of TPSPLIT ! - TYPE(ZONE_ll), INTENT(IN) :: TPZONE ! Zone to be splitted + TYPE(ZONE_ll), INTENT(IN) :: TPZONE ! Zone to be split ! TYPE(ZONE_ll), DIMENSION(:), INTENT(OUT) :: TPRES ! Splitting of the zone ! diff --git a/src/LIB/SURCOUCHE/src/mode_toolsz_ll.f90 b/src/LIB/SURCOUCHE/src/mode_toolsz_ll.f90 index e76d24d1dee8d995cc60e06084eebba6a43518d4..ac917b4922addd7461f223efc7841c68e08d19ce 100644 --- a/src/LIB/SURCOUCHE/src/mode_toolsz_ll.f90 +++ b/src/LIB/SURCOUCHE/src/mode_toolsz_ll.f90 @@ -1,4 +1,4 @@ -!MNH_LIC Copyright 1998-2019 CNRS, Meteo-France and Universite Paul Sabatier +!MNH_LIC Copyright 1998-2020 CNRS, Meteo-France and Universite Paul Sabatier !MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence !MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt !MNH_LIC for details. version 1. @@ -1124,7 +1124,7 @@ ! INTEGER, INTENT(IN) :: K ! Number of elements of TPSPLIT ! - TYPE(ZONE_ll), INTENT(IN) :: TPZONE ! Zone to be splitted + TYPE(ZONE_ll), INTENT(IN) :: TPZONE ! Zone to be split ! TYPE(ZONE_ll), DIMENSION(:), INTENT(OUT) :: TPRES ! Splitting of the zone ! diff --git a/src/MNH/calcsound.f90 b/src/MNH/calcsound.f90 index a0b1c5fa1e0deb61f7723d6ac1fba400a2b49707..03acbaba22fb11a10921e2f67dafe4474c8137c0 100644 --- a/src/MNH/calcsound.f90 +++ b/src/MNH/calcsound.f90 @@ -1,13 +1,8 @@ -!MNH_LIC Copyright 1994-2014 CNRS, Meteo-France and Universite Paul Sabatier +!MNH_LIC Copyright 1994-2020 CNRS, Meteo-France and Universite Paul Sabatier !MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence -!MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt +!MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt !MNH_LIC for details. version 1. !----------------------------------------------------------------- -!--------------- special set of characters for RCS information -!----------------------------------------------------------------- -! $Source$ $Revision$ -! masdev4_7 BUG1 2007/06/15 17:47:17 -!----------------------------------------------------------------- ! ##################### MODULE MODI_CALCSOUND ! ##################### @@ -43,7 +38,7 @@ END MODULE MODI_CALCSOUND !! !!** METHOD !! ------ -!! The horizontal dimensions of model arrays are splitted in arrays of +!! The horizontal dimensions of model arrays are split in arrays of !! 1000 columns. If there is at least 1000 elements, computation is !! made in a static way, otherwise in a dynamical way. !! diff --git a/src/MNH/call_rttov11.f90 b/src/MNH/call_rttov11.f90 index 254bc976c84de483419ce3623ca315b8bbc96a90..e5116b18d814d9d5577344699ee43da060d0cb74 100644 --- a/src/MNH/call_rttov11.f90 +++ b/src/MNH/call_rttov11.f90 @@ -82,7 +82,8 @@ SUBROUTINE CALL_RTTOV11(KDLON, KFLEV, PEMIS, PTSRAD, & !! J.Escobar : 15/09/2015 : WENO5 & JPHEXT <> 1 !! JP Chaboureau 30/05/2017 exclude the first layer when considering clouds !! Philippe Wautelet: 05/2016-04/2018: new data structures and calls for I/O -! P. Wautelet 10/04/2019: replace ABORT and STOP calls by Print_msg +! P. Wautelet 10/04/2019: replace ABORT and STOP calls by Print_msg +! JP Chaboureau 26/10/2020: calculate all IR intruments; deallocate MW tabs !!---------------------------------------------------------------------------- !! !!* 0. DECLARATIONS @@ -110,7 +111,7 @@ USE MODE_POS ! #ifdef MNH_RTTOV_11 USE rttov_const, ONLY : & - & sensor_id_ir, sensor_id_hi, sensor_id_mw, & + & sensor_id, sensor_id_ir, sensor_id_hi, sensor_id_mw, & & q_mixratio_to_ppmv, tmin, tmax, qmin, qmax, pmin, pmax USE rttov_types USE parkind1, ONLY: jpim, jprb, jplm @@ -193,8 +194,8 @@ REAL :: ZZH, zdeg_to_rad, zrad_to_deg, zbeta, zalpha ! REAL, DIMENSION(:,:), ALLOCATABLE :: ZCOSZEN, ZSINZEN, ZAZIMSOL ! ----------------------------------------------------------------------------- -REAL, DIMENSION(:), ALLOCATABLE :: ZANGL !Satellite zenith angle (deg) -REAL, DIMENSION(:), ALLOCATABLE :: ZANGS !Solar zenith angle (deg) +REAL, DIMENSION(1) :: ZANGL, ZLON, ZLAT !Satellite zenith angle, longitude, latitude (deg) +REAL :: ZANGS !Solar zenith angle (deg) ! ----------------------------------------------------------------------------- ! INDEXES AND TEMPORAL ARRAYS FOR VECTORIZATION INTEGER :: JIS, IBEG, IEND, IDIM, ICPT @@ -297,9 +298,7 @@ DO JSAT=1,IJSAT ! loop over sensors instrument(3)=KRTTOVINFO(3,JSAT) ! PRINT *,' JSAT=',JSAT, instrument -!!! METEOSAT, GOES, OR MSG PLATFORM - IF (KRTTOVINFO(1,JSAT) == 3 .OR. KRTTOVINFO(1,JSAT) == 4 & - .OR. KRTTOVINFO(1,JSAT) == 12) THEN + IF( sensor_id( instrument(3) ) /= sensor_id_mw) THEN opts % rt_ir % addsolar = .FALSE. ! Do not include solar radiation opts % interpolation % addinterp = .TRUE. ! Allow interpolation of input profile opts % interpolation % interp_mode = 1 ! Set interpolation method @@ -343,7 +342,7 @@ DO JSAT=1,IJSAT ! loop over sensors ALLOCATE(ZBT(IIU,IJU,nchannels)) ZBT(:,:,:)=999. -! PRINT *,'ncan=',nchan,' nchannels=',nchannels +! PRINT *,'ncan=',nchan,' nchannels=',nchannels ALLOCATE (chanprof (nchannels)) ALLOCATE (frequencies (nchannels)) @@ -355,9 +354,7 @@ DO JSAT=1,IJSAT ! loop over sensors calcemis = .TRUE. emissivity % emis_in = 0.0_JPRB -!!! METEOSAT, GOES, OR MSG PLATFORM - IF (KRTTOVINFO(1,JSAT) == 3 .OR. KRTTOVINFO(1,JSAT) == 4 & - .OR. KRTTOVINFO(1,JSAT) == 12) calcemis = .FALSE. + IF( coef_rttov%coef% id_sensor /= sensor_id_mw) calcemis = .FALSE. ! IF( coef_rttov%coef% id_sensor /= sensor_id_mw) THEN ! ! Allocate arrays for surface reflectance @@ -427,18 +424,41 @@ DO JSAT=1,IJSAT ! loop over sensors !! opts%interpolation%reg_limit_extrap = .TRUE. !! profiles(1)%gas_units = 1 ! kg/kg over moist air -!PRINT *,'nlev=',nlev,' tmax=',tmax,' tmin=',tmin,' qmax=',qmax,' qmin=',qmin -!PRINT *, coef_rttov%coef % nlevels +! PRINT *,'nlev=',nlev,' tmax=',tmax,' tmin=',tmin,' qmax=',qmax,' qmin=',qmin +! PRINT *, coef_rttov%coef % nlevels DO JI=IIB,IIE DO JJ=IJB,IJE + ZANGL = XUNDEF + ZLON = XLON(JI,JJ) + ZLAT = XLAT(JI,JJ) + IF (KRTTOVINFO(1,JSAT) == 2) THEN ! DMSP PLATFORM + ZANGL=53.1 ! see Saunders, 2002, RTTOV7 - science/validation rep, page 8 + ELSEIF (KRTTOVINFO(1,JSAT) == 3) THEN ! METEOSAT PLATFORM + CALL DETER_ANGLE(5, 1, ZLAT, ZLON, ZANGL) + WHERE (ZANGL /= XUNDEF .AND. ZANGL /=0.) ZANGL=ACOS(1./ZANGL)*180./XPI + ELSEIF (KRTTOVINFO(1,JSAT) == 12) THEN ! MSG PLATFORM + CALL DETER_ANGLE(6, 1, ZLAT, ZLON, ZANGL) + WHERE (ZANGL /= XUNDEF .AND. ZANGL /=0.) ZANGL=ACOS(1./ZANGL)*180./XPI + ELSEIF (KRTTOVINFO(1,JSAT) == 4) THEN ! GOES-E PLATFORM + CALL DETER_ANGLE(1, 1, ZLAT, ZLON, ZANGL) + WHERE (ZANGL /= XUNDEF .AND. ZANGL /=0.) ZANGL=ACOS(1./ZANGL)*180./XPI + ELSEIF (KRTTOVINFO(1,JSAT) == 7) THEN ! TRMM PLATFORM + ZANGL=52.3 + ELSE + ZANGL=0. + ENDIF +! Coefficients computed from transmittances for 6 viewing angles in the range +! 0 to 63.6 deg (Saunders, 2002, RTTOV7 - science/validation rep., page 3) + profiles(1) % zenangle = MIN(ZANGL(1),65.) + DO JK=IKB,IKE ! nlevels JKRAD = nlev-JK+2 !INVERSION OF VERTICAL LEVELS! -!PRINT *,'jk=',jk,' jkrad=',jkrad +! PRINT *,'jk=',jk,' jkrad=',jkrad profiles(1) % p(JKRAD) = PPABST(JI,JJ,JK)*0.01 profiles(1) % t(JKRAD) = MIN(tmax,MAX(tmin,ZTEMP(JI,JJ,JK))) -!PRINT *,'jk=',JK,' ZTEMP=',ZTEMP(JI,JJ,JK),' t=',profiles(1) % t(JKRAD) +! PRINT *,'jk=',JK,' ZTEMP=',ZTEMP(JI,JJ,JK),' t=',profiles(1) % t(JKRAD) profiles(1) % q(JKRAD) = MIN(qmax,MAX(qmin,PRT(JI,JJ,JK,1)*q_mixratio_to_ppmv)) -! PRINT *,JK,profiles(1) % p(JKRAD) ,profiles(1) % t(JKRAD) ,profiles(1) % q(JKRAD) +! PRINT *,JK,profiles(1) % p(JKRAD) ,profiles(1) % t(JKRAD) ,profiles(1) % q(JKRAD) END DO profiles(1) % elevation = 0.5*( PZZ(JI,JJ,1)+PZZ(JI,JJ,IKB) ) profiles(1) % skin % t = MIN(tmax,MAX(tmin,PTSRAD(JI,JJ))) @@ -469,7 +489,7 @@ DO JSAT=1,IJSAT ! loop over sensors ELSE DO JK=IKB,IKE JKRAD = nlev-JK+2 !INVERSION OF VERTICAL LEVELS! - cld_profiles(1) % ph (JKRAD) = 0.5*( PPABST(JI,JJ,JK) + PPABST(JI,JJ,JK+1) )*0.01 + cld_profiles(1) %ph (JKRAD) = 0.5*( PPABST(JI,JJ,JK) + PPABST(JI,JJ,JK+1) )*0.01 cld_profiles(1) %cc(JKRAD) = PCLDFR(JI,JJ,JK) cld_profiles(1) %clw(JKRAD) = MIN(ZRCMAX,PRT(JI,JJ,JK,2)) cld_profiles(1) %rain(JKRAD) = MIN(ZRRMAX,PRT(JI,JJ,JK,3)) @@ -479,14 +499,14 @@ DO JSAT=1,IJSAT ! loop over sensors END IF END DO cld_profiles (1) % ph (nlev+1) = profiles (1) % s2m % p -! PRINT *,nlev+1,' cld_profiles(1) % ph (nlev+1) =',cld_profiles(1) % ph (nlev+1) +! PRINT *,nlev+1,' cld_profiles(1) % ph (nlev+1) =',cld_profiles(1) % ph (nlev+1) END IF DO JCH=1,nchannels IF (.NOT.calcemis(JCH)) emissivity(JCH)%emis_in = PEMIS(JI,JJ) END DO -!write(*,*) 'Calling forward model' +! write(*,*) 'Calling forward model' ! Forward model run IF ( coef_rttov%coef% id_sensor /= sensor_id_mw) THEN @@ -574,12 +594,18 @@ DO JSAT=1,IJSAT ! loop over sensors TZFIELD%NGRID = 1 TZFIELD%NTYPE = TYPEREAL TZFIELD%NDIMS = 2 - TZFIELD%LTIMEDEP = .FALSE. + TZFIELD%LTIMEDEP = .TRUE. ! PRINT *,'YRECFM='//TRIM(TZFIELD%CMNHNAME) CALL IO_Field_write(TPFILE,TZFIELD,ZBT(:,:,JCH)) END DO - DEALLOCATE(chanprof,frequencies,emissivity,calcemis,profiles,cld_profiles) + DEALLOCATE(chanprof,frequencies,emissivity,calcemis,profiles) DEALLOCATE(ZBT) + IF( coef_rttov%coef% id_sensor == sensor_id_mw) THEN + CALL rttov_alloc_scatt_prof(nprof, cld_profiles, nlev, .FALSE., 0_jpim) + CALL rttov_dealloc_scattcoeffs(coef_scatt) + END IF + DEALLOCATE(cld_profiles) + CALL rttov_dealloc_coefs(errorstatus, coef_rttov) ! IF( coef_rttov%coef% id_sensor /= sensor_id_mw) THEN ! DEALLOCATE(calcrefl,reflectance) ! END IF diff --git a/src/MNH/ch_f77.fx90 b/src/MNH/ch_f77.fx90 index 25e86d2cdf4ce98bdf846ef9e14eb25250567380..3200d175726131af689d38f771d08362e669850b 100644 --- a/src/MNH/ch_f77.fx90 +++ b/src/MNH/ch_f77.fx90 @@ -1,4 +1,4 @@ -!MNH_LIC Copyright 1989-2019 CNRS, Meteo-France and Universite Paul Sabatier +!MNH_LIC Copyright 1989-2020 CNRS, Meteo-France and Universite Paul Sabatier !MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence !MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt !MNH_LIC for details. version 1. @@ -25,6 +25,7 @@ C + wrong use of an non initialized C**MODIFIED: P. Wautelet 10/04/2019: replace ABORT and STOP calls by Print_msg C P. Wautelet 26/04/2019: replace non-standard FLOAT function by REAL function C P. Wautelet 21/11/2019: replace several CONTINUE (workaround of problems with gfortran OpenACC) +C P. Wautelet 17/08/2020: small correction in call to LEPOLY C! C! C! @@ -13478,7 +13479,7 @@ c cosines NCOS = 1 ANGCOS = -UMU0 - CALL LEPOLY( NCOS, MAZIM, MXCMU, NSTR - 1, ANGCOS, YLM0 ) + CALL LEPOLY( NCOS, MAZIM, MXCMU, NSTR - 1, [ANGCOS], YLM0 ) END IF diff --git a/src/MNH/default_desfmn.f90 b/src/MNH/default_desfmn.f90 index a554e967f003a65d25b075efa39da3ead31f85cc..28a6429a4a1714e59b72b1cb7f50a6ebf92f2984 100644 --- a/src/MNH/default_desfmn.f90 +++ b/src/MNH/default_desfmn.f90 @@ -168,7 +168,7 @@ END MODULE MODI_DEFAULT_DESFM_n !! Modifications 25/04/96 (Suhre) add the blank module !! Modifications 29/07/96 (Pinty&Suhre) add module MODD_FRC !! Modifications 11/04/96 (Pinty) add the rain-ice scheme and modify -!! the splitted arrays in MODD_PARAM_RAD_n +!! the split arrays in MODD_PARAM_RAD_n !! Modifications 11/01/97 (Pinty) add the deep convection scheme !! Modifications 24/11/96 (Masson) add LREFRESH_ALL in deep convection !! Modifications 12/02/96 (Lafore) transformation to DEFAULT_DESFM_n for spawning @@ -210,7 +210,7 @@ END MODULE MODI_DEFAULT_DESFM_n !! Modification 24/03/16 (Leriche) remove LCH_SURFACE_FLUX !! put NCH_VEC_LENGTH = 50 instead of 1000 !! -!! 04/2016 (C.LAC) negative contribution to the budget splitted between advection, turbulence and microphysics for KHKO/C2R2 +!! 04/2016 (C.LAC) negative contribution to the budget split between advection, turbulence and microphysics for KHKO/C2R2 !! Modification 01/2016 (JP Pinty) Add LIMA !! Modification 24/03/16 (Leriche) remove LCH_SURFACE_FLUX !! put NCH_VEC_LENGTH = 50 instead of 1000 @@ -1076,7 +1076,7 @@ END IF ! --------------------------------------- ! IF (KMI == 1) THEN - LRED = .FALSE. + LRED = .TRUE. LWARM = .TRUE. CPRISTINE_ICE = 'PLAT' LSEDIC = .TRUE. diff --git a/src/MNH/extend_grid_parameter_mnh.f90 b/src/MNH/extend_grid_parameter_mnh.f90 index f83fc564f7c7a88f784331aab62369990f598531..7b54a15d520ff8dcec3079a9ca95b9a9421e837a 100644 --- a/src/MNH/extend_grid_parameter_mnh.f90 +++ b/src/MNH/extend_grid_parameter_mnh.f90 @@ -1,4 +1,4 @@ -!MNH_LIC Copyright 2015-2019 CNRS, Meteo-France and Universite Paul Sabatier +!MNH_LIC Copyright 2015-2020 CNRS, Meteo-France and Universite Paul Sabatier !MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence !MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt !MNH_LIC for details. version 1. @@ -7,7 +7,7 @@ SUBROUTINE EXTEND_GRID_PARAMETERX1_MNH(HGRID,HREC,KDIM,KSIZE,KIMAX,KJMAX,PFIELD,PFIELD_EXTEND) ! ############################################################# ! -!!**** * - routine to extend a real splitted array on SURFEX halo +!!**** * - routine to extend a real split array on SURFEX halo ! ! Author ! M.Moge 01/03/2015 @@ -37,7 +37,7 @@ INTEGER, INTENT(IN) :: KSIZE ! size of PFIELD_EXTEND INTEGER, INTENT(IN) :: KIMAX !(local) dimension of the domain - X direction INTEGER, INTENT(IN) :: KJMAX !(local) dimension of the domain - Y direction REAL, DIMENSION(KDIM ), INTENT(IN) :: PFIELD ! real field for complete grid -REAL, DIMENSION(KSIZE), INTENT(OUT):: PFIELD_EXTEND! real field for splitted grid +REAL, DIMENSION(KSIZE), INTENT(OUT):: PFIELD_EXTEND! real field for split grid ! !* 0.2 Declarations of local variables ! @@ -154,7 +154,7 @@ END SUBROUTINE EXTEND_GRID_PARAMETERX1_MNH SUBROUTINE EXTEND_GRID_PARAMETERN0_MNH(HGRID,HREC,KFIELD,KFIELD_EXTEND) ! ############################################################# ! -!!**** * - routine to "extend" an integer related to splitted grid on SURFEX halo +!!**** * - routine to "extend" an integer related to split grid on SURFEX halo ! ! ! @@ -169,7 +169,7 @@ IMPLICIT NONE CHARACTER(LEN=10), INTENT(IN) :: HGRID ! grid type CHARACTER(LEN=6), INTENT(IN) :: HREC ! name of the parameter INTEGER, INTENT(IN) :: KFIELD ! integer scalar for complete grid -INTEGER, INTENT(OUT):: KFIELD_EXTEND ! integer scalar for splitted grid +INTEGER, INTENT(OUT):: KFIELD_EXTEND ! integer scalar for split grid !* 0.2 Declarations of local variables ! INTEGER :: IIB, IIE, IJB, IJE diff --git a/src/MNH/ini_lesn.f90 b/src/MNH/ini_lesn.f90 index 792001f7328ab98da4b124c9bf73d72ee5228c01..fe07ae22111111aea29d508e4fc230ce01861fe8 100644 --- a/src/MNH/ini_lesn.f90 +++ b/src/MNH/ini_lesn.f90 @@ -1,4 +1,4 @@ -!MNH_LIC Copyright 2000-2019 CNRS, Meteo-France and Universite Paul Sabatier +!MNH_LIC Copyright 2000-2020 CNRS, Meteo-France and Universite Paul Sabatier !MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence !MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt !MNH_LIC for details. version 1. @@ -35,6 +35,7 @@ !! Philippe Wautelet: 05/2016-04/2018: new data structures and calls for I/O !! 02/2019 (C. Lac) Add rain fraction as a LES diagnostic ! P. Wautelet 10/04/2019: replace ABORT and STOP calls by Print_msg +! P. Wautelet 12/08/2020: bugfix: use NUNDEF instead of XUNDEF for integer variables !! -------------------------------------------------------------------------- ! !* 0. DECLARATIONS @@ -391,7 +392,7 @@ END IF ! -------------------- ! IF (ANY(NLES_LEVELS(:)/=NUNDEF)) THEN - NLES_K = COUNT (NLES_LEVELS(:)/=XUNDEF) + NLES_K = COUNT (NLES_LEVELS(:)/=NUNDEF) CLES_LEVEL_TYPE='K' ELSE IF (NLES_K==0) THEN @@ -439,8 +440,8 @@ END IF !* 5.2 Case of model levels (highest priority) ! -------------------- ! -IF (ANY(NSPECTRA_LEVELS(:)/=XUNDEF)) THEN - NSPECTRA_K = COUNT (NSPECTRA_LEVELS(:)/=XUNDEF) +IF (ANY(NSPECTRA_LEVELS(:)/=NUNDEF)) THEN + NSPECTRA_K = COUNT (NSPECTRA_LEVELS(:)/=NUNDEF) CSPECTRA_LEVEL_TYPE='K' END IF ! diff --git a/src/MNH/latlon_to_xy.f90 b/src/MNH/latlon_to_xy.f90 index 320f6b1dc92ca461ff816bac677bb2315ec47805..f00d137ef5b5b69afe5006f73d12d614297eba17 100644 --- a/src/MNH/latlon_to_xy.f90 +++ b/src/MNH/latlon_to_xy.f90 @@ -58,6 +58,7 @@ ! P. Wautelet 07/02/2019: force TYPE to a known value for IO_File_add2list ! P. Wautelet 26/04/2019: replace non-standard FLOAT function by REAL function ! P. Wautelet 10/04/2020: add missing initializations (LATLON_TO_XY was not working) +! J. Escobar 21/07/2020 : missing modi_version !---------------------------------------------------------------------------- ! !* 0. DECLARATION @@ -85,6 +86,7 @@ use MODE_SPLITTINGZ_ll ! USE MODI_INI_CST USE MODI_READ_HGRID +USE MODI_VERSION ! USE MODN_CONFIO, ONLY: NAM_CONFIO ! diff --git a/src/MNH/lima_inst_procs.f90 b/src/MNH/lima_inst_procs.f90 index a03eed7e3af5aa42c376955b9d8094bde1204feb..ff8dc1f04df51daa9018d3cf8a1778ce4bde2294 100644 --- a/src/MNH/lima_inst_procs.f90 +++ b/src/MNH/lima_inst_procs.f90 @@ -1,4 +1,4 @@ -!MNH_LIC Copyright 2013-2018 CNRS, Meteo-France and Universite Paul Sabatier +!MNH_LIC Copyright 2013-2020 CNRS, Meteo-France and Universite Paul Sabatier !MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence !MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt !MNH_LIC for details. version 1. @@ -82,7 +82,7 @@ SUBROUTINE LIMA_INST_PROCS (PTSTEP, LDCOMPUTE, !! PURPOSE !! ------- !! Compute sources of instantaneous microphysical processes for the -!! time-splitted version of LIMA +!! time-split version of LIMA !! !! AUTHOR !! ------ diff --git a/src/MNH/lima_nucleation_procs.f90 b/src/MNH/lima_nucleation_procs.f90 index 9526dafa32b87f94faac15464a80f24cbfc0ea98..715fb98273973e229fefbc811ce811078249193d 100644 --- a/src/MNH/lima_nucleation_procs.f90 +++ b/src/MNH/lima_nucleation_procs.f90 @@ -60,7 +60,7 @@ SUBROUTINE LIMA_NUCLEATION_PROCS (PTSTEP, TPFILE, OCLOSE_OUT, PRHODJ, ! !! PURPOSE !! ------- -!! Compute nucleation processes for the time-splitted version of LIMA +!! Compute nucleation processes for the time-split version of LIMA !! !! AUTHOR !! ------ diff --git a/src/MNH/lima_phillips_ifn_nucleation.f90 b/src/MNH/lima_phillips_ifn_nucleation.f90 index 440a53f1550937df07b86365ce60cb8e2c61a0f9..27d2175e61656774950a96ccd71b2171c2658ead 100644 --- a/src/MNH/lima_phillips_ifn_nucleation.f90 +++ b/src/MNH/lima_phillips_ifn_nucleation.f90 @@ -59,7 +59,7 @@ END MODULE MODI_LIMA_PHILLIPS_IFN_NUCLEATION !! PURPOSE !! ------- !! The purpose of this routine is to compute the heterogeneous nucleation -!! following Phillips (2008) for the time-splitted version of LIMA +!! following Phillips (2008) for the time-split version of LIMA !! !! !!** METHOD diff --git a/src/MNH/lima_tendencies.f90 b/src/MNH/lima_tendencies.f90 index b66b19c3d56f807c7378db7f8a85bcc003584c39..02bf151fce8c8ec637810ab26ae2682d13520e0b 100644 --- a/src/MNH/lima_tendencies.f90 +++ b/src/MNH/lima_tendencies.f90 @@ -1,4 +1,4 @@ -!MNH_LIC Copyright 2013-2018 CNRS, Meteo-France and Universite Paul Sabatier +!MNH_LIC Copyright 2013-2020 CNRS, Meteo-France and Universite Paul Sabatier !MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence !MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt !MNH_LIC for details. version 1. @@ -209,7 +209,7 @@ SUBROUTINE LIMA_TENDENCIES (PTSTEP, LDCOMPUTE, !! PURPOSE !! ------- !! Compute sources of non-instantaneous microphysical processes for the -!! time-splitted version of LIMA +!! time-split version of LIMA !! !! AUTHOR !! ------ diff --git a/src/MNH/ls_coupling.f90 b/src/MNH/ls_coupling.f90 index 9af87a483a3b5cc7bcdd6c6c4b5c4bbc0b9a467d..3f8c43e1e52e2eb03af63022b721195dd0c492b1 100644 --- a/src/MNH/ls_coupling.f90 +++ b/src/MNH/ls_coupling.f90 @@ -1,4 +1,4 @@ -!MNH_LIC Copyright 1996-2019 CNRS, Meteo-France and Universite Paul Sabatier +!MNH_LIC Copyright 1996-2020 CNRS, Meteo-France and Universite Paul Sabatier !MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence !MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt !MNH_LIC for details. version 1. @@ -159,7 +159,7 @@ END MODULE MODI_LS_COUPLING !! !! MODIFICATIONS !! ------------- -!! Original 03/09/96 The previous routine SET_COUPLING have been splitted +!! Original 03/09/96 The previous routine SET_COUPLING have been split !! in 2 routines (UVW_LS_COUPLING and LS_COUPLING), !! and the temporal advance have been removed. !! Correction of the LS sources names (removing of R). diff --git a/src/MNH/modd_budget.f90 b/src/MNH/modd_budget.f90 index 6d0fe284b5547afc95e41824b4048567acbbcb7f..40cb7c46c644a954bea2c4235d0cacfab014f9df 100644 --- a/src/MNH/modd_budget.f90 +++ b/src/MNH/modd_budget.f90 @@ -38,7 +38,7 @@ !! V. Masson 27/11/02 add 2way nesting effect !! P. Jabouille 07/07/04 add budget terms for microphysics !! C. Barthe 19/11/09 add budget terms for electricity -!! C.Lac 04/2016 negative contribution to the budget splitted between advection, turbulence and microphysics for KHKO/C2R2 +!! C.Lac 04/2016 negative contribution to the budget split between advection, turbulence and microphysics for KHKO/C2R2 !! C. Barthe /16 add budget terms for LIMA !! C. LAc 10/2016 add droplets deposition !! S. Riette 11/2016 New budgets for ICE3/ICE4 diff --git a/src/MNH/modd_prep_real.f90 b/src/MNH/modd_prep_real.f90 index d2d06321744568f7b2f1caf138f96388ff092c75..6933ae26a8f64486b93121fa44923c6a8a67774a 100644 --- a/src/MNH/modd_prep_real.f90 +++ b/src/MNH/modd_prep_real.f90 @@ -28,6 +28,7 @@ !! Original 05/05 !! 05/06 (I.Mallet) add *_SV_* variables to allow chemical !! initialization from HCHEMFILE +!! 09/20 (Q. Rodier) add geopotential height for GFS GRIB read !------------------------------------------------------------------------------- ! !* 0. DECLARATIONS @@ -70,6 +71,7 @@ REAL :: XLEN2_LS ! Decay scale for small-scale REAL,DIMENSION(:,:), ALLOCATABLE :: XPS_LS ! surface pressure REAL,DIMENSION(:,:), ALLOCATABLE :: XZS_LS ! orography REAL,DIMENSION(:,:), ALLOCATABLE :: XZSMT_LS ! smooth orography +REAL,DIMENSION(:,:,:), ALLOCATABLE :: XGH_LS ! geopotential height REAL,DIMENSION(:,:,:), ALLOCATABLE :: XZFLUX_LS! altitude of pressure points REAL,DIMENSION(:,:,:), ALLOCATABLE :: XZMASS_LS! altitude of mass points REAL,DIMENSION(:,:,:), ALLOCATABLE :: XPMHP_LS ! pressure minus hyd. pressure diff --git a/src/MNH/mode_prandtl.f90 b/src/MNH/mode_prandtl.f90 index a04e8aa6a4975ee2141b43df4ca538b98cf9d296..04dfe6155e2efdacbcf981be63e260d8046e1187 100644 --- a/src/MNH/mode_prandtl.f90 +++ b/src/MNH/mode_prandtl.f90 @@ -9,6 +9,7 @@ ! !* modification 08/2010 V. Masson smoothing of the discontinuity in functions ! used for implicitation of exchange coefficients +! 05/2020 V. Masson and C. Lac : bug in D_PHI3DTDZ2_O_DDTDZ ! USE MODD_CTURB, ONLY : XCTV, XCSHF, XCTD, XPHI_LIM, XCPR3, XCPR4, XCPR5 USE MODD_PARAMETERS, ONLY : JPVEXT_TURB @@ -272,32 +273,36 @@ IKE = SIZE(PREDTH1,3)-JPVEXT_TURB ! ! IF (HTURBDIM=='3DIM') THEN - !* 3DIM case - IF (OUSERV) THEN - WHERE (PPHI3(:,:,:)<=XPHI_LIM) - D_PHI3DTDZ2_O_DDTDZ(:,:,:) = PPHI3(:,:,:) & - * PDTDZ(:,:,:)*(2.-PREDTH1(:,:,:)*(3./2.+PREDTH1+PREDR1) & - /((1.+PREDTH1+PREDR1)*(1.+1./2.*(PREDTH1+PREDR1)))) & - + (1.+PREDR1)*(PRED2THR3+PRED2TH3) & - / (PREDTH1*(1.+PREDTH1+PREDR1)*(1.+1./2.*(PREDTH1+PREDR1))) & - - (1./2.*PREDTH1+PREDR1 * (1.+PREDTH1+PREDR1)) & - / ((1.+PREDTH1+PREDR1)*(1.+1./2.*(PREDTH1+PREDR1))) - ELSEWHERE - D_PHI3DTDZ2_O_DDTDZ(:,:,:) = PPHI3(:,:,:) * 2. * PDTDZ(:,:,:) - ENDWHERE + ! by derivation of (phi3 dtdz) * dtdz according to dtdz we obtain: + D_PHI3DTDZ2_O_DDTDZ(:,:,:) = PDTDZ * (PPHI3 + & + D_PHI3DTDZ_O_DDTDZ(PPHI3,PREDTH1,PREDR1,PRED2TH3,PRED2THR3,HTURBDIM,OUSERV) ) -! - ELSE - WHERE (PPHI3(:,:,:)<=XPHI_LIM) - D_PHI3DTDZ2_O_DDTDZ(:,:,:) = PPHI3(:,:,:) & - * PDTDZ(:,:,:)*(2.-PREDTH1(:,:,:)*(3./2.+PREDTH1) & - /((1.+PREDTH1)*(1.+1./2.*PREDTH1))) & - + PRED2TH3 / (PREDTH1*(1.+PREDTH1)*(1.+1./2.*PREDTH1)) & - - 1./2.*PREDTH1 / ((1.+PREDTH1)*(1.+1./2.*PREDTH1)) - ELSEWHERE - D_PHI3DTDZ2_O_DDTDZ(:,:,:) = PPHI3(:,:,:) * 2. * PDTDZ(:,:,:) - ENDWHERE - END IF +! !* 3DIM case +! IF (OUSERV) THEN +! WHERE (PPHI3(:,:,:)<=XPHI_LIM) +! D_PHI3DTDZ2_O_DDTDZ(:,:,:) = PPHI3(:,:,:) & +! * PDTDZ(:,:,:)*(2.-PREDTH1(:,:,:)*(3./2.+PREDTH1+PREDR1) & +! /((1.+PREDTH1+PREDR1)*(1.+1./2.*(PREDTH1+PREDR1)))) & +! + (1.+PREDR1)*(PRED2THR3+PRED2TH3) & +! / (PREDTH1*(1.+PREDTH1+PREDR1)*(1.+1./2.*(PREDTH1+PREDR1))) & +! - (1./2.*PREDTH1+PREDR1 * (1.+PREDTH1+PREDR1)) & +! / ((1.+PREDTH1+PREDR1)*(1.+1./2.*(PREDTH1+PREDR1))) +! ELSEWHERE +! D_PHI3DTDZ2_O_DDTDZ(:,:,:) = PPHI3(:,:,:) * 2. * PDTDZ(:,:,:) +! ENDWHERE +! +!! +! ELSE +! WHERE (PPHI3(:,:,:)<=XPHI_LIM) +! D_PHI3DTDZ2_O_DDTDZ(:,:,:) = PPHI3(:,:,:) & +! * PDTDZ(:,:,:)*(2.-PREDTH1(:,:,:)*(3./2.+PREDTH1) & +! /((1.+PREDTH1)*(1.+1./2.*PREDTH1))) & +! + PRED2TH3 / (PREDTH1*(1.+PREDTH1)*(1.+1./2.*PREDTH1)) & +! - 1./2.*PREDTH1 / ((1.+PREDTH1)*(1.+1./2.*PREDTH1)) +! ELSEWHERE +! D_PHI3DTDZ2_O_DDTDZ(:,:,:) = PPHI3(:,:,:) * 2. * PDTDZ(:,:,:) +! ENDWHERE +! END IF ELSE !* 1DIM case WHERE (PPHI3(:,:,:)<=XPHI_LIM) diff --git a/src/MNH/modeln.f90 b/src/MNH/modeln.f90 index 7def250d57f0a34ad2a8013b1df7c462342efb28..919292e865c7189f9737a6f8a9cccae778d58c26 100644 --- a/src/MNH/modeln.f90 +++ b/src/MNH/modeln.f90 @@ -168,7 +168,7 @@ END MODULE MODI_MODEL_n !! July 29,1996 (Lafore) nesting introduction !! Aug. 1,1996 (Lafore) synchronization between models !! Sept. 4,1996 (Lafore) modification of call to routine SET_COUPLING -!! now splitted in 2 routines +!! now split in 2 routines !! (UVW_LS_COUPLING and SCALAR_LS_COUPLING) !! Sept 5,1996 (V.Masson) print of loop index for debugging !! purposes diff --git a/src/MNH/modn_budget.f90 b/src/MNH/modn_budget.f90 index 257e023032c00b2e1bf54986b3845ff225422455..52bc31721e72572a8efae724e3159f561ae41a17 100644 --- a/src/MNH/modn_budget.f90 +++ b/src/MNH/modn_budget.f90 @@ -221,7 +221,7 @@ !! J.-P. Pinty 18/02/97 add forcing and ice !! J.-P. Pinty 25/09/00 add budget terms for C2R2 !! D. Gazen 22/01/01 add NCHEMSV -!! C.Lac 04/2016 negative contribution to the budget splitted between advection, turbulence and microphysics for KHKO/C2R2 +!! C.Lac 04/2016 negative contribution to the budget split between advection, turbulence and microphysics for KHKO/C2R2 !! C. Barthe /16 add budget terms for LIMA !! C.Lac 10/2016 Add droplet deposition !! S. Riette 11/2016 New budgets for ICE3/ICE4 diff --git a/src/MNH/radiations.f90 b/src/MNH/radiations.f90 index 8d47d4851fe307bbfa631489ad4fdbf10a128a7c..749dbae56b126458b4ba80aced08d408086d8370 100644 --- a/src/MNH/radiations.f90 +++ b/src/MNH/radiations.f90 @@ -84,7 +84,7 @@ CONTAINS !! ------------- !! Original 26/02/95 !! J.Stein 20/12/95 add the array splitting in order to save memory -!! J.-P. Pinty 19/11/96 change the splitted arrays, specific humidity +!! J.-P. Pinty 19/11/96 change the split arrays, specific humidity !! and add the ice phase !! J.Stein 22/06/97 use of the absolute pressure !! P.Jabouille 31/07/97 impose a zero humidity for dry simulation @@ -204,7 +204,7 @@ INTEGER, INTENT(IN) :: KSTATM ! index of the standard ! atmosphere level just above ! the model top INTEGER, INTENT(IN) :: KRAD_COLNBR ! factor by which the memory - ! is splitted + ! is split ! !Choice of : CHARACTER (LEN=*), INTENT (IN) :: HEFRADL ! @@ -418,7 +418,7 @@ REAL, DIMENSION(:), ALLOCATABLE :: ZWORK1, ZWORK2, ZWORK3, ZWORK REAL, DIMENSION(:,:), ALLOCATABLE :: ZWORK4, ZWORK1AER, ZWORK2AER, ZWORK_GRID LOGICAL, DIMENSION(SIZE(PTHT,1),SIZE(PTHT,2)) :: ZWORKL ! -! splitted arrays used to split the memory required by the ECMWF_radiation +! split arrays used to split the memory required by the ECMWF_radiation ! subroutine, the fields have the same meaning as their complete counterpart ! REAL(KIND=JPRB), DIMENSION(:,:), ALLOCATABLE :: ZALBP_SPLIT, ZALBD_SPLIT @@ -514,7 +514,7 @@ REAL, DIMENSION(KFLEV,KSWB_OLD) :: ZTAUREL_EQ_CLEAR !tau/tau_{550} INTEGER :: WVL_IDX !Counter for wavelength ! -INTEGER :: JI_SPLIT ! loop on the splitted array +INTEGER :: JI_SPLIT ! loop on the split array INTEGER :: INUM_CALL ! number of CALL of the radiation scheme INTEGER :: IDIM_EFF ! effective number of air-columns to compute INTEGER :: IDIM_RESIDUE ! number of remaining air-columns to compute @@ -2181,7 +2181,7 @@ ELSE END IF END IF ! -! fill the splitted arrays with their values taken from the full arrays +! fill the split arrays with their values taken from the full arrays ! IBEG = IDIM-IDIM_RESIDUE+1 IEND = IBEG+IDIM_EFF-1 @@ -2218,7 +2218,7 @@ ELSE ZQSAVE_SPLIT (:,:) = ZQSAVE (IBEG:IEND ,:) ZTS_SPLIT (:) = ZTS (IBEG:IEND) ! -! CALL the ECMWF radiation with the splitted array +! CALL the ECMWF radiation with the split array ! IF (CCLOUD == 'LIMA') THEN ! LIMA concentrations @@ -2320,7 +2320,7 @@ ELSE END IF END IF ! -! fill the full output arrays with the splitted arrays +! fill the full output arrays with the split arrays ! ZDTLW( IBEG:IEND ,:) = ZDTLW_SPLIT(:,:) ZDTSW( IBEG:IEND ,:) = ZDTSW_SPLIT(:,:) @@ -2372,7 +2372,7 @@ ELSE ! IDIM_RESIDUE = IDIM_RESIDUE - IDIM_EFF ! -! desallocation of the splitted arrays +! desallocation of the split arrays ! IF( JI_SPLIT >= INUM_CALL-1 ) THEN DEALLOCATE( ZALBP_SPLIT ) diff --git a/src/MNH/radtr_satel.f90 b/src/MNH/radtr_satel.f90 index 357b7941c06927cdbf7b1ed5e01627d7a97f3adc..851030cd802f30efaafe2a856c5c3921fc60057c 100644 --- a/src/MNH/radtr_satel.f90 +++ b/src/MNH/radtr_satel.f90 @@ -1,4 +1,4 @@ -!MNH_LIC Copyright 2000-2019 CNRS, Meteo-France and Universite Paul Sabatier +!MNH_LIC Copyright 2000-2020 CNRS, Meteo-France and Universite Paul Sabatier !MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence !MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt !MNH_LIC for details. version 1. @@ -25,7 +25,7 @@ INTEGER, INTENT(IN) :: KFLEV !number of vertical levels where the !radiation calculations are performed INTEGER, INTENT(IN) :: KSTATM !index of the standard atmosphere level !just above the model top -INTEGER, INTENT(IN) :: KRAD_COLNBR !factor by which the memory is splitted +INTEGER, INTENT(IN) :: KRAD_COLNBR !factor by which the memory is split ! REAL, DIMENSION(:,:), INTENT(IN) :: PEMIS !Surface IR EMISsivity REAL, INTENT(IN) :: PCCO2 !CO2 content @@ -136,7 +136,7 @@ INTEGER, INTENT(IN) :: KFLEV !number of vertical levels where the ! radiation calculations are performed INTEGER, INTENT(IN) :: KSTATM !index of the standard atmosphere level !just above the model top -INTEGER, INTENT(IN) :: KRAD_COLNBR !factor by which the memory is splitted +INTEGER, INTENT(IN) :: KRAD_COLNBR !factor by which the memory is split ! REAL, DIMENSION(:,:), INTENT(IN) :: PEMIS !Surface IR EMISsivity REAL, INTENT(IN) :: PCCO2 !CO2 content @@ -226,7 +226,7 @@ REAL, DIMENSION(:,:), ALLOCATABLE :: ZZRADFT ! REAL, DIMENSION(:), ALLOCATABLE :: ZWORK1, ZWORK3 ! -! splitted arrays used to split the memory required by the ECMWF_radiation +! split arrays used to split the memory required by the ECMWF_radiation ! subroutine, the fields have the same meaning as their complete counterpart REAL, DIMENSION(:), ALLOCATABLE :: ZREMIS_SPLIT REAL, DIMENSION(:,:), ALLOCATABLE :: ZO3AVE_SPLIT @@ -241,7 +241,7 @@ REAL, DIMENSION(:), ALLOCATABLE :: ZDT0_SPLIT REAL, DIMENSION(:,:), ALLOCATABLE :: ZRADBT_SPLIT REAL, DIMENSION(:,:), ALLOCATABLE :: ZRADBC_SPLIT ! -INTEGER :: JI_SPLIT ! loop on the splitted array +INTEGER :: JI_SPLIT ! loop on the split array INTEGER :: INUM_CALL ! number of CALL of the radiation scheme INTEGER :: IDIM_EFF ! effective number of air-columns to compute INTEGER :: IDIM_RESIDUE ! number of remaining air-columns to compute @@ -642,7 +642,7 @@ ELSE ALLOCATE( ZRADBC_SPLIT(IDIM_EFF,JPWVINT)) END IF ! - ! fill the splitted arrays with their values + ! fill the split arrays with their values ! taken from the full arrays ! IBEG = IDIM-IDIM_RESIDUE+1 @@ -658,7 +658,7 @@ ELSE ZVIEW_SPLIT(:) = ZVIEW ( IBEG:IEND ) ZDT0_SPLIT(:) = ZDT0 ( IBEG:IEND ) ! - ! call ECMWF_radiation with the splitted arrays + ! call ECMWF_radiation with the split arrays ! CALL NBMVEC( 1, IDIM_EFF, IDIM_EFF, KFLEV, IGL, ICABS, ING1, IUABS,& IH2O, ICO2, IO3, ICNT, IN2O, ICH4, ICO, IC11, IC12, ICFC, & @@ -668,14 +668,14 @@ ELSE ZVIEW_SPLIT, ZCLDLD_SPLIT, ZCLDLU_SPLIT, ZDT0_SPLIT, & ZREMIS_SPLIT, ZRADBC_SPLIT, ZRADBT_SPLIT) ! - ! fill the full output arrays with the splitted arrays + ! fill the full output arrays with the split arrays ! ZRADBT( IBEG:IEND ,:) = ZRADBT_SPLIT(:,:) ZRADBC( IBEG:IEND ,:) = ZRADBC_SPLIT(:,:) ! IDIM_RESIDUE = IDIM_RESIDUE - IDIM_EFF ! - ! desallocation of the splitted arrays + ! desallocation of the split arrays ! IF( JI_SPLIT >= INUM_CALL-1 ) THEN DEALLOCATE(ZREMIS_SPLIT) diff --git a/src/MNH/rain_c2r2_khko.f90 b/src/MNH/rain_c2r2_khko.f90 index 4bb0e2474c480e71f4cc76d435e300374c3f5755..06cf9abcfe03a55ba7e849c9c00746c0e1a6410d 100644 --- a/src/MNH/rain_c2r2_khko.f90 +++ b/src/MNH/rain_c2r2_khko.f90 @@ -365,7 +365,7 @@ REAL, DIMENSION(SIZE(PRHODREF,1),SIZE(PRHODREF,2),SIZE(PRHODREF,3)) & :: ZMVRR,ZVRR,ZVCR REAL, DIMENSION(SIZE(PRHODREF,1),SIZE(PRHODREF,2),SIZE(PRHODREF,3)) & :: ZPRCT, ZPCCT, ZPRRT, ZPCRT - ! For splitted sedimentation + ! For split sedimentation REAL, DIMENSION(SIZE(PRHODREF,1),SIZE(PRHODREF,2),SIZE(PRHODREF,3)) & :: ZMVRC !Cloud water mean volumic radius REAL, DIMENSION(SIZE(PEXNREF,1),SIZE(PEXNREF,2),SIZE(PEXNREF,3)) & diff --git a/src/MNH/read_all_data_grib_case.f90 b/src/MNH/read_all_data_grib_case.f90 index 030716ac977d58321ffc122cb863b6baa4eea661..b38be9d78b33525a200a7a18ae524c304ecea68d 100644 --- a/src/MNH/read_all_data_grib_case.f90 +++ b/src/MNH/read_all_data_grib_case.f90 @@ -134,6 +134,7 @@ END MODULE MODI_READ_ALL_DATA_GRIB_CASE ! Q. Rodier 16/09/2019: switch of GRIB number ID for orography in ARPEGE/AROME in EPyGrAM ! Q. Rodier 27/01/2020: switch of GRIB number ID for orography and hydrometeors in ARPEGE/AROME in EPyGrAM v1.3.7 ! Q. Rodier 21/04/2020: correction GFS u and v wind component written in the right vertical order +! Q. Rodier 02/09/2020 : Read and interpol geopotential height for interpolation on isobaric surface Grid of NCEP !------------------------------------------------------------------------------- ! !* 0. DECLARATIONS @@ -206,7 +207,7 @@ INTEGER :: ILUOUT0 ! Unit used for output msg. INTEGER :: IRESP ! Return code of FM-routines INTEGER :: IRET ! Return code from subroutines INTEGER(KIND=kindOfInt) :: IRET_GRIB ! Return code from subroutines -INTEGER, PARAMETER :: JP_GFS=26 ! number of pressure levels for GFS model +INTEGER, PARAMETER :: JP_GFS=31 ! number of pressure levels for GFS model REAL :: ZA,ZB,ZC ! Dummy variables REAL :: ZD,ZE,ZF ! | REAL :: ZTEMP ! | @@ -314,6 +315,7 @@ REAL, DIMENSION(:,:), ALLOCATABLE :: ZPF_G ! Pressure (flux point) REAL, DIMENSION(:,:), ALLOCATABLE :: ZPM_G ! Pressure (mass point) REAL, DIMENSION(:,:), ALLOCATABLE :: ZEXNF_G ! Exner fct. (flux point) REAL, DIMENSION(:,:), ALLOCATABLE :: ZEXNM_G ! Exner fct. (mass point) +REAL, DIMENSION(:,:), ALLOCATABLE :: ZGH_G ! Geopotential Height REAL, DIMENSION(:,:), ALLOCATABLE :: ZT_G ! Temperature REAL, DIMENSION(:,:), ALLOCATABLE :: ZQ_G ! Specific humidity REAL, DIMENSION(:), ALLOCATABLE :: ZH_G ! Relative humidity @@ -337,7 +339,7 @@ INTEGER :: IVERSION,ILEVTYPE LOGICAL :: GFIND ! to test if sea wave height is found !--------------------------------------------------------------------------------------- IP_GFS=(/1000,975,950,925,900,850,800,750,700,650,600,550,500,450,400,350,300,& - 250,200,150,100,70,50,30,20,10/)! + 250,200,150,100,70,50,30,20,10,7,5,3,2,1/)! ! TZFILE => NULL() ! @@ -528,15 +530,10 @@ SELECT CASE (IMODEL) END IF ENDIF CASE(10) ! NCEP - DO IVAR=0,222 - CALL SEARCH_FIELD(IGRIB,INUM_ZS,KPARAM=IVAR) + CALL SEARCH_FIELD(IGRIB,INUM_ZS,KDIS=0,KCAT=3,KNUMBER=5,KTFFS=1) IF(INUM_ZS < 0) THEN - WRITE (ILUOUT0,'(A)')'Orography is missing' - ENDIF - END DO - INUM_ZS=218 - WRITE (ILUOUT0,*) 'lsm ',IGRIB(350) - WRITE (ILUOUT0,*) 'orog ',IGRIB(INUM_ZS) + WRITE (ILUOUT0,'(A)')'Orography is missing - abort' + ENDIF END SELECT ZPARAM(:)=-999. CALL GRIB_GET(IGRIB(INUM_ZS),'Nj',INJ,IRET_GRIB) @@ -739,7 +736,7 @@ IF (IMODEL/=10) THEN CALL SEARCH_FIELD(IGRIB,INUM,KPARAM=IQ,KLEV1=ISTARTLEVEL) IF(INUM < 0) call Print_msg( NVERB_FATAL, 'IO', 'READ_ALL_DATA_GRIB_CASE', 'atmospheric specific humidity is missing' ) ELSE ! NCEP - ISTARTLEVEL=10 + ISTARTLEVEL=1000 IT=130 IQ=157 CALL SEARCH_FIELD(IGRIB,INUM,KPARAM=IT,KLEV1=ISTARTLEVEL) @@ -786,7 +783,7 @@ ELSE ! NCEP END IF CALL GRIB_GET(IGRIB(INUM),'values',ZQ_G(:,JLOOP1),IRET_GRIB) WRITE (ILUOUT0,*) 'Q ',ILEV1,IRET_GRIB - CALL SEARCH_FIELD(IGRIB,INUM,KPARAM=IT,KLEV1=ILEV1) + CALL SEARCH_FIELD(IGRIB,INUM,KDIS=0,KCAT=0,KNUMBER=0,KLEV1=ILEV1,KTFFS=100) IF (INUM< 0) THEN WRITE(YMSG,*) 'atmospheric temperature level ',JLOOP1,' is missing' CALL PRINT_MSG(NVERB_FATAL,'IO','READ_ALL_DATA_GRIB_CASE',YMSG) @@ -1025,6 +1022,43 @@ ELSE !NCEP END IF DEALLOCATE (ZOUT) + + +!--------------------------------------------------------------------------------------- +!* 2.5.4.2 Read and interpol geopotential height for interpolation on isobaric surface Grid of NCEP +!--------------------------------------------------------------------------------------- +! +ALLOCATE (ZGH_G(ISIZE,INLEVEL)) +! +IF(IMODEL==10) THEN !NCEP with pressure grid only + DO JLOOP1=1, INLEVEL + ILEV1 = IP_GFS(JLOOP1) + WRITE (ILUOUT0,'(A)') ' | Searching geopotential height' + CALL SEARCH_FIELD(IGRIB,INUM,KDIS=0,KCAT=3,KNUMBER=5,KLEV1=ILEV1) + IF (INUM< 0) THEN + !callabortstop + WRITE(YMSG,*) 'Geopoential height level ',JLOOP1,' is missing' + CALL PRINT_MSG(NVERB_FATAL,'GEN','READ_ALL_DATA_GRIB_CASE',YMSG) + END IF + ! + CALL GRIB_GET(IGRIB(INUM),'values',ZGH_G(:,JLOOP1),IRET_GRIB) + CALL GRIB_GET(IGRIB(INUM),'Nj',INJ,IRET_GRIB) + ! + END DO + ! + CALL COORDINATE_CONVERSION(IMODEL,IGRIB(INUM_ZS),IIU,IJU,ZLONOUT,ZLATOUT,& + ZXOUT,ZYOUT,INI,ZPARAM,IINLO) + ! + ALLOCATE(ZOUT(INO)) + ALLOCATE(XGH_LS(IIU,IJU,INLEVEL)) + ! + DO JLOOP1=1, INLEVEL + CALL HORIBL(ZPARAM(3),ZPARAM(4),ZPARAM(5),ZPARAM(6),INT(ZPARAM(2)),IINLO,INI, & + ZGH_G(:,JLOOP1),INO,ZXOUT,ZYOUT,ZOUT,.FALSE.,PTIME_HORI,.FALSE.) + CALL ARRAY_1D_TO_2D (INO,ZOUT,IIU,IJU,XGH_LS(:,:,JLOOP1)) + END DO + DEALLOCATE(ZOUT) +END IF ! !* 2.5.5 Compute atmospheric pressure on MESO-NH grid ! @@ -1867,7 +1901,7 @@ END SUBROUTINE ARRAY_1D_TO_2D !--------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------- !################################################################################# -SUBROUTINE SEARCH_FIELD(KGRIB,KNUM,KPARAM,KDIS,KCAT,KNUMBER,KLEV1) +SUBROUTINE SEARCH_FIELD(KGRIB,KNUM,KPARAM,KDIS,KCAT,KNUMBER,KLEV1,KTFFS) !################################################################################# ! search the grib message corresponding to KPARAM,KLTYPE,KLEV1,KLEV2 in all ! the KGIRB messages @@ -1885,13 +1919,14 @@ INTEGER,INTENT(IN),OPTIONAL :: KDIS ! Discipline (GRIB2) INTEGER,INTENT(IN),OPTIONAL :: KCAT ! Catégorie (GRIB2) INTEGER,INTENT(IN),OPTIONAL :: KNUMBER ! parameterNumber (GRIB2) INTEGER,INTENT(IN),OPTIONAL :: KLEV1 ! Level +INTEGER,INTENT(IN),OPTIONAL :: KTFFS ! TypeOfFirstFixedSurface ! ! Declaration of local variables ! INTEGER :: IFOUND ! Number of correct parameters INTEGER :: ISEARCH ! Number of correct parameters to find INTEGER :: IRET ! error code -INTEGER :: IPARAM,IDIS,ICAT,INUMBER +INTEGER :: IPARAM,IDIS,ICAT,INUMBER,ITFFS INTEGER :: ILEV1 ! Level parameter 1 INTEGER :: JLOOP ! Dummy counter INTEGER :: IVERSION @@ -1909,6 +1944,7 @@ IF (PRESENT(KDIS)) ISEARCH=ISEARCH+1 IF (PRESENT(KCAT)) ISEARCH=ISEARCH+1 IF (PRESENT(KNUMBER)) ISEARCH=ISEARCH+1 IF (PRESENT(KLEV1)) ISEARCH=ISEARCH+1 +IF(PRESENT(KTFFS)) ISEARCH=ISEARCH+1 ! DO JLOOP=1,SIZE(KGRIB) IFOUND = 0 @@ -1921,6 +1957,23 @@ DO JLOOP=1,SIZE(KGRIB) WRITE (ILUOUT0,'(A)')' | ECMWF pseudo-Grib data encountered, skipping field' CYCLE ENDIF + ! + IF (PRESENT(KTFFS)) THEN + CALL GRIB_GET(KGRIB(JLOOP),'typeOfFirstFixedSurface',ITFFS,IRET_GRIB) + IF (IRET_GRIB > 0) THEN + WRITE (ILUOUT0,'(A)')' | Error encountered in the Grib file, skipping field' + CYCLE + ELSE IF (IRET_GRIB == -6) THEN + WRITE (ILUOUT0,'(A)')' | ECMWF pseudo-Grib data encountered, skipping field' + CYCLE + ENDIF + IF (ITFFS==KTFFS) THEN + IFOUND = IFOUND + 1 + ELSE + CYCLE + ENDIF + ENDIF + IF (PRESENT(KPARAM)) THEN IF (IVERSION == 2) THEN CALL GRIB_GET(KGRIB(JLOOP),'paramId',IPARAM,IRET_GRIB) diff --git a/src/MNH/sources_neg_correct.f90 b/src/MNH/sources_neg_correct.f90 index 7a0c80d42e36428255e742c623a7caca87a3a929..e93073be2a67eeb9d257eb4dd5f9d06e4d8aa487 100644 --- a/src/MNH/sources_neg_correct.f90 +++ b/src/MNH/sources_neg_correct.f90 @@ -6,6 +6,7 @@ ! Author: P. Wautelet 25/06/2020 (deduplication of code from advection_metsv, resolved_cloud and turb) ! Modifications: ! P. Wautelet 30/06/2020: remove non-local corrections in resolved_cloud for NEGA => new local corrections here +! J. Escobar 21/07/2020: bug <-> array of size(:,:,:,0) => return if krr=0 !----------------------------------------------------------------- module mode_sources_neg_correct @@ -50,6 +51,8 @@ integer :: jrmax integer :: jsv real, dimension(:, :, :), allocatable :: zt, zexn, zlv, zls, zcph, zcor +if ( krr == 0 ) return + if ( hbudname /= 'NEADV' .and. hbudname /= 'NECON' .and. hbudname /= 'NEGA' .and. hbudname /= 'NETUR' ) & call Print_msg( NVERB_WARNING, 'GEN', 'Sources_neg_correct', 'budget '//hbudname//' not yet tested' ) diff --git a/src/MNH/split_grid_parameter_mnh.f90 b/src/MNH/split_grid_parameter_mnh.f90 index e859565f1512b167ef76f96a8a8c1856968428b8..e04ff2ea5a2065123e3abf22bf0d58a0a26b1f17 100644 --- a/src/MNH/split_grid_parameter_mnh.f90 +++ b/src/MNH/split_grid_parameter_mnh.f90 @@ -1,4 +1,4 @@ -!MNH_LIC Copyright 2011-2019 CNRS, Meteo-France and Universite Paul Sabatier +!MNH_LIC Copyright 2011-2020 CNRS, Meteo-France and Universite Paul Sabatier !MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence !MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt !MNH_LIC for details. version 1. @@ -11,7 +11,7 @@ #endif ! ############################################################# ! -!!**** * - routine to split a real array on the splitted grid +!!**** * - routine to split a real array on the split grid ! ! Modifications ! M.Moge 10/02/2015 Using local subdomain for parallel execution @@ -39,7 +39,7 @@ INTEGER, INTENT(IN) :: KJMAX_ll !(global) dimension of the dom INTEGER, INTENT(IN) :: KHALO ! size of the Halo #endif REAL, DIMENSION(KDIM ), INTENT(IN) :: PFIELD ! real field for complete grid -REAL, DIMENSION(KSIZE), INTENT(OUT):: PFIELD_SPLIT! real field for splitted grid +REAL, DIMENSION(KSIZE), INTENT(OUT):: PFIELD_SPLIT! real field for split grid ! !* 0.2 Declarations of local variables ! @@ -143,7 +143,7 @@ END SUBROUTINE SPLIT_GRID_PARAMETERX1_MNH #endif ! ############################################################# ! -!!**** * - routine to define an integer related to splitted grid +!!**** * - routine to define an integer related to split grid ! ! ! @@ -164,7 +164,7 @@ CHARACTER(LEN=6), INTENT(IN) :: HREC ! name of the parameter INTEGER, INTENT(IN) :: KHALO ! size of the Halo #endif INTEGER, INTENT(IN) :: KFIELD ! integer scalar for complete grid -INTEGER, INTENT(OUT):: KFIELD_SPLIT ! integer scalar for splitted grid +INTEGER, INTENT(OUT):: KFIELD_SPLIT ! integer scalar for split grid !* 0.2 Declarations of local variables ! INTEGER :: IIB, IIE, IJB, IJE diff --git a/src/MNH/turb_ver.f90 b/src/MNH/turb_ver.f90 index 1a7b33ed0cbd89cff784437cbee2a70e7eda2129..6649ff77da5701daaf0d52cf037cb58cef97dba6 100644 --- a/src/MNH/turb_ver.f90 +++ b/src/MNH/turb_ver.f90 @@ -226,10 +226,10 @@ END MODULE MODI_TURB_VER !! _(M,UW,...) represent the localization of the !! field derivated !! -!! SUBROUTINE TRIDIAG : to compute the splitted implicit evolution +!! SUBROUTINE TRIDIAG : to compute the split implicit evolution !! of a variable located at a mass point !! -!! SUBROUTINE TRIDIAG_WIND: to compute the splitted implicit evolution +!! SUBROUTINE TRIDIAG_WIND: to compute the split implicit evolution !! of a variable located at a wind point !! !! FUNCTIONs ETHETA and EMOIST : diff --git a/src/MNH/turb_ver_dyn_flux.f90 b/src/MNH/turb_ver_dyn_flux.f90 index d7ef5a5df65f4da52517114f4910202c924f76d2..f7596933f7a7e7530d8cb06b0686db89fa1e69f4 100644 --- a/src/MNH/turb_ver_dyn_flux.f90 +++ b/src/MNH/turb_ver_dyn_flux.f90 @@ -198,10 +198,10 @@ END MODULE MODI_TURB_VER_DYN_FLUX !! DXF,DYF,DZF,DZM !! : Shuman functions (difference operators) !! -!! SUBROUTINE TRIDIAG : to compute the splitted implicit evolution +!! SUBROUTINE TRIDIAG : to compute the split implicit evolution !! of a variable located at a mass point !! -!! SUBROUTINE TRIDIAG_WIND: to compute the splitted implicit evolution +!! SUBROUTINE TRIDIAG_WIND: to compute the split implicit evolution !! of a variable located at a wind point !! !! FUNCTIONs ETHETA and EMOIST : @@ -483,7 +483,7 @@ ZSOURCE(:,:,IKB:IKB) = & ZSOURCE(:,:,IKTB+1:IKTE-1) = 0. ZSOURCE(:,:,IKE) = 0. ! -! Obtention of the splitted U at t+ deltat +! Obtention of the split U at t+ deltat ! CALL TRIDIAG_WIND(KKA,KKU,KKL,PUM,ZA,ZCOEFS(:,:,1),PTSTEP,PEXPL,PIMPL, & MXM(PRHODJ),ZSOURCE,ZRES) @@ -659,7 +659,7 @@ ZSOURCE(:,:,IKB:IKB) = & ZSOURCE(:,:,IKTB+1:IKTE-1) = 0. ZSOURCE(:,:,IKE) = 0. ! -! Obtention of the splitted V at t+ deltat +! Obtention of the split V at t+ deltat CALL TRIDIAG_WIND(KKA,KKU,KKL,PVM,ZA,ZCOEFS(:,:,1),PTSTEP,PEXPL,PIMPL, & MYM(PRHODJ),ZSOURCE,ZRES) ! diff --git a/src/MNH/turb_ver_sv_flux.f90 b/src/MNH/turb_ver_sv_flux.f90 index 6603b8ad60bc64d30720e2b6b13513b07bd56811..3439923f47176bcf0ccbd94c34f1a9153ace6fa2 100644 --- a/src/MNH/turb_ver_sv_flux.f90 +++ b/src/MNH/turb_ver_sv_flux.f90 @@ -177,10 +177,10 @@ END MODULE MODI_TURB_VER_SV_FLUX !! DXF,DYF,DZF,DZM !! : Shuman functions (difference operators) !! -!! SUBROUTINE TRIDIAG : to compute the splitted implicit evolution +!! SUBROUTINE TRIDIAG : to compute the split implicit evolution !! of a variable located at a mass point !! -!! SUBROUTINE TRIDIAG_WIND: to compute the splitted implicit evolution +!! SUBROUTINE TRIDIAG_WIND: to compute the split implicit evolution !! of a variable located at a wind point !! !! FUNCTIONs ETHETA and EMOIST : @@ -419,7 +419,7 @@ DO JSV=1,ISV ZSOURCE(:,:,IKTB+1:IKTE-1) = 0. ZSOURCE(:,:,IKE) = 0. ! -! Obtention of the splitted JSV scalar variable at t+ deltat +! Obtention of the split JSV scalar variable at t+ deltat CALL TRIDIAG(KKA,KKU,KKL,PSVM(:,:,:,JSV),ZA,PTSTEP,PEXPL,PIMPL,PRHODJ,ZSOURCE,ZRES) ! ! Compute the equivalent tendency for the JSV scalar variable diff --git a/src/MNH/turb_ver_thermo_corr.f90 b/src/MNH/turb_ver_thermo_corr.f90 index e4909f49b3a7bd4b50c6b0294ad1542bab44eb47..00096ac5a08cd8c465b9c4457ec48de58aed2123 100644 --- a/src/MNH/turb_ver_thermo_corr.f90 +++ b/src/MNH/turb_ver_thermo_corr.f90 @@ -222,10 +222,10 @@ END MODULE MODI_TURB_VER_THERMO_CORR !! DXF,DYF,DZF,DZM !! : Shuman functions (difference operators) !! -!! SUBROUTINE TRIDIAG : to compute the splitted implicit evolution +!! SUBROUTINE TRIDIAG : to compute the split implicit evolution !! of a variable located at a mass point !! -!! SUBROUTINE TRIDIAG_WIND: to compute the splitted implicit evolution +!! SUBROUTINE TRIDIAG_WIND: to compute the split implicit evolution !! of a variable located at a wind point !! !! FUNCTIONs ETHETA and EMOIST : diff --git a/src/MNH/turb_ver_thermo_flux.f90 b/src/MNH/turb_ver_thermo_flux.f90 index 9ee8de8bf881cddc1ad7d95fc18bd4c72779e374..dfce2cc475c47f138ca02052c8c175a241f5983d 100644 --- a/src/MNH/turb_ver_thermo_flux.f90 +++ b/src/MNH/turb_ver_thermo_flux.f90 @@ -234,10 +234,10 @@ END MODULE MODI_TURB_VER_THERMO_FLUX !! DXF,DYF,DZF,DZM !! : Shuman functions (difference operators) !! -!! SUBROUTINE TRIDIAG : to compute the splitted implicit evolution +!! SUBROUTINE TRIDIAG : to compute the split implicit evolution !! of a variable located at a mass point !! -!! SUBROUTINE TRIDIAG_WIND: to compute the splitted implicit evolution +!! SUBROUTINE TRIDIAG_WIND: to compute the split implicit evolution !! of a variable located at a wind point !! !! FUNCTIONs ETHETA and EMOIST : @@ -580,7 +580,7 @@ ELSE * 0.5 * (1. + PRHODJ(:,:,KKA) / PRHODJ(:,:,IKB)) END IF ! -! Compute the splitted conservative potential temperature at t+deltat +! Compute the split conservative potential temperature at t+deltat CALL TRIDIAG_THERMO(KKA,KKU,KKL,PTHLM,ZF,ZDFDDTDZ,PTSTEP,PIMPL,PDZZ,& PRHODJ,PTHLP) ! @@ -758,7 +758,7 @@ IF (KRR /= 0) THEN * 0.5 * (1. + PRHODJ(:,:,KKA) / PRHODJ(:,:,IKB)) END IF ! - ! Compute the splitted conservative potential temperature at t+deltat + ! Compute the split conservative potential temperature at t+deltat CALL TRIDIAG_THERMO(KKA,KKU,KKL,PRM(:,:,:,1),ZF,ZDFDDRDZ,PTSTEP,PIMPL,& PDZZ,PRHODJ,PRP) ! diff --git a/src/MNH/ver_prep_gribex_case.f90 b/src/MNH/ver_prep_gribex_case.f90 index 1c6ea2b2af6033a4dc355ca8f44fb22be3ae1cb5..8a6cc54bb401f84f1c5e5cbeafff1bb41cb6e2e9 100644 --- a/src/MNH/ver_prep_gribex_case.f90 +++ b/src/MNH/ver_prep_gribex_case.f90 @@ -85,6 +85,8 @@ END MODULE MODI_VER_PREP_GRIBEX_CASE !! May 2006 Remove EPS !! Apr, 09 2018 (J.-P. Chaboureau) add isobaric surface !! Philippe Wautelet: 05/2016-04/2018: new data structures and calls for I/O +!! Sep, 02, 2020 (Q. Rodier) use of geopotential height instead of +!! height above orography for isobaric surface interpolation !------------------------------------------------------------------------------- ! !* 0. DECLARATIONS @@ -271,8 +273,9 @@ IF (HFILE(1:3)=='ATM') THEN ZU_LS,ZV_LS, & ZW_LS,'FLUX' ) ELSE ! isobaric surfaces (w at mass points) + !Warning, in that case (NCEP only for now) ZZFLUX_LS is not correct (but not used) CALL VER_INTERP_TO_MIXED_GRID('ATM ',.TRUE.,XZS_LS,XZSMT_LS, & - ZZMASS_LS,ZSV_LS, & + XGH_LS,ZSV_LS, & ZZFLUX_LS,XPS_LS,ZPMHP_LS, & ZTHV_LS,ZR_LS, & ZHU_LS, & diff --git a/src/SURFEX/mode_read_grib.F90 b/src/SURFEX/mode_read_grib.F90 index 344ea5967b0658f1a362b4eef77366bc302691fa..2751bff06b17107df33231e213da599818c03176 100644 --- a/src/SURFEX/mode_read_grib.F90 +++ b/src/SURFEX/mode_read_grib.F90 @@ -63,11 +63,9 @@ IF (NGRIB_VERSION==1) THEN CALL GRIB_INDEX_CREATE(NIDX,HGRIB,'indicatorOfParameter',IRET) ELSEIF (NGRIB_VERSION==2) THEN IF(HINMODEL=='ARPEGE') THEN - print*,"CALL GRIB_INDEX_CREATE" CALL GRIB_INDEX_CREATE(NIDX,HGRIB,'parameterNumber',IRET) -print*,IRET ELSE - CALL GRIB_INDEX_CREATE(NIDX,HGRIB,'paramId',IRET) + CALL GRIB_INDEX_CREATE(NIDX,HGRIB,'paramId',IRET) ENDIF ENDIF IF (IRET/=0) CALL ABOR1_SFX("MODE_READ_GRIB:MAKE_GRIB_INDEX: error while creating the grib index") @@ -136,20 +134,16 @@ IRET = 0 KFOUND=0 ! DO WHILE (IRET /= GRIB_END_OF_INDEX .AND. KFOUND/=3) -print*,"===============new message==============" ! IRET = 0 KFOUND=0 ! IF (KLTYPE/=-2) THEN CALL GRIB_GET(KGRIB,'indicatorOfTypeOfLevel',ILTYPE,IRET) -print*,IRET IF(IRET/=0) THEN CALL GRIB_GET(KGRIB,'typeOfFirstFixedSurface',ILTYPE,IRET) ENDIF -print*,IRET CALL TEST_IRET(KLUOUT,ILTYPE,KLTYPE,IRET) - print*,"ILTYPE,KLTYPE,IRET",ILTYPE,KLTYPE,IRET ELSE IF (PRESENT(HTYPELEVEL)) THEN CALL GRIB_GET(KGRIB,'typeOfLevel',YTYPELEVEL,IRET) @@ -170,7 +164,6 @@ print*,IRET ENDIF ! -print*,KFOUND IF (IRET.EQ.0) THEN ! KFOUND = KFOUND + 1 @@ -185,7 +178,6 @@ print*,KFOUND ! IF (IRET.EQ.0) KFOUND = KFOUND + 1 ! -print*,KFOUND ENDIF ! ENDIF @@ -348,11 +340,9 @@ IF (NGRIB_VERSION == 1) THEN CALL GRIB_INDEX_SELECT(NIDX,'indicatorOfParameter',KPARAM,KRET) ELSEIF (NGRIB_VERSION == 2) THEN IF (HINMODEL=='ARPEGE') THEN - print*,"GRIB_INDEX_SELECT :",KPARAM CALL GRIB_INDEX_SELECT(NIDX,'parameterNumber',KPARAM,KRET) -print*,KRET ELSE - CALL GRIB_INDEX_SELECT(NIDX,'paramId',KPARAM,KRET) + CALL GRIB_INDEX_SELECT(NIDX,'paramId',KPARAM,KRET) ENDIF END IF CALL GRIB_NEW_FROM_INDEX(NIDX,IGRIB,KRET) @@ -363,7 +353,6 @@ IF (KRET.EQ.0) THEN IF (PRESENT(HTYPELEVEL)) THEN CALL GET_GRIB_MESSAGE(KLUOUT,ILTYPE,ILEV1,ILEV2,IGRIB,IFOUND,HTYPELEVEL,ZLEV1,ZLEV2) ELSE -print*,"CALL GET_GRIB_MESSAGE" CALL GET_GRIB_MESSAGE(KLUOUT,ILTYPE,ILEV1,ILEV2,IGRIB,IFOUND) ENDIF ENDIF @@ -390,8 +379,6 @@ IF (PRESENT(KPARAM2)) THEN ENDIF ENDIF ! -print*,"IFOUND=",IFOUND - IF (IFOUND==3) THEN ! IF (PRESENT(KLTYPE)) KLTYPE = ILTYPE @@ -443,8 +430,6 @@ INTEGER :: INUM_ZS,ISIZE,ICOUNT,JLOOP,IPARAM,IGRIB,IPARAM2 CHARACTER(LEN=24) :: YLTYPELU REAL(KIND=JPRB) :: ZHOOK_HANDLE !------------------------------------------------------------------- -print*,"HINMODEL=",HINMODEL -print*,"NGRIB_VERSION=",NGRIB_VERSION IF (LHOOK) CALL DR_HOOK('MODE_READ_GRIB:READ_GRIB_LAND_MASK',0,ZHOOK_HANDLE) WRITE (KLUOUT,'(A)') 'MODE_READ_GRIB:READ_GRIB_LAND_MASK: | Reading land mask from ',HINMODEL ! @@ -454,14 +439,12 @@ SELECT CASE (HINMODEL) CASE ('NCEP ') CALL READ_GRIB(HGRIB,HINMODEL,KLUOUT,172,IRET,PMASK) CASE ('ARPEGE','ALADIN','MOCAGE') - print*,"NGRIB_VERSION=",NGRIB_VERSION IF(HINMODEL=='ARPEGE' .AND. NGRIB_VERSION==2) THEN ILTYPE=1 - CALL READ_GRIB(HGRIB,HINMODEL,KLUOUT,0,IRET,PMASK,KLTYPE=ILTYPE) + CALL READ_GRIB(HGRIB,HINMODEL,KLUOUT,0,IRET,PMASK,KLTYPE=ILTYPE) ELSE CALL READ_GRIB(HGRIB,HINMODEL,KLUOUT,81,IRET,PMASK) ENDIF -print*,"NGRIB_VERSION=",NGRIB_VERSION CASE ('HIRLAM') ILTYPE=105 ILEV =0 @@ -514,7 +497,7 @@ SELECT CASE (HINMODEL) CASE ('ECMWF ') CALL READ_GRIB(HGRIB,HINMODEL,KLUOUT,129,IRET,PZS) CASE ('NCEP ') - CALL READ_GRIB(HGRIB,HINMODEL,KLUOUT,228002,IRET,PZS) + CALL READ_GRIB(HGRIB,HINMODEL,KLUOUT,228002,IRET,PZS) CASE ('ARPEGE','MOCAGE') IF (HINMODEL=='ARPEGE' .AND. NGRIB_VERSION==2) THEN CALL READ_GRIB(HGRIB,HINMODEL,KLUOUT,4,IRET,PZS) @@ -536,7 +519,9 @@ IF (IRET /= 0) THEN END IF ! ! Datas given in archives are multiplied by the gravity acceleration -PZS = PZS / XG +IF(HINMODEL /= 'NCEP') THEN + PZS = PZS / XG +END IF ! IF (LHOOK) CALL DR_HOOK('MODE_READ_GRIB:READ_GRIB_ZS',1,ZHOOK_HANDLE) END SUBROUTINE READ_GRIB_ZS @@ -756,7 +741,7 @@ SELECT CASE (HINMODEL) CALL ABOR1_SFX('MODE_READ_GRIB:READ_GRIB_TSWATER:OPTION NOT SUPPORTED '//HINMODEL) END SELECT ! -IF (SIZE(PMASK)==SIZE(PTS)) WHERE ((PMASK(:)/=1.) .OR. ((PMASK(:)==1.) .AND.(PTS(:)==9999.))) PTS = XUNDEF +IF (SIZE(PMASK)==SIZE(PTS)) WHERE ((PMASK(:)/=0.) .OR. ((PMASK(:)==0.) .AND.(PTS(:)==9999.))) PTS = XUNDEF ! IF (LHOOK) CALL DR_HOOK('MODE_READ_GRIB:READ_GRIB_TSWATER',1,ZHOOK_HANDLE) diff --git a/src/SURFEX/pgd_fieldin.F90 b/src/SURFEX/pgd_fieldin.F90 index 683611a1c6db9abc6a56ac5ce4510edf25811734..990727e151a2f567c1181f2701d293f124f10186 100644 --- a/src/SURFEX/pgd_fieldin.F90 +++ b/src/SURFEX/pgd_fieldin.F90 @@ -57,7 +57,7 @@ USE MODD_PGDWORK, ONLY : XALL, NSIZE_ALL, CATYPE, NSIZE, XSUMVAL, & USE MODD_SURF_PAR, ONLY : XUNDEF USE MODD_PGD_GRID, ONLY : NL ! -USE MODD_DATA_COVER_PAR, ONLY : NTYPE, LVEG_PRES, NVEGTYPE +USE MODD_DATA_COVER_PAR, ONLY : NTYPE, LVEG_PRES, NVEGTYPE, NVEGTYPE_OLD ! USE MODI_GET_LUOUT USE MODI_TREAT_FIELD @@ -293,8 +293,8 @@ IF (LEN_TRIM(HFILE)/=0) THEN ! DO JT=1,SIZE(NSIZE,2) - IF (.NOT.U%LECOSG.AND.JT>NVEGTYPE) EXIT - + IF (.NOT.U%LECOSG.AND.JT>NVEGTYPE_OLD) EXIT + !multitype input file IF (SIZE(ZFIELD,2)>1) THEN diff --git a/src/SURFEX/prep_isba_ascllv.F90 b/src/SURFEX/prep_isba_ascllv.F90 index 3b9ba798d4992d3a46205ac5e198381b7d45d8bd..561e33e051493f3eb1f668839b92efdbeed09996 100644 --- a/src/SURFEX/prep_isba_ascllv.F90 +++ b/src/SURFEX/prep_isba_ascllv.F90 @@ -91,6 +91,11 @@ REAL(KIND=JPRB) :: ZHOOK_HANDLE ! IF (LHOOK) CALL DR_HOOK('PREP_ISBA_ASCLLV',0,ZHOOK_HANDLE) ! +IF ((.NOT.ALLOCATED(NINDEX)).AND.(HPROGRAM=='MESONH')) THEN + ALLOCATE(NINDEX(U%NDIM_FULL)) + NINDEX(:) = 0 +ENDIF +! IF (.NOT.ALLOCATED(NNUM)) THEN ALLOCATE(NNUM(U%NDIM_FULL)) IF (NRANK/=NPIO) THEN diff --git a/src/SURFEX/write_bld_descriptionn.F90 b/src/SURFEX/write_bld_descriptionn.F90 index 8f71b236d9df9051db6512036c9c86664006dae1..8ab77a32c78345b28b901477e2d50e32fe13e2a1 100644 --- a/src/SURFEX/write_bld_descriptionn.F90 +++ b/src/SURFEX/write_bld_descriptionn.F90 @@ -70,7 +70,6 @@ INTEGER :: IRESP INTEGER :: I1, I2 INTEGER :: JL INTEGER :: ITOT - CHARACTER(LEN=LEN_HREC) :: YRECFM CHARACTER(LEN=100) :: YCOMMENT !------------------------------------------------------------------------------- !------------------------------------------------------------------------------- @@ -92,9 +91,8 @@ ZWORK(5) = FLOAT(BDD%NDESC_ROOF_LAYER) ZWORK(6) = FLOAT(BDD%NDESC_ROAD_LAYER) ZWORK(7) = FLOAT(BDD%NDESC_FLOOR_LAYER) ! -YRECFM='Bld_dimensions ' YCOMMENT='Configuration numbers for descriptive building data' - CALL WRITE_SURF(HSELECT, HPROGRAM,'BLD_DESC_CNF',ZWORK,IRESP,YCOMMENT,'-',YRECFM) + CALL WRITE_SURF(HSELECT, HPROGRAM,'BLD_DESC_CNF',ZWORK,IRESP,YCOMMENT,'-','Bld_dimensions ') DEALLOCATE(ZWORK) ! !------------------------------------------------------------------------------- @@ -183,9 +181,8 @@ END DO CALL UP_DESC_IND_W(BDD%NDESC_AGE) ; ZWORK(I1:I2) = FLOAT(BDD%NDESC_AGE_DATE(:)) ! YCOMMENT='Descriptive building data' -YRECFM='Bld_parameters ' CALL WRITE_SURF(HSELECT, & - HPROGRAM,'BLD_DESC_DAT',ZWORK,IRESP,YCOMMENT,'-',YRECFM) + HPROGRAM,'BLD_DESC_DAT',ZWORK,IRESP,YCOMMENT,'-','Bld_parameters ') DEALLOCATE(ZWORK) ! IF (LHOOK) CALL DR_HOOK('WRITE_BLD_DESCRIPTION_n',1,ZHOOK_HANDLE)