diff --git a/src/LIB/SURCOUCHE/src/mode_io_tools_nc4.f90 b/src/LIB/SURCOUCHE/src/mode_io_tools_nc4.f90 index e1a4a866bcc5a59c680f0031b111e246be94739f..d8dba0e00d7fcc701e77c4223788bd1d6ba826ba 100644 --- a/src/LIB/SURCOUCHE/src/mode_io_tools_nc4.f90 +++ b/src/LIB/SURCOUCHE/src/mode_io_tools_nc4.f90 @@ -359,7 +359,7 @@ if ( tpfile%ctype /= 'MNHOUTPUT' .or. lout_bigbox_write ) then !Do not write di call IO_Add_dim_nc4( tpfile, NMNHDIM_NJ_V, 'nj_v', MIN( IJU_ll+1, IJU_MAX ) ) end if - if ( Trim( yprogram ) /= 'PGD' .and. Trim( yprogram ) /= 'NESPGD' .and. Trim( yprogram ) /= 'ZOOMPG' & + if ( Trim( yprogram ) /= 'PGD' .and. Trim( yprogram ) /= 'NESPGD' & .and. .not. ( Trim( yprogram ) == 'REAL' .and. cstorage_type == 'SU' ) ) then !condition to detect PREP_SURFEX call IO_Add_dim_nc4( tpfile, NMNHDIM_LEVEL, 'level', IKU ) if ( tpfile%ctype == 'MNHOUTPUT' .and. lout_physical_simplified ) then @@ -371,7 +371,7 @@ if ( tpfile%ctype /= 'MNHOUTPUT' .or. lout_bigbox_write ) then !Do not write di end if end if -if ( Trim( yprogram ) /= 'PGD' .and. Trim( yprogram ) /= 'NESPGD' .and. Trim( yprogram ) /= 'ZOOMPG' & +if ( Trim( yprogram ) /= 'PGD' .and. Trim( yprogram ) /= 'NESPGD' & .and. .not. ( Trim( yprogram ) == 'REAL' .and. cstorage_type == 'SU' ) ) then !condition to detect PREP_SURFEX if ( tpfile%ctype /= 'MNHDIACHRONIC' ) & call IO_Add_dim_nc4( tpfile, NMNHDIM_TIME, 'time', Int( NF90_UNLIMITED, kind = Kind(1) ) ) diff --git a/src/LIB/SURCOUCHE/src/mode_io_write_nc4.f90 b/src/LIB/SURCOUCHE/src/mode_io_write_nc4.f90 index 85eab8c8ade9d1c217b72c669d0c42bae0041d1f..1fc50cafe69a8a13e36d48169a5a3cb3bca3e8bd 100644 --- a/src/LIB/SURCOUCHE/src/mode_io_write_nc4.f90 +++ b/src/LIB/SURCOUCHE/src/mode_io_write_nc4.f90 @@ -1961,7 +1961,7 @@ end if if ( tzfile%lmaster ) then !vertical coordinates in the transformed space are the same on all processes if ( tzfile%ctype /= 'MNHOUTPUT' ) then !Do not write coordinates of main domain if it is not written - if ( Trim( yprogram ) /= 'PGD' .and. Trim( yprogram ) /= 'NESPGD' .and. Trim( yprogram ) /= 'ZOOMPG' & + if ( Trim( yprogram ) /= 'PGD' .and. Trim( yprogram ) /= 'NESPGD' & .and. .not. ( Trim( yprogram ) == 'REAL' .and. cstorage_type == 'SU') ) then !condition to detect prep_surfex call Write_ver_coord( tzfile%tncdims%tdims(NMNHDIM_LEVEL), 'position z in the transformed space', '', & 'altitude', 0., ikm_bdmin, ikm_bdmax, ZZHATM(ikm_min:ikm_max) ) @@ -1980,7 +1980,7 @@ end if !Write time scale if ( tzfile%lmaster ) then !time scale is the same on all processes - if ( Trim( yprogram ) /= 'PGD' .and. Trim( yprogram ) /= 'NESPGD' .and. Trim( yprogram ) /= 'ZOOMPG' & + if ( Trim( yprogram ) /= 'PGD' .and. Trim( yprogram ) /= 'NESPGD' & .and. .not. ( Trim( yprogram ) == 'REAL' .and. cstorage_type == 'SU' ) ) then !condition to detect prep_surfex if ( tzfile%ctype /= 'MNHDIACHRONIC' ) then if ( Present( tpdtmodeln ) ) then diff --git a/src/MNH/mnhget_desfmn.f90 b/src/MNH/mnhget_desfmn.f90 index d49a77ab8b694f8d01b6f048eef709d735bfeaff..867c7d2d2ac55ef554bdc25f2cc04bdaf2a03ee5 100644 --- a/src/MNH/mnhget_desfmn.f90 +++ b/src/MNH/mnhget_desfmn.f90 @@ -90,8 +90,7 @@ IF (HACTION=='READ ') THEN KLUDES = 0 END SELECT ELSE IF (HACTION=='WRITE') THEN - IF (CPROGRAM == 'PGD ' .OR. CPROGRAM =='NESPGD' .OR. & - CPROGRAM == 'ZOOMPG' .OR. CPROGRAM =='DIAG ' ) THEN + IF (CPROGRAM == 'PGD ' .OR. CPROGRAM =='NESPGD' .OR. CPROGRAM =='DIAG ' ) THEN KLUDES = 0 ELSE KLUDES = TOUTDATAFILE%TDESFILE%NLU diff --git a/src/MNH/mnhinit_io_surfn.f90 b/src/MNH/mnhinit_io_surfn.f90 index e6194c3e106f67b641b4a406cf141275a22a146d..f28e2d629f9fda6128b3252d04d3abaf8305652b 100644 --- a/src/MNH/mnhinit_io_surfn.f90 +++ b/src/MNH/mnhinit_io_surfn.f90 @@ -113,7 +113,7 @@ IF (HACTION=='READ ') THEN ELSE TPINFILE=>TINIFILE ENDIF - CASE('REAL ','IDEAL ','NESPGD','SPAWN ','ZOOMPG') + CASE( 'REAL ','IDEAL ','NESPGD','SPAWN ' ) TPINFILE => TPGDFILE END SELECT END IF diff --git a/src/MNH/mnhopen_namelist.f90 b/src/MNH/mnhopen_namelist.f90 index c4ceb3e2b940f8d64dcf9ad89c38e63d81e2ee27..ce83647f4d140e96ac7c0910f12c6e893ac08f78 100644 --- a/src/MNH/mnhopen_namelist.f90 +++ b/src/MNH/mnhopen_namelist.f90 @@ -106,8 +106,6 @@ ELSE YNAM='SPAWN1.nam ' CASE('NESPGD') YNAM='PRE_NEST_PGD1.nam' - CASE('ZOOMPG') - YNAM='PRE_ZOOM1.nam' CASE('SPEC ') YNAM='SPEC1.nam' CASE DEFAULT diff --git a/src/MNH/prep_real_case.f90 b/src/MNH/prep_real_case.f90 index 0327f5d9b42672c052a12153385bd01550dfb48b..d81522e2be64b7e2d1f484d786b48f5eccd41331 100644 --- a/src/MNH/prep_real_case.f90 +++ b/src/MNH/prep_real_case.f90 @@ -96,7 +96,7 @@ !! !! - initializes the horizontal domain from the data read in the !! descriptive part of the Aladin file and the directives read in the -!! namelist file (routines READ_GENERAL and SET_SUBDOMAIN in +!! namelist file (routines READ_GENERAL in !! READ_ALL_DATA). This MESO-NH domain is a part of the Aladin domain. !! !! - initializes global variables from namelists and the MESO-NH diff --git a/src/MNH/read_all_data_grib_case.f90 b/src/MNH/read_all_data_grib_case.f90 index f47205d60bce5ad7f444bc1e846e57e249da6f1f..77155a8b96d0968e890823d84b8002421e203331 100644 --- a/src/MNH/read_all_data_grib_case.f90 +++ b/src/MNH/read_all_data_grib_case.f90 @@ -60,12 +60,10 @@ END MODULE MODI_READ_ALL_DATA_GRIB_CASE !! EXTERNAL !! -------- !! subroutine READ_LFIFM_PGD : to read PGD file -!! subroutine SET_SUBDOMAIN : to define the horizontal MESO-NH domain. !! subroutine READ_VER_GRID : to read the vertical grid in namelist file. !! subroutine HORIBL : horizontal bilinear interpolation !! subroutine XYTOLATLON : projection from conformal to lat,lon !! -!! Module MODI_SET_SUBDOMAIN : interface for subroutine SET_SUBDOMAIN !! Module MODI_READ_VER_GRID : interface for subroutine READ_VER_GRID !! Module MODI_HORIBL : interface for subroutine HORIBL !! Module MODI_XYTOLATLON : interface for subroutine XYTOLATLON diff --git a/src/MNH/read_all_data_mesonh_case.f90 b/src/MNH/read_all_data_mesonh_case.f90 index 59b215b64676a3b82ff50ea154cba6503f87e540..72982a18a0fc61e7d5b1352e3e4b860475b56955 100644 --- a/src/MNH/read_all_data_mesonh_case.f90 +++ b/src/MNH/read_all_data_mesonh_case.f90 @@ -43,7 +43,7 @@ END MODULE MODI_READ_ALL_DATA_MESONH_CASE !! (READ_LFIFM_PGD and MESONH_INFO in READ_GENERAL) and coherence is tested. !! The PGD files are also read in READ_LFIFM_PGD. !! The PGD file is closed. -!! The MESO-NH domain is defined from PRE_REAL1.nam inputs in SET_SUBDOMAIN. +!! The MESO-NH domain is defined from PRE_REAL1.nam inputs. !! Vertical grid is defined in READ_VER_GRID. !! Variables fields are read in Mesonh file and stored on MESO-NH domain !! (READ_LFI_PRC). @@ -52,14 +52,12 @@ END MODULE MODI_READ_ALL_DATA_MESONH_CASE !! -------- !! subroutine READ_LFIFM_PGD: to read PGD file !! subroutine READ_GRID_TIME_MESONH_CASE : to read the geographic and time data. -!! subroutine SET_SUBDOMAIN : to define the horizontal MESO-NH domain. !! subroutine READ_VER_GRID : to read the vertical grid in namelist file. !! subroutine READ_PRC_FMFILE : to read the large scale fields on the MESO-NH !! domain. !! !! Module MODI_READ_GRID_TIME_MESONH_CASE : interface for subroutine !! READ_GRID_TIME_MESONH_CASE -!! Module MODI_SET_SUBDOMAIN : interface for subroutine SET_SUBDOMAIN !! Module MODI_READ_VER_GRID : interface for subroutine READ_VER_GRID !! Module MODI_READ_PRC_FMFILE : interface for subroutine READ_PRC_FMFILE !! diff --git a/src/MNH/read_surf_mnh.f90 b/src/MNH/read_surf_mnh.f90 index ca508f8c324cc69c4e63d7e1e202c952897e4a3c..ca28c1ea96b5dc17f223134d38d88c177bbd7546 100644 --- a/src/MNH/read_surf_mnh.f90 +++ b/src/MNH/read_surf_mnh.f90 @@ -1125,8 +1125,7 @@ KRESP=0 ILUOUT = TOUT%NLU HCOMMENT='' ! -IF (HREC=='DIM_FULL' .AND. ( CPROGRAM=='IDEAL ' .OR. & - CPROGRAM=='SPAWN ' .OR. CPROGRAM=='ZOOMPG' ))THEN +IF ( HREC=='DIM_FULL' .AND. ( CPROGRAM=='IDEAL ' .OR. CPROGRAM=='SPAWN ' ) ) THEN CALL IO_Field_read(TPINFILE,'IMAX',IIMAX) CALL IO_Field_read(TPINFILE,'JMAX',IJMAX) KFIELD = IIMAX * IJMAX @@ -1386,8 +1385,7 @@ IF (TPINFILE%NMNHVERSION(1)<4 .OR. (TPINFILE%NMNHVERSION(1)==4 .AND. TPINFILE%NM END SELECT ELSE IF ( HREC=='GRID_TYPE'.AND. ( & (CPROGRAM=='IDEAL ' .AND. .NOT.ASSOCIATED(TPGDFILE,TOUT)) .OR. & - (CPROGRAM=='SPAWN ' .AND. .NOT.ASSOCIATED(TPGDFILE,TOUT)) .OR. & - CPROGRAM=='ZOOMPG' )) THEN + (CPROGRAM=='SPAWN ' .AND. .NOT.ASSOCIATED(TPGDFILE,TOUT)) )) THEN IF (LCARTESIAN) THEN HFIELD="CARTESIAN " ELSE diff --git a/src/MNH/set_subdomain.f90 b/src/MNH/set_subdomain.f90 deleted file mode 100644 index b4f6047942da80ee39f8d55366a265a44c6b3945..0000000000000000000000000000000000000000 --- a/src/MNH/set_subdomain.f90 +++ /dev/null @@ -1,337 +0,0 @@ -!MNH_LIC Copyright 1994-2024 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. -!----------------------------------------------------------------- -! ######################### - MODULE MODI_SET_SUBDOMAIN -! ######################### -INTERFACE - SUBROUTINE SET_SUBDOMAIN(TPNMLFILE,TPATMFILE,KXOR_DAD,KYOR_DAD, & - KXOR,KYOR,KDXRATIO,KDYRATIO ) -! -USE MODD_IO, ONLY : TFILEDATA -! -TYPE(TFILEDATA), INTENT(IN) :: TPNMLFILE ! namelist file -TYPE(TFILEDATA), INTENT(IN) :: TPATMFILE ! atmospheric MNH file -INTEGER, INTENT(OUT):: KXOR_DAD ! XOR compared to Dad file, if any -INTEGER, INTENT(OUT):: KYOR_DAD ! YOR compared to Dad file, if any -INTEGER, INTENT(OUT):: KXOR ! XOR given or computed -INTEGER, INTENT(OUT):: KYOR ! YOR given or computed -INTEGER, INTENT(OUT):: KDXRATIO ! DXRATIO compared to Dad file, if any -INTEGER, INTENT(OUT):: KDYRATIO ! DYRATIO compared to Dad file, if any -! -END SUBROUTINE SET_SUBDOMAIN -END INTERFACE -END MODULE MODI_SET_SUBDOMAIN -! -! ################################################################# - SUBROUTINE SET_SUBDOMAIN(TPNMLFILE,TPATMFILE,KXOR_DAD,KYOR_DAD, & - KXOR,KYOR,KDXRATIO,KDYRATIO ) -! ################################################################# -! -!!**** *SET_SUBDOMAIN* - computes the horizontal MESO-NH domain -!! -!! PURPOSE -!! ------- -!! This routine computes the boundaries of the MESO-NH domain inside the -!! Aladin domain. This subroutine initializes also XXHAT and XYHAT. -!! -!!** METHOD -!! ------ -!! -!! IMPLICIT ARGUMENTS -!! ------------------ -!! -!! Module MODD_CONF : contains configuration variables for all models. -!! NVERB : verbosity level for output-listing -!! Module MODD_LUNIT : contains logical unit names for all models -!! TLUOUT0 : output-listing file -!! Module MODD_PARAMETERS -!! JPHEXT -!! Module MODD_GRID1 -!! XLONOR -!! XLATOR -!! XXHAT -!! XYHAT -!! Module MODD_DIM1 -!! NIMAX -!! NJMAX -!! Module MODD_GRID : contains grid definition -!! -!! REFERENCE -!! --------- -!! -!! Book 2 -!! -!! AUTHOR -!! ------ -!! -!! V.Masson Meteo-France -!! -!! MODIFICATIONS -!! ------------- -!! Original 16/12/94 -!! Modification 30/01/96 Flux point as center of the domain (V. Masson) -!! Modification 02/10/96 coordinates are copied from pgd file -!! 25/10/96 Add deallocations (V. Masson) -!! 15/03/99 Possibility to use IXOR and IYOR (V. Masson) -!! 15/10/01 Allow namelists in different orders (I. Mallet) -!! 30/10/03 No more used in masdev4_6 version (V. Masson) -!! 30/11/04 Used again in masdev4_7 version (V. Masson) -!! Philippe Wautelet: 05/2016-04/2018: new data structures and calls for I/O -!------------------------------------------------------------------------------- -! -!* 0. DECLARATIONS -! ------------ -! -USE MODD_CONF -USE MODD_DIM_n, ONLY: NIMAX_n=>NIMAX,NJMAX_n=>NJMAX -USE MODD_GRID -USE MODD_GRID_n -USE MODD_IO, ONLY: TFILEDATA -USE MODD_LUNIT -USE MODD_PARAMETERS -USE MODD_PGDDIM -USE MODD_PGDGRID -! -USE MODE_IO_FIELD_READ, only: IO_Field_read -USE MODE_GRIDPROJ -USE MODE_MSG -USE MODE_POS -! -IMPLICIT NONE -! -!* 0.1 Declaration of arguments -! ------------------------ -! -TYPE(TFILEDATA), INTENT(IN) :: TPNMLFILE ! namelist file -TYPE(TFILEDATA), INTENT(IN) :: TPATMFILE ! atmospheric MNH file -INTEGER, INTENT(OUT):: KXOR_DAD ! XOR compared to Dad file, if any -INTEGER, INTENT(OUT):: KYOR_DAD ! YOR compared to Dad file, if any -INTEGER, INTENT(OUT):: KXOR ! XOR given or computed -INTEGER, INTENT(OUT):: KYOR ! YOR given or computed -INTEGER, INTENT(OUT):: KDXRATIO ! DXRATIO compared to Dad file, if any -INTEGER, INTENT(OUT):: KDYRATIO ! DYRATIO compared to Dad file, if any -! -!* 0.2 Declaration of local variables -! ------------------------------ -! -CHARACTER(LEN=NFILENAMELGTMAX) :: YDADFILE ! name of atmospheric file father (if any) -INTEGER :: ILUNAM ! logical unit for namelist file HNAMELIST -INTEGER :: ILUOUT0 ! logical unit for listing file -INTEGER :: IRESP ! return-code if problems araised -INTEGER :: IIU,IJU ! number of points in x,y directions of the large grid -INTEGER :: IIINF ! left point index -INTEGER :: IISUP ! right point index -INTEGER :: IJINF ! bottom point index -INTEGER :: IJSUP ! top point index - ! Declare namelist variables - ! horizontal position (i,j) of the ORigin -INTEGER :: NXOR,NYOR ! of the model 2 domain, relative to model 1 -INTEGER :: NIMAX,NJMAX ! Dimensions respectively in x, y directions -REAL, DIMENSION(:), ALLOCATABLE :: ZXHAT ! = XXHAT(:) -REAL, DIMENSION(:), ALLOCATABLE :: ZYHAT ! = XYHAT(:) -! -LOGICAL :: GFOUND ! return code when searching namelist -! -!* 0.3 Declaration of namelists -! ------------------------ -NAMELIST/NAM_MESONH_DOM/ NIMAX,NJMAX,NXOR,NYOR -! ! definition of MESO-NH -! ! horizontal domain -!------------------------------------------------------------------------------- -ILUOUT0 = TLUOUT0%NLU -!------------------------------------------------------------------------------- -! -!* 1. COMPUTATION OF THE LATITUDE AND LONGITUDE OF LARGE DOMAIN POINTS -! ---------------------------------------------------------------- -! -ALLOCATE(ZXHAT(SIZE(XXHAT))) -ALLOCATE(ZYHAT(SIZE(XYHAT))) -ZXHAT(:) = XXHAT(:) -ZYHAT(:) = XYHAT(:) -! -IIU=SIZE(ZXHAT) -IJU=SIZE(ZYHAT) -! -KXOR_DAD=1 -KYOR_DAD=1 -KDXRATIO=1 -KDYRATIO=1 -!------------------------------------------------------------------------------- -! -!* 2. DOMAIN DEFINITION -! ----------------- -! -!* 2.1 Default values -! -------------- -! -NXOR=NUNDEF -NYOR=NUNDEF -! -! -!* 2.2 Reading of the namelist file (or given as dummy argument) -! ---------------------------- -! -ILUNAM = TPNMLFILE%NLU -CALL POSNAM( TPNMLFILE, 'NAM_MESONH_DOM', GFOUND ) -IF (GFOUND) THEN - NIMAX=NIMAX_n ; NJMAX=NJMAX_n - READ(UNIT=ILUNAM,NML=NAM_MESONH_DOM) - NIMAX_n=NIMAX ; NJMAX_n=NJMAX -END IF -! -!* 2.3 Default values if none was given in namelist: domain is centered -! ---------------------------- --------------- -! -IF ( NXOR==NUNDEF .OR. NYOR==NUNDEF ) THEN - IF ( NXOR/=NUNDEF ) THEN - WRITE(ILUOUT0,*) 'bottom-left domain X index is given, but not its Y index' - WRITE(ILUOUT0,*) 'NXOR = ',NXOR - WRITE(ILUOUT0,*) 'Please also define NYOR or choose an other domain initialization mode' - !callabortstop - CALL PRINT_MSG(NVERB_FATAL,'GEN','SET_SUBDOMAIN','bottom-left domain X index is given, but not its Y index') - END IF - IF ( NYOR/=NUNDEF ) THEN - WRITE(ILUOUT0,*) 'bottom-left domain Y index is given, but not its X index' - WRITE(ILUOUT0,*) 'NYOR = ',NYOR - WRITE(ILUOUT0,*) 'Please also define NXOR or choose an other domain initialization mode' - !callabortstop - CALL PRINT_MSG(NVERB_FATAL,'GEN','SET_SUBDOMAIN','bottom-left domain Y index is given, but not its X index') - END IF - NXOR= (IIU - NIMAX)/2 - NYOR= (IJU - NJMAX)/2 -END IF -! -!------------------------------------------------------------------------------- -! -WRITE(ILUOUT0,*) 'given or computed NIMAX = ',NIMAX -WRITE(ILUOUT0,*) 'given or computed NJMAX = ',NJMAX -WRITE(ILUOUT0,*) 'given or computed NXOR = ',NXOR -WRITE(ILUOUT0,*) 'given or computed NYOR = ',NYOR -! -!------------------------------------------------------------------------------- -! -!* 4. COHERENCE WITH GRID MESH INDICES -! -------------------------------- -! -!* 4.1 TEST if FATHER of atmospheric MNH file exists: -! --------------------------------------------- -! -CALL IO_Field_read(TPATMFILE,'DAD_NAME',YDADFILE,IRESP) -IF ( IRESP /= 0 ) YDADFILE='' -! -IF (LEN_TRIM(YDADFILE)/=0) THEN - CALL IO_Field_read(TPATMFILE,'DXRATIO',KDXRATIO,IRESP) - IF ( IRESP /= 0 .OR. KDXRATIO == 0 ) THEN - KDXRATIO=1 - END IF - ! - CALL IO_Field_read(TPATMFILE,'DYRATIO',KDYRATIO,IRESP) - IF ( IRESP /= 0 .OR. KDYRATIO == 0 ) THEN - KDYRATIO=1 - END IF - ! - CALL IO_Field_read(TPATMFILE,'XOR',KXOR,IRESP) - IF ( IRESP /= 0 ) KXOR_DAD=1 - ! - CALL IO_Field_read(TPATMFILE,'YOR',KYOR,IRESP) - IF ( IRESP /= 0 ) KYOR_DAD=1 -END IF -! -!* 4.2 CONTROL of new domain position relatively to father mesh size -! ------------------------------------------------------------- -! -IF ( MOD(NIMAX,KDXRATIO) /= 0 ) THEN - WRITE(ILUOUT0,*) '**************************************' - WRITE(ILUOUT0,*) 'In order to be included in father grid' - WRITE(ILUOUT0,*) 'NIMAX must be divisible by: ', KDXRATIO - WRITE(ILUOUT0,*) 'Your NIMAX is :', NIMAX - WRITE(ILUOUT0,*) '**************************************' - !callabortstop - CALL PRINT_MSG(NVERB_FATAL,'GEN','SET_SUBDOMAIN','') -END IF -! -IF ( MOD(NJMAX,KDYRATIO) /= 0 ) THEN - WRITE(ILUOUT0,*) '**************************************' - WRITE(ILUOUT0,*) 'In order to be included in father grid' - WRITE(ILUOUT0,*) 'NJMAX must be divisible by: ', KDYRATIO - WRITE(ILUOUT0,*) 'Your NJMAX is :', NJMAX - WRITE(ILUOUT0,*) '**************************************' - !callabortstop - CALL PRINT_MSG(NVERB_FATAL,'GEN','SET_SUBDOMAIN','') -END IF -! -IF ( MOD(NXOR-1,KDXRATIO) /= 0 ) THEN - NXOR = KDXRATIO * ((NXOR-1)/KDXRATIO) + 1 - WRITE(ILUOUT0,*) '**************************************' - WRITE(ILUOUT0,*) 'In order to be included in father grid' - WRITE(ILUOUT0,*) 'NXOR is set to : ', NXOR - WRITE(ILUOUT0,*) '**************************************' -END IF -KXOR=NXOR -!* new left coordinate compared to father grid, if any -KXOR_DAD = KXOR_DAD + (NXOR-1)/KDXRATIO -! -IF ( MOD(NYOR-1,KDYRATIO) /= 0 ) THEN - NYOR = KDYRATIO * ((NYOR-1)/KDYRATIO) + 1 - WRITE(ILUOUT0,*) '**************************************' - WRITE(ILUOUT0,*) 'In order to be included in father grid' - WRITE(ILUOUT0,*) 'NYOR is set to : ', NYOR - WRITE(ILUOUT0,*) '**************************************' -END IF -KYOR=NYOR -!* new bottom coordinate compared to father grid, if any -KYOR_DAD = KYOR_DAD + (NYOR-1)/KDYRATIO -! -!------------------------------------------------------------------------------- -! -!* 5. COMPUTATION OF THE BOUNDARIES OF THE MESO-NH DOMAIN -! --------------------------------------------------- -! -IIINF=NXOR -IJINF=NYOR -IISUP=NXOR + NIMAX + 2*JPHEXT - 1 -IJSUP=NYOR + NJMAX + 2*JPHEXT - 1 -! -!------------------------------------------------------------------------------- -! -!* 6. TEST ON THE BOUNDARIES -! ---------------------- -! -WRITE(ILUOUT0,*) 'IINF=', IIINF, ' JINF=', IJINF -WRITE(ILUOUT0,*) 'ISUP=', IISUP, ' JSUP=', IJSUP -! -IF ( (IIINF<1) & - .OR. (IJINF<1) & - .OR. (IISUP>IIU) & - .OR. (IJSUP>IJU) ) & -THEN - WRITE(ILUOUT0,*) - WRITE(ILUOUT0,*) ' +----------------------------------------------------------+' - WRITE(ILUOUT0,*) ' | INPUT PGD DOMAIN TOO SMALL OR OUTPUT DOMAIN NOT WELL CENTERED |' - WRITE(ILUOUT0,*) ' +----------------------------------------------------------+' - WRITE(ILUOUT0,*) - !callabortstop - CALL PRINT_MSG(NVERB_FATAL,'GEN','SET_SUBDOMAIN','input PGD domain too small or output domain not well centered') -ENDIF -! -!------------------------------------------------------------------------------- -! -!* 8. COMPUTATION OF xhat AND yhat -! ---------------------------- -! -DEALLOCATE(XXHAT) -DEALLOCATE(XYHAT) -ALLOCATE(XXHAT(IISUP-IIINF+1)) -XXHAT(:)=ZXHAT(IIINF:IISUP) -ALLOCATE(XYHAT(IJSUP-IJINF+1)) -XYHAT(:)=ZYHAT(IJINF:IJSUP) -DEALLOCATE(ZXHAT) -DEALLOCATE(ZYHAT) -!------------------------------------------------------------------------------- -! -WRITE(ILUOUT0,*) 'Routine SET_SUBDOMAIN completed' -! -END SUBROUTINE SET_SUBDOMAIN diff --git a/src/MNH/zoom_pgd.f90 b/src/MNH/zoom_pgd.f90 deleted file mode 100644 index ad21b9e8fbe3413d45103d32dff738c741bc1a67..0000000000000000000000000000000000000000 --- a/src/MNH/zoom_pgd.f90 +++ /dev/null @@ -1,271 +0,0 @@ -!MNH_LIC Copyright 2005-2024 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. -!----------------------------------------------------------------- -! ################ - PROGRAM ZOOM_PGD -! ################ -!! -!! PURPOSE -!! ------- -!! This program zooms the physiographic data fields. -!! -!! METHOD -!! ------ -!! -!! -!! EXTERNAL -!! -------- -!! -!! -!! IMPLICIT ARGUMENTS -!! ------------------ -!! -!! -!! REFERENCE -!! --------- -!! -!! AUTHOR -!! ------ -!! -!! V. Masson Meteo-France -!! -!! MODIFICATION -!! ------------ -!! -!! Original march 2005 -!! 10/10/2011 J.Escobar call INI_PARAZ_ll -!! 30/03/2012 S.Bielli Add NAM_NCOUT -!! 06/2016 (G.Delautier) phasage surfex 8 -!! 08/07/2016 P.Wautelet Removed MNH_NCWRIT define -!! Philippe Wautelet: 05/2016-04/2018: new data structures and calls for I/O -! P. Wautelet 07/02/2019: force TYPE to a known value for IO_File_add2list -! P. Wautelet 14/02/2019: remove CLUOUT/CLUOUT0 and associated variables -! P. Wautelet 06/07/2021: use FINALIZE_MNH -!---------------------------------------------------------------------------- -! -!* 0. DECLARATION -! ----------- -! -USE MODD_CONF, ONLY : CPROGRAM, L1D, L2D, LPACK -USE MODD_IO, only: TFILE_OUTPUTLISTING, TFILEDATA -USE MODD_LUNIT, ONLY : TLUOUT0, TOUTDATAFILE -USE MODD_PARAMETERS, ONLY : XUNDEF, NUNDEF, JPVEXT, JPHEXT, JPMODELMAX, NFILENAMELGTMAX -USE MODD_PARAM_n, ONLY : CSURF -USE MODD_DIM_n, ONLY : NIMAX, NJMAX -USE MODD_CONF_n, ONLY : CSTORAGE_TYPE -use modd_precision, only: LFIINT -! -USE MODE_FINALIZE_MNH, only: FINALIZE_MNH -USE MODE_POS -USE MODE_INI_CST, ONLY: INI_CST -USE MODE_IO, only: IO_Config_set, IO_Init -USE MODE_IO_FIELD_READ, only: IO_Field_read -USE MODE_IO_FIELD_WRITE, only: IO_Field_write, IO_Header_write -USE MODE_IO_FILE, only: IO_File_close, IO_File_open -USE MODE_IO_MANAGE_STRUCT, only: IO_File_add2list -USE MODE_ll -USE MODE_MSG -USE MODE_MODELN_HANDLER -! -USE MODI_READ_HGRID -USE MODI_WRITE_HGRID -USE MODI_SET_SUBDOMAIN -!JUANZ -USE MODE_SPLITTINGZ_ll -!JUANZ -! -USE MODI_VERSION -USE MODI_READ_ALL_NAMELISTS -USE MODI_ZOOM_PGD_SURF_ATM -USE MODI_WRITE_PGD_SURF_ATM_N -USE MODD_MNH_SURFEX_n -! -USE MODN_CONFIO, ONLY : NAM_CONFIO -! -IMPLICIT NONE -! -! -!* 0.2 Declaration of local variables -! ------------------------------ -! -INTEGER :: IRESP ! return code for I/O -INTEGER :: ILUOUT0 -INTEGER :: ILUNAM -INTEGER :: IINFO_ll -CHARACTER(LEN=NFILENAMELGTMAX) :: CPGDFILE ! name of the PGD file -CHARACTER(LEN=NFILENAMELGTMAX) :: YZOOMFILE ! name of the output file -CHARACTER(LEN=2) :: YZOOMNBR -CHARACTER(LEN=NFILENAMELGTMAX) :: YMY_NAME, YDAD_NAME -CHARACTER(LEN=NFILENAMELGTMAX) :: YPGDFILE -CHARACTER(LEN=2) :: YSTORAGE_TYPE -LOGICAL :: GFOUND -INTEGER :: IXOR_DAD,IYOR_DAD ! compared to Dad file, if any -INTEGER :: IXOR,IYOR ! given or computed -INTEGER :: IDXRATIO,IDYRATIO -TYPE(TFILEDATA),POINTER :: TZNMLFILE => NULL() -TYPE(TFILEDATA),POINTER :: TZPGDFILE => NULL() -TYPE(TFILEDATA),POINTER :: TZZOOMFILE => NULL() -! -REAL, DIMENSION(:,:), ALLOCATABLE :: ZZS1,ZZSMT1,ZZS2,ZZSMT2 -! -NAMELIST/NAM_PGDFILE/CPGDFILE,YZOOMFILE,YZOOMNBR -!------------------------------------------------------------------------------ -! -CALL GOTO_MODEL(1) -CALL VERSION -CPROGRAM='ZOOMPG' -CSTORAGE_TYPE = 'PG' -! -CALL INI_CST -! -! -!* 1. Set default names and parallelized I/O -! -------------------------------------- -! -CALL IO_Init() -! -CALL IO_File_add2list(TLUOUT0,'OUTPUT_LISTING0','OUTPUTLISTING','WRITE') -CALL IO_File_open(TLUOUT0) -TFILE_OUTPUTLISTING => TLUOUT0 -ILUOUT0=TLUOUT0%NLU -! -CALL IO_File_add2list(TZNMLFILE,'PRE_ZOOM1.nam','NML','READ') -CALL IO_File_open(TZNMLFILE) -ILUNAM = TZNMLFILE%NLU -! -CPGDFILE = 'PGDFILE' ! name of the input file -YZOOMFILE = '' -YZOOMNBR = '00' -CALL POSNAM( TZNMLFILE, 'NAM_PGDFILE', GFOUND ) -IF (GFOUND) READ(UNIT=ILUNAM,NML=NAM_PGDFILE) -CALL POSNAM( TZNMLFILE, 'NAM_CONFIO', GFOUND ) -IF (GFOUND) READ(UNIT=ILUNAM,NML=NAM_CONFIO) -CALL IO_Config_set() -! -!------------------------------------------------------------------------------ -! -!* 2. ZOOM OF PGD DOMAIN -! ------------------ -! -!* 2.1 Open PGD file -! ------------- -! -CALL IO_File_add2list( TZPGDFILE, TRIM(CPGDFILE), 'PGD', 'READ', KLFINPRAR=INT(1,KIND=LFIINT), KLFIVERB=5 ) -CALL IO_File_open(TZPGDFILE) -! -!* 2.2 Reading of initial grid -! ----------------------- -! -CALL READ_HGRID(1,TZPGDFILE,YMY_NAME,YDAD_NAME,YSTORAGE_TYPE) -! -! NIMAX, NJMAX: size of input domain -ALLOCATE(ZZS1 (NIMAX+2*JPHEXT,NJMAX+2*JPHEXT)) -ALLOCATE(ZZSMT1(NIMAX+2*JPHEXT,NJMAX+2*JPHEXT)) -CALL IO_Field_read(TZPGDFILE,'ZS',ZZS1) -CALL IO_Field_read(TZPGDFILE,'ZSMT',ZZSMT1) -! -!* 2.3 Define subdomain -! ---------------- -! -CALL SET_SUBDOMAIN(TZNMLFILE,TZPGDFILE,IXOR_DAD,IYOR_DAD,IXOR,IYOR,IDXRATIO,IDYRATIO) -! -CALL IO_File_close(TZNMLFILE) -! -! NIMAX, NJMAX: size of output domain -! -CALL SET_JP_ll(JPMODELMAX,JPHEXT,JPVEXT,JPHEXT) -CALL SET_DAD0_ll() -CALL SET_DIM_ll(NIMAX, NJMAX, 1) -CALL SET_LBX_ll('OPEN',1) -CALL SET_LBY_ll('OPEN', 1) -CALL SET_XRATIO_ll(1, 1) -CALL SET_YRATIO_ll(1, 1) -CALL SET_XOR_ll(1, 1) -CALL SET_XEND_ll(NIMAX+2*JPHEXT, 1) -CALL SET_YOR_ll(1, 1) -CALL SET_YEND_ll(NJMAX+2*JPHEXT, 1) -CALL SET_DAD_ll(0, 1) -!JUANZ CALL INI_PARA_ll(IINFO_ll) -CALL INI_PARAZ_ll(IINFO_ll) -! -! -!* 2.4 Writing of final grid -! --------------------- -! -IF ( (LEN_TRIM(YZOOMFILE) == 0) .OR. (ADJUSTL(YZOOMFILE) == ADJUSTL(CPGDFILE)) ) THEN - YZOOMFILE=ADJUSTL(ADJUSTR(CPGDFILE)//'.z'//ADJUSTL(YZOOMNBR)) -END IF -! -CALL IO_File_add2list( TZZOOMFILE, TRIM(YZOOMFILE), 'PGD', 'WRITE', KLFINPRAR=INT(1,KIND=LFIINT), KLFIVERB=5 ) -! -CALL IO_File_open(TZZOOMFILE) -CALL WRITE_HGRID(1,TZZOOMFILE) -! -!* 2.5 Preparation of surface physiographic fields -! ------------------------------------------- -! -CALL IO_Field_read(TZPGDFILE,'SURF',CSURF) -! -! -IF (CSURF=='EXTE') THEN - CALL SURFEX_ALLOC_LIST(1) - YSURF_CUR => YSURF_LIST(1) - CALL READ_ALL_NAMELISTS(YSURF_CUR,'MESONH','PRE',.FALSE.) - YPGDFILE = CPGDFILE - CPGDFILE = YZOOMFILE - TOUTDATAFILE => TZZOOMFILE - CALL GOTO_SURFEX(1) - CALL ZOOM_PGD_SURF_ATM(YSURF_CUR,'MESONH',YPGDFILE,'MESONH',YZOOMFILE,'MESONH') -! -!* 2.6 Writes the physiographic fields -! ------------------------------- -! - CALL WRITE_PGD_SURF_ATM_n(YSURF_CUR,'MESONH') -ELSE - ALLOCATE(ZZS2(NIMAX+2*JPHEXT,NJMAX+2*JPHEXT)) - ZZS2(:,:)=ZZS1(IXOR:IXOR+NIMAX+2*JPHEXT-1,IYOR:IYOR+NJMAX+2*JPHEXT-1) - CALL IO_Field_write(TZZOOMFILE,'ZS',ZZS2) -END IF -! -ALLOCATE(ZZSMT2(NIMAX+2*JPHEXT,NJMAX+2*JPHEXT)) -ZZSMT2(:,:)=ZZSMT1(IXOR:IXOR+NIMAX+2*JPHEXT-1,IYOR:IYOR+NJMAX+2*JPHEXT-1) -CALL IO_Field_write(TZZOOMFILE,'ZSMT',ZZSMT2) -! -!* 2.7 Write configuration variables in the output file -! ------------------------------------------------ -! -CALL IO_Header_write(TZZOOMFILE) -CALL IO_Field_write(TZZOOMFILE,'DXRATIO',IDXRATIO) -CALL IO_Field_write(TZZOOMFILE,'DYRATIO',IDYRATIO) -CALL IO_Field_write(TZZOOMFILE,'XOR', IXOR_DAD) -CALL IO_Field_write(TZZOOMFILE,'YOR', IYOR_DAD) -CALL IO_Field_write(TZZOOMFILE,'L1D', L1D) -CALL IO_Field_write(TZZOOMFILE,'L2D', L2D) -CALL IO_Field_write(TZZOOMFILE,'PACK', LPACK) -CALL IO_Field_write(TZZOOMFILE,'SURF', CSURF) -CALL IO_File_close(TZZOOMFILE) -! -!* 2.8 Shift to new PGD file -! --------------------- -! -CPGDFILE = YZOOMFILE -! -!------------------------------------------------------------------------------ -! -!* 3. CLOSE PARALLELIZED I/O -! ---------------------- -! -CALL IO_File_close(TZPGDFILE) -! -WRITE(ILUOUT0,*) -WRITE(ILUOUT0,*) '***************************' -WRITE(ILUOUT0,*) '* ZOOM_PGD ends correctly *' -WRITE(ILUOUT0,*) '***************************' -! -CALL FINALIZE_MNH() -! -!------------------------------------------------------------------------------- -! -END PROGRAM ZOOM_PGD diff --git a/src/Makefile.MESONH.mk b/src/Makefile.MESONH.mk index caebcb7e1ad3de5cd15794506423becc93991b50..892207d078cf8343d9eeb443cc7dc23636421b91 100644 --- a/src/Makefile.MESONH.mk +++ b/src/Makefile.MESONH.mk @@ -674,8 +674,7 @@ NSOURCE=8 #PROG_LIST += MESONH PREP_IDEAL_CASE PREP_PGD #else PROG_LIST += MESONH LATLON_TO_XY PREP_IDEAL_CASE PREP_REAL_CASE PREP_PGD \ - PREP_NEST_PGD SPAWNING DIAG PREP_SURFEX ZOOM_PGD SPECTRE \ - MNH2LPDM + PREP_NEST_PGD SPAWNING DIAG PREP_SURFEX SPECTRE MNH2LPDM ifdef MNH_TOOLS PROG_LIST += LFI2CDF endif