From 138d663886aea3001919ba87c7910a0467e55bfc Mon Sep 17 00:00:00 2001 From: Philippe WAUTELET <philippe.wautelet@aero.obs-mip.fr> Date: Fri, 22 Dec 2023 11:34:19 +0100 Subject: [PATCH] Philippe 22/12/2023: SURFEX: use parameter NFILENAMELGTMAX to fix filename length --- src/SURFEX/ch_init_depconst.F90 | 3 +- src/SURFEX/ch_init_emissionn.F90 | 4 +- src/SURFEX/ch_init_snapn.F90 | 3 +- src/SURFEX/close_aux_io_surf.F90 | 3 +- src/SURFEX/close_aux_io_surf_asc.F90 | 3 +- src/SURFEX/close_aux_io_surf_fa.F90 | 9 +- src/SURFEX/default_ch_surf_atm.F90 | 8 +- src/SURFEX/get_teb_depths.F90 | 10 +- src/SURFEX/grid_from_file.F90 | 3 +- src/SURFEX/ini_var_from_data.F90 | 30 +- src/SURFEX/ini_var_from_data_0d.F90 | 16 +- src/SURFEX/ini_var_from_data_0d_in.F90 | 4 +- src/SURFEX/init_flaken.F90 | 4 +- src/SURFEX/init_inland_watern.F90 | 3 +- src/SURFEX/init_isban.F90 | 4 +- src/SURFEX/init_naturen.F90 | 3 +- src/SURFEX/init_pgd_surf_atm.F90 | 4 +- src/SURFEX/init_seafluxn.F90 | 4 +- src/SURFEX/init_sean.F90 | 3 +- src/SURFEX/init_surf_atmn.F90 | 4 +- src/SURFEX/init_teb_veg_optionsn.F90 | 22 +- src/SURFEX/init_tebn.F90 | 4 +- src/SURFEX/init_townn.F90 | 3 +- src/SURFEX/init_watfluxn.F90 | 4 +- src/SURFEX/modd_ch_isban.F90 | 4 +- src/SURFEX/modd_ch_surfn.F90 | 4 +- src/SURFEX/modd_ch_tebn.F90 | 4 +- src/SURFEX/modd_grid_grib.F90 | 3 +- src/SURFEX/modd_io_surf_asc.F90 | 13 +- src/SURFEX/modd_io_surf_fa.F90 | 12 +- src/SURFEX/modd_io_surf_lfi.F90 | 16 +- src/SURFEX/modd_prep_flake.F90 | 10 +- src/SURFEX/modd_prep_isba.F90 | 38 +- src/SURFEX/modd_prep_seaflux.F90 | 14 +- src/SURFEX/modd_prep_teb.F90 | 26 +- src/SURFEX/modd_prep_teb_garden.F90 | 38 +- src/SURFEX/modd_prep_teb_greenroof.F90 | 38 +- src/SURFEX/modd_prep_watflux.F90 | 10 +- src/SURFEX/modd_surf_par.F90 | 9 +- src/SURFEX/mode_ekf.F90 | 6 +- src/SURFEX/mode_read_cdf.F90 | 8 +- src/SURFEX/mode_read_extern.F90 | 20 +- src/SURFEX/mode_read_netcdf_mercator.F90 | 44 ++- src/SURFEX/modn_io_offline.F90 | 10 +- src/SURFEX/modn_isban.F90 | 4 +- src/SURFEX/modn_pgd_grid.F90 | 6 +- src/SURFEX/modn_prep_surf_atm.F90 | 9 +- src/SURFEX/modn_surf_atmn.F90 | 4 +- src/SURFEX/modn_teb_vegn.F90 | 4 +- src/SURFEX/open_aux_io_surf.F90 | 10 +- src/SURFEX/open_aux_io_surf_asc.F90 | 3 +- src/SURFEX/open_aux_io_surf_fa.F90 | 3 +- src/SURFEX/open_file.F90 | 4 +- src/SURFEX/open_file_asc.F90 | 8 +- src/SURFEX/open_file_fa.F90 | 8 +- src/SURFEX/open_namelist.F90 | 7 +- src/SURFEX/open_namelist_asc.F90 | 7 +- src/SURFEX/open_namelist_fa.F90 | 6 +- src/SURFEX/pgd_bathyfield.F90 | 6 +- src/SURFEX/pgd_bem_par.F90 | 363 ++++++++++---------- src/SURFEX/pgd_chemistry.F90 | 6 +- src/SURFEX/pgd_chemistry_snap.F90 | 22 +- src/SURFEX/pgd_cover.F90 | 4 +- src/SURFEX/pgd_dms.F90 | 4 +- src/SURFEX/pgd_dummy.F90 | 6 +- src/SURFEX/pgd_ecoclimap2_data.F90 | 10 +- src/SURFEX/pgd_field.F90 | 12 +- src/SURFEX/pgd_fieldin.F90 | 4 +- src/SURFEX/pgd_flake.F90 | 26 +- src/SURFEX/pgd_frac.F90 | 18 +- src/SURFEX/pgd_grid.F90 | 5 +- src/SURFEX/pgd_grid_surf_atm.F90 | 6 +- src/SURFEX/pgd_isba.F90 | 22 +- src/SURFEX/pgd_isba_par.F90 | 280 +++++++-------- src/SURFEX/pgd_megan.F90 | 4 +- src/SURFEX/pgd_orography.F90 | 14 +- src/SURFEX/pgd_seaflux.F90 | 7 +- src/SURFEX/pgd_seaflux_par.F90 | 8 +- src/SURFEX/pgd_snap_temp_profile.F90 | 4 +- src/SURFEX/pgd_surf_atm.F90 | 3 +- src/SURFEX/pgd_teb_garden_par.F90 | 26 +- src/SURFEX/pgd_teb_greenroof_par.F90 | 18 +- src/SURFEX/pgd_teb_hydro_par.F90 | 38 +- src/SURFEX/pgd_teb_irrig.F90 | 62 ++-- src/SURFEX/pgd_teb_par.F90 | 259 +++++++------- src/SURFEX/pgd_teb_veg.F90 | 22 +- src/SURFEX/pgd_topo_index.F90 | 6 +- src/SURFEX/pgd_tsz0_par.F90 | 4 - src/SURFEX/prep_flake.F90 | 12 +- src/SURFEX/prep_flake_extern.F90 | 12 +- src/SURFEX/prep_flake_grib.F90 | 3 +- src/SURFEX/prep_hor_flake_field.F90 | 26 +- src/SURFEX/prep_hor_isba_cc_field.F90 | 14 +- src/SURFEX/prep_hor_isba_esc_field.F90 | 14 +- src/SURFEX/prep_hor_isba_field.F90 | 20 +- src/SURFEX/prep_hor_ocean_field.F90 | 16 +- src/SURFEX/prep_hor_ocean_fields.F90 | 6 +- src/SURFEX/prep_hor_seaflux_field.F90 | 23 +- src/SURFEX/prep_hor_snow_field.F90 | 9 +- src/SURFEX/prep_hor_snow_fields.F90 | 10 +- src/SURFEX/prep_hor_teb_field.F90 | 14 +- src/SURFEX/prep_hor_teb_garden_field.F90 | 32 +- src/SURFEX/prep_hor_teb_greenroof_field.F90 | 26 +- src/SURFEX/prep_hor_watflux_field.F90 | 23 +- src/SURFEX/prep_inland_water.F90 | 12 +- src/SURFEX/prep_isba.F90 | 14 +- src/SURFEX/prep_isba_cc_extern.F90 | 10 +- src/SURFEX/prep_isba_esc_extern.F90 | 10 +- src/SURFEX/prep_isba_extern.F90 | 10 +- src/SURFEX/prep_isba_grib.F90 | 4 +- src/SURFEX/prep_isba_netcdf.F90 | 4 +- src/SURFEX/prep_nature.F90 | 12 +- src/SURFEX/prep_ocean_ascllv.F90 | 5 +- src/SURFEX/prep_ocean_netcdf.F90 | 7 +- src/SURFEX/prep_sea.F90 | 12 +- src/SURFEX/prep_seaflux.F90 | 11 +- src/SURFEX/prep_seaflux_extern.F90 | 9 +- src/SURFEX/prep_seaflux_grib.F90 | 3 +- src/SURFEX/prep_seaflux_netcdf.F90 | 3 +- src/SURFEX/prep_seaice.F90 | 12 +- src/SURFEX/prep_snow_extern.F90 | 10 +- src/SURFEX/prep_snow_grib.F90 | 4 +- src/SURFEX/prep_surf_atm.F90 | 25 +- src/SURFEX/prep_teb.F90 | 13 +- src/SURFEX/prep_teb_extern.F90 | 9 +- src/SURFEX/prep_teb_garden.F90 | 10 +- src/SURFEX/prep_teb_garden_extern.F90 | 10 +- src/SURFEX/prep_teb_garden_grib.F90 | 4 +- src/SURFEX/prep_teb_greenroof.F90 | 14 +- src/SURFEX/prep_teb_greenroof_extern.F90 | 10 +- src/SURFEX/prep_teb_greenroof_grib.F90 | 4 +- src/SURFEX/prep_teb_grib.F90 | 4 +- src/SURFEX/prep_town.F90 | 14 +- src/SURFEX/prep_watflux.F90 | 11 +- src/SURFEX/prep_watflux_extern.F90 | 10 +- src/SURFEX/prep_watflux_grib.F90 | 3 +- src/SURFEX/read_ascllv.F90 | 3 +- src/SURFEX/read_binllv.F90 | 3 +- src/SURFEX/read_binllvfast.F90 | 4 +- src/SURFEX/read_csvdata_archi_teb.F90 | 6 +- src/SURFEX/read_csvdata_compo_teb.F90 | 4 +- src/SURFEX/read_direct.F90 | 7 +- src/SURFEX/read_direct_gauss.F90 | 7 +- src/SURFEX/read_flake_date.F90 | 14 +- src/SURFEX/read_from_surfex_file.F90 | 6 +- src/SURFEX/read_isba_date.F90 | 14 +- src/SURFEX/read_latlon.F90 | 3 +- src/SURFEX/read_nam_pgd_cover.F90 | 7 +- src/SURFEX/read_nam_pgd_dms.F90 | 9 +- src/SURFEX/read_nam_pgd_dummy.F90 | 9 +- src/SURFEX/read_nam_pgd_isba.F90 | 62 ++-- src/SURFEX/read_nam_pgd_megan.F90 | 11 +- src/SURFEX/read_nam_pgd_orography.F90 | 18 +- src/SURFEX/read_nam_pgd_seabathy.F90 | 21 +- src/SURFEX/read_nam_pgd_teb_greenroof.F90 | 26 +- src/SURFEX/read_netcdf.F90 | 3 +- src/SURFEX/read_pgd_isban.F90 | 22 +- src/SURFEX/read_pgd_netcdf.F90 | 4 +- src/SURFEX/read_prep_file_date.F90 | 4 +- src/SURFEX/read_prep_flake_conf.F90 | 54 +-- src/SURFEX/read_prep_garden_snow.F90 | 20 +- src/SURFEX/read_prep_greenroof_snow.F90 | 18 +- src/SURFEX/read_prep_isba_conf.F90 | 30 +- src/SURFEX/read_prep_isba_snow.F90 | 14 +- src/SURFEX/read_prep_seaflux_conf.F90 | 32 +- src/SURFEX/read_prep_surf_atm_conf.F90 | 24 +- src/SURFEX/read_prep_teb_conf.F90 | 30 +- src/SURFEX/read_prep_teb_garden_conf.F90 | 28 +- src/SURFEX/read_prep_teb_greenroof_conf.F90 | 28 +- src/SURFEX/read_prep_teb_snow.F90 | 14 +- src/SURFEX/read_prep_watflux_conf.F90 | 32 +- src/SURFEX/read_seaflux_date.F90 | 14 +- src/SURFEX/read_surf_atm_date.F90 | 14 +- src/SURFEX/read_teb_date.F90 | 14 +- src/SURFEX/read_teb_patch.F90 | 4 +- src/SURFEX/read_watflux_date.F90 | 14 +- src/SURFEX/read_z1d_netcdf.F90 | 4 +- src/SURFEX/set_surfex_file_name_asc.F90 | 5 +- src/SURFEX/set_surfex_filein.F90 | 4 +- src/SURFEX/sfx_oasis_init.F90 | 4 +- src/SURFEX/soda.F90 | 14 +- src/SURFEX/treat_bathyfield.F90 | 4 +- src/SURFEX/treat_field.F90 | 4 +- src/SURFEX/zoom_pgd_cover.F90 | 4 +- src/SURFEX/zoom_pgd_inland_water.F90 | 14 +- src/SURFEX/zoom_pgd_isba.F90 | 14 +- src/SURFEX/zoom_pgd_isba_full.F90 | 7 +- src/SURFEX/zoom_pgd_nature.F90 | 14 +- src/SURFEX/zoom_pgd_orography.F90 | 6 +- src/SURFEX/zoom_pgd_sea.F90 | 12 +- src/SURFEX/zoom_pgd_seaflux.F90 | 11 +- src/SURFEX/zoom_pgd_surf_atm.F90 | 12 +- src/SURFEX/zoom_pgd_teb.F90 | 4 +- src/SURFEX/zoom_pgd_town.F90 | 12 +- 194 files changed, 1673 insertions(+), 1517 deletions(-) diff --git a/src/SURFEX/ch_init_depconst.F90 b/src/SURFEX/ch_init_depconst.F90 index ab695881a..63a40dc85 100644 --- a/src/SURFEX/ch_init_depconst.F90 +++ b/src/SURFEX/ch_init_depconst.F90 @@ -45,6 +45,7 @@ USE MODI_CLOSE_NAMELIST ! USE MODI_CH_OPEN_INPUTB USE MODD_CH_SURF +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX !! !! IMPLICIT ARGUMENTS !! ------------------ @@ -61,7 +62,7 @@ IMPLICIT NONE !* 0.1 declarations of arguments ! CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! Program name -CHARACTER(LEN=28), INTENT(IN) :: HCHEM_SURF_FILE ! ascii file for chemistry aggregation +CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HCHEM_SURF_FILE ! ascii file for chemistry aggregation INTEGER, INTENT(IN) :: KLUOUT ! output listing channel CHARACTER(LEN=*), DIMENSION(:), INTENT(IN) :: HSV ! name of chemical species ! diff --git a/src/SURFEX/ch_init_emissionn.F90 b/src/SURFEX/ch_init_emissionn.F90 index 99e7449ef..7251f8541 100644 --- a/src/SURFEX/ch_init_emissionn.F90 +++ b/src/SURFEX/ch_init_emissionn.F90 @@ -36,7 +36,7 @@ ! ! USE MODD_CH_EMIS_FIELD_n, ONLY : CH_EMIS_FIELD_t -USE MODD_SURF_PAR, ONLY : LEN_HREC +USE MODD_SURF_PAR, ONLY : LEN_HREC, NFILENAMELGTMAX ! USE MODI_GET_LUOUT USE MODI_BUILD_EMISSTAB_n @@ -69,7 +69,7 @@ CHARACTER(LEN=3), INTENT(IN) :: HINIT ! Flag to know if one initializes: ! ! 'PRE' : only variables to build ! ! an initial file REAL, DIMENSION(:),INTENT(IN) :: PRHOA ! air density -CHARACTER(LEN=28), INTENT(IN) :: HCHEM_SURF_FILE ! ascii file for chemistry aggregation +CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HCHEM_SURF_FILE ! ascii file for chemistry aggregation LOGICAL, INTENT(IN) :: LCH_SURF_EMIS INTEGER, INTENT(IN) :: KEQ ! diff --git a/src/SURFEX/ch_init_snapn.F90 b/src/SURFEX/ch_init_snapn.F90 index f36f4a266..df0ec78a0 100644 --- a/src/SURFEX/ch_init_snapn.F90 +++ b/src/SURFEX/ch_init_snapn.F90 @@ -35,6 +35,7 @@ USE MODD_CH_SNAP_n, ONLY : CH_EMIS_SNAP_t ! USE MODD_CSTS, ONLY : XAVOGADRO, XMD +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX USE MODI_GET_LUOUT USE MODI_READ_SURF USE MODI_ABOR1_SFX @@ -66,7 +67,7 @@ INTEGER, INTENT(IN) :: KLU ! number of points ! ! 'PRE' : only variables to build ! ! an initial file REAL, DIMENSION(:),INTENT(IN) :: PRHOA ! air density -CHARACTER(LEN=28), INTENT(IN) :: HCHEM_SURF_FILE ! ascii file for chemistry aggregation +CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HCHEM_SURF_FILE ! ascii file for chemistry aggregation LOGICAL, INTENT(IN) :: LCH_SURF_EMIS INTEGER, INTENT(IN) :: KEQ diff --git a/src/SURFEX/close_aux_io_surf.F90 b/src/SURFEX/close_aux_io_surf.F90 index 54ee0ee81..825538e85 100644 --- a/src/SURFEX/close_aux_io_surf.F90 +++ b/src/SURFEX/close_aux_io_surf.F90 @@ -41,6 +41,7 @@ ! ! ! +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX USE YOMHOOK ,ONLY : LHOOK, DR_HOOK USE PARKIND1 ,ONLY : JPRB ! @@ -78,7 +79,7 @@ IMPLICIT NONE !* 0.1 Declarations of arguments ! ------------------------- ! - CHARACTER(LEN=28), INTENT(IN) :: HFILE ! file name + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILE ! file name CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE ! main program REAL(KIND=JPRB) :: ZHOOK_HANDLE ! diff --git a/src/SURFEX/close_aux_io_surf_asc.F90 b/src/SURFEX/close_aux_io_surf_asc.F90 index a63278b4f..7aafeed75 100644 --- a/src/SURFEX/close_aux_io_surf_asc.F90 +++ b/src/SURFEX/close_aux_io_surf_asc.F90 @@ -39,6 +39,7 @@ ! ------------ ! USE MODD_IO_SURF_ASC,ONLY:NUNIT,CMASK,NMASK,NFULL +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX ! USE YOMHOOK ,ONLY : LHOOK, DR_HOOK USE PARKIND1 ,ONLY : JPRB @@ -48,7 +49,7 @@ IMPLICIT NONE !* 0.1 Declarations of arguments ! ------------------------- ! - CHARACTER(LEN=28), INTENT(IN) :: HFILE ! file name + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILE ! file name CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE ! main program REAL(KIND=JPRB) :: ZHOOK_HANDLE ! diff --git a/src/SURFEX/close_aux_io_surf_fa.F90 b/src/SURFEX/close_aux_io_surf_fa.F90 index 968404712..0f14dec78 100644 --- a/src/SURFEX/close_aux_io_surf_fa.F90 +++ b/src/SURFEX/close_aux_io_surf_fa.F90 @@ -38,6 +38,7 @@ ! ------------ ! USE MODD_IO_SURF_FA, ONLY : NUNIT_FA, NFULL, CMASK, NLUOUT, NMASK, CFILEIN_FA, CDNOMC, NMASK +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX ! ! USE YOMHOOK ,ONLY : LHOOK, DR_HOOK @@ -48,10 +49,10 @@ IMPLICIT NONE !* 0.1 Declarations of arguments ! ------------------------- ! - CHARACTER(LEN=28), INTENT(IN) :: HFILE ! file name + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILE ! file name CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE ! main program INTEGER :: IRET ! error code -CHARACTER(LEN=28) :: YFILE +CHARACTER(LEN=NFILENAMELGTMAX) :: YFILE REAL(KIND=JPRB) :: ZHOOK_HANDLE ! !* 0.2 Declarations of local variables @@ -66,8 +67,8 @@ CMASK=' ' DEALLOCATE(NMASK) CALL FAIRME(IRET,NUNIT_FA,'UNKNOWN') ! -YFILE=HFILE(1:LEN_TRIM(HFILE))//'.fa' -WRITE(NLUOUT,*)'HFILETYPE ',HFILETYPE,'END EXTERNAL',NUNIT_FA,YFILE +YFILE=TRIM(HFILE)//'.fa' +WRITE(NLUOUT,*)'HFILETYPE ',HFILETYPE,'END EXTERNAL',NUNIT_FA,TRIM(YFILE) ! CFILEIN_FA = ' ' NUNIT_FA = 0 diff --git a/src/SURFEX/default_ch_surf_atm.F90 b/src/SURFEX/default_ch_surf_atm.F90 index a080d94b3..98f3b6ece 100644 --- a/src/SURFEX/default_ch_surf_atm.F90 +++ b/src/SURFEX/default_ch_surf_atm.F90 @@ -39,6 +39,8 @@ ! ! ! +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX +! USE YOMHOOK ,ONLY : LHOOK, DR_HOOK USE PARKIND1 ,ONLY : JPRB ! @@ -48,8 +50,8 @@ IMPLICIT NONE ! ------------------------- ! ! - CHARACTER(LEN=28), INTENT(OUT) :: HCHEM_SURF_FILE -LOGICAL, INTENT(OUT) :: OSURF_EMIS + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(OUT) :: HCHEM_SURF_FILE +LOGICAL, INTENT(OUT) :: OSURF_EMIS REAL(KIND=JPRB) :: ZHOOK_HANDLE ! !* 0.2 Declarations of local variables @@ -57,7 +59,7 @@ REAL(KIND=JPRB) :: ZHOOK_HANDLE ! !------------------------------------------------------------------------------- IF (LHOOK) CALL DR_HOOK('DEFAULT_CH_SURF_ATM',0,ZHOOK_HANDLE) -HCHEM_SURF_FILE = ' ' +HCHEM_SURF_FILE = '' OSURF_EMIS = .FALSE. IF (LHOOK) CALL DR_HOOK('DEFAULT_CH_SURF_ATM',1,ZHOOK_HANDLE) !------------------------------------------------------------------------------- diff --git a/src/SURFEX/get_teb_depths.F90 b/src/SURFEX/get_teb_depths.F90 index bf826cc40..73c34818d 100644 --- a/src/SURFEX/get_teb_depths.F90 +++ b/src/SURFEX/get_teb_depths.F90 @@ -41,7 +41,7 @@ ! ----------- ! USE MODD_DATA_COVER_n, ONLY : DATA_COVER_t, DATA_COVER_INIT -USE MODD_SURF_PAR, ONLY : LEN_HREC +USE MODD_SURF_PAR, ONLY : LEN_HREC, NFILENAMELGTMAX ! USE MODD_SURFEX_MPI, ONLY : NRANK, NPIO USE MODD_DATA_COVER, ONLY : XDATA_D_ROOF, XDATA_D_ROAD, XDATA_D_WALL, XDATA_D_FLOOR, XDATA_D_MASS @@ -76,10 +76,10 @@ IMPLICIT NONE ! TYPE(DATA_COVER_t), INTENT(INOUT) :: DTCO ! - CHARACTER(LEN=28), INTENT(IN) :: HFILE ! type of input file - CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE ! type of input file - CHARACTER(LEN=28), INTENT(IN) :: HFILEPGD ! type of input file - CHARACTER(LEN=6), INTENT(IN) :: HFILEPGDTYPE ! type of input file + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILE ! type of input file + CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE ! type of input file + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILEPGD ! type of input file + CHARACTER(LEN=6), INTENT(IN) :: HFILEPGDTYPE ! type of input file ! REAL, DIMENSION(:,:), INTENT(OUT), OPTIONAL :: PD_ROOF REAL, DIMENSION(:,:), INTENT(OUT), OPTIONAL :: PD_ROAD diff --git a/src/SURFEX/grid_from_file.F90 b/src/SURFEX/grid_from_file.F90 index 63e70df28..d9b79c2ca 100644 --- a/src/SURFEX/grid_from_file.F90 +++ b/src/SURFEX/grid_from_file.F90 @@ -43,6 +43,7 @@ ! USE MODD_SURF_ATM_n, ONLY : SURF_ATM_t USE MODD_GRID_CONF_PROJ_n, ONLY : GRID_CONF_PROJ_t +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX ! USE MODD_SURFEX_MPI, ONLY : NRANK, NSIZE_TASK ! @@ -74,7 +75,7 @@ TYPE(GRID_CONF_PROJ_t),INTENT(INOUT) :: GCP REAL, DIMENSION(:), POINTER :: PGRID_FULL_PAR ! CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling the surface - CHARACTER(LEN=28), INTENT(IN) :: HFILE ! file name + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILE ! file name CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE ! file type LOGICAL, INTENT(IN) :: OGRID ! .true. if grid is imposed by atm. model CHARACTER(LEN=10), INTENT(OUT) :: HGRID ! type of horizontal grid diff --git a/src/SURFEX/ini_var_from_data.F90 b/src/SURFEX/ini_var_from_data.F90 index 0ae40bcd2..1ee4b3ae3 100644 --- a/src/SURFEX/ini_var_from_data.F90 +++ b/src/SURFEX/ini_var_from_data.F90 @@ -14,6 +14,8 @@ USE MODD_SURF_ATM_GRID_n, ONLY : SURF_ATM_GRID_t USE MODD_SURF_ATM_n, ONLY : SURF_ATM_t USE MODD_SSO_n, ONLY : SSO_t ! +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX +! TYPE(DATA_COVER_t), INTENT(INOUT) :: DTCO TYPE(SURF_ATM_GRID_t), INTENT(INOUT) :: UG TYPE(SURF_ATM_t), INTENT(INOUT) :: U @@ -25,7 +27,7 @@ REAL, DIMENSION(:,:), INTENT(IN) :: PPAR_VEGTYPE CHARACTER(LEN=3), INTENT(IN) :: HATYPE CHARACTER(LEN=*), INTENT(IN) :: HNAME CHARACTER(LEN=3), INTENT(IN) :: HTYPE - CHARACTER(LEN=28), DIMENSION(:), INTENT(IN) :: HFNAM + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(:), INTENT(IN) :: HFNAM CHARACTER(LEN=6), DIMENSION(:), INTENT(INOUT) :: HFTYP REAL, DIMENSION(:), INTENT(IN) :: PUNIF REAL, DIMENSION(:,:), INTENT(OUT) :: PFIELD @@ -42,6 +44,8 @@ USE MODD_SURF_ATM_GRID_n, ONLY : SURF_ATM_GRID_t USE MODD_SURF_ATM_n, ONLY : SURF_ATM_t USE MODD_SSO_n, ONLY : SSO_t ! +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX +! TYPE(DATA_COVER_t), INTENT(INOUT) :: DTCO TYPE(SURF_ATM_GRID_t), INTENT(INOUT) :: UG TYPE(SURF_ATM_t), INTENT(INOUT) :: U @@ -51,7 +55,7 @@ TYPE(SSO_t), INTENT(INOUT) :: USS CHARACTER(LEN=3), INTENT(IN) :: HATYPE CHARACTER(LEN=*), INTENT(IN) :: HNAME CHARACTER(LEN=3), INTENT(IN) :: HTYPE - CHARACTER(LEN=28), DIMENSION(:), INTENT(IN) :: HFNAM + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(:), INTENT(IN) :: HFNAM CHARACTER(LEN=6), DIMENSION(:), INTENT(INOUT) :: HFTYP REAL, DIMENSION(:), INTENT(IN) :: PUNIF REAL, DIMENSION(:,:), INTENT(OUT) :: PFIELD @@ -68,6 +72,8 @@ USE MODD_SURF_ATM_GRID_n, ONLY : SURF_ATM_GRID_t USE MODD_SURF_ATM_n, ONLY : SURF_ATM_t USE MODD_SSO_n, ONLY : SSO_t ! +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX +! REAL, DIMENSION(:,:), INTENT(IN) :: PPAR_VEGTYPE ! TYPE(DATA_COVER_t), INTENT(INOUT) :: DTCO @@ -79,7 +85,7 @@ TYPE(SSO_t), INTENT(INOUT) :: USS CHARACTER(LEN=3), INTENT(IN) :: HATYPE CHARACTER(LEN=*), INTENT(IN) :: HNAME CHARACTER(LEN=3), INTENT(IN) :: HTYPE - CHARACTER(LEN=28), DIMENSION(:,:), INTENT(IN) :: HFNAM + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(:,:), INTENT(IN) :: HFNAM CHARACTER(LEN=6), DIMENSION(:,:), INTENT(INOUT) :: HFTYP REAL, DIMENSION(:,:), INTENT(IN) :: PUNIF REAL, DIMENSION(:,:,:), INTENT(OUT) :: PFIELD_TIME @@ -97,6 +103,8 @@ USE MODD_SURF_ATM_GRID_n, ONLY : SURF_ATM_GRID_t USE MODD_SURF_ATM_n, ONLY : SURF_ATM_t USE MODD_SSO_n, ONLY : SSO_t ! +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX +! TYPE(DATA_COVER_t), INTENT(INOUT) :: DTCO TYPE(SURF_ATM_GRID_t), INTENT(INOUT) :: UG TYPE(SURF_ATM_t), INTENT(INOUT) :: U @@ -106,7 +114,7 @@ TYPE(SSO_t), INTENT(INOUT) :: USS CHARACTER(LEN=3), INTENT(IN) :: HATYPE CHARACTER(LEN=*), INTENT(IN) :: HNAME CHARACTER(LEN=3), INTENT(IN) :: HTYPE - CHARACTER(LEN=28), DIMENSION(:,:), INTENT(IN) :: HFNAM + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(:,:), INTENT(IN) :: HFNAM CHARACTER(LEN=6), DIMENSION(:,:), INTENT(INOUT) :: HFTYP REAL, DIMENSION(:,:), INTENT(IN) :: PUNIF REAL, DIMENSION(:,:,:), INTENT(OUT) :: PFIELD_TIME @@ -133,7 +141,7 @@ USE MODD_SURF_ATM_GRID_n, ONLY : SURF_ATM_GRID_t USE MODD_SURF_ATM_n, ONLY : SURF_ATM_t USE MODD_SSO_n, ONLY : SSO_t ! -USE MODD_SURF_PAR, ONLY : XUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF USE MODD_DATA_COVER_PAR, ONLY : NVEGTYPE ! USE MODI_INI_VAR_FROM_DATA_0D @@ -157,7 +165,7 @@ REAL, DIMENSION(:,:), INTENT(IN) :: PPAR_VEGTYPE CHARACTER(LEN=3), INTENT(IN) :: HATYPE CHARACTER(LEN=*), INTENT(IN) :: HNAME CHARACTER(LEN=3), INTENT(IN) :: HTYPE - CHARACTER(LEN=28), DIMENSION(:), INTENT(INOUT) :: HFNAM + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(:), INTENT(INOUT) :: HFNAM CHARACTER(LEN=6), DIMENSION(:), INTENT(INOUT) :: HFTYP REAL, DIMENSION(:), INTENT(INOUT) :: PUNIF REAL, DIMENSION(:,:), INTENT(OUT) :: PFIELD @@ -287,6 +295,7 @@ USE MODD_SURF_ATM_n, ONLY : SURF_ATM_t USE MODD_SSO_n, ONLY : SSO_t ! USE MODD_DATA_COVER_PAR, ONLY : NVEGTYPE +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX ! USE MODI_INI_VAR_FROM_DATA_0D USE MODI_ABOR1_SFX @@ -308,7 +317,7 @@ TYPE(SSO_t), INTENT(INOUT) :: USS CHARACTER(LEN=3), INTENT(IN) :: HATYPE CHARACTER(LEN=*), INTENT(IN) :: HNAME CHARACTER(LEN=3), INTENT(IN) :: HTYPE - CHARACTER(LEN=28), DIMENSION(:), INTENT(IN) :: HFNAM + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(:), INTENT(IN) :: HFNAM CHARACTER(LEN=6), DIMENSION(:), INTENT(INOUT) :: HFTYP REAL, DIMENSION(:), INTENT(IN) :: PUNIF REAL, DIMENSION(:,:), INTENT(OUT) :: PFIELD @@ -374,7 +383,7 @@ USE MODD_SURF_ATM_GRID_n, ONLY : SURF_ATM_GRID_t USE MODD_SURF_ATM_n, ONLY : SURF_ATM_t USE MODD_SSO_n, ONLY : SSO_t ! -USE MODD_SURF_PAR, ONLY : XUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF USE MODD_PGDWORK, ONLY : NSIZE USE MODD_DATA_COVER_PAR, ONLY : NVEGTYPE ! @@ -400,7 +409,7 @@ REAL, DIMENSION(:,:), INTENT(IN) :: PPAR_VEGTYPE CHARACTER(LEN=3), INTENT(IN) :: HATYPE CHARACTER(LEN=*), INTENT(IN) :: HNAME CHARACTER(LEN=3), INTENT(IN) :: HTYPE - CHARACTER(LEN=28), DIMENSION(:,:), INTENT(INOUT) :: HFNAM + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(:,:), INTENT(INOUT) :: HFNAM CHARACTER(LEN=6), DIMENSION(:,:), INTENT(INOUT) :: HFTYP REAL, DIMENSION(:,:), INTENT(INOUT) :: PUNIF REAL, DIMENSION(:,:,:), INTENT(OUT) :: PFIELD_TIME @@ -570,6 +579,7 @@ USE MODD_SURF_ATM_n, ONLY : SURF_ATM_t USE MODD_SSO_n, ONLY : SSO_t ! USE MODD_DATA_COVER_PAR, ONLY : NVEGTYPE +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX ! USE MODI_INI_VAR_FROM_DATA_0D USE MODI_PUT_IN_TIME @@ -593,7 +603,7 @@ TYPE(SSO_t), INTENT(INOUT) :: USS CHARACTER(LEN=3), INTENT(IN) :: HATYPE CHARACTER(LEN=*), INTENT(IN) :: HNAME CHARACTER(LEN=3), INTENT(IN) :: HTYPE - CHARACTER(LEN=28), DIMENSION(:,:), INTENT(IN) :: HFNAM + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(:,:), INTENT(IN) :: HFNAM CHARACTER(LEN=6), DIMENSION(:,:), INTENT(INOUT) :: HFTYP REAL, DIMENSION(:,:), INTENT(IN) :: PUNIF REAL, DIMENSION(:,:,:), INTENT(OUT) :: PFIELD_TIME diff --git a/src/SURFEX/ini_var_from_data_0d.F90 b/src/SURFEX/ini_var_from_data_0d.F90 index 0f8ef4ded..bfbdef460 100644 --- a/src/SURFEX/ini_var_from_data_0d.F90 +++ b/src/SURFEX/ini_var_from_data_0d.F90 @@ -18,6 +18,8 @@ USE MODD_SURF_ATM_GRID_n, ONLY : SURF_ATM_GRID_t USE MODD_SURF_ATM_n, ONLY : SURF_ATM_t USE MODD_SSO_n, ONLY : SSO_t ! +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX +! IMPLICIT NONE ! !* 0.1 Declaration of arguments @@ -34,7 +36,7 @@ TYPE(SSO_t), INTENT(INOUT) :: USS CHARACTER(LEN=3), INTENT(IN) :: HATYPE CHARACTER(LEN=*), INTENT(IN) :: HNAME CHARACTER(LEN=3), INTENT(IN) :: HTYPE - CHARACTER(LEN=28), INTENT(IN) :: HFNAM + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFNAM CHARACTER(LEN=6), INTENT(INOUT) :: HFTYP REAL, INTENT(IN) :: PUNIF REAL, DIMENSION(:), INTENT(OUT) :: PFIELD @@ -56,6 +58,8 @@ USE MODD_SURF_ATM_GRID_n, ONLY : SURF_ATM_GRID_t USE MODD_SURF_ATM_n, ONLY : SURF_ATM_t USE MODD_SSO_n, ONLY : SSO_t ! +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX +! IMPLICIT NONE ! !* 0.1 Declaration of arguments @@ -72,7 +76,7 @@ TYPE(SSO_t), INTENT(INOUT) :: USS CHARACTER(LEN=3), INTENT(IN) :: HATYPE CHARACTER(LEN=*), INTENT(IN) :: HNAME CHARACTER(LEN=3), INTENT(IN) :: HTYPE - CHARACTER(LEN=28), INTENT(IN) :: HFNAM + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFNAM CHARACTER(LEN=6), INTENT(INOUT) :: HFTYP REAL, INTENT(IN) :: PUNIF REAL, DIMENSION(:,:), INTENT(OUT) :: PFIELD @@ -97,7 +101,7 @@ USE MODD_SURF_ATM_GRID_n, ONLY : SURF_ATM_GRID_t USE MODD_SURF_ATM_n, ONLY : SURF_ATM_t USE MODD_SSO_n, ONLY : SSO_t ! -USE MODD_SURF_PAR, ONLY : XUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF ! USE MODI_INI_VAR_FROM_DATA_0D_IN ! @@ -117,7 +121,7 @@ TYPE(SSO_t), INTENT(INOUT) :: USS CHARACTER(LEN=3), INTENT(IN) :: HATYPE CHARACTER(LEN=*), INTENT(IN) :: HNAME CHARACTER(LEN=3), INTENT(IN) :: HTYPE - CHARACTER(LEN=28), INTENT(IN) :: HFNAM + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFNAM CHARACTER(LEN=6), INTENT(INOUT) :: HFTYP REAL, INTENT(IN) :: PUNIF REAL, DIMENSION(:), INTENT(OUT) :: PFIELD @@ -156,6 +160,8 @@ USE MODD_SURF_ATM_GRID_n, ONLY : SURF_ATM_GRID_t USE MODD_SURF_ATM_n, ONLY : SURF_ATM_t USE MODD_SSO_n, ONLY : SSO_t ! +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX +! USE MODI_INI_VAR_FROM_DATA_0D_IN ! IMPLICIT NONE @@ -174,7 +180,7 @@ TYPE(SSO_t), INTENT(INOUT) :: USS CHARACTER(LEN=3), INTENT(IN) :: HATYPE CHARACTER(LEN=*), INTENT(IN) :: HNAME CHARACTER(LEN=3), INTENT(IN) :: HTYPE - CHARACTER(LEN=28), INTENT(IN) :: HFNAM + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFNAM CHARACTER(LEN=6), INTENT(INOUT) :: HFTYP REAL, INTENT(IN) :: PUNIF REAL, DIMENSION(:,:), INTENT(OUT) :: PFIELD diff --git a/src/SURFEX/ini_var_from_data_0d_in.F90 b/src/SURFEX/ini_var_from_data_0d_in.F90 index dcdf9c39e..4fb99558e 100644 --- a/src/SURFEX/ini_var_from_data_0d_in.F90 +++ b/src/SURFEX/ini_var_from_data_0d_in.F90 @@ -48,7 +48,7 @@ USE MODD_SURF_ATM_GRID_n, ONLY : SURF_ATM_GRID_t USE MODD_SURF_ATM_n, ONLY : SURF_ATM_t USE MODD_SSO_n, ONLY : SSO_t ! -USE MODD_SURF_PAR, ONLY : XUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF ! USE MODD_PGDWORK, ONLY : CATYPE ! @@ -74,7 +74,7 @@ TYPE(SSO_t), INTENT(INOUT) :: USS CHARACTER(LEN=3), INTENT(IN) :: HATYPE CHARACTER(LEN=*), INTENT(IN) :: HNAME CHARACTER(LEN=3), INTENT(IN) :: HTYPE - CHARACTER(LEN=28), INTENT(IN) :: HFNAM + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFNAM CHARACTER(LEN=6), INTENT(INOUT) :: HFTYP REAL, INTENT(IN) :: PUNIF REAL, DIMENSION(:,:), INTENT(OUT) :: PFIELD diff --git a/src/SURFEX/init_flaken.F90 b/src/SURFEX/init_flaken.F90 index c39462d24..432fe75e2 100644 --- a/src/SURFEX/init_flaken.F90 +++ b/src/SURFEX/init_flaken.F90 @@ -70,7 +70,7 @@ USE MODD_DST_SURF, ONLY: LVARSIG_DST, NDSTMDE, NDST_MDEBEG, LRGFIX_DST USE MODD_SLT_SURF, ONLY: LVARSIG_SLT, NSLTMDE, NSLT_MDEBEG, LRGFIX_SLT ! USE MODD_READ_NAMELIST, ONLY : LNAM_READ -USE MODD_SURF_PAR, ONLY : XUNDEF, NUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF, NUNDEF ! USE MODD_SURF_ATM_TURB_n, ONLY : SURF_ATM_TURB_t ! @@ -137,7 +137,7 @@ INTEGER, INTENT(IN) :: KDAY ! current day (UTC) REAL, INTENT(IN) :: PTIME ! current time since ! midnight (UTC, s) ! - CHARACTER(LEN=28), INTENT(IN) :: HATMFILE ! atmospheric file name + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HATMFILE ! atmospheric file name CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! atmospheric file type CHARACTER(LEN=2), INTENT(IN) :: HTEST ! must be equal to 'OK' ! diff --git a/src/SURFEX/init_inland_watern.F90 b/src/SURFEX/init_inland_watern.F90 index 6a6bd314c..c15d71165 100644 --- a/src/SURFEX/init_inland_watern.F90 +++ b/src/SURFEX/init_inland_watern.F90 @@ -54,6 +54,7 @@ USE MODD_DIAG_n, ONLY : DIAG_OPTIONS_t, DIAG_t ! ! USE MODD_CSTS, ONLY : XTT +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX ! USE MODD_SURF_ATM_TURB_n, ONLY : SURF_ATM_TURB_t ! @@ -105,7 +106,7 @@ REAL, INTENT(IN) :: PTIME ! current time since ! midnight (UTC, s) TYPE(SURF_ATM_TURB_t), INTENT(IN) :: AT ! atmospheric turbulence parameters ! - CHARACTER(LEN=28), INTENT(IN) :: HATMFILE ! atmospheric file name + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HATMFILE ! atmospheric file name CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! atmospheric file type CHARACTER(LEN=2), INTENT(IN) :: HTEST ! must be equal to 'OK' REAL(KIND=JPRB) :: ZHOOK_HANDLE diff --git a/src/SURFEX/init_isban.F90 b/src/SURFEX/init_isban.F90 index 789cefd74..afb06dc36 100644 --- a/src/SURFEX/init_isban.F90 +++ b/src/SURFEX/init_isban.F90 @@ -106,7 +106,7 @@ USE MODD_DATA_COVER, ONLY : XDATA_LAI, XDATA_H_TREE, ! USE MODD_WRITE_SURF_ATM, ONLY : LSPLIT_PATCH USE MODD_SURF_ATM, ONLY : LCPL_GCM, XCO2UNCPL -USE MODD_SURF_PAR, ONLY : XUNDEF, NUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF, NUNDEF USE MODD_AGRI, ONLY : LAGRIP, LIRRIGMODE, NPATCH_TREE ! USE MODE_TARTES, ONLY : INIT_TARTES @@ -198,7 +198,7 @@ INTEGER, INTENT(IN) :: KMONTH ! current month (UTC) INTEGER, INTENT(IN) :: KDAY ! current day (UTC) REAL, INTENT(IN) :: PTIME ! current time since midnight (UTC, s) ! - CHARACTER(LEN=28), INTENT(IN) :: HATMFILE ! atmospheric file name + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HATMFILE ! atmospheric file name CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! atmospheric file type CHARACTER(LEN=2), INTENT(IN) :: HTEST ! must be equal to 'OK' ! diff --git a/src/SURFEX/init_naturen.F90 b/src/SURFEX/init_naturen.F90 index 565114c7c..d4c2b305b 100644 --- a/src/SURFEX/init_naturen.F90 +++ b/src/SURFEX/init_naturen.F90 @@ -70,6 +70,7 @@ USE MODD_BLOWSNW_n, ONLY : BLOWSNW_t USE MODD_SURF_ATM_TURB_n, ONLY : SURF_ATM_TURB_t ! USE MODD_CSTS, ONLY : XTT +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX ! USE YOMHOOK ,ONLY : LHOOK, DR_HOOK USE PARKIND1 ,ONLY : JPRB @@ -126,7 +127,7 @@ REAL, DIMENSION(KI,IM%MSF%NMEGAN_NBR),INTENT(IN) :: PMEGAN_FIELDS TYPE(DATE), INTENT(INOUT) :: TPDATE_END TYPE(SURF_ATM_TURB_t), INTENT(IN) :: AT ! atmospheric turbulence parameters ! - CHARACTER(LEN=28), INTENT(IN) :: HATMFILE ! atmospheric file name + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HATMFILE ! atmospheric file name CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! atmospheric file type CHARACTER(LEN=2), INTENT(IN) :: HTEST ! must be equal to 'OK' REAL(KIND=JPRB) :: ZHOOK_HANDLE diff --git a/src/SURFEX/init_pgd_surf_atm.F90 b/src/SURFEX/init_pgd_surf_atm.F90 index b109258c6..709579b5f 100644 --- a/src/SURFEX/init_pgd_surf_atm.F90 +++ b/src/SURFEX/init_pgd_surf_atm.F90 @@ -37,6 +37,8 @@ USE MODD_SURFEX_n, ONLY : SURFEX_t USE MODD_TYPE_DATE_SURF, ONLY : DATE USE MODD_SURF_ATM_TURB_n, ONLY : SURF_ATM_TURB_t ! +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX +! USE YOMHOOK ,ONLY : LHOOK, DR_HOOK USE PARKIND1 ,ONLY : JPRB ! @@ -51,7 +53,7 @@ TYPE(SURFEX_t), INTENT(INOUT) :: YSC ! CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes CHARACTER(LEN=3), INTENT(IN) :: HINIT ! fields to initialize 'ALL', 'PRE', 'PGD' - CHARACTER(LEN=28), INTENT(IN) :: HATMFILE ! name of the Atmospheric file + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HATMFILE ! name of the Atmospheric file CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! type of the Atmospheric file INTEGER, INTENT(IN) :: KYEAR ! year INTEGER, INTENT(IN) :: KMONTH ! month diff --git a/src/SURFEX/init_seafluxn.F90 b/src/SURFEX/init_seafluxn.F90 index 16d10df6d..685f000ec 100644 --- a/src/SURFEX/init_seafluxn.F90 +++ b/src/SURFEX/init_seafluxn.F90 @@ -67,7 +67,7 @@ USE MODD_SFX_OASIS, ONLY : LCPL_WAVE, LCPL_SEA, LCPL_SEAICE, LCPL_SEACARB USE MODD_READ_NAMELIST, ONLY : LNAM_READ USE MODD_CSTS, ONLY : XTTS USE MODD_SNOW_PAR, ONLY : XZ0HSN -USE MODD_SURF_PAR, ONLY : XUNDEF, NUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF, NUNDEF USE MODD_CHS_AEROSOL, ONLY: LVARSIGI, LVARSIGJ USE MODD_DST_SURF, ONLY: LVARSIG_DST, NDSTMDE, NDST_MDEBEG, LRGFIX_DST USE MODD_SLT_SURF, ONLY: LVARSIG_SLT, NSLTMDE, NSLT_MDEBEG, LRGFIX_SLT @@ -143,7 +143,7 @@ REAL, INTENT(IN) :: PTIME ! current time since ! midnight (UTC, s) ! TYPE(SURF_ATM_TURB_t), INTENT(IN) :: AT ! atmospheric turbulence parameters -CHARACTER(LEN=28), INTENT(IN) :: HATMFILE ! atmospheric file name +CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HATMFILE ! atmospheric file name CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! atmospheric file type CHARACTER(LEN=2), INTENT(IN) :: HTEST ! must be equal to 'OK' ! diff --git a/src/SURFEX/init_sean.F90 b/src/SURFEX/init_sean.F90 index 622295dc1..241325223 100644 --- a/src/SURFEX/init_sean.F90 +++ b/src/SURFEX/init_sean.F90 @@ -57,6 +57,7 @@ USE MODD_DIAG_n, ONLY : DIAG_t, DIAG_OPTIONS_t USE MODD_SURF_ATM_TURB_n, ONLY : SURF_ATM_TURB_t ! USE MODD_CSTS, ONLY : XTT +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX ! ! USE YOMHOOK ,ONLY : LHOOK, DR_HOOK @@ -105,7 +106,7 @@ REAL, INTENT(IN) :: PTIME ! current time since ! midnight (UTC, s) TYPE(SURF_ATM_TURB_t), INTENT(IN) :: AT ! atmospheric turbulence parameters ! - CHARACTER(LEN=28), INTENT(IN) :: HATMFILE ! atmospheric file name + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HATMFILE ! atmospheric file name CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! atmospheric file type CHARACTER(LEN=2), INTENT(IN) :: HTEST ! must be equal to 'OK' REAL(KIND=JPRB) :: ZHOOK_HANDLE diff --git a/src/SURFEX/init_surf_atmn.F90 b/src/SURFEX/init_surf_atmn.F90 index fda0a4dd8..33c13cea2 100644 --- a/src/SURFEX/init_surf_atmn.F90 +++ b/src/SURFEX/init_surf_atmn.F90 @@ -76,7 +76,7 @@ USE MODD_SURF_CONF, ONLY : CPROGNAME USE MODD_DATA_COVER_PAR, ONLY : NTILESFC USE MODD_DATA_COVER, ONLY : LCLIM_LAI, NECO2_START_YEAR, NECO2_END_YEAR ! -USE MODD_SURF_PAR, ONLY : XUNDEF, NUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF, NUNDEF USE MODD_CHS_AEROSOL, ONLY : LVARSIGI, LVARSIGJ USE MODD_WRITE_SURF_ATM, ONLY : LNOWRITE_CANOPY, LNOWRITE_TEXFILE USE MODD_SURF_ATM_TURB_n, ONLY : SURF_ATM_TURB_t @@ -179,7 +179,7 @@ TYPE(DATE), INTENT(INOUT) :: TPDATE_END ! TYPE(SURF_ATM_TURB_t), INTENT(IN) :: AT ! atmospheric turbulence parameters ! - CHARACTER(LEN=28), INTENT(IN) :: HATMFILE ! atmospheric file name + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HATMFILE ! atmospheric file name CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! atmospheric file type CHARACTER(LEN=2), INTENT(IN) :: HTEST ! must be equal to 'OK' ! diff --git a/src/SURFEX/init_teb_veg_optionsn.F90 b/src/SURFEX/init_teb_veg_optionsn.F90 index d4ab89881..a44ae6c09 100644 --- a/src/SURFEX/init_teb_veg_optionsn.F90 +++ b/src/SURFEX/init_teb_veg_optionsn.F90 @@ -53,7 +53,7 @@ USE MODD_TYPE_DATE_SURF USE MODD_TYPE_SNOW ! USE MODD_DATA_COVER_PAR, ONLY: NVEGTYPE -USE MODD_SURF_PAR, ONLY: XUNDEF, NUNDEF, LEN_HREC +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX, XUNDEF, NUNDEF, LEN_HREC USE MODD_ISBA_PAR, ONLY : XOPTIMGRID ! USE MODI_READ_NAM_PGD_ISBA @@ -106,14 +106,14 @@ CHARACTER(LEN=3) :: YPHOTO ! photosynthesis option LOGICAL :: GTR_ML ! new radiative transfert CHARACTER(LEN=4) :: YALBEDO REAL :: ZRM_PATCH ! threshold to remove little fractions of patches -CHARACTER(LEN=28) :: YSAND ! file name for sand fraction -CHARACTER(LEN=28) :: YCLAY ! file name for clay fraction -CHARACTER(LEN=28) :: YSOC_TOP ! file name for organic carbon top soil -CHARACTER(LEN=28) :: YSOC_SUB ! file name for organic carbon sub soil -CHARACTER(LEN=28) :: YCTI ! file name for topographic index -CHARACTER(LEN=28) :: YRUNOFFB ! file name for runoffb parameter -CHARACTER(LEN=28) :: YWDRAIN ! file name for wdrain parameter -CHARACTER(LEN=28) :: YPERM ! file name for permafrost distribution +CHARACTER(LEN=NFILENAMELGTMAX) :: YSAND ! file name for sand fraction +CHARACTER(LEN=NFILENAMELGTMAX) :: YCLAY ! file name for clay fraction +CHARACTER(LEN=NFILENAMELGTMAX) :: YSOC_TOP ! file name for organic carbon top soil +CHARACTER(LEN=NFILENAMELGTMAX) :: YSOC_SUB ! file name for organic carbon sub soil +CHARACTER(LEN=NFILENAMELGTMAX) :: YCTI ! file name for topographic index +CHARACTER(LEN=NFILENAMELGTMAX) :: YRUNOFFB ! file name for runoffb parameter +CHARACTER(LEN=NFILENAMELGTMAX) :: YWDRAIN ! file name for wdrain parameter +CHARACTER(LEN=NFILENAMELGTMAX) :: YPERM ! file name for permafrost distribution CHARACTER(LEN=6) :: YSANDFILETYPE ! sand data file type CHARACTER(LEN=6) :: YCLAYFILETYPE ! clay data file type CHARACTER(LEN=6) :: YSOCFILETYPE ! organic carbon data file type @@ -135,8 +135,8 @@ LOGICAL :: LIMP_CTI ! Imposed maps of topographic index LOGICAL :: LIMP_PERM ! Imposed maps of permafrost distribution LOGICAL :: LLULCC ! land-use scheme activation key REAL, DIMENSION(150) :: ZSOILGRID ! Soil grid reference for DIF -CHARACTER(LEN=28) :: YPH ! file name for pH -CHARACTER(LEN=28) :: YFERT ! file name for fertilisation rate +CHARACTER(LEN=NFILENAMELGTMAX) :: YPH ! file name for pH +CHARACTER(LEN=NFILENAMELGTMAX) :: YFERT ! file name for fertilisation rate CHARACTER(LEN=6) :: YPHFILETYPE ! pH data file type CHARACTER(LEN=6) :: YFERTFILETYPE ! fertilisation data file type REAL :: XUNIF_PH ! uniform value of pH diff --git a/src/SURFEX/init_tebn.F90 b/src/SURFEX/init_tebn.F90 index 26aa3ff0b..755d37e29 100644 --- a/src/SURFEX/init_tebn.F90 +++ b/src/SURFEX/init_tebn.F90 @@ -80,7 +80,7 @@ USE MODD_SNOW_PAR, ONLY : XEMISSN ! USE MODD_READ_NAMELIST, ONLY : LNAM_READ ! -USE MODD_SURF_PAR, ONLY: XUNDEF, NUNDEF +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX, XUNDEF, NUNDEF USE MODD_TYPE_DATE_SURF USE MODD_ISBA_PAR, ONLY: XEMISVEG USE MODD_TEB_PAR, ONLY: XD_FLOOR_DEF, XHC_FLOOR_DEF, XTC_FLOOR_DEF, XTS_FLOOR @@ -205,7 +205,7 @@ REAL, INTENT(IN) :: PTIME ! current time si ! midnight (UTC, s) TYPE(SURF_ATM_TURB_t), INTENT(IN) :: AT ! atmospheric turbulence parameters ! - CHARACTER(LEN=28), INTENT(IN) :: HATMFILE ! atmospheric file name + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HATMFILE ! atmospheric file name CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! atmospheric file type CHARACTER(LEN=2), INTENT(IN) :: HTEST ! must be equal to 'OK' ! diff --git a/src/SURFEX/init_townn.F90 b/src/SURFEX/init_townn.F90 index 1c933c100..d09383b4d 100644 --- a/src/SURFEX/init_townn.F90 +++ b/src/SURFEX/init_townn.F90 @@ -58,6 +58,7 @@ USE MODD_DIAG_n, ONLY : DIAG_OPTIONS_t, DIAG_t USE MODD_SURF_ATM_TURB_n, ONLY : SURF_ATM_TURB_t ! USE MODD_CSTS, ONLY : XTT +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX ! USE YOMHOOK ,ONLY : LHOOK, DR_HOOK USE PARKIND1 ,ONLY : JPRB @@ -109,7 +110,7 @@ REAL, INTENT(IN) :: PTIME ! current time since ! midnight (UTC, s) TYPE(SURF_ATM_TURB_t), INTENT(IN) :: AT ! atmospheric turbulence parameters ! - CHARACTER(LEN=28), INTENT(IN) :: HATMFILE ! atmospheric file name + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HATMFILE ! atmospheric file name CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! atmospheric file type CHARACTER(LEN=2), INTENT(IN) :: HTEST ! must be equal to 'OK' REAL(KIND=JPRB) :: ZHOOK_HANDLE diff --git a/src/SURFEX/init_watfluxn.F90 b/src/SURFEX/init_watfluxn.F90 index 2137e4662..9ceac8128 100644 --- a/src/SURFEX/init_watfluxn.F90 +++ b/src/SURFEX/init_watfluxn.F90 @@ -61,7 +61,7 @@ USE MODD_CSTS, ONLY : XTT USE MODD_CHS_AEROSOL, ONLY: LVARSIGI, LVARSIGJ USE MODD_DST_SURF, ONLY: LVARSIG_DST, NDSTMDE, NDST_MDEBEG, LRGFIX_DST USE MODD_SLT_SURF, ONLY: LVARSIG_SLT, NSLTMDE, NSLT_MDEBEG, LRGFIX_SLT -USE MODD_SURF_PAR, ONLY : XUNDEF, NUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF, NUNDEF ! USE MODD_SURF_ATM_TURB_n, ONLY : SURF_ATM_TURB_t ! @@ -126,7 +126,7 @@ REAL, INTENT(IN) :: PTIME ! current time since ! midnight (UTC, s) TYPE(SURF_ATM_TURB_t), INTENT(IN) :: AT ! atmospheric turbulence parameters ! - CHARACTER(LEN=28), INTENT(IN) :: HATMFILE ! atmospheric file name + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HATMFILE ! atmospheric file name CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! atmospheric file type CHARACTER(LEN=2), INTENT(IN) :: HTEST ! must be equal to 'OK' diff --git a/src/SURFEX/modd_ch_isban.F90 b/src/SURFEX/modd_ch_isban.F90 index cdb60e939..e13085170 100644 --- a/src/SURFEX/modd_ch_isban.F90 +++ b/src/SURFEX/modd_ch_isban.F90 @@ -35,6 +35,8 @@ USE MODD_SV_n, ONLY : SV_t, SV_INIT USE MODD_SLT_n, ONLY : SLT_t, SLT_INIT USE MODD_DST_n, ONLY : DST_t, DST_INIT ! +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX +! USE YOMHOOK ,ONLY : LHOOK, DR_HOOK USE PARKIND1 ,ONLY : JPRB ! @@ -42,7 +44,7 @@ IMPLICIT NONE TYPE CH_ISBA_t ! - CHARACTER(LEN=28) :: CCHEM_SURF_FILE ! name of general (chemical) purpose ASCII input file + CHARACTER(LEN=NFILENAMELGTMAX) :: CCHEM_SURF_FILE ! name of general (chemical) purpose ASCII input file CHARACTER(LEN=6) :: CCH_DRY_DEP ! deposition scheme CHARACTER(LEN=6) :: CPARAMBVOC ! BVOC flux scheme REAL, DIMENSION(:,:), POINTER :: XDEP ! final dry deposition diff --git a/src/SURFEX/modd_ch_surfn.F90 b/src/SURFEX/modd_ch_surfn.F90 index 3a3793967..3645c3ca7 100644 --- a/src/SURFEX/modd_ch_surfn.F90 +++ b/src/SURFEX/modd_ch_surfn.F90 @@ -33,6 +33,8 @@ ! ------------ ! ! +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX +! USE YOMHOOK ,ONLY : LHOOK, DR_HOOK USE PARKIND1 ,ONLY : JPRB ! @@ -57,7 +59,7 @@ TYPE CH_SURF_t CHARACTER(LEN=6), DIMENSION(:), POINTER :: CDSTNAMES ! NAME OF DUST SPECIES CHARACTER(LEN=6), DIMENSION(:), POINTER :: CSLTNAMES ! NAME OF SEA SALT SPECIES ! SPECIES (FOR DIAG ONLY) - CHARACTER(LEN=28) :: CCHEM_SURF_FILE ! name of general + CHARACTER(LEN=NFILENAMELGTMAX) :: CCHEM_SURF_FILE ! name of general ! (chemical) purpose ! ASCII input file REAL, DIMENSION(:), POINTER :: XCONVERSION ! emission unit diff --git a/src/SURFEX/modd_ch_tebn.F90 b/src/SURFEX/modd_ch_tebn.F90 index 516651103..8f0590b87 100644 --- a/src/SURFEX/modd_ch_tebn.F90 +++ b/src/SURFEX/modd_ch_tebn.F90 @@ -34,6 +34,8 @@ USE MODD_SV_n, ONLY : SV_t, SV_INIT USE MODD_SLT_n, ONLY : SLT_t, SLT_INIT USE MODD_DST_n, ONLY : DST_t, DST_INIT ! +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX +! USE YOMHOOK ,ONLY : LHOOK, DR_HOOK USE PARKIND1 ,ONLY : JPRB ! @@ -41,7 +43,7 @@ IMPLICIT NONE TYPE CH_TEB_t ! - CHARACTER(LEN=28) :: CCHEM_SURF_FILE ! name of general (chemical) purpose ASCII input file + CHARACTER(LEN=NFILENAMELGTMAX) :: CCHEM_SURF_FILE ! name of general (chemical) purpose ASCII input file CHARACTER(LEN=6) :: CCH_DRY_DEP ! deposition scheme REAL, DIMENSION(:,:), POINTER :: XDEP ! final dry deposition ! velocity for nature diff --git a/src/SURFEX/modd_grid_grib.F90 b/src/SURFEX/modd_grid_grib.F90 index 412369ae7..d3bfacb08 100644 --- a/src/SURFEX/modd_grid_grib.F90 +++ b/src/SURFEX/modd_grid_grib.F90 @@ -32,6 +32,7 @@ ! ------------ ! USE GRIB_API, ONLY : kindOfInt +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX ! IMPLICIT NONE ! @@ -40,7 +41,7 @@ INTEGER :: NGRIB_VERSION ! GRIB-API version (1 or 2) ! CHARACTER(LEN=6) :: CINMODEL - CHARACTER(LEN=28) :: CGRIB_FILE + CHARACTER(LEN=NFILENAMELGTMAX) :: CGRIB_FILE INTEGER(KIND=kindOfInt) :: NIDX ! END MODULE MODD_GRID_GRIB diff --git a/src/SURFEX/modd_io_surf_asc.F90 b/src/SURFEX/modd_io_surf_asc.F90 index 81207ed32..b29d19c2f 100644 --- a/src/SURFEX/modd_io_surf_asc.F90 +++ b/src/SURFEX/modd_io_surf_asc.F90 @@ -30,12 +30,15 @@ ! !* 0. DECLARATIONS ! +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX +! IMPLICIT NONE - CHARACTER(LEN=28),SAVE :: CFILE = 'SURFIN.txt' - CHARACTER(LEN=28),SAVE :: CFILEIN ='SURFIN.txt' ! Name of the input - CHARACTER(LEN=28),SAVE :: CFILEIN_SAVE ='SURFIN.txt' ! Name of the input - CHARACTER(LEN=28),SAVE :: CFILEOUT='SURFOUT.txt'! Name of the output - CHARACTER(LEN=28),SAVE :: CFILEPGD ='PGD.txt' ! Name of the pgd file +! + CHARACTER(LEN=NFILENAMELGTMAX),SAVE :: CFILE = 'SURFIN.txt' + CHARACTER(LEN=NFILENAMELGTMAX),SAVE :: CFILEIN = 'SURFIN.txt' ! Name of the input + CHARACTER(LEN=NFILENAMELGTMAX),SAVE :: CFILEIN_SAVE = 'SURFIN.txt' ! Name of the input + CHARACTER(LEN=NFILENAMELGTMAX),SAVE :: CFILEOUT = 'SURFOUT.txt'! Name of the output + CHARACTER(LEN=NFILENAMELGTMAX),SAVE :: CFILEPGD = 'PGD.txt' ! Name of the pgd file INTEGER :: NUNIT ! logical unit of surface file INTEGER :: NLUOUT ! logical unit of output file INTEGER, DIMENSION(:), POINTER :: NMASK=>NULL() ! 1D mask to read only interesting diff --git a/src/SURFEX/modd_io_surf_fa.F90 b/src/SURFEX/modd_io_surf_fa.F90 index 707fa28fc..f5f093871 100644 --- a/src/SURFEX/modd_io_surf_fa.F90 +++ b/src/SURFEX/modd_io_surf_fa.F90 @@ -29,14 +29,16 @@ ! !* 0. DECLARATIONS ! +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX +! IMPLICIT NONE ! CHARACTER(LEN=6), SAVE :: CDNOMC ='header' ! Name of the header -CHARACTER(LEN=28),SAVE :: CFILE_FA ='SURFIN.fa' ! Name of the input -CHARACTER(LEN=28),SAVE :: CFILEIN_FA ='SURFIN.fa' ! Name of the input -CHARACTER(LEN=28),SAVE :: CFILEIN_FA_SAVE ='SURFIN.fa' ! Name of the input -CHARACTER(LEN=28),SAVE :: CFILEOUT_FA ='SURFOUT.fa' ! Name of the input -CHARACTER(LEN=28),SAVE :: CFILEPGD_FA ='PGD.fa' ! Name of the pgd file +CHARACTER(LEN=NFILENAMELGTMAX),SAVE :: CFILE_FA = 'SURFIN.fa' ! Name of the input +CHARACTER(LEN=NFILENAMELGTMAX),SAVE :: CFILEIN_FA = 'SURFIN.fa' ! Name of the input +CHARACTER(LEN=NFILENAMELGTMAX),SAVE :: CFILEIN_FA_SAVE = 'SURFIN.fa' ! Name of the input +CHARACTER(LEN=NFILENAMELGTMAX),SAVE :: CFILEOUT_FA = 'SURFOUT.fa' ! Name of the input +CHARACTER(LEN=NFILENAMELGTMAX),SAVE :: CFILEPGD_FA = 'PGD.fa' ! Name of the pgd file CHARACTER(LEN=4), SAVE :: CPREFIX1D ='SFX.' ! Prefix name in fa file CHARACTER(LEN=1), SAVE :: CPREFIX2D ='X' ! Prefix name in fa file ! diff --git a/src/SURFEX/modd_io_surf_lfi.F90 b/src/SURFEX/modd_io_surf_lfi.F90 index 14ff2df4a..62f11871f 100644 --- a/src/SURFEX/modd_io_surf_lfi.F90 +++ b/src/SURFEX/modd_io_surf_lfi.F90 @@ -26,18 +26,18 @@ !! MODIFICATIONS !! ------------- !! -USE MODD_SURF_PAR, ONLY : NUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, NUNDEF ! !* 0. DECLARATIONS ! IMPLICIT NONE - CHARACTER(LEN=28),SAVE :: CLUOUT_LFI ! Name of the listing - CHARACTER(LEN=28),SAVE :: CFILE_LFI ! Name of the current file - CHARACTER(LEN=28),SAVE :: CFILEIN_LFI ! Name of the input - CHARACTER(LEN=28),SAVE :: CFILEIN_LFI_SAVE ! Name of the input - CHARACTER(LEN=28),SAVE :: CFILEOUT_LFI ! Name of the output - CHARACTER(LEN=28),SAVE :: CFILEDIAG_LFI ! Name of the output - CHARACTER(LEN=28),SAVE :: CFILEPGD_LFI ! Name of the pgd file + CHARACTER(LEN=NFILENAMELGTMAX),SAVE :: CLUOUT_LFI ! Name of the listing + CHARACTER(LEN=NFILENAMELGTMAX),SAVE :: CFILE_LFI ! Name of the current file + CHARACTER(LEN=NFILENAMELGTMAX),SAVE :: CFILEIN_LFI ! Name of the input + CHARACTER(LEN=NFILENAMELGTMAX),SAVE :: CFILEIN_LFI_SAVE ! Name of the input + CHARACTER(LEN=NFILENAMELGTMAX),SAVE :: CFILEOUT_LFI ! Name of the output + CHARACTER(LEN=NFILENAMELGTMAX),SAVE :: CFILEDIAG_LFI ! Name of the output + CHARACTER(LEN=NFILENAMELGTMAX),SAVE :: CFILEPGD_LFI ! Name of the pgd file INTEGER :: NUNIT_LFI ! logical unit of surface file (LFI part) INTEGER :: NLUOUT ! logical unit of output file ! diff --git a/src/SURFEX/modd_prep_flake.F90 b/src/SURFEX/modd_prep_flake.F90 index 40209c381..d619726e3 100644 --- a/src/SURFEX/modd_prep_flake.F90 +++ b/src/SURFEX/modd_prep_flake.F90 @@ -31,15 +31,17 @@ MODULE MODD_PREP_FLAKE !* 0. DECLARATIONS ! ------------ ! +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX +! IMPLICIT NONE ! SAVE !-------------------------------------------------------------------------- ! - CHARACTER(LEN=28) :: CFILE_FLAKE ! input file name - CHARACTER(LEN=6) :: CTYPE ! input file type - CHARACTER(LEN=28) :: CFILEPGD_FLAKE ! input file name - CHARACTER(LEN=6) :: CTYPEPGD ! input file type + CHARACTER(LEN=NFILENAMELGTMAX) :: CFILE_FLAKE ! input file name + CHARACTER(LEN=6) :: CTYPE ! input file type + CHARACTER(LEN=NFILENAMELGTMAX) :: CFILEPGD_FLAKE ! input file name + CHARACTER(LEN=6) :: CTYPEPGD ! input file type ! REAL :: XTS_UNIF ! uniform prescribed ! surface temperature for inland water diff --git a/src/SURFEX/modd_prep_isba.F90 b/src/SURFEX/modd_prep_isba.F90 index 67f995516..da692b2e0 100644 --- a/src/SURFEX/modd_prep_isba.F90 +++ b/src/SURFEX/modd_prep_isba.F90 @@ -33,29 +33,31 @@ !* 0. DECLARATIONS ! ------------ ! +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX +! IMPLICIT NONE ! SAVE !-------------------------------------------------------------------------- ! - CHARACTER(LEN=28) :: CFILE_ISBA ! input file name - CHARACTER(LEN=6) :: CTYPE ! input file type - CHARACTER(LEN=28) :: CFILEPGD_ISBA ! input file name - CHARACTER(LEN=6) :: CTYPEPGD ! input file type - CHARACTER(LEN=28) :: CFILE_SNOW ! input file name for Snow - CHARACTER(LEN=6) :: CTYPE_SNOW ! input file type for Snow - CHARACTER(LEN=28) :: CFILEPGD_SNOW ! input file name for Snow - CHARACTER(LEN=6) :: CTYPEPGD_SNOW ! input file type for Snow - CHARACTER(LEN=28) :: CFILE_HUG ! input file name for Wg, Wgi - CHARACTER(LEN=6) :: CTYPE_HUG ! input file type for Wg, Wgi - CHARACTER(LEN=28) :: CFILE_TG ! input file name for Tg - CHARACTER(LEN=6) :: CTYPE_TG ! input file type for Tg - CHARACTER(LEN=28) :: CFILE_HUG_SURF ! input file name for HUG_SURF - CHARACTER(LEN=28) :: CFILE_HUG_ROOT ! input file name for HUG_ROOT - CHARACTER(LEN=28) :: CFILE_HUG_DEEP ! input file name for HUG_DEEP - CHARACTER(LEN=28) :: CFILE_TG_SURF ! input file name for TG_SURF - CHARACTER(LEN=28) :: CFILE_TG_ROOT ! input file name for TG_ROOT - CHARACTER(LEN=28) :: CFILE_TG_DEEP ! input file name for TG_DEEP + CHARACTER(LEN=NFILENAMELGTMAX) :: CFILE_ISBA ! input file name + CHARACTER(LEN=6) :: CTYPE ! input file type + CHARACTER(LEN=NFILENAMELGTMAX) :: CFILEPGD_ISBA ! input file name + CHARACTER(LEN=6) :: CTYPEPGD ! input file type + CHARACTER(LEN=NFILENAMELGTMAX) :: CFILE_SNOW ! input file name for Snow + CHARACTER(LEN=6) :: CTYPE_SNOW ! input file type for Snow + CHARACTER(LEN=NFILENAMELGTMAX) :: CFILEPGD_SNOW ! input file name for Snow + CHARACTER(LEN=6) :: CTYPEPGD_SNOW ! input file type for Snow + CHARACTER(LEN=NFILENAMELGTMAX) :: CFILE_HUG ! input file name for Wg, Wgi + CHARACTER(LEN=6) :: CTYPE_HUG ! input file type for Wg, Wgi + CHARACTER(LEN=NFILENAMELGTMAX) :: CFILE_TG ! input file name for Tg + CHARACTER(LEN=6) :: CTYPE_TG ! input file type for Tg + CHARACTER(LEN=NFILENAMELGTMAX) :: CFILE_HUG_SURF ! input file name for HUG_SURF + CHARACTER(LEN=NFILENAMELGTMAX) :: CFILE_HUG_ROOT ! input file name for HUG_ROOT + CHARACTER(LEN=NFILENAMELGTMAX) :: CFILE_HUG_DEEP ! input file name for HUG_DEEP + CHARACTER(LEN=NFILENAMELGTMAX) :: CFILE_TG_SURF ! input file name for TG_SURF + CHARACTER(LEN=NFILENAMELGTMAX) :: CFILE_TG_ROOT ! input file name for TG_ROOT + CHARACTER(LEN=NFILENAMELGTMAX) :: CFILE_TG_DEEP ! input file name for TG_DEEP ! REAL :: XHUG_SURF ! surface relative soil humidity REAL :: XHUG_ROOT ! root layer relative soil humidity diff --git a/src/SURFEX/modd_prep_seaflux.F90 b/src/SURFEX/modd_prep_seaflux.F90 index 9f0a29cce..91016feac 100644 --- a/src/SURFEX/modd_prep_seaflux.F90 +++ b/src/SURFEX/modd_prep_seaflux.F90 @@ -34,17 +34,19 @@ !* 0. DECLARATIONS ! ------------ ! +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX +! IMPLICIT NONE ! SAVE !-------------------------------------------------------------------------- ! - CHARACTER(LEN=28) :: CFILE_SEAFLX ! input file name - CHARACTER(LEN=6) :: CTYPE_SEAFLX ! input file type - CHARACTER(LEN=28) :: CFILEWAVE_SEAFLX ! input file name wave parameters - CHARACTER(LEN=6) :: CTYPEWAVE ! file type for wave parameters - CHARACTER(LEN=28) :: CFILEPGD_SEAFLX ! input file name - CHARACTER(LEN=6) :: CTYPEPGD ! input file type + CHARACTER(LEN=NFILENAMELGTMAX) :: CFILE_SEAFLX ! input file name + CHARACTER(LEN=6) :: CTYPE_SEAFLX ! input file type + CHARACTER(LEN=NFILENAMELGTMAX) :: CFILEWAVE_SEAFLX ! input file name wave parameters + CHARACTER(LEN=6) :: CTYPEWAVE ! file type for wave parameters + CHARACTER(LEN=NFILENAMELGTMAX) :: CFILEPGD_SEAFLX ! input file name + CHARACTER(LEN=6) :: CTYPEPGD ! input file type ! REAL :: XSST_UNIF ! uniform prescribed SST REAL :: XSSS_UNIF ! uniform prescribed SSS diff --git a/src/SURFEX/modd_prep_teb.F90 b/src/SURFEX/modd_prep_teb.F90 index 339562811..0f5f7c5df 100644 --- a/src/SURFEX/modd_prep_teb.F90 +++ b/src/SURFEX/modd_prep_teb.F90 @@ -31,23 +31,25 @@ !* 0. DECLARATIONS ! ------------ ! +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX +! IMPLICIT NONE ! SAVE !-------------------------------------------------------------------------- ! - CHARACTER(LEN=28) :: CFILE_TEB ! input file name - CHARACTER(LEN=6) :: CTYPE ! input file type - CHARACTER(LEN=28) :: CFILEPGD_TEB ! input file name - CHARACTER(LEN=6) :: CTYPEPGD ! input file type - CHARACTER(LEN=28) :: CFILE_SNOW_TEB ! input file name for Snow - CHARACTER(LEN=6) :: CTYPE_SNOW ! input file type for Snow - CHARACTER(LEN=28) :: CFILEPGD_SNOW_TEB ! input file name for Snow - CHARACTER(LEN=6) :: CTYPEPGD_SNOW ! input file type for Snow - CHARACTER(LEN=28) :: CFILE_WS ! input file name for Ws - CHARACTER(LEN=6) :: CTYPE_WS ! input file type for Ws - CHARACTER(LEN=28) :: CFILE_TS ! input file name for Ts - CHARACTER(LEN=6) :: CTYPE_TS ! input file type for Ts + CHARACTER(LEN=NFILENAMELGTMAX) :: CFILE_TEB ! input file name + CHARACTER(LEN=6) :: CTYPE ! input file type + CHARACTER(LEN=NFILENAMELGTMAX) :: CFILEPGD_TEB ! input file name + CHARACTER(LEN=6) :: CTYPEPGD ! input file type + CHARACTER(LEN=NFILENAMELGTMAX) :: CFILE_SNOW_TEB ! input file name for Snow + CHARACTER(LEN=6) :: CTYPE_SNOW ! input file type for Snow + CHARACTER(LEN=NFILENAMELGTMAX) :: CFILEPGD_SNOW_TEB ! input file name for Snow + CHARACTER(LEN=6) :: CTYPEPGD_SNOW ! input file type for Snow + CHARACTER(LEN=NFILENAMELGTMAX) :: CFILE_WS ! input file name for Ws + CHARACTER(LEN=6) :: CTYPE_WS ! input file type for Ws + CHARACTER(LEN=NFILENAMELGTMAX) :: CFILE_TS ! input file name for Ts + CHARACTER(LEN=6) :: CTYPE_TS ! input file type for Ts ! REAL :: XWS_ROOF ! roof uniform water content (kg/m2) REAL :: XWS_ROAD ! road uniform water content (kg/m2) diff --git a/src/SURFEX/modd_prep_teb_garden.F90 b/src/SURFEX/modd_prep_teb_garden.F90 index 79cee8ac6..c5925db9e 100644 --- a/src/SURFEX/modd_prep_teb_garden.F90 +++ b/src/SURFEX/modd_prep_teb_garden.F90 @@ -31,29 +31,31 @@ !* 0. DECLARATIONS ! ------------ ! +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX +! IMPLICIT NONE ! SAVE !-------------------------------------------------------------------------- ! - CHARACTER(LEN=28) :: CFILE_GD ! input file name - CHARACTER(LEN=6) :: CTYPE ! input file type - CHARACTER(LEN=28) :: CFILEPGD_GD ! input file name - CHARACTER(LEN=6) :: CTYPEPGD ! input file type - CHARACTER(LEN=28) :: CFILE_SNOW_GD ! input file name for Snow - CHARACTER(LEN=6) :: CTYPE_SNOW ! input file type for Snow - CHARACTER(LEN=28) :: CFILEPGD_SNOW_GD ! input file name for Snow - CHARACTER(LEN=6) :: CTYPEPGD_SNOW ! input file type for Snow - CHARACTER(LEN=28) :: CFILE_HUG_GD ! input file name for Wg, Wgi - CHARACTER(LEN=6) :: CTYPE_HUG ! input file type for Wg, Wgi - CHARACTER(LEN=28) :: CFILE_TG_GD ! input file name for Tg - CHARACTER(LEN=6) :: CTYPE_TG ! input file type for Tg - CHARACTER(LEN=28) :: CFILE_HUG_SURF_GD ! input file name for HUG_SURF - CHARACTER(LEN=28) :: CFILE_HUG_ROOT_GD ! input file name for HUG_ROOT - CHARACTER(LEN=28) :: CFILE_HUG_DEEP_GD ! input file name for HUG_DEEP - CHARACTER(LEN=28) :: CFILE_TG_SURF_GD ! input file name for TG_SURF - CHARACTER(LEN=28) :: CFILE_TG_ROOT_GD ! input file name for TG_ROOT - CHARACTER(LEN=28) :: CFILE_TG_DEEP_GD ! input file name for TG_DEEP + CHARACTER(LEN=NFILENAMELGTMAX) :: CFILE_GD ! input file name + CHARACTER(LEN=6) :: CTYPE ! input file type + CHARACTER(LEN=NFILENAMELGTMAX) :: CFILEPGD_GD ! input file name + CHARACTER(LEN=6) :: CTYPEPGD ! input file type + CHARACTER(LEN=NFILENAMELGTMAX) :: CFILE_SNOW_GD ! input file name for Snow + CHARACTER(LEN=6) :: CTYPE_SNOW ! input file type for Snow + CHARACTER(LEN=NFILENAMELGTMAX) :: CFILEPGD_SNOW_GD ! input file name for Snow + CHARACTER(LEN=6) :: CTYPEPGD_SNOW ! input file type for Snow + CHARACTER(LEN=NFILENAMELGTMAX) :: CFILE_HUG_GD ! input file name for Wg, Wgi + CHARACTER(LEN=6) :: CTYPE_HUG ! input file type for Wg, Wgi + CHARACTER(LEN=NFILENAMELGTMAX) :: CFILE_TG_GD ! input file name for Tg + CHARACTER(LEN=6) :: CTYPE_TG ! input file type for Tg + CHARACTER(LEN=NFILENAMELGTMAX) :: CFILE_HUG_SURF_GD ! input file name for HUG_SURF + CHARACTER(LEN=NFILENAMELGTMAX) :: CFILE_HUG_ROOT_GD ! input file name for HUG_ROOT + CHARACTER(LEN=NFILENAMELGTMAX) :: CFILE_HUG_DEEP_GD ! input file name for HUG_DEEP + CHARACTER(LEN=NFILENAMELGTMAX) :: CFILE_TG_SURF_GD ! input file name for TG_SURF + CHARACTER(LEN=NFILENAMELGTMAX) :: CFILE_TG_ROOT_GD ! input file name for TG_ROOT + CHARACTER(LEN=NFILENAMELGTMAX) :: CFILE_TG_DEEP_GD ! input file name for TG_DEEP ! REAL :: XHUG_SURF_GD ! surface relative soil humidity REAL :: XHUG_ROOT_GD ! root layer relative soil humidity diff --git a/src/SURFEX/modd_prep_teb_greenroof.F90 b/src/SURFEX/modd_prep_teb_greenroof.F90 index 0597cd022..3ad854213 100644 --- a/src/SURFEX/modd_prep_teb_greenroof.F90 +++ b/src/SURFEX/modd_prep_teb_greenroof.F90 @@ -31,28 +31,30 @@ !* 0. DECLARATIONS ! ------------ ! +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX +! IMPLICIT NONE ! !-------------------------------------------------------------------------- ! - CHARACTER(LEN=28) :: CFILE_GR ! input file name - CHARACTER(LEN=6) :: CTYPE ! input file type - CHARACTER(LEN=28) :: CFILEPGD_GR ! input file name - CHARACTER(LEN=6) :: CTYPEPGD ! input file type - CHARACTER(LEN=28) :: CFILE_SNOW_GR ! input file name for Snow - CHARACTER(LEN=6) :: CTYPE_SNOW ! input file type for Snow - CHARACTER(LEN=28) :: CFILEPGD_SNOW_GR ! input file name for Snow - CHARACTER(LEN=6) :: CTYPEPGD_SNOW ! input file type for Snow - CHARACTER(LEN=28) :: CFILE_HUG_GR ! input file name for Wg, Wgi - CHARACTER(LEN=6) :: CTYPE_HUG ! input file type for Wg, Wgi - CHARACTER(LEN=28) :: CFILE_TG_GR ! input file name for Tg - CHARACTER(LEN=6) :: CTYPE_TG ! input file type for Tg - CHARACTER(LEN=28) :: CFILE_HUG_SURF_GR ! input file name for HUG_SURF - CHARACTER(LEN=28) :: CFILE_HUG_ROOT_GR ! input file name for HUG_ROOT - CHARACTER(LEN=28) :: CFILE_HUG_DEEP_GR ! input file name for HUG_DEEP - CHARACTER(LEN=28) :: CFILE_TG_SURF_GR ! input file name for TG_SURF - CHARACTER(LEN=28) :: CFILE_TG_ROOT_GR ! input file name for TG_ROOT - CHARACTER(LEN=28) :: CFILE_TG_DEEP_GR ! input file name for TG_DEEP + CHARACTER(LEN=NFILENAMELGTMAX) :: CFILE_GR ! input file name + CHARACTER(LEN=6) :: CTYPE ! input file type + CHARACTER(LEN=NFILENAMELGTMAX) :: CFILEPGD_GR ! input file name + CHARACTER(LEN=6) :: CTYPEPGD ! input file type + CHARACTER(LEN=NFILENAMELGTMAX) :: CFILE_SNOW_GR ! input file name for Snow + CHARACTER(LEN=6) :: CTYPE_SNOW ! input file type for Snow + CHARACTER(LEN=NFILENAMELGTMAX) :: CFILEPGD_SNOW_GR ! input file name for Snow + CHARACTER(LEN=6) :: CTYPEPGD_SNOW ! input file type for Snow + CHARACTER(LEN=NFILENAMELGTMAX) :: CFILE_HUG_GR ! input file name for Wg, Wgi + CHARACTER(LEN=6) :: CTYPE_HUG ! input file type for Wg, Wgi + CHARACTER(LEN=NFILENAMELGTMAX) :: CFILE_TG_GR ! input file name for Tg + CHARACTER(LEN=6) :: CTYPE_TG ! input file type for Tg + CHARACTER(LEN=NFILENAMELGTMAX) :: CFILE_HUG_SURF_GR ! input file name for HUG_SURF + CHARACTER(LEN=NFILENAMELGTMAX) :: CFILE_HUG_ROOT_GR ! input file name for HUG_ROOT + CHARACTER(LEN=NFILENAMELGTMAX) :: CFILE_HUG_DEEP_GR ! input file name for HUG_DEEP + CHARACTER(LEN=NFILENAMELGTMAX) :: CFILE_TG_SURF_GR ! input file name for TG_SURF + CHARACTER(LEN=NFILENAMELGTMAX) :: CFILE_TG_ROOT_GR ! input file name for TG_ROOT + CHARACTER(LEN=NFILENAMELGTMAX) :: CFILE_TG_DEEP_GR ! input file name for TG_DEEP ! REAL :: XHUG_SURF_GR ! surface relative soil humidity REAL :: XHUG_ROOT_GR ! root layer relative soil humidity diff --git a/src/SURFEX/modd_prep_watflux.F90 b/src/SURFEX/modd_prep_watflux.F90 index e2d798a2f..222711ef9 100644 --- a/src/SURFEX/modd_prep_watflux.F90 +++ b/src/SURFEX/modd_prep_watflux.F90 @@ -31,15 +31,17 @@ !* 0. DECLARATIONS ! ------------ ! +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX +! IMPLICIT NONE ! SAVE !-------------------------------------------------------------------------- ! - CHARACTER(LEN=28) :: CFILE_WATFLX ! input file name - CHARACTER(LEN=6) :: CTYPE ! input file type - CHARACTER(LEN=28) :: CFILEPGD_WATFLX ! input file name - CHARACTER(LEN=6) :: CTYPEPGD ! input file type + CHARACTER(LEN=NFILENAMELGTMAX) :: CFILE_WATFLX ! input file name + CHARACTER(LEN=6) :: CTYPE ! input file type + CHARACTER(LEN=NFILENAMELGTMAX) :: CFILEPGD_WATFLX ! input file name + CHARACTER(LEN=6) :: CTYPEPGD ! input file type ! REAL :: XTS_WATER_UNIF ! uniform prescribed ! surface temperature for inland water diff --git a/src/SURFEX/modd_surf_par.F90 b/src/SURFEX/modd_surf_par.F90 index 2db2c81dd..a95231d06 100644 --- a/src/SURFEX/modd_surf_par.F90 +++ b/src/SURFEX/modd_surf_par.F90 @@ -34,7 +34,8 @@ MODULE MODD_SURF_PAR ! ------------ ! #ifdef SFX_MNH -USE MODD_PRECISION, ONLY: MNHREAL +USE MODD_PARAMETERS, ONLY: NFILENAMELGTMAX_MNH => NFILENAMELGTMAX +USE MODD_PRECISION, ONLY: MNHREAL #endif ! IMPLICIT NONE @@ -67,6 +68,12 @@ INTEGER, PARAMETER :: LEN_HREC = MNH_LEN_HREC ! Length of record variable writte #else INTEGER, PARAMETER :: LEN_HREC = 12 #endif +! +#ifdef SFX_MNH +INTEGER, PARAMETER :: NFILENAMELGTMAX = NFILENAMELGTMAX_MNH +#else +INTEGER, PARAMETER :: NFILENAMELGTMAX = 28 +#endif !----------------------------------------------------------------------------------------------------- ! END MODULE MODD_SURF_PAR diff --git a/src/SURFEX/mode_ekf.F90 b/src/SURFEX/mode_ekf.F90 index 62bc21b3b..4bd5d9942 100644 --- a/src/SURFEX/mode_ekf.F90 +++ b/src/SURFEX/mode_ekf.F90 @@ -238,6 +238,8 @@ END SUBROUTINE COFSWI ! SUBROUTINE SET_FILEIN(HFILE) ! +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX +! USE MODN_IO_OFFLINE, ONLY : CSURF_FILETYPE ! #ifdef SFX_NC @@ -257,8 +259,8 @@ USE MODI_ABOR1_SFX ! IMPLICIT NONE ! - CHARACTER(LEN=*), INTENT(IN) :: HFILE - CHARACTER(LEN=28) :: YFILEIN + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILE + CHARACTER(LEN=NFILENAMELGTMAX) :: YFILEIN REAL(KIND=JPRB) :: ZHOOK_HANDLE ! IF (LHOOK) CALL DR_HOOK('MODE_EKF:SET_FILEIN',0,ZHOOK_HANDLE) diff --git a/src/SURFEX/mode_read_cdf.F90 b/src/SURFEX/mode_read_cdf.F90 index eeb248674..5a7589919 100644 --- a/src/SURFEX/mode_read_cdf.F90 +++ b/src/SURFEX/mode_read_cdf.F90 @@ -233,9 +233,11 @@ END SUBROUTINE GET2DCDF ! USE NETCDF ! +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX +! IMPLICIT NONE ! - CHARACTER(LEN=28), INTENT(IN) :: HFILENAME ! Name of the field file. + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILENAME ! Name of the field file. CHARACTER(LEN=28), INTENT(IN) :: HNCVARNAME ! Name of variable to read in netcdf file REAL, DIMENSION(:), INTENT(OUT) :: PLON,PLAT ! Longitudes/latitudes innetcdf file REAL, DIMENSION(:), INTENT(OUT) :: PVAL ! value to get @@ -432,9 +434,11 @@ END SUBROUTINE READ_LATLONVAL_CDF ! USE NETCDF ! +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX +! IMPLICIT NONE ! - CHARACTER(LEN=28), INTENT(IN) :: HFILENAME ! Name of the field file. + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILENAME ! Name of the field file. CHARACTER(LEN=28), INTENT(IN) :: HNCVARNAME ! Name of variable to read in netcdf file INTEGER(kind=IDCDF_KIND), INTENT(OUT):: KDIM ! value of dimension to get ! diff --git a/src/SURFEX/mode_read_extern.F90 b/src/SURFEX/mode_read_extern.F90 index 7bf8dc370..8ac2eed6d 100644 --- a/src/SURFEX/mode_read_extern.F90 +++ b/src/SURFEX/mode_read_extern.F90 @@ -41,7 +41,7 @@ USE MODD_GRID_CONF_PROJ_n, ONLY : GRID_CONF_PROJ_t ! USE MODD_DATA_COVER_n, ONLY : DATA_COVER_t USE MODD_ISBA_OPTIONS_n, ONLY : ISBA_OPTIONS_t -USE MODD_SURF_PAR, ONLY : LEN_HREC +USE MODD_SURF_PAR, ONLY : LEN_HREC, NFILENAMELGTMAX ! USE MODD_SURFEX_MPI, ONLY : NRANK,NPIO ! @@ -71,10 +71,10 @@ TYPE(DATA_COVER_t), INTENT(INOUT) :: DTCO TYPE(ISBA_OPTIONS_t), INTENT(INOUT) :: IO ! INTEGER,DIMENSION(:), INTENT(IN) :: NPAR_VEG_IRR_USE ! vegtype with irrigation - CHARACTER(LEN=28), INTENT(IN) :: HFILE ! type of input file - CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE ! type of input file - CHARACTER(LEN=28), INTENT(IN) :: HFILEPGD ! type of input file - CHARACTER(LEN=6), INTENT(IN) :: HFILEPGDTYPE ! type of input file + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILE ! type of input file + CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE ! type of input file + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILEPGD ! type of input file + CHARACTER(LEN=6), INTENT(IN) :: HFILEPGDTYPE ! type of input file INTEGER, INTENT(IN) :: KLUOUT ! logical unit of output listing CHARACTER(LEN=3), INTENT(IN) :: HISBA ! type of ISBA soil scheme CHARACTER(LEN=3), INTENT(IN) :: HNAT ! type of surface (nature, gardens) @@ -443,7 +443,7 @@ USE MODD_SURF_ATM_n, ONLY : SURF_ATM_t USE MODD_GRID_CONF_PROJ_n, ONLY : GRID_CONF_PROJ_t USE MODD_DATA_COVER_n, ONLY : DATA_COVER_t USE MODD_ISBA_OPTIONS_n, ONLY : ISBA_OPTIONS_t -USE MODD_SURF_PAR, ONLY : LEN_HREC +USE MODD_SURF_PAR, ONLY : LEN_HREC, NFILENAMELGTMAX ! USE MODD_ISBA_PAR, ONLY : XOPTIMGRID USE MODD_COUPLING_TOPD, ONLY : LPERT_PARAM @@ -466,10 +466,10 @@ TYPE(GRID_CONF_PROJ_t),INTENT(INOUT) :: GCP TYPE(ISBA_OPTIONS_t), INTENT(INOUT) :: IO ! INTEGER,DIMENSION(:), INTENT(IN) :: NPAR_VEG_IRR_USE ! vegtype with irrigation -CHARACTER(LEN=28), INTENT(IN) :: HFILE ! name of file -CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE ! type of input file -CHARACTER(LEN=28), INTENT(IN) :: HFILEPGD ! name of file -CHARACTER(LEN=6), INTENT(IN) :: HFILEPGDTYPE ! type of input file +CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILE ! name of file +CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE ! type of input file +CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILEPGD ! name of file +CHARACTER(LEN=6), INTENT(IN) :: HFILEPGDTYPE ! type of input file INTEGER, INTENT(IN) :: KLUOUT ! logical unit of output listing INTEGER, INTENT(IN) :: KNI ! number of points CHARACTER(LEN=7), INTENT(IN) :: HFIELD ! field name diff --git a/src/SURFEX/mode_read_netcdf_mercator.F90 b/src/SURFEX/mode_read_netcdf_mercator.F90 index 4ec313b87..ecf2d5bad 100644 --- a/src/SURFEX/mode_read_netcdf_mercator.F90 +++ b/src/SURFEX/mode_read_netcdf_mercator.F90 @@ -383,12 +383,14 @@ END SUBROUTINE GET3DCDF SUBROUTINE READ_DIM_CDF(HFILENAME,HNCVARNAME,KDIM) ! #################### ! +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX +! USE NETCDF ! IMPLICIT NONE ! - CHARACTER(LEN=28), INTENT(IN) :: HFILENAME ! Name of the field file. - CHARACTER(LEN=28), INTENT(IN) :: HNCVARNAME ! Name of variable to read in netcdf file + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILENAME ! Name of the field file. + CHARACTER(LEN=28), INTENT(IN) :: HNCVARNAME ! Name of variable to read in netcdf file INTEGER(kind=IDCDF_KIND), INTENT(OUT):: KDIM ! value of dimension to get ! integer(kind=IDCDF_KIND) :: status @@ -525,8 +527,8 @@ IMPLICIT NONE INCLUDE "mpif.h" #endif ! - CHARACTER(LEN=28), INTENT(IN) :: HFILENAME ! Name of the field file. - CHARACTER(LEN=28), INTENT(IN) :: HNCVARNAME ! Name of variable to read in netcdf file + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILENAME ! Name of the field file. + CHARACTER(LEN=28), INTENT(IN) :: HNCVARNAME ! Name of variable to read in netcdf file ! integer(kind=IDCDF_KIND) :: status integer(kind=IDCDF_KIND) :: kcdf_id @@ -764,12 +766,14 @@ END SUBROUTINE PREP_NETCDF_GRID SUBROUTINE READ_Z1D_CDF(HFILENAME,HNCVARNAME,PVAL) ! #################### ! +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX +! USE NETCDF ! IMPLICIT NONE ! - CHARACTER(LEN=28), INTENT(IN) :: HFILENAME ! Name of the field file. - CHARACTER(LEN=28), INTENT(IN) :: HNCVARNAME ! Name of variable to read in netcdf file + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILENAME ! Name of the field file. + CHARACTER(LEN=28), INTENT(IN) :: HNCVARNAME ! Name of variable to read in netcdf file REAL, DIMENSION(:), INTENT(OUT) :: PVAL ! value to get ! integer(kind=IDCDF_KIND) :: status @@ -882,12 +886,14 @@ END SUBROUTINE READ_Z1D_CDF SUBROUTINE READ_LATLONVAL_CDF(HFILENAME,HNCVARNAME,PLON,PLAT,PVAL) ! #################### ! +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX +! USE NETCDF ! IMPLICIT NONE ! - CHARACTER(LEN=28), INTENT(IN) :: HFILENAME ! Name of the field file. - CHARACTER(LEN=28), INTENT(IN) :: HNCVARNAME ! Name of variable to read in netcdf file + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILENAME ! Name of the field file. + CHARACTER(LEN=28), INTENT(IN) :: HNCVARNAME ! Name of variable to read in netcdf file REAL, DIMENSION(:), INTENT(OUT) :: PLON,PLAT ! Longitudes/latitudes in netcdf file REAL, DIMENSION(:), INTENT(OUT) :: PVAL ! value to get ! @@ -1082,12 +1088,14 @@ END SUBROUTINE READ_LATLONVAL_CDF SUBROUTINE READ_LATLONDEPVAL_CDF(HFILENAME,HNCVARNAME,PLON,PLAT,PDEP,PVAL) ! #################### ! +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX +! USE NETCDF ! IMPLICIT NONE ! - CHARACTER(LEN=28), INTENT(IN) :: HFILENAME ! Name of the field file. - CHARACTER(LEN=28), INTENT(IN) :: HNCVARNAME ! Name of variable to read in netcdf file + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILENAME ! Name of the field file. + CHARACTER(LEN=28), INTENT(IN) :: HNCVARNAME ! Name of variable to read in netcdf file REAL, DIMENSION(:), INTENT(OUT) :: PLON,PLAT ! Longitudes/latitudes in netcdf file REAL, DIMENSION(:), INTENT(OUT) :: PDEP ! depth in netcdf file REAL, DIMENSION(:,:), INTENT(OUT) :: PVAL ! value to get @@ -1348,7 +1356,7 @@ END SUBROUTINE READ_LATLONDEPVAL_CDF ! #################### ! USE MODD_GRID_LATLONREGUL, ONLY : NINDEPTH,NILENGTH -USE MODD_SURF_PAR, ONLY : XUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF USE MODD_CSTS, ONLY : XTT USE MODD_PREP, ONLY : CINTERP_TYPE ! @@ -1356,8 +1364,8 @@ USE NETCDF ! IMPLICIT NONE ! - CHARACTER(LEN=28), INTENT(IN) :: HFILENAME ! Name of the field file. - CHARACTER(LEN=28), INTENT(IN) :: HNCVARNAME ! Name of variable to read in netcdf file + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILENAME ! Name of the field file. + CHARACTER(LEN=28), INTENT(IN) :: HNCVARNAME ! Name of variable to read in netcdf file REAL, POINTER,DIMENSION(:) :: PFIELD ! value to get ! REAL,DIMENSION(:), ALLOCATABLE :: ZLATI @@ -1428,13 +1436,14 @@ END SUBROUTINE READ_NETCDF_SST ! USE MODD_GRID_LATLONREGUL, ONLY : NINLAT,NINLON,NINDEPTH,NILENGTH USE MODD_PREP, ONLY : CINTERP_TYPE +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX ! USE NETCDF ! IMPLICIT NONE ! - CHARACTER(LEN=28), INTENT(IN) :: HFILENAME ! Name of the field file. - CHARACTER(LEN=28), INTENT(IN) :: HNCVARNAME ! Name of variable to read in netcdf file + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILENAME ! Name of the field file. + CHARACTER(LEN=28), INTENT(IN) :: HNCVARNAME ! Name of variable to read in netcdf file REAL, POINTER, DIMENSION(:) :: PFIELD ! value to get ! REAL,DIMENSION(:), ALLOCATABLE :: ZLATI @@ -1484,11 +1493,12 @@ END SUBROUTINE READ_NETCDF_ZS_SEA ! USE MODD_GRID_LATLONREGUL, ONLY : NINLAT,NINLON,NINDEPTH,NILENGTH USE MODD_PREP, ONLY : CINTERP_TYPE +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX ! IMPLICIT NONE ! - CHARACTER(LEN=28), INTENT(IN) :: HFILENAME ! Name of the field file. - CHARACTER(LEN=28), INTENT(IN) :: HNCVARNAME ! Name of variable to read in netcdf file + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILENAME ! Name of the field file. + CHARACTER(LEN=28), INTENT(IN) :: HNCVARNAME ! Name of variable to read in netcdf file REAL, POINTER, DIMENSION(:) :: PFIELD ! value to get ! REAL,DIMENSION(:), ALLOCATABLE :: ZLATI diff --git a/src/SURFEX/modn_io_offline.F90 b/src/SURFEX/modn_io_offline.F90 index 72e35dbab..e63db961f 100644 --- a/src/SURFEX/modn_io_offline.F90 +++ b/src/SURFEX/modn_io_offline.F90 @@ -42,6 +42,8 @@ !* 0. DECLARATIONS ! ------------ ! +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX +! IMPLICIT NONE ! !* Types of files @@ -61,10 +63,10 @@ IMPLICIT NONE !* Names of files ! -------------- ! - CHARACTER(LEN=28):: CPGDFILE ='PGD' ! name of the PGD file - CHARACTER(LEN=28):: CPREPFILE ='PREP' ! name of the INITIAL file - CHARACTER(LEN=28):: CSURFFILE ='SURFOUT' ! name of the final output CSURFEX file - CHARACTER(LEN=28):: CNAMELIST ='OPTIONS.nam' ! name of namelist file + CHARACTER(LEN=NFILENAMELGTMAX):: CPGDFILE ='PGD' ! name of the PGD file + CHARACTER(LEN=NFILENAMELGTMAX):: CPREPFILE ='PREP' ! name of the INITIAL file + CHARACTER(LEN=NFILENAMELGTMAX):: CSURFFILE ='SURFOUT' ! name of the final output CSURFEX file + CHARACTER(LEN=NFILENAMELGTMAX):: CNAMELIST ='OPTIONS.nam' ! name of namelist file ! ! !* General flags defining output options diff --git a/src/SURFEX/modn_isban.F90 b/src/SURFEX/modn_isban.F90 index c85599136..b7c0284d3 100644 --- a/src/SURFEX/modn_isban.F90 +++ b/src/SURFEX/modn_isban.F90 @@ -43,7 +43,7 @@ MODULE MODN_ISBA_n ! ------------ ! ! -USE MODD_SURF_PAR, ONLY : XUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF USE YOMHOOK , ONLY : LHOOK, DR_HOOK USE PARKIND1 , ONLY : JPRB ! @@ -150,7 +150,7 @@ CHARACTER(3) :: CSNOWHOLD CHARACTER(3) :: CSNOWCOMP CHARACTER(3) :: CSNOWZREF CHARACTER(LEN=6) :: CCH_DRY_DEP, CPARAMBVOC='' -CHARACTER(LEN=28) :: CCHEM_SURF_FILE +CHARACTER(LEN=NFILENAMELGTMAX) :: CCHEM_SURF_FILE ! ! New options Spoil and snow nduging ! diff --git a/src/SURFEX/modn_pgd_grid.F90 b/src/SURFEX/modn_pgd_grid.F90 index 92da1f3e0..f678847c1 100644 --- a/src/SURFEX/modn_pgd_grid.F90 +++ b/src/SURFEX/modn_pgd_grid.F90 @@ -31,13 +31,15 @@ ! ------------ ! USE MODD_PGD_GRID, ONLY : CGRID +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX +! ! USE MODD_POINT_OVERLAY, ONLY : NOVMX ! IMPLICIT NONE ! - CHARACTER(LEN=28):: YINIFILE ! name of input file - CHARACTER(LEN=6) :: YINIFILETYPE! type of input file + CHARACTER(LEN=NFILENAMELGTMAX) :: YINIFILE ! name of input file + CHARACTER(LEN=6) :: YINIFILETYPE! type of input file ! ! NAMELIST/NAM_PGD_GRID/CGRID,NOVMX,YINIFILE,YINIFILETYPE diff --git a/src/SURFEX/modn_prep_surf_atm.F90 b/src/SURFEX/modn_prep_surf_atm.F90 index fc75c3327..6c2bee4f4 100644 --- a/src/SURFEX/modn_prep_surf_atm.F90 +++ b/src/SURFEX/modn_prep_surf_atm.F90 @@ -31,13 +31,14 @@ !* 0. DECLARATIONS ! ------------ ! +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX ! IMPLICIT NONE ! - CHARACTER(LEN=28) :: CFILE ! file name - CHARACTER(LEN=6) :: CFILETYPE ! file type - CHARACTER(LEN=28) :: CFILEPGD ! file name - CHARACTER(LEN=6) :: CFILEPGDTYPE ! file type + CHARACTER(LEN=NFILENAMELGTMAX) :: CFILE ! file name + CHARACTER(LEN=6) :: CFILETYPE ! file type + CHARACTER(LEN=NFILENAMELGTMAX) :: CFILEPGD ! file name + CHARACTER(LEN=6) :: CFILEPGDTYPE ! file type INTEGER :: NHALO_PREP ! HALO for nearest point extrapolation INTEGER :: NYEAR ! YEAR for surface INTEGER :: NMONTH ! MONTH for surface diff --git a/src/SURFEX/modn_surf_atmn.F90 b/src/SURFEX/modn_surf_atmn.F90 index ff0a2b7d4..1bebe1201 100644 --- a/src/SURFEX/modn_surf_atmn.F90 +++ b/src/SURFEX/modn_surf_atmn.F90 @@ -38,14 +38,14 @@ ! ! -USE MODD_SURF_PAR, ONLY : LEN_HREC +USE MODD_SURF_PAR, ONLY : LEN_HREC, NFILENAMELGTMAX ! USE YOMHOOK ,ONLY : LHOOK, DR_HOOK USE PARKIND1 ,ONLY : JPRB ! IMPLICIT NONE ! -CHARACTER(LEN=28), SAVE :: CCHEM_SURF_FILE +CHARACTER(LEN=NFILENAMELGTMAX), SAVE :: CCHEM_SURF_FILE LOGICAL, SAVE :: LCH_EMIS, LCH_DMSEMIS, LCH_SURF_EMIS LOGICAL :: LFRAC REAL :: XDIAG_TSTEP diff --git a/src/SURFEX/modn_teb_vegn.F90 b/src/SURFEX/modn_teb_vegn.F90 index 53f753aac..ab2771aa6 100644 --- a/src/SURFEX/modn_teb_vegn.F90 +++ b/src/SURFEX/modn_teb_vegn.F90 @@ -34,6 +34,8 @@ MODULE MODN_TEB_VEG_n ! ------------ ! ! +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX +! USE YOMHOOK ,ONLY : LHOOK, DR_HOOK USE PARKIND1 ,ONLY : JPRB ! @@ -60,7 +62,7 @@ CHARACTER(LEN=3) :: CKSAT LOGICAL :: LSOC CHARACTER(LEN=3) :: CRAIN CHARACTER(LEN=3) :: CHORT -CHARACTER(LEN=28) :: CCHEM_SURF_FILE +CHARACTER(LEN=NFILENAMELGTMAX) :: CCHEM_SURF_FILE CHARACTER(LEN=6) :: CCH_DRY_DEP ! REAL :: XCVHEATF diff --git a/src/SURFEX/open_aux_io_surf.F90 b/src/SURFEX/open_aux_io_surf.F90 index 183686a75..fbbf3a7b3 100644 --- a/src/SURFEX/open_aux_io_surf.F90 +++ b/src/SURFEX/open_aux_io_surf.F90 @@ -38,6 +38,8 @@ !* 0. DECLARATIONS ! ------------ ! +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX +! USE YOMHOOK ,ONLY : LHOOK, DR_HOOK USE PARKIND1 ,ONLY : JPRB ! @@ -77,10 +79,10 @@ IMPLICIT NONE ! ! ! - CHARACTER(LEN=28), INTENT(IN) :: HFILE ! file name - CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE ! main program - CHARACTER(LEN=6), INTENT(IN) :: HMASK - CHARACTER(LEN=1), OPTIONAL, INTENT(IN) :: HDIR + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILE ! file name + CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE ! main program + CHARACTER(LEN=6), INTENT(IN) :: HMASK + CHARACTER(LEN=1), OPTIONAL, INTENT(IN) :: HDIR ! !* 0.2 Declarations of local variables ! ------------------------------- diff --git a/src/SURFEX/open_aux_io_surf_asc.F90 b/src/SURFEX/open_aux_io_surf_asc.F90 index 78f3513c2..19baf7a2a 100644 --- a/src/SURFEX/open_aux_io_surf_asc.F90 +++ b/src/SURFEX/open_aux_io_surf_asc.F90 @@ -42,6 +42,7 @@ ! ! USE MODD_IO_SURF_ASC,ONLY:NUNIT,NMASK,NLUOUT,NFULL,CMASK +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX USE MODI_GET_LUOUT USE MODI_READ_SURF USE MODI_IO_BUFF_CLEAN @@ -57,7 +58,7 @@ IMPLICIT NONE ! ! ! - CHARACTER(LEN=28), INTENT(IN) :: HFILE ! file name + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILE ! file name CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE ! main program CHARACTER(LEN=6), INTENT(IN) :: HMASK CHARACTER(LEN=1), INTENT(IN) :: HDIR diff --git a/src/SURFEX/open_aux_io_surf_fa.F90 b/src/SURFEX/open_aux_io_surf_fa.F90 index 9fdcd39ec..5f39ec7c3 100644 --- a/src/SURFEX/open_aux_io_surf_fa.F90 +++ b/src/SURFEX/open_aux_io_surf_fa.F90 @@ -42,6 +42,7 @@ USE MODD_SURFEX_MPI, ONLY : NRANK USE MODD_IO_SURF_FA, ONLY : NUNIT_FA,CFILEIN_FA,NMASK,NLUOUT,NFULL,CMASK, & CDNOMC,IVERBFA +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX ! USE MODI_GET_LUOUT USE MODI_READ_SURF @@ -59,7 +60,7 @@ IMPLICIT NONE ! ! ! - CHARACTER(LEN=28), INTENT(IN) :: HFILE ! file name + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILE ! file name CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE ! main program CHARACTER(LEN=6), INTENT(IN) :: HMASK CHARACTER(LEN=1), INTENT(IN) :: HDIR diff --git a/src/SURFEX/open_file.F90 b/src/SURFEX/open_file.F90 index e15977507..e442c05fe 100644 --- a/src/SURFEX/open_file.F90 +++ b/src/SURFEX/open_file.F90 @@ -37,6 +37,8 @@ !* 0. DECLARATIONS ! ------------ ! +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX +! #if defined(SFX_ASC) || defined(SFX_ARO) || defined(SFX_MNH) || defined(SFX_NC) USE MODI_OPEN_FILE_ASC #endif @@ -76,7 +78,7 @@ INTEGER, INTENT(IN), OPTIONAL :: KRECL ! record length !* 0.2 Declarations of local variables ! ------------------------------- ! - CHARACTER(LEN=28) :: YFILE + CHARACTER(LEN=NFILENAMELGTMAX) :: YFILE CHARACTER(LEN=11) :: YFORM CHARACTER(LEN=9) :: YACTION CHARACTER(LEN=6) :: YACCESS diff --git a/src/SURFEX/open_file_asc.F90 b/src/SURFEX/open_file_asc.F90 index 965ebfff2..23e40b16f 100644 --- a/src/SURFEX/open_file_asc.F90 +++ b/src/SURFEX/open_file_asc.F90 @@ -43,6 +43,8 @@ USE YOMHOOK ,ONLY : LHOOK, DR_HOOK USE PARKIND1 ,ONLY : JPRB ! +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX +! USE MODI_ABOR1_SFX ! IMPLICIT NONE @@ -51,7 +53,7 @@ IMPLICIT NONE ! ------------------------- ! INTEGER, INTENT(OUT):: KUNIT ! logical unit - CHARACTER(LEN=28), INTENT(IN) :: HFILE ! file to open + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILE ! file to open CHARACTER(LEN=11), INTENT(IN) :: HFORM ! type of file CHARACTER(LEN=9), INTENT(IN) :: HACTION ! action CHARACTER(LEN=6), INTENT(IN) :: HACCESS ! access type @@ -71,7 +73,7 @@ IF (LHOOK) CALL DR_HOOK('OPEN_FILE_ASC',0,ZHOOK_HANDLE) IF(HACTION=='READ ') THEN INQUIRE (FILE=HFILE,EXIST=LEXIST) IF (.NOT. LEXIST ) THEN - CALL ABOR1_SFX ('ERROR WHILE OPENING '//HFILE//' THIS FILE IS MISSING'// & + CALL ABOR1_SFX ('ERROR WHILE OPENING '//TRIM(HFILE)//' THIS FILE IS MISSING'// & ' IN THE RUN DIRECTORY') ENDIF ENDIF @@ -93,7 +95,7 @@ END IF IF (LHOOK) CALL DR_HOOK('OPEN_FILE_ASC',1,ZHOOK_HANDLE) RETURN 100 CONTINUE - CALL ABOR1_SFX('OPEN_FILE_ASC: ERROR WHEN OPENING FILE '//HFILE) + CALL ABOR1_SFX('OPEN_FILE_ASC: ERROR WHEN OPENING FILE '//TRIM(HFILE)) IF (LHOOK) CALL DR_HOOK('OPEN_FILE_ASC',1,ZHOOK_HANDLE) !------------------------------------------------------------------------------- ! diff --git a/src/SURFEX/open_file_fa.F90 b/src/SURFEX/open_file_fa.F90 index 72ac78baa..d673cfe9e 100644 --- a/src/SURFEX/open_file_fa.F90 +++ b/src/SURFEX/open_file_fa.F90 @@ -43,6 +43,8 @@ USE YOMHOOK ,ONLY : LHOOK, DR_HOOK USE PARKIND1 ,ONLY : JPRB ! +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX +! USE MODI_ABOR1_SFX ! IMPLICIT NONE @@ -51,7 +53,7 @@ IMPLICIT NONE ! ------------------------- ! INTEGER, INTENT(OUT):: KUNIT ! logical unit - CHARACTER(LEN=28), INTENT(IN) :: HFILE ! file to open + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILE ! file to open CHARACTER(LEN=11), INTENT(IN) :: HFORM ! type of file CHARACTER(LEN=9), INTENT(IN) :: HACTION ! action CHARACTER(LEN=6), INTENT(IN) :: HACCESS ! access type @@ -70,7 +72,7 @@ IF (LHOOK) CALL DR_HOOK('OPEN_FILE_FA',0,ZHOOK_HANDLE) IF(HACTION=='READ ') THEN INQUIRE (FILE=HFILE,EXIST=LEXIST) IF (.NOT. LEXIST ) THEN - CALL ABOR1_SFX ('ERROR WHILE OPENING '//HFILE//' THIS FILE IS MISSING'// & + CALL ABOR1_SFX ('ERROR WHILE OPENING '//TRIM(HFILE)//' THIS FILE IS MISSING'// & ' IN THE RUN DIRECTORY') ENDIF ENDIF @@ -93,7 +95,7 @@ END IF IF (LHOOK) CALL DR_HOOK('OPEN_FILE_FA',1,ZHOOK_HANDLE) RETURN 100 CONTINUE - CALL ABOR1_SFX('OPEN_FILE_FA: ERROR WHEN OPENING FILE '//HFILE) + CALL ABOR1_SFX('OPEN_FILE_FA: ERROR WHEN OPENING FILE '//TRIM(HFILE)) IF (LHOOK) CALL DR_HOOK('OPEN_FILE_FA',1,ZHOOK_HANDLE) !------------------------------------------------------------------------------- ! diff --git a/src/SURFEX/open_namelist.F90 b/src/SURFEX/open_namelist.F90 index a965cfc6a..7d2cb3d3a 100644 --- a/src/SURFEX/open_namelist.F90 +++ b/src/SURFEX/open_namelist.F90 @@ -59,6 +59,7 @@ USE MODI_MNHOPEN_NAMELIST USE MODI_AROOPEN_NAMELIST #endif ! +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX USE YOMHOOK ,ONLY : LHOOK, DR_HOOK USE PARKIND1 ,ONLY : JPRB ! @@ -69,13 +70,13 @@ IMPLICIT NONE ! CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! main program INTEGER, INTENT(OUT) :: KLUNAM ! logical unit of namelist - CHARACTER(LEN=28), INTENT(IN), OPTIONAL :: HFILE ! ASCII file to open + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN), OPTIONAL :: HFILE ! ASCII file to open ! !* 0.2 Declarations of local variables ! ------------------------------- ! - CHARACTER(LEN=28) :: YFILE + CHARACTER(LEN=NFILENAMELGTMAX) :: YFILE REAL(KIND=JPRB) :: ZHOOK_HANDLE ! !------------------------------------------------------------------------------- @@ -84,7 +85,7 @@ IF (LHOOK) CALL DR_HOOK('OPEN_NAMELIST',0,ZHOOK_HANDLE) IF (PRESENT(HFILE)) THEN YFILE = HFILE ELSE - YFILE = ' ' + YFILE = '' END IF IF (HPROGRAM=='MESONH') THEN diff --git a/src/SURFEX/open_namelist_asc.F90 b/src/SURFEX/open_namelist_asc.F90 index f94907430..9fb0b620b 100644 --- a/src/SURFEX/open_namelist_asc.F90 +++ b/src/SURFEX/open_namelist_asc.F90 @@ -40,6 +40,7 @@ ! USE YOMHOOK ,ONLY : LHOOK, DR_HOOK USE PARKIND1 ,ONLY : JPRB +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX USE MODI_ABOR1_SFX ! IMPLICIT NONE @@ -49,12 +50,12 @@ IMPLICIT NONE ! CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! main program INTEGER, INTENT(OUT) :: KLUNAM ! logical unit of namelist - CHARACTER(LEN=28), INTENT(IN) :: HFILE ! ASCII file to open + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILE ! ASCII file to open ! !* 0.2 Declarations of local variables ! ------------------------------- ! - CHARACTER(LEN=28) :: YNAM + CHARACTER(LEN=NFILENAMELGTMAX) :: YNAM REAL(KIND=JPRB) :: ZHOOK_HANDLE LOGICAL :: LLEXIST ! @@ -75,7 +76,7 @@ INQUIRE(FILE=YNAM,EXIST=LLEXIST) IF (LLEXIST) THEN OPEN(KLUNAM,FILE=YNAM,ACTION='READ',FORM="FORMATTED",POSITION="REWIND") ELSE - CALL ABOR1_SFX ('ERROR WHILE OPENING '//YNAM//' THIS FILE IS MISSING'// & + CALL ABOR1_SFX ('ERROR WHILE OPENING '//TRIM(YNAM)//' THIS FILE IS MISSING'// & ' IN THE RUN DIRECTORY') ENDIF IF (LHOOK) CALL DR_HOOK('OPEN_NAMELIST_ASC',1,ZHOOK_HANDLE) diff --git a/src/SURFEX/open_namelist_fa.F90 b/src/SURFEX/open_namelist_fa.F90 index 00f130a60..ab21feb11 100644 --- a/src/SURFEX/open_namelist_fa.F90 +++ b/src/SURFEX/open_namelist_fa.F90 @@ -40,6 +40,8 @@ USE YOMHOOK ,ONLY : LHOOK, DR_HOOK USE PARKIND1 ,ONLY : JPRB ! +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX +! IMPLICIT NONE ! !* 0.1 Declarations of arguments @@ -47,12 +49,12 @@ IMPLICIT NONE ! CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! main program INTEGER, INTENT(OUT) :: KLUNAM ! logical unit of namelist - CHARACTER(LEN=28), INTENT(IN) :: HFILE ! FAII file to open + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILE ! FAII file to open ! !* 0.2 Declarations of local variables ! ------------------------------- ! - CHARACTER(LEN=28) :: YNAM + CHARACTER(LEN=NFILENAMELGTMAX) :: YNAM REAL(KIND=JPRB) :: ZHOOK_HANDLE ! !------------------------------------------------------------------------------- diff --git a/src/SURFEX/pgd_bathyfield.F90 b/src/SURFEX/pgd_bathyfield.F90 index 61875ea32..014827b71 100644 --- a/src/SURFEX/pgd_bathyfield.F90 +++ b/src/SURFEX/pgd_bathyfield.F90 @@ -47,7 +47,7 @@ USE MODD_SURF_ATM_GRID_n, ONLY : SURF_ATM_GRID_t USE MODD_SURF_ATM_n, ONLY : SURF_ATM_t USE MODD_SSO_n, ONLY : SSO_t ! -USE MODD_SURF_PAR, ONLY : XUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF USE MODD_PGD_GRID, ONLY : NL USE MODD_PGDWORK, ONLY : XALL, NSIZE_ALL, NSIZE, XSUMVAL ! @@ -79,8 +79,8 @@ TYPE(SSO_t), INTENT(INOUT) :: USS ! ! 'SEA' : on sea ! ! 'WAT' : on inland waters ! ! 'LAN' : on nature + on town - CHARACTER(LEN=28), INTENT(IN) :: HFILE ! data file name - CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE ! data file type + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILE ! data file name + CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE ! data file type CHARACTER(LEN=28), INTENT(IN) :: HNCVARNAME! variable name to read REAL, INTENT(IN) :: PUNIF ! prescribed uniform value for field REAL, DIMENSION(:),INTENT(OUT):: PFIELD ! physiographic field diff --git a/src/SURFEX/pgd_bem_par.F90 b/src/SURFEX/pgd_bem_par.F90 index 7fd62daa4..ac0644ca4 100644 --- a/src/SURFEX/pgd_bem_par.F90 +++ b/src/SURFEX/pgd_bem_par.F90 @@ -57,7 +57,7 @@ USE MODD_DATA_BEM_n, ONLY : DATA_BEM_t USE MODD_BEM_OPTION_n, ONLY : BEM_OPTIONS_t USE MODE_COHERENCE_FRAC ! -USE MODD_SURF_PAR, ONLY : XUNDEF, NUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF, NUNDEF USE MODD_CSTS, ONLY : XSURF_EPSILON ! USE YOMHOOK ,ONLY : LHOOK, DR_HOOK @@ -110,105 +110,104 @@ INTEGER, PARAMETER :: NFLOOR_MAX = 9 ! Maximum number of floor laye INTEGER, PARAMETER :: NMASS_MAX = 9 ! Maximum number of internal mass layers INTEGER, PARAMETER :: NBEMCOMP_MAX= 9 ! Maximum number of tiles for use/behaviour ! -INTEGER, PARAMETER :: NFNAM = 28 ! max file name length INTEGER, PARAMETER :: NFTYP = 6 ! max file type length ! INTEGER :: NPAR_FLOOR_LAYER ! number of floor layers INTEGER :: NPAR_MASS_LAYER ! number of internal mass layers ! REAL , DIMENSION(NBEMCOMP_MAX) :: XUNIF_NATVENT ! Control variable for ventilation (0=NONE; 1=MANU; 2=AUTO) -CHARACTER(LEN=NFNAM) :: CFNAM_NATVENT ! File name for NATVENT +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_NATVENT ! File name for NATVENT CHARACTER(LEN=NFTYP) :: CFTYP_NATVENT ! File type for NATVENT ! REAL :: XUNIF_RESIDENTIAL ! Residential fraction (for solar panels) [1] -CHARACTER(LEN=NFNAM) :: CFNAM_RESIDENTIAL ! File name for RESIDENTIAL +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_RESIDENTIAL ! File name for RESIDENTIAL CHARACTER(LEN=NFTYP) :: CFTYP_RESIDENTIAL ! File type for RESIDENTIAL ! -REAL , DIMENSION(NBEMCOMP_MAX) :: XUNIF_FRACOMP ! Fractions of tiles for uses/behaviour [1] -CHARACTER(LEN=NFNAM) :: CFNAM_FRACOMP ! File name for FRACOMP -CHARACTER(LEN=NFTYP) :: CFTYP_FRACOMP ! File type for FRACOMP +REAL , DIMENSION(NBEMCOMP_MAX) :: XUNIF_FRACOMP ! Fractions of tiles for uses/behaviour [1] +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_FRACOMP ! File name for FRACOMP +CHARACTER(LEN=NFTYP) :: CFTYP_FRACOMP ! File type for FRACOMP ! -REAL :: XUNIF_ISMECH ! Control variable for presence of mechanical ventilation [0=NO, 1=YES] -CHARACTER(LEN=NFNAM) :: CFNAM_ISMECH ! File name for ISMECH -CHARACTER(LEN=NFTYP) :: CFTYP_ISMECH ! File type for ISMECH +REAL :: XUNIF_ISMECH ! Control variable for presence of mechanical ventilation [0=NO, 1=YES] +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_ISMECH ! File name for ISMECH +CHARACTER(LEN=NFTYP) :: CFTYP_ISMECH ! File type for ISMECH ! -REAL :: XUNIF_MECHRATE ! Air exchange rate due to mechanical ventilation [vol h-1] -CHARACTER(LEN=NFNAM) :: CFNAM_MECHRATE ! File name for MECHRATE -CHARACTER(LEN=NFTYP) :: CFTYP_MECHRATE ! File type for MECHRATE +REAL :: XUNIF_MECHRATE ! Air exchange rate due to mechanical ventilation [vol h-1] +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_MECHRATE ! File name for MECHRATE +CHARACTER(LEN=NFTYP) :: CFTYP_MECHRATE ! File type for MECHRATE ! -REAL :: XUNIF_SHADEARCHI ! Control variable for presence of shading elements [0=None; 1=Adaptive; 2=Permanent] -CHARACTER(LEN=NFNAM) :: CFNAM_SHADEARCHI ! File name for SHADEARCHI -CHARACTER(LEN=NFTYP) :: CFTYP_SHADEARCHI ! File type for SHADEARCHI +REAL :: XUNIF_SHADEARCHI ! Control variable for presence of shading elements [0=None; 1=Adaptive; 2=Permanent] +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_SHADEARCHI ! File name for SHADEARCHI +CHARACTER(LEN=NFTYP) :: CFTYP_SHADEARCHI ! File type for SHADEARCHI ! ! Floor parameters ! -REAL, DIMENSION(NFLOOR_MAX) :: XUNIF_HC_FLOOR ! Floor layers heat capacity [J.K-1.m-3] -REAL, DIMENSION(NFLOOR_MAX) :: XUNIF_TC_FLOOR ! Floor layers thermal conductivity [W.K-1.m-1] -REAL, DIMENSION(NFLOOR_MAX) :: XUNIF_D_FLOOR ! Depth of floor layers [m] -REAL :: XUNIF_FLOOR_HEIGHT ! Building floor height [m] -CHARACTER(LEN=NFNAM), DIMENSION(NFLOOR_MAX) :: CFNAM_HC_FLOOR ! File name for HC_FLOOR -CHARACTER(LEN=NFNAM), DIMENSION(NFLOOR_MAX) :: CFNAM_TC_FLOOR ! File name for TC_FLOOR -CHARACTER(LEN=NFNAM), DIMENSION(NFLOOR_MAX) :: CFNAM_D_FLOOR ! File name for D_FLOOR -CHARACTER(LEN=NFNAM) :: CFNAM_FLOOR_HEIGHT ! File name for FLOOR_HEIGHT -CHARACTER(LEN=NFTYP), DIMENSION(NFLOOR_MAX) :: CFTYP_HC_FLOOR ! File type for HC_FLOOR -CHARACTER(LEN=NFTYP), DIMENSION(NFLOOR_MAX) :: CFTYP_TC_FLOOR ! File type for TC_FLOOR -CHARACTER(LEN=NFTYP), DIMENSION(NFLOOR_MAX) :: CFTYP_D_FLOOR ! File type for D_FLOOR -CHARACTER(LEN=NFTYP) :: CFTYP_FLOOR_HEIGHT ! File type for FLOOR_HEIGHT +REAL, DIMENSION(NFLOOR_MAX) :: XUNIF_HC_FLOOR ! Floor layers heat capacity [J.K-1.m-3] +REAL, DIMENSION(NFLOOR_MAX) :: XUNIF_TC_FLOOR ! Floor layers thermal conductivity [W.K-1.m-1] +REAL, DIMENSION(NFLOOR_MAX) :: XUNIF_D_FLOOR ! Depth of floor layers [m] +REAL :: XUNIF_FLOOR_HEIGHT ! Building floor height [m] +CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NFLOOR_MAX) :: CFNAM_HC_FLOOR ! File name for HC_FLOOR +CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NFLOOR_MAX) :: CFNAM_TC_FLOOR ! File name for TC_FLOOR +CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NFLOOR_MAX) :: CFNAM_D_FLOOR ! File name for D_FLOOR +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_FLOOR_HEIGHT ! File name for FLOOR_HEIGHT +CHARACTER(LEN=NFTYP), DIMENSION(NFLOOR_MAX) :: CFTYP_HC_FLOOR ! File type for HC_FLOOR +CHARACTER(LEN=NFTYP), DIMENSION(NFLOOR_MAX) :: CFTYP_TC_FLOOR ! File type for TC_FLOOR +CHARACTER(LEN=NFTYP), DIMENSION(NFLOOR_MAX) :: CFTYP_D_FLOOR ! File type for D_FLOOR +CHARACTER(LEN=NFTYP) :: CFTYP_FLOOR_HEIGHT ! File type for FLOOR_HEIGHT ! ! Mass parameters ! -REAL, DIMENSION(NMASS_MAX) :: XUNIF_HC_MASS ! Mass layers heat capacity [J.K-1.m-3] -REAL, DIMENSION(NMASS_MAX) :: XUNIF_TC_MASS ! Mass layers thermal conductivity [W.K-1.m-1] -REAL, DIMENSION(NMASS_MAX) :: XUNIF_D_MASS ! Depth of mass layers [m] -CHARACTER(LEN=NFNAM), DIMENSION(NMASS_MAX) :: CFNAM_HC_MASS ! File name for HC_MASS -CHARACTER(LEN=NFNAM), DIMENSION(NMASS_MAX) :: CFNAM_TC_MASS ! File name for TC_MASS -CHARACTER(LEN=NFNAM), DIMENSION(NMASS_MAX) :: CFNAM_D_MASS ! File name for D_MASS -CHARACTER(LEN=NFTYP), DIMENSION(NMASS_MAX) :: CFTYP_HC_MASS ! File type for HC_MASS -CHARACTER(LEN=NFTYP), DIMENSION(NMASS_MAX) :: CFTYP_TC_MASS ! File type for TC_MASS -CHARACTER(LEN=NFTYP), DIMENSION(NMASS_MAX) :: CFTYP_D_MASS ! File type for D_MASS +REAL, DIMENSION(NMASS_MAX) :: XUNIF_HC_MASS ! Mass layers heat capacity [J.K-1.m-3] +REAL, DIMENSION(NMASS_MAX) :: XUNIF_TC_MASS ! Mass layers thermal conductivity [W.K-1.m-1] +REAL, DIMENSION(NMASS_MAX) :: XUNIF_D_MASS ! Depth of mass layers [m] +CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NMASS_MAX) :: CFNAM_HC_MASS ! File name for HC_MASS +CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NMASS_MAX) :: CFNAM_TC_MASS ! File name for TC_MASS +CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NMASS_MAX) :: CFNAM_D_MASS ! File name for D_MASS +CHARACTER(LEN=NFTYP), DIMENSION(NMASS_MAX) :: CFTYP_HC_MASS ! File type for HC_MASS +CHARACTER(LEN=NFTYP), DIMENSION(NMASS_MAX) :: CFTYP_TC_MASS ! File type for TC_MASS +CHARACTER(LEN=NFTYP), DIMENSION(NMASS_MAX) :: CFTYP_D_MASS ! File type for D_MASS ! ! AC systems parameters ! -REAL :: XUNIF_F_WASTE_CAN ! Fraction of waste heat into the canyon [1] -REAL :: XUNIF_HR_TARGET ! Relative humidity setpoint [1] -REAL :: XUNIF_CAP_SYS_HEAT ! Capacity of the heating system [W.m-2(bld)] -REAL :: XUNIF_CAP_SYS_RAT ! Rated capacity of the cooling system [1] -REAL :: XUNIF_T_ADP ! Apparatus dewpoint temperature [K] -REAL :: XUNIF_M_SYS_RAT ! Rated HVAC mass flow rate [kg s-1 m-2(bld)] -REAL :: XUNIF_COP_RAT ! Rated COP of the cooling system [1] -REAL :: XUNIF_COP_DCS ! Rated COP of the district cooling system [1] -REAL :: XUNIF_F_WATER_COND ! fraction of evaporation of condensers [1] -REAL :: XUNIF_DCS_AREA ! presence of district cooling system [1] -CHARACTER(LEN=NFNAM) :: CFNAM_F_WASTE_CAN ! File name for F_WASTE_CAN -CHARACTER(LEN=NFNAM) :: CFNAM_HR_TARGET ! File name for HR_TARGET -CHARACTER(LEN=NFNAM) :: CFNAM_CAP_SYS_HEAT ! File name for CAP_SYS_HEAT -CHARACTER(LEN=NFNAM) :: CFNAM_CAP_SYS_RAT ! File name for CAP_SYS_RAT -CHARACTER(LEN=NFNAM) :: CFNAM_T_ADP ! File name for T_ADP -CHARACTER(LEN=NFNAM) :: CFNAM_M_SYS_RAT ! File name for M_SYS_RAT -CHARACTER(LEN=NFNAM) :: CFNAM_COP_RAT ! File name for COP_RAT -CHARACTER(LEN=NFNAM) :: CFNAM_COP_DCS ! File name for COP_DCS -CHARACTER(LEN=NFNAM) :: CFNAM_F_WATER_COND ! File name for F_WATER_COND -CHARACTER(LEN=NFNAM) :: CFNAM_DCS_AREA ! File name for DCS_AREA -CHARACTER(LEN=NFTYP) :: CFTYP_F_WASTE_CAN ! File type for F_WASTE_CAN -CHARACTER(LEN=NFTYP) :: CFTYP_HR_TARGET ! File type for HR_TARGET -CHARACTER(LEN=NFTYP) :: CFTYP_CAP_SYS_HEAT ! File type for CAP_SYS_HEAT -CHARACTER(LEN=NFTYP) :: CFTYP_CAP_SYS_RAT ! File type for CAP_SYS_RAT -CHARACTER(LEN=NFTYP) :: CFTYP_T_ADP ! File type for T_ADP -CHARACTER(LEN=NFTYP) :: CFTYP_M_SYS_RAT ! File type for M_SYS_RAT -CHARACTER(LEN=NFTYP) :: CFTYP_COP_RAT ! File type for COP_RAT -CHARACTER(LEN=NFTYP) :: CFTYP_COP_DCS ! File type for COP_DCS -CHARACTER(LEN=NFTYP) :: CFTYP_F_WATER_COND ! File type for F_WATER_COND -CHARACTER(LEN=NFTYP) :: CFTYP_DCS_AREA ! File type for DCS_AREA -! -REAL :: XUNIF_TDESV ! Design temperature for ventilation [K] -REAL :: XUNIF_WIN_SW_MAX ! Threshold for shortwave radiation received by walls for shading [W.m-2(wall)] -REAL :: XUNIF_FOPEN ! Maximum fraction of windows opened [1] -CHARACTER(LEN=NFNAM) :: CFNAM_TDESV ! File name for TDESV -CHARACTER(LEN=NFNAM) :: CFNAM_WIN_SW_MAX ! File name for WIN_SW_MAX -CHARACTER(LEN=NFNAM) :: CFNAM_FOPEN ! File name for FOPEN -CHARACTER(LEN=NFTYP) :: CFTYP_TDESV ! File type for TDESV -CHARACTER(LEN=NFTYP) :: CFTYP_WIN_SW_MAX ! File type for WIN_SW_MAX -CHARACTER(LEN=NFTYP) :: CFTYP_FOPEN ! File type for FOPEN +REAL :: XUNIF_F_WASTE_CAN ! Fraction of waste heat into the canyon [1] +REAL :: XUNIF_HR_TARGET ! Relative humidity setpoint [1] +REAL :: XUNIF_CAP_SYS_HEAT ! Capacity of the heating system [W.m-2(bld)] +REAL :: XUNIF_CAP_SYS_RAT ! Rated capacity of the cooling system [1] +REAL :: XUNIF_T_ADP ! Apparatus dewpoint temperature [K] +REAL :: XUNIF_M_SYS_RAT ! Rated HVAC mass flow rate [kg s-1 m-2(bld)] +REAL :: XUNIF_COP_RAT ! Rated COP of the cooling system [1] +REAL :: XUNIF_COP_DCS ! Rated COP of the district cooling system [1] +REAL :: XUNIF_F_WATER_COND ! fraction of evaporation of condensers [1] +REAL :: XUNIF_DCS_AREA ! presence of district cooling system [1] +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_F_WASTE_CAN ! File name for F_WASTE_CAN +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_HR_TARGET ! File name for HR_TARGET +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_CAP_SYS_HEAT ! File name for CAP_SYS_HEAT +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_CAP_SYS_RAT ! File name for CAP_SYS_RAT +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_T_ADP ! File name for T_ADP +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_M_SYS_RAT ! File name for M_SYS_RAT +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_COP_RAT ! File name for COP_RAT +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_COP_DCS ! File name for COP_DCS +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_F_WATER_COND ! File name for F_WATER_COND +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_DCS_AREA ! File name for DCS_AREA +CHARACTER(LEN=NFTYP) :: CFTYP_F_WASTE_CAN ! File type for F_WASTE_CAN +CHARACTER(LEN=NFTYP) :: CFTYP_HR_TARGET ! File type for HR_TARGET +CHARACTER(LEN=NFTYP) :: CFTYP_CAP_SYS_HEAT ! File type for CAP_SYS_HEAT +CHARACTER(LEN=NFTYP) :: CFTYP_CAP_SYS_RAT ! File type for CAP_SYS_RAT +CHARACTER(LEN=NFTYP) :: CFTYP_T_ADP ! File type for T_ADP +CHARACTER(LEN=NFTYP) :: CFTYP_M_SYS_RAT ! File type for M_SYS_RAT +CHARACTER(LEN=NFTYP) :: CFTYP_COP_RAT ! File type for COP_RAT +CHARACTER(LEN=NFTYP) :: CFTYP_COP_DCS ! File type for COP_DCS +CHARACTER(LEN=NFTYP) :: CFTYP_F_WATER_COND ! File type for F_WATER_COND +CHARACTER(LEN=NFTYP) :: CFTYP_DCS_AREA ! File type for DCS_AREA +! +REAL :: XUNIF_TDESV ! Design temperature for ventilation [K] +REAL :: XUNIF_WIN_SW_MAX ! Threshold for shortwave radiation received by walls for shading [W.m-2(wall)] +REAL :: XUNIF_FOPEN ! Maximum fraction of windows opened [1] +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_TDESV ! File name for TDESV +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_WIN_SW_MAX ! File name for WIN_SW_MAX +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_FOPEN ! File name for FOPEN +CHARACTER(LEN=NFTYP) :: CFTYP_TDESV ! File type for TDESV +CHARACTER(LEN=NFTYP) :: CFTYP_WIN_SW_MAX ! File type for WIN_SW_MAX +CHARACTER(LEN=NFTYP) :: CFTYP_FOPEN ! File type for FOPEN ! REAL, DIMENSION(NBEMCOMP_MAX) :: XUNIF_FVSUM ! Fraction of households opening windows during warm conditions [1] REAL, DIMENSION(NBEMCOMP_MAX) :: XUNIF_FVVAC ! Fraction of households opening windows when the building is vacant [1] @@ -216,18 +215,18 @@ REAL, DIMENSION(NBEMCOMP_MAX) :: XUNIF_FVNIG ! Fraction of households opening wi REAL, DIMENSION(NBEMCOMP_MAX) :: XUNIF_FSSUM ! Fraction of households closing shading elements during warm conditions [1] REAL, DIMENSION(NBEMCOMP_MAX) :: XUNIF_FSVAC ! Fraction of households closing shading elements when the building is vacant [1] REAL, DIMENSION(NBEMCOMP_MAX) :: XUNIF_FSNIG ! Fraction of households closing shading elements during the night [1] -CHARACTER(LEN=NFNAM) :: CFNAM_FVSUM ! File name for FVSUM -CHARACTER(LEN=NFNAM) :: CFNAM_FVVAC ! File name for FVVAC -CHARACTER(LEN=NFNAM) :: CFNAM_FVNIG ! File name for FVNIG -CHARACTER(LEN=NFNAM) :: CFNAM_FSSUM ! File name for FSSUM -CHARACTER(LEN=NFNAM) :: CFNAM_FSVAC ! File name for FSVAC -CHARACTER(LEN=NFNAM) :: CFNAM_FSNIG ! File name for FSNIG -CHARACTER(LEN=NFTYP) :: CFTYP_FVSUM ! File type for FVSUM -CHARACTER(LEN=NFTYP) :: CFTYP_FVVAC ! File type for FVVAC -CHARACTER(LEN=NFTYP) :: CFTYP_FVNIG ! File type for FVNIG -CHARACTER(LEN=NFTYP) :: CFTYP_FSSUM ! File type for FSSUM -CHARACTER(LEN=NFTYP) :: CFTYP_FSVAC ! File type for FSVAC -CHARACTER(LEN=NFTYP) :: CFTYP_FSNIG ! File type for FSNIG +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_FVSUM ! File name for FVSUM +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_FVVAC ! File name for FVVAC +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_FVNIG ! File name for FVNIG +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_FSSUM ! File name for FSSUM +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_FSVAC ! File name for FSVAC +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_FSNIG ! File name for FSNIG +CHARACTER(LEN=NFTYP) :: CFTYP_FVSUM ! File type for FVSUM +CHARACTER(LEN=NFTYP) :: CFTYP_FVVAC ! File type for FVVAC +CHARACTER(LEN=NFTYP) :: CFTYP_FVNIG ! File type for FVNIG +CHARACTER(LEN=NFTYP) :: CFTYP_FSSUM ! File type for FSSUM +CHARACTER(LEN=NFTYP) :: CFTYP_FSVAC ! File type for FSVAC +CHARACTER(LEN=NFTYP) :: CFTYP_FSNIG ! File type for FSNIG ! REAL, DIMENSION(:,:), ALLOCATABLE :: XUNIF_DAYWBEG_SCHED ! Day of week for beginning of schedule (1=Monday) REAL, DIMENSION(:,:), ALLOCATABLE :: XUNIF_HOURBEG_SCHED ! Hour of day for beginning of schedule @@ -235,12 +234,12 @@ REAL, DIMENSION(:,:), ALLOCATABLE :: XUNIF_PROBOCC ! Probability of buildi REAL, DIMENSION(:,:), ALLOCATABLE :: XUNIF_BEG_HOLIDAY ! Julian day of year for beginning of holiday REAL, DIMENSION(:,:), ALLOCATABLE :: XUNIF_END_HOLIDAY ! Julian day of year for end of holiday REAL, DIMENSION(NBEMCOMP_MAX) :: XUNIF_MOD_HOLIDAY ! Modulation factor for internal heat release during holidays [1] -CHARACTER(LEN=NFNAM) :: CFNAM_DAYWBEG_SCHED ! File name for DAYWBEG_SCHED -CHARACTER(LEN=NFNAM) :: CFNAM_HOURBEG_SCHED ! File name for HOURBEG_SCHED -CHARACTER(LEN=NFNAM) :: CFNAM_PROBOCC ! File name for PROBOCC -CHARACTER(LEN=NFNAM) :: CFNAM_BEG_HOLIDAY ! File name for BEG_HOLIDAY -CHARACTER(LEN=NFNAM) :: CFNAM_END_HOLIDAY ! File name for END_HOLIDAY -CHARACTER(LEN=NFNAM) :: CFNAM_MOD_HOLIDAY ! File name for MOD_HOLIDAY +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_DAYWBEG_SCHED ! File name for DAYWBEG_SCHED +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_HOURBEG_SCHED ! File name for HOURBEG_SCHED +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_PROBOCC ! File name for PROBOCC +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_BEG_HOLIDAY ! File name for BEG_HOLIDAY +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_END_HOLIDAY ! File name for END_HOLIDAY +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_MOD_HOLIDAY ! File name for MOD_HOLIDAY CHARACTER(LEN=NFTYP) :: CFTYP_DAYWBEG_SCHED ! File type for DAYWBEG_SCHED CHARACTER(LEN=NFTYP) :: CFTYP_HOURBEG_SCHED ! File type for HOURBEG_SCHED CHARACTER(LEN=NFTYP) :: CFTYP_PROBOCC ! File type for PROBOCC @@ -248,122 +247,122 @@ CHARACTER(LEN=NFTYP) :: CFTYP_BEG_HOLIDAY ! File type for BEG_HOL CHARACTER(LEN=NFTYP) :: CFTYP_END_HOLIDAY ! File type for END_HOLIDAY CHARACTER(LEN=NFTYP) :: CFTYP_MOD_HOLIDAY ! File type for MOD_HOLIDAY ! -REAL, DIMENSION(NBEMCOMP_MAX) :: XUNIF_TCOOL_OCCD ! Design temperature for air conditioning, occupied, day [K] -CHARACTER(LEN=NFNAM) :: CFNAM_TCOOL_OCCD ! File name for TCOOL_OCCD -CHARACTER(LEN=NFTYP) :: CFTYP_TCOOL_OCCD ! File type for TCOOL_OCCD +REAL, DIMENSION(NBEMCOMP_MAX) :: XUNIF_TCOOL_OCCD ! Design temperature for air conditioning, occupied, day [K] +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_TCOOL_OCCD ! File name for TCOOL_OCCD +CHARACTER(LEN=NFTYP) :: CFTYP_TCOOL_OCCD ! File type for TCOOL_OCCD ! -REAL, DIMENSION(NBEMCOMP_MAX) :: XUNIF_TCOOL_OCCN ! Design temperature for air conditioning, occupied, night [K] -CHARACTER(LEN=NFNAM) :: CFNAM_TCOOL_OCCN ! File name for TCOOL_OCCN -CHARACTER(LEN=NFTYP) :: CFTYP_TCOOL_OCCN ! File type for TCOOL_OCCN +REAL, DIMENSION(NBEMCOMP_MAX) :: XUNIF_TCOOL_OCCN ! Design temperature for air conditioning, occupied, night [K] +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_TCOOL_OCCN ! File name for TCOOL_OCCN +CHARACTER(LEN=NFTYP) :: CFTYP_TCOOL_OCCN ! File type for TCOOL_OCCN ! -REAL, DIMENSION(NBEMCOMP_MAX) :: XUNIF_TCOOL_VCDD ! Design temperature for air conditioning, vacant, day [K] -CHARACTER(LEN=NFNAM) :: CFNAM_TCOOL_VCDD ! File name for TCOOL_VCDD -CHARACTER(LEN=NFTYP) :: CFTYP_TCOOL_VCDD ! File type for TCOOL_VCDD +REAL, DIMENSION(NBEMCOMP_MAX) :: XUNIF_TCOOL_VCDD ! Design temperature for air conditioning, vacant, day [K] +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_TCOOL_VCDD ! File name for TCOOL_VCDD +CHARACTER(LEN=NFTYP) :: CFTYP_TCOOL_VCDD ! File type for TCOOL_VCDD ! -REAL, DIMENSION(NBEMCOMP_MAX) :: XUNIF_TCOOL_VCDN ! Design temperature for air conditioning, vacant, night [K] -CHARACTER(LEN=NFNAM) :: CFNAM_TCOOL_VCDN ! File name for TCOOL_VCDN -CHARACTER(LEN=NFTYP) :: CFTYP_TCOOL_VCDN ! File type for TCOOL_VCDN +REAL, DIMENSION(NBEMCOMP_MAX) :: XUNIF_TCOOL_VCDN ! Design temperature for air conditioning, vacant, night [K] +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_TCOOL_VCDN ! File name for TCOOL_VCDN +CHARACTER(LEN=NFTYP) :: CFTYP_TCOOL_VCDN ! File type for TCOOL_VCDN ! -REAL, DIMENSION(NBEMCOMP_MAX) :: XUNIF_TCOOL_VCLD ! Design temperature for air conditioning, vacant, long duration [K] -CHARACTER(LEN=NFNAM) :: CFNAM_TCOOL_VCLD ! File name for TCOOL_VCLD -CHARACTER(LEN=NFTYP) :: CFTYP_TCOOL_VCLD ! File type for TCOOL_VCLD +REAL, DIMENSION(NBEMCOMP_MAX) :: XUNIF_TCOOL_VCLD ! Design temperature for air conditioning, vacant, long duration [K] +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_TCOOL_VCLD ! File name for TCOOL_VCLD +CHARACTER(LEN=NFTYP) :: CFTYP_TCOOL_VCLD ! File type for TCOOL_VCLD ! -REAL, DIMENSION(NBEMCOMP_MAX) :: XUNIF_THEAT_OCCD ! Design temperature for heating, occupied, day [K] -CHARACTER(LEN=NFNAM) :: CFNAM_THEAT_OCCD ! File name for THEAT_OCCD -CHARACTER(LEN=NFTYP) :: CFTYP_THEAT_OCCD ! File type for THEAT_OCCD +REAL, DIMENSION(NBEMCOMP_MAX) :: XUNIF_THEAT_OCCD ! Design temperature for heating, occupied, day [K] +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_THEAT_OCCD ! File name for THEAT_OCCD +CHARACTER(LEN=NFTYP) :: CFTYP_THEAT_OCCD ! File type for THEAT_OCCD ! -REAL, DIMENSION(NBEMCOMP_MAX) :: XUNIF_THEAT_OCCN ! Design temperature for heating, occupied, night [K] -CHARACTER(LEN=NFNAM) :: CFNAM_THEAT_OCCN ! File name for THEAT_OCCN -CHARACTER(LEN=NFTYP) :: CFTYP_THEAT_OCCN ! File type for THEAT_OCCN +REAL, DIMENSION(NBEMCOMP_MAX) :: XUNIF_THEAT_OCCN ! Design temperature for heating, occupied, night [K] +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_THEAT_OCCN ! File name for THEAT_OCCN +CHARACTER(LEN=NFTYP) :: CFTYP_THEAT_OCCN ! File type for THEAT_OCCN ! -REAL, DIMENSION(NBEMCOMP_MAX) :: XUNIF_THEAT_VCDD ! Design temperature for heating, vacant, day [K] -CHARACTER(LEN=NFNAM) :: CFNAM_THEAT_VCDD ! File name for THEAT_VCDD -CHARACTER(LEN=NFTYP) :: CFTYP_THEAT_VCDD ! File type for THEAT_VCDD +REAL, DIMENSION(NBEMCOMP_MAX) :: XUNIF_THEAT_VCDD ! Design temperature for heating, vacant, day [K] +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_THEAT_VCDD ! File name for THEAT_VCDD +CHARACTER(LEN=NFTYP) :: CFTYP_THEAT_VCDD ! File type for THEAT_VCDD ! -REAL, DIMENSION(NBEMCOMP_MAX) :: XUNIF_THEAT_VCDN ! Design temperature for heating, vacant, night [K] -CHARACTER(LEN=NFNAM) :: CFNAM_THEAT_VCDN ! File name for THEAT_VCDN -CHARACTER(LEN=NFTYP) :: CFTYP_THEAT_VCDN ! File type for THEAT_VCDN +REAL, DIMENSION(NBEMCOMP_MAX) :: XUNIF_THEAT_VCDN ! Design temperature for heating, vacant, night [K] +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_THEAT_VCDN ! File name for THEAT_VCDN +CHARACTER(LEN=NFTYP) :: CFTYP_THEAT_VCDN ! File type for THEAT_VCDN ! -REAL, DIMENSION(NBEMCOMP_MAX) :: XUNIF_THEAT_VCLD ! Design temperature for heating, vacant, long duration [K] -CHARACTER(LEN=NFNAM) :: CFNAM_THEAT_VCLD ! File name for THEAT_VCLD -CHARACTER(LEN=NFTYP) :: CFTYP_THEAT_VCLD ! File type for THEAT_VCLD +REAL, DIMENSION(NBEMCOMP_MAX) :: XUNIF_THEAT_VCLD ! Design temperature for heating, vacant, long duration [K] +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_THEAT_VCLD ! File name for THEAT_VCLD +CHARACTER(LEN=NFTYP) :: CFTYP_THEAT_VCLD ! File type for THEAT_VCLD ! ! Internal heat gains -REAL, DIMENSION(NBEMCOMP_MAX) :: XUNIF_QIN ! Internal heat gains [W m-2(floor)] -REAL :: XUNIF_QIN_FRAD ! Radiant fraction of int heat gains [1] -REAL :: XUNIF_QIN_FLAT ! Latent franction of internal heat gains [1] -REAL, DIMENSION(NBEMCOMP_MAX) :: XUNIF_MODQIN_VCD ! Modulation during short-term vacancy [1] -REAL, DIMENSION(NBEMCOMP_MAX) :: XUNIF_MODQIN_VLD ! Modulation during long-term vacancy [1] -REAL, DIMENSION(NBEMCOMP_MAX) :: XUNIF_MODQIN_NIG ! Modulation during night [1] -CHARACTER(LEN=NFNAM) :: CFNAM_QIN ! File name for QIN -CHARACTER(LEN=NFNAM) :: CFNAM_QIN_FRAD ! File name for QIN_FRAD -CHARACTER(LEN=NFNAM) :: CFNAM_QIN_FLAT ! File name for QIN_FLAT -CHARACTER(LEN=NFNAM) :: CFNAM_MODQIN_VCD ! File name for MODQIN_VCD -CHARACTER(LEN=NFNAM) :: CFNAM_MODQIN_VLD ! File name for MODQIN_VLD -CHARACTER(LEN=NFNAM) :: CFNAM_MODQIN_NIG ! File name for MODQIN_NIG -CHARACTER(LEN=NFTYP) :: CFTYP_QIN ! File type for QIN -CHARACTER(LEN=NFTYP) :: CFTYP_QIN_FRAD ! File type for QIN_FRAD -CHARACTER(LEN=NFTYP) :: CFTYP_QIN_FLAT ! File type for QIN_FLAT -CHARACTER(LEN=NFTYP) :: CFTYP_MODQIN_VCD ! File type for MODQIN_VCD -CHARACTER(LEN=NFTYP) :: CFTYP_MODQIN_VLD ! File type for MODQIN_VLD -CHARACTER(LEN=NFTYP) :: CFTYP_MODQIN_NIG ! File type for MODQIN_NIG +REAL, DIMENSION(NBEMCOMP_MAX) :: XUNIF_QIN ! Internal heat gains [W m-2(floor)] +REAL :: XUNIF_QIN_FRAD ! Radiant fraction of int heat gains [1] +REAL :: XUNIF_QIN_FLAT ! Latent franction of internal heat gains [1] +REAL, DIMENSION(NBEMCOMP_MAX) :: XUNIF_MODQIN_VCD ! Modulation during short-term vacancy [1] +REAL, DIMENSION(NBEMCOMP_MAX) :: XUNIF_MODQIN_VLD ! Modulation during long-term vacancy [1] +REAL, DIMENSION(NBEMCOMP_MAX) :: XUNIF_MODQIN_NIG ! Modulation during night [1] +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_QIN ! File name for QIN +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_QIN_FRAD ! File name for QIN_FRAD +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_QIN_FLAT ! File name for QIN_FLAT +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_MODQIN_VCD ! File name for MODQIN_VCD +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_MODQIN_VLD ! File name for MODQIN_VLD +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_MODQIN_NIG ! File name for MODQIN_NIG +CHARACTER(LEN=NFTYP) :: CFTYP_QIN ! File type for QIN +CHARACTER(LEN=NFTYP) :: CFTYP_QIN_FRAD ! File type for QIN_FRAD +CHARACTER(LEN=NFTYP) :: CFTYP_QIN_FLAT ! File type for QIN_FLAT +CHARACTER(LEN=NFTYP) :: CFTYP_MODQIN_VCD ! File type for MODQIN_VCD +CHARACTER(LEN=NFTYP) :: CFTYP_MODQIN_VLD ! File type for MODQIN_VLD +CHARACTER(LEN=NFTYP) :: CFTYP_MODQIN_NIG ! File type for MODQIN_NIG ! ! window parameters -REAL :: XUNIF_GR ! Glazing ratio [1] -REAL :: XUNIF_SHGC ! Solar transmittance of windows [1] -REAL :: XUNIF_SHGC_SH ! solar transmittance of windows + shading [1] -REAL :: XUNIF_U_WIN ! U-Value of window [W.m-2.K-1] -CHARACTER(LEN=NFNAM) :: CFNAM_GR ! File name for GR -CHARACTER(LEN=NFNAM) :: CFNAM_SHGC ! File name for SHGC -CHARACTER(LEN=NFNAM) :: CFNAM_SHGC_SH ! File name for SHGC_SH -CHARACTER(LEN=NFNAM) :: CFNAM_U_WIN ! File name for U_WIN -CHARACTER(LEN=NFTYP) :: CFTYP_GR ! File type for GR -CHARACTER(LEN=NFTYP) :: CFTYP_SHGC ! File type for SHGC -CHARACTER(LEN=NFTYP) :: CFTYP_SHGC_SH ! File type for SHGC -CHARACTER(LEN=NFTYP) :: CFTYP_U_WIN ! File type for U_WIN +REAL :: XUNIF_GR ! Glazing ratio [1] +REAL :: XUNIF_SHGC ! Solar transmittance of windows [1] +REAL :: XUNIF_SHGC_SH ! solar transmittance of windows + shading [1] +REAL :: XUNIF_U_WIN ! U-Value of window [W.m-2.K-1] +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_GR ! File name for GR +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_SHGC ! File name for SHGC +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_SHGC_SH ! File name for SHGC_SH +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_U_WIN ! File name for U_WIN +CHARACTER(LEN=NFTYP) :: CFTYP_GR ! File type for GR +CHARACTER(LEN=NFTYP) :: CFTYP_SHGC ! File type for SHGC +CHARACTER(LEN=NFTYP) :: CFTYP_SHGC_SH ! File type for SHGC +CHARACTER(LEN=NFTYP) :: CFTYP_U_WIN ! File type for U_WIN ! ! air renewal -REAL :: XUNIF_N50 ! Airtightness of the building [vol.h-1 at 5O Pa] -CHARACTER(LEN=NFNAM) :: CFNAM_N50 ! File name for N50 -CHARACTER(LEN=NFTYP) :: CFTYP_N50 ! File type for N50 +REAL :: XUNIF_N50 ! Airtightness of the building [vol.h-1 at 5O Pa] +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_N50 ! File name for N50 +CHARACTER(LEN=NFTYP) :: CFTYP_N50 ! File type for N50 ! ! parameters for autosize calculation of the AC systems -REAL :: XUNIF_T_SIZE_MAX ! Temperature for capacity of the cooling system [K] -REAL :: XUNIF_T_SIZE_MIN ! Temperature for capacity of the heating system [K] - CHARACTER(LEN=NFNAM) :: CFNAM_T_SIZE_MAX ! File name for T_SIZE_MAX - CHARACTER(LEN=NFNAM) :: CFNAM_T_SIZE_MIN ! File name for T_SIZE_MIN - CHARACTER(LEN=NFTYP) :: CFTYP_T_SIZE_MAX ! File type for T_SIZE_MAX - CHARACTER(LEN=NFTYP) :: CFTYP_T_SIZE_MIN ! File type for T_SIZE_MIN +REAL :: XUNIF_T_SIZE_MAX ! Temperature for capacity of the cooling system [K] +REAL :: XUNIF_T_SIZE_MIN ! Temperature for capacity of the heating system [K] + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_T_SIZE_MAX ! File name for T_SIZE_MAX + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_T_SIZE_MIN ! File name for T_SIZE_MIN + CHARACTER(LEN=NFTYP) :: CFTYP_T_SIZE_MAX ! File type for T_SIZE_MAX + CHARACTER(LEN=NFTYP) :: CFTYP_T_SIZE_MIN ! File type for T_SIZE_MIN ! ! heating fractions and emission factors(for CO2 flux from buildings calculation) -REAL :: XUNIF_FRAC_HEAT_ELEC ! uniform value for Fraction of electric heating [1] -CHARACTER(LEN=NFNAM) :: CFNAM_FRAC_HEAT_ELEC ! file name for Fraction of electric heating -CHARACTER(LEN=NFTYP) :: CFTYP_FRAC_HEAT_ELEC ! file type for Fraction of electric heating +REAL :: XUNIF_FRAC_HEAT_ELEC ! uniform value for Fraction of electric heating [1] +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_FRAC_HEAT_ELEC ! file name for Fraction of electric heating +CHARACTER(LEN=NFTYP) :: CFTYP_FRAC_HEAT_ELEC ! file type for Fraction of electric heating ! -REAL :: XUNIF_FRAC_HEAT_GAS ! uniform value for Fraction of gas heating [1] -CHARACTER(LEN=NFNAM) :: CFNAM_FRAC_HEAT_GAS ! file name for Fraction of gas heating -CHARACTER(LEN=NFTYP) :: CFTYP_FRAC_HEAT_GAS ! file type for Fraction of gas heating +REAL :: XUNIF_FRAC_HEAT_GAS ! uniform value for Fraction of gas heating [1] +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_FRAC_HEAT_GAS ! file name for Fraction of gas heating +CHARACTER(LEN=NFTYP) :: CFTYP_FRAC_HEAT_GAS ! file type for Fraction of gas heating ! -REAL :: XUNIF_FRAC_HEAT_OTHER ! uniform value for Fraction of other heating [1] -CHARACTER(LEN=NFNAM) :: CFNAM_FRAC_HEAT_OTHER ! file name for Fraction of other heating -CHARACTER(LEN=NFTYP) :: CFTYP_FRAC_HEAT_OTHER ! file type for Fraction of other heating +REAL :: XUNIF_FRAC_HEAT_OTHER ! uniform value for Fraction of other heating [1] +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_FRAC_HEAT_OTHER ! file name for Fraction of other heating +CHARACTER(LEN=NFTYP) :: CFTYP_FRAC_HEAT_OTHER ! file type for Fraction of other heating ! -REAL :: XUNIF_FRAC_HEAT_FUEL ! uniform value for Fraction of fuel heating [1] -CHARACTER(LEN=NFNAM) :: CFNAM_FRAC_HEAT_FUEL ! file name for Fraction of fuel heating -CHARACTER(LEN=NFTYP) :: CFTYP_FRAC_HEAT_FUEL ! file type for Fraction of fuel heating +REAL :: XUNIF_FRAC_HEAT_FUEL ! uniform value for Fraction of fuel heating [1] +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_FRAC_HEAT_FUEL ! file name for Fraction of fuel heating +CHARACTER(LEN=NFTYP) :: CFTYP_FRAC_HEAT_FUEL ! file type for Fraction of fuel heating ! REAL :: XPAR_CF_CO2_ELEC ! Emission factor CO2/electricity [KgCO2.J-1] REAL :: XPAR_CF_CO2_GAS ! Emission factor CO2/gas [KgCO2.J-1] REAL :: XPAR_CF_CO2_FUEL ! Emission factor CO2/fuel [KgCO2.J-1] REAL :: XPAR_CF_CO2_OTHER ! Emission factor CO2/other source [KgCO2.J-1] ! -REAL, DIMENSION(NBEMCOMP_MAX) :: XUNIF_HOTWAT ! Energy needed for hot water [W m-2(floor)] -CHARACTER(LEN=NFNAM) :: CFNAM_HOTWAT ! Energy needed for hot water [W m-2(floor)] -CHARACTER(LEN=NFTYP) :: CFTYP_HOTWAT ! Energy needed for hot water [W m-2(floor)] +REAL, DIMENSION(NBEMCOMP_MAX) :: XUNIF_HOTWAT ! Energy needed for hot water [W m-2(floor)] +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_HOTWAT ! Energy needed for hot water [W m-2(floor)] +CHARACTER(LEN=NFTYP) :: CFTYP_HOTWAT ! Energy needed for hot water [W m-2(floor)] ! -REAL :: XUNIF_F_HW_GAS ! Fraction of warm water heated by gas [1] -CHARACTER(LEN=NFNAM) :: CFNAM_F_HW_GAS ! File name for F_HW_GAS -CHARACTER(LEN=NFTYP) :: CFTYP_F_HW_GAS ! File type for F_HW_GAS +REAL :: XUNIF_F_HW_GAS ! Fraction of warm water heated by gas [1] +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_F_HW_GAS ! File name for F_HW_GAS +CHARACTER(LEN=NFTYP) :: CFTYP_F_HW_GAS ! File type for F_HW_GAS ! REAL(KIND=JPRB) :: ZHOOK_HANDLE ! diff --git a/src/SURFEX/pgd_chemistry.F90 b/src/SURFEX/pgd_chemistry.F90 index 7d8e7e246..8d23a5609 100644 --- a/src/SURFEX/pgd_chemistry.F90 +++ b/src/SURFEX/pgd_chemistry.F90 @@ -53,7 +53,7 @@ USE MODD_SSO_n, ONLY : SSO_t ! USE MODD_PGD_GRID, ONLY : NL USE MODD_PGDWORK, ONLY : CATYPE -USE MODD_SURF_PAR, ONLY : XUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF USE MODD_CH_SURF, ONLY : JPEMISMAX_F ! USE MODI_GET_LUOUT @@ -107,7 +107,7 @@ INTEGER :: NEMIS_PGD_NBR INTEGER, DIMENSION(JPEMISMAX_F):: NEMIS_PGD_TIME CHARACTER(LEN=3), DIMENSION(JPEMISMAX_F):: CEMIS_PGD_AREA CHARACTER(LEN=3), DIMENSION(JPEMISMAX_F):: CEMIS_PGD_ATYPE - CHARACTER(LEN=28), DIMENSION(JPEMISMAX_F):: CEMIS_PGD_FILE + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(JPEMISMAX_F):: CEMIS_PGD_FILE CHARACTER(LEN=6), DIMENSION(JPEMISMAX_F):: CEMIS_PGD_FILETYPE CHARACTER(LEN=6) :: YMASK REAL, DIMENSION(:), ALLOCATABLE :: ZEMIS_FIELD, ZEMIS_FIELDS @@ -131,7 +131,7 @@ NEMIS_PGD_TIME(:) = 0 CEMIS_PGD_COMMENT(:) = '' CEMIS_PGD_AREA(:) = 'ALL' CEMIS_PGD_FILETYPE(:)= 'DIRECT' -CEMIS_PGD_FILE(:) = ' ' +CEMIS_PGD_FILE(:) = '' CEMIS_PGD_ATYPE(:) = 'ARI' ! CALL GET_LUOUT(HPROGRAM,ILUOUT) diff --git a/src/SURFEX/pgd_chemistry_snap.F90 b/src/SURFEX/pgd_chemistry_snap.F90 index f939e9d9f..59101d00f 100644 --- a/src/SURFEX/pgd_chemistry_snap.F90 +++ b/src/SURFEX/pgd_chemistry_snap.F90 @@ -50,7 +50,7 @@ USE MODD_SURF_ATM_n, ONLY : SURF_ATM_t USE MODD_SSO_n, ONLY : SSO_t ! USE MODD_PGDWORK, ONLY : CATYPE -USE MODD_SURF_PAR, ONLY : XUNDEF, LEN_HREC +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF, LEN_HREC USE MODD_PGD_GRID, ONLY : NL USE MODD_CH_SURF, ONLY : JPEMISMAX_S, JPSNAPMAX USE MODI_GET_LUOUT @@ -101,13 +101,13 @@ INTEGER :: JSNAP ! loop counter on SNAP categories REAL(KIND=JPRB) :: ZHOOK_HANDLE CHARACTER(LEN=LEN_HREC), DIMENSION(JPEMISMAX_S):: CEMIS_NAME CHARACTER(LEN=40), DIMENSION(JPEMISMAX_S):: CEMIS_COMMENT - CHARACTER(LEN=28), DIMENSION(JPEMISMAX_S):: CSNAP_MONTHLY_FILE - CHARACTER(LEN=28), DIMENSION(JPEMISMAX_S):: CSNAP_DAILY_FILE - CHARACTER(LEN=28), DIMENSION(JPEMISMAX_S):: CSNAP_HOURLY_FILE - CHARACTER(LEN=50), DIMENSION(JPEMISMAX_S,JPSNAPMAX):: CSNAP_POTENTIAL_FILE + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(JPEMISMAX_S):: CSNAP_MONTHLY_FILE + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(JPEMISMAX_S):: CSNAP_DAILY_FILE + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(JPEMISMAX_S):: CSNAP_HOURLY_FILE + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(JPEMISMAX_S,JPSNAPMAX):: CSNAP_POTENTIAL_FILE CHARACTER(LEN=6), DIMENSION(JPEMISMAX_S) :: CSNAP_POTENTIAL_FILETYPE REAL, DIMENSION(JPEMISMAX_S,JPSNAPMAX):: XUNIF_SNAP - CHARACTER(LEN=50) :: CDELTA_LEGAL_TIME_FILE + CHARACTER(LEN=NFILENAMELGTMAX) :: CDELTA_LEGAL_TIME_FILE CHARACTER(LEN=6) :: CDELTA_LEGAL_TIME_FILETYPE REAL :: XUNIF_DELTA_LEGAL_TIME INTEGER :: NEMIS_NBR @@ -142,13 +142,13 @@ CHN%NSNAP_D = 7 CHN%NSNAP_H = 24 XUNIF_SNAP = XUNDEF XUNIF_DELTA_LEGAL_TIME = XUNDEF -CSNAP_MONTHLY_FILE(:) = ' ' -CSNAP_DAILY_FILE(:) = ' ' -CSNAP_HOURLY_FILE(:) = ' ' +CSNAP_MONTHLY_FILE(:) = '' +CSNAP_DAILY_FILE(:) = '' +CSNAP_HOURLY_FILE(:) = '' CSNAP_POTENTIAL_FILETYPE(:)= ' ' -CSNAP_POTENTIAL_FILE(:,:) = ' ' +CSNAP_POTENTIAL_FILE(:,:) = '' CDELTA_LEGAL_TIME_FILETYPE = ' ' -CDELTA_LEGAL_TIME_FILE = ' ' +CDELTA_LEGAL_TIME_FILE = '' ! CALL GET_LUOUT(HPROGRAM,ILUOUT) ! diff --git a/src/SURFEX/pgd_cover.F90 b/src/SURFEX/pgd_cover.F90 index a62a1cb47..237bcedf6 100644 --- a/src/SURFEX/pgd_cover.F90 +++ b/src/SURFEX/pgd_cover.F90 @@ -53,7 +53,7 @@ USE MODD_SURF_ATM_n, ONLY : SURF_ATM_t USE MODD_SSO_n, ONLY : SSO_t ! USE MODD_SURFEX_MPI, ONLY : NRANK, NPIO, NPROC, NCOMM -USE MODD_SURF_PAR, ONLY : XUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF USE MODD_PGD_GRID, ONLY : CGRID, NL, XGRID_PAR USE MODD_PGDWORK, ONLY : XALL, NSIZE_ALL, NSIZE, XSUMVAL, XPREC USE MODD_DATA_COVER_PAR, ONLY : JPCOVER, NROCK, NSEA, NWATER, NPERMSNOW, LVEG_PRES @@ -122,7 +122,7 @@ LOGICAL, INTENT(OUT) :: ORM_RIVER ! delete river coverage (defa ! ------------------------------ ! CHARACTER(LEN=10) :: YFIELD - CHARACTER(LEN=28) :: YCOVER ! file name for cover types + CHARACTER(LEN=NFILENAMELGTMAX) :: YCOVER ! file name for cover types CHARACTER(LEN=6) :: YFILETYPE ! data file type ! REAL :: XRM_COVER ! limit of coverage under which the diff --git a/src/SURFEX/pgd_dms.F90 b/src/SURFEX/pgd_dms.F90 index e9f1dd56d..446eff43c 100644 --- a/src/SURFEX/pgd_dms.F90 +++ b/src/SURFEX/pgd_dms.F90 @@ -46,7 +46,7 @@ USE MODD_DMS_SURF_FIELDS_n,ONLY : DMS_SURF_FIELDS_t ! USE MODD_PGD_GRID, ONLY : NL USE MODD_PGDWORK, ONLY : CATYPE -USE MODD_SURF_PAR, ONLY : XUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF ! USE MODI_GET_LUOUT USE MODI_PGD_FIELD @@ -92,7 +92,7 @@ CHARACTER(LEN=20), DIMENSION(1000) :: YDMS_NAME CHARACTER(LEN=3), DIMENSION(1000) :: YDMS_AREA CHARACTER(LEN=3), DIMENSION(1000) :: CDMS_ATYPE ! avg type for dummy pgd fields ! ! 'ARI' , 'INV' -CHARACTER(LEN=28), DIMENSION(1000) :: CDMS_FILE ! data files +CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(1000) :: CDMS_FILE ! data files CHARACTER(LEN=6), DIMENSION(1000) :: CDMS_FILETYPE ! type of these files REAL, DIMENSION(:), ALLOCATABLE :: ZDMS_FIELD, ZDMS_FIELDS INTEGER, DIMENSION(:), ALLOCATABLE :: IMASK diff --git a/src/SURFEX/pgd_dummy.F90 b/src/SURFEX/pgd_dummy.F90 index 8dfed9970..5862a4b26 100644 --- a/src/SURFEX/pgd_dummy.F90 +++ b/src/SURFEX/pgd_dummy.F90 @@ -49,7 +49,7 @@ USE MODD_SSO_n, ONLY : SSO_t ! USE MODD_PGD_GRID, ONLY : NL USE MODD_PGDWORK, ONLY : CATYPE -USE MODD_SURF_PAR, ONLY : XUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF ! USE MODI_GET_LUOUT USE MODI_PGD_FIELD @@ -88,8 +88,8 @@ INTEGER :: IDUMMY_NBR CHARACTER(LEN=3), DIMENSION(1000) :: YDUMMY_AREA CHARACTER(LEN=3), DIMENSION(1000) :: CDUMMY_ATYPE ! avg type for dummy pgd fields ! ! 'ARI' , 'INV' - CHARACTER(LEN=28), DIMENSION(1000) :: CDUMMY_FILE ! data files - CHARACTER(LEN=6), DIMENSION(1000) :: CDUMMY_FILETYPE ! type of these files + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(1000) :: CDUMMY_FILE ! data files + CHARACTER(LEN=6), DIMENSION(1000) :: CDUMMY_FILETYPE ! type of these files REAL(KIND=JPRB) :: ZHOOK_HANDLE ! !------------------------------------------------------------------------------- diff --git a/src/SURFEX/pgd_ecoclimap2_data.F90 b/src/SURFEX/pgd_ecoclimap2_data.F90 index 9980f694e..c3aea33c5 100644 --- a/src/SURFEX/pgd_ecoclimap2_data.F90 +++ b/src/SURFEX/pgd_ecoclimap2_data.F90 @@ -42,7 +42,7 @@ !* 0. DECLARATION ! ----------- ! -USE MODD_SURF_PAR, ONLY : XUNDEF, NUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF, NUNDEF ! USE MODD_DATA_COVER, ONLY : TDATA_SEED, TDATA_REAP, XDATA_WATSUP, XDATA_IRRIGTYPE,& LDATA_IRRIG, XDATA_VEGTYPE, LCLIM_LAI @@ -97,7 +97,7 @@ INTEGER, DIMENSION(:), ALLOCATABLE :: IVALUE ! value of a record of data poi !* 0.3 Declaration of namelists ! ------------------------ ! - CHARACTER(LEN=28) :: YIRRIG ! file name for irrigation + CHARACTER(LEN=NFILENAMELGTMAX) :: YIRRIG ! file name for irrigation REAL(KIND=JPRB) :: ZHOOK_HANDLE ! NAMELIST/NAM_ECOCLIMAP2/ YIRRIG, LCLIM_LAI @@ -113,7 +113,7 @@ NAMELIST/NAM_ECOCLIMAP2/ YIRRIG, LCLIM_LAI !* Initializations ! IF (LHOOK) CALL DR_HOOK('PGD_ECOCLIMAP2_DATA',0,ZHOOK_HANDLE) -YIRRIG = ' ' +YIRRIG = '' LCLIM_LAI = .TRUE. KYEAR = NUNDEF ! @@ -167,7 +167,7 @@ DO JCOVER=301,JPCOVER (IVALUE(2).EQ.0 .OR. IVALUE(3).EQ.0 .OR. IVALUE(4).EQ.0 .OR. & IVALUE(5).EQ.0 .OR. IVALUE(6).EQ.0 .OR. IVALUE(7).EQ.0)) THEN WRITE(ILUOUT,*)'**************************************************' - WRITE(ILUOUT,*)'* error, missing data in ',YIRRIG,' for *' + WRITE(ILUOUT,*)'* error, missing data in ',TRIM(YIRRIG),' for *' WRITE(ILUOUT,*)'* the class ',JCOVER,'. *' WRITE(ILUOUT,*)'**************************************************' IERR=1 @@ -176,7 +176,7 @@ DO JCOVER=301,JPCOVER (IVALUE(2).NE.0 .OR. IVALUE(3).NE.0 .OR. IVALUE(4).NE.0 .OR. & IVALUE(5).NE.0 .OR. IVALUE(6).NE.0 .OR. IVALUE(7).NE.0)) THEN WRITE(ILUOUT,*)'**************************************************' - WRITE(ILUOUT,*)'* error, too many data in ',YIRRIG,' for *' + WRITE(ILUOUT,*)'* error, too many data in ',TRIM(YIRRIG),' for *' WRITE(ILUOUT,*)'* the class ',JCOVER,'. *' WRITE(ILUOUT,*)'**************************************************' IERR=1 diff --git a/src/SURFEX/pgd_field.F90 b/src/SURFEX/pgd_field.F90 index 71f34488e..d98843f01 100644 --- a/src/SURFEX/pgd_field.F90 +++ b/src/SURFEX/pgd_field.F90 @@ -14,6 +14,7 @@ INTERFACE PGD_FIELD USE MODD_DATA_COVER_n, ONLY : DATA_COVER_t USE MODD_SURF_ATM_GRID_n, ONLY : SURF_ATM_GRID_t USE MODD_SURF_ATM_n, ONLY : SURF_ATM_t +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX USE MODD_SSO_n, ONLY : SSO_t ! IMPLICIT NONE @@ -35,7 +36,7 @@ TYPE(SSO_t), INTENT(INOUT) :: USS ! ! 'TWN' : on town ! ! 'SEA' : on sea ! ! 'WAT' : on inland waters - CHARACTER(LEN=28), INTENT(IN) :: HFILE ! data file name + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILE ! data file name CHARACTER(LEN=6), INTENT(INOUT) :: HFILETYPE ! data file type REAL, INTENT(IN) :: PUNIF ! prescribed uniform value for field REAL, DIMENSION(:),INTENT(OUT):: PFIELD ! physiographic field @@ -54,6 +55,7 @@ END SUBROUTINE PGD_FIELD_1D USE MODD_DATA_COVER_n, ONLY : DATA_COVER_t USE MODD_SURF_ATM_GRID_n, ONLY : SURF_ATM_GRID_t USE MODD_SURF_ATM_n, ONLY : SURF_ATM_t +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX USE MODD_SSO_n, ONLY : SSO_t ! IMPLICIT NONE @@ -75,7 +77,7 @@ TYPE(SSO_t), INTENT(INOUT) :: USS ! ! 'TWN' : on town ! ! 'SEA' : on sea ! ! 'WAT' : on inland waters - CHARACTER(LEN=28), INTENT(IN) :: HFILE ! data file name + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILE ! data file name CHARACTER(LEN=6), INTENT(INOUT) :: HFILETYPE ! data file type REAL, INTENT(IN) :: PUNIF ! prescribed uniform value for field REAL, DIMENSION(:,:),INTENT(OUT):: PFIELD ! physiographic field @@ -99,6 +101,7 @@ END MODULE MODI_PGD_FIELD USE MODD_DATA_COVER_n, ONLY : DATA_COVER_t USE MODD_SURF_ATM_GRID_n, ONLY : SURF_ATM_GRID_t USE MODD_SURF_ATM_n, ONLY : SURF_ATM_t +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX USE MODD_SSO_n, ONLY : SSO_t ! USE MODI_PGD_FIELDIN @@ -122,7 +125,7 @@ TYPE(SSO_t), INTENT(INOUT) :: USS ! ! 'TWN' : on town ! ! 'SEA' : on sea ! ! 'WAT' : on inland waters - CHARACTER(LEN=28), INTENT(IN) :: HFILE ! data file name + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILE ! data file name CHARACTER(LEN=6), INTENT(INOUT) :: HFILETYPE ! data file type REAL, INTENT(IN) :: PUNIF ! prescribed uniform value for field REAL, DIMENSION(:),INTENT(OUT):: PFIELD ! physiographic field @@ -160,6 +163,7 @@ END SUBROUTINE PGD_FIELD_1D USE MODD_DATA_COVER_n, ONLY : DATA_COVER_t USE MODD_SURF_ATM_GRID_n, ONLY : SURF_ATM_GRID_t USE MODD_SURF_ATM_n, ONLY : SURF_ATM_t +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX USE MODD_SSO_n, ONLY : SSO_t ! USE MODI_PGD_FIELDIN @@ -183,7 +187,7 @@ TYPE(SSO_t), INTENT(INOUT) :: USS ! ! 'TWN' : on town ! ! 'SEA' : on sea ! ! 'WAT' : on inland waters - CHARACTER(LEN=28), INTENT(IN) :: HFILE ! data file name + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILE ! data file name CHARACTER(LEN=6), INTENT(INOUT) :: HFILETYPE ! data file type REAL, INTENT(IN) :: PUNIF ! prescribed uniform value for field REAL, DIMENSION(:,:),INTENT(OUT):: PFIELD ! physiographic field diff --git a/src/SURFEX/pgd_fieldin.F90 b/src/SURFEX/pgd_fieldin.F90 index 35852a943..05f440ad9 100644 --- a/src/SURFEX/pgd_fieldin.F90 +++ b/src/SURFEX/pgd_fieldin.F90 @@ -56,7 +56,7 @@ USE MODD_SSO_n, ONLY : SSO_t ! USE MODD_PGDWORK, ONLY : XALL, NSIZE_ALL, CATYPE, NSIZE, XSUMVAL, & NVALNBR, NVALCOUNT, XVALLIST, JPVALMAX -USE MODD_SURF_PAR, ONLY : XUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF USE MODD_PGD_GRID, ONLY : NL ! USE MODD_DATA_COVER_PAR, ONLY : NTYPE, LVEG_PRES, NVEGTYPE_OLD @@ -96,7 +96,7 @@ TYPE(SSO_t), INTENT(INOUT) :: USS ! ! 'TWN' : on town ! ! 'SEA' : on sea ! ! 'WAT' : on inland waters - CHARACTER(LEN=28), INTENT(IN) :: HFILE ! data file name + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILE ! data file name CHARACTER(LEN=6), INTENT(INOUT) :: HFILETYPE ! data file type REAL, INTENT(IN) :: PUNIF ! prescribed uniform value for field REAL, DIMENSION(:,:),INTENT(OUT):: PFIELD ! physiographic field diff --git a/src/SURFEX/pgd_flake.F90 b/src/SURFEX/pgd_flake.F90 index e9843752d..bee7b76ec 100644 --- a/src/SURFEX/pgd_flake.F90 +++ b/src/SURFEX/pgd_flake.F90 @@ -52,7 +52,7 @@ USE MODD_SSO_n, ONLY : SSO_t ! USE MODD_DATA_LAKE, ONLY : CLAKELDB, CSTATUSLDB USE MODD_DATA_COVER_PAR, ONLY : JPCOVER -USE MODD_SURF_PAR, ONLY : XUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF ! USE MODD_PGDWORK, ONLY : CATYPE ! @@ -109,12 +109,12 @@ INTEGER,DIMENSION(:),ALLOCATABLE :: IWATER_STATUS !* 0.3 Declaration of namelists ! ------------------------ ! - CHARACTER(LEN=28) :: YWATER_DEPTH ! file name for water depth - CHARACTER(LEN=28) :: YWATER_DEPTH_STATUS ! file name for water depth status - CHARACTER(LEN=28) :: YWATER_FETCH - CHARACTER(LEN=28) :: YT_BS - CHARACTER(LEN=28) :: YDEPTH_BS - CHARACTER(LEN=28) :: YEXTCOEF_WATER + CHARACTER(LEN=NFILENAMELGTMAX) :: YWATER_DEPTH ! file name for water depth + CHARACTER(LEN=NFILENAMELGTMAX) :: YWATER_DEPTH_STATUS ! file name for water depth status + CHARACTER(LEN=NFILENAMELGTMAX) :: YWATER_FETCH + CHARACTER(LEN=NFILENAMELGTMAX) :: YT_BS + CHARACTER(LEN=NFILENAMELGTMAX) :: YDEPTH_BS + CHARACTER(LEN=NFILENAMELGTMAX) :: YEXTCOEF_WATER CHARACTER(LEN=6) :: YWATER_DEPTHFILETYPE ! water depth file type CHARACTER(LEN=6) :: YWATER_FETCHFILETYPE @@ -152,12 +152,12 @@ XUNIF_T_BS = 286. XUNIF_DEPTH_BS = 1. XUNIF_EXTCOEF_WATER= 3. ! -YWATER_DEPTH = ' ' -YWATER_DEPTH_STATUS = ' ' -YWATER_FETCH = ' ' -YT_BS = ' ' -YDEPTH_BS = ' ' -YEXTCOEF_WATER = ' ' +YWATER_DEPTH = '' +YWATER_DEPTH_STATUS = '' +YWATER_FETCH = '' +YT_BS = '' +YDEPTH_BS = '' +YEXTCOEF_WATER = '' ! YWATER_DEPTHFILETYPE = ' ' YWATER_FETCHFILETYPE = ' ' diff --git a/src/SURFEX/pgd_frac.F90 b/src/SURFEX/pgd_frac.F90 index 78c5d5cf7..5cfb5ab0a 100644 --- a/src/SURFEX/pgd_frac.F90 +++ b/src/SURFEX/pgd_frac.F90 @@ -48,7 +48,7 @@ USE MODD_SURF_ATM_GRID_n, ONLY : SURF_ATM_GRID_t USE MODD_SURF_ATM_n, ONLY : SURF_ATM_t USE MODD_SSO_n, ONLY : SSO_t ! -USE MODD_SURF_PAR, ONLY : XUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF USE MODD_PGD_GRID, ONLY : NL, CGRID USE MODD_DATA_COVER_PAR, ONLY : JPCOVER, NCOVER, NTYPE ! @@ -104,10 +104,10 @@ REAL :: XUNIF_TOWN ! value of town fraction ! ! name of files containing data ! - CHARACTER(LEN=28) :: CFNAM_SEA ! name of sea file - CHARACTER(LEN=28) :: CFNAM_WATER ! name of water file - CHARACTER(LEN=28) :: CFNAM_NATURE ! name of nature file - CHARACTER(LEN=28) :: CFNAM_TOWN ! name of town file + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_SEA ! name of sea file + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_WATER ! name of water file + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_NATURE ! name of nature file + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_TOWN ! name of town file ! ! type of files containing data ! @@ -140,10 +140,10 @@ XUNIF_NATURE = XUNDEF XUNIF_TOWN = XUNDEF LECOCLIMAP = .TRUE. LECOSG = .FALSE. -CFNAM_SEA (:)= ' ' -CFNAM_WATER (:)= ' ' -CFNAM_NATURE(:)= ' ' -CFNAM_TOWN (:)= ' ' +CFNAM_SEA (:)= '' +CFNAM_WATER (:)= '' +CFNAM_NATURE(:)= '' +CFNAM_TOWN (:)= '' CFTYP_SEA (:)= ' ' CFTYP_WATER (:)= ' ' CFTYP_NATURE(:)= ' ' diff --git a/src/SURFEX/pgd_grid.F90 b/src/SURFEX/pgd_grid.F90 index 9c17d153a..91384af0a 100644 --- a/src/SURFEX/pgd_grid.F90 +++ b/src/SURFEX/pgd_grid.F90 @@ -52,6 +52,7 @@ USE MODD_SURFEX_MPI, ONLY : NSIZE, NPIO, NRANK, NCOMM, NPROC USE MODD_PGD_GRID, ONLY : NL, XGRID_PAR, NGRID_PAR, XMESHLENGTH USE MODN_PGD_GRID USE MODD_CSTS, ONLY : XPI, XRADIUS +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX ! USE MODI_DEFAULT_GRID USE MODI_GRID_FROM_FILE @@ -93,7 +94,7 @@ TYPE(SURF_ATM_t), INTENT(INOUT) :: U TYPE(GRID_CONF_PROJ_t),INTENT(INOUT) :: GCP ! CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling the surface - CHARACTER(LEN=28), INTENT(IN) :: HFILE ! atmospheric file name + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILE ! atmospheric file name CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE ! atmospheric file type LOGICAL, INTENT(IN) :: OGRID ! .true. if grid is imposed by atm. model CHARACTER(LEN=1), INTENT(IN), OPTIONAL :: HDIR @@ -241,7 +242,7 @@ IF (LEN_TRIM(YINIFILETYPE)>0 .AND. LEN_TRIM(YINIFILE)>0 ) THEN U%NSIZE_FULL = NL #endif ELSE - CALL ABOR1_SFX('PGD_GRID: FILE TYPE NOT SUPPORTED '//HFILETYPE//' FOR FILE '//HFILE) + CALL ABOR1_SFX('PGD_GRID: FILE TYPE NOT SUPPORTED '//HFILETYPE//' FOR FILE '//TRIM(HFILE)) END IF ! ELSE diff --git a/src/SURFEX/pgd_grid_surf_atm.F90 b/src/SURFEX/pgd_grid_surf_atm.F90 index 72e5906bb..8f266fd0c 100644 --- a/src/SURFEX/pgd_grid_surf_atm.F90 +++ b/src/SURFEX/pgd_grid_surf_atm.F90 @@ -45,7 +45,7 @@ USE MODD_SURF_ATM_GRID_n, ONLY : SURF_ATM_GRID_t USE MODD_SURF_ATM_n, ONLY : SURF_ATM_t USE MODD_GRID_CONF_PROJ_n, ONLY :GRID_CONF_PROJ_t ! -USE MODD_SURF_PAR, ONLY : NVERSION, NBUGFIX +USE MODD_SURF_PAR, ONLY : NVERSION, NBUGFIX, NFILENAMELGTMAX USE MODD_SURF_CONF, ONLY : CPROGNAME USE MODD_PGD_GRID, ONLY : LLATLONMASK, NL, NGRID_PAR ! @@ -67,8 +67,8 @@ TYPE(SURF_ATM_t), INTENT(INOUT) :: U TYPE(GRID_CONF_PROJ_t),INTENT(INOUT) :: GCP ! CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling - CHARACTER(LEN=28), INTENT(IN) :: HFILE ! atmospheric file name - CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE! atmospheric file type + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILE ! atmospheric file name + CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE! atmospheric file type LOGICAL, INTENT(IN) :: OGRID ! .true. if grid is imposed by atm. model CHARACTER(LEN=1), INTENT(IN), OPTIONAL :: HDIR ! diff --git a/src/SURFEX/pgd_isba.F90 b/src/SURFEX/pgd_isba.F90 index 390d1987e..90486beaa 100644 --- a/src/SURFEX/pgd_isba.F90 +++ b/src/SURFEX/pgd_isba.F90 @@ -65,7 +65,7 @@ USE MODD_SSO_n, ONLY : SSO_t USE MODD_SURF_ATM_GRID_n, ONLY : SURF_ATM_GRID_t USE MODD_SURF_ATM_n, ONLY : SURF_ATM_t ! -USE MODD_SURF_PAR, ONLY : XUNDEF, NUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF, NUNDEF USE MODD_PGD_GRID, ONLY : NL USE MODD_PGDWORK, ONLY : CATYPE USE MODD_DATA_COVER_PAR, ONLY : NVEGTYPE, JPCOVER, NVT_TEBD, NVT_BONE, NVT_TRBE, & @@ -176,14 +176,14 @@ CHARACTER(LEN=3) :: YPHOTO ! photosynthesis option LOGICAL :: GTR_ML ! new radiative transfert CHARACTER(LEN=4) :: YALBEDO REAL :: ZRM_PATCH ! threshold to remove little fractions of patches -CHARACTER(LEN=28) :: YSAND ! file name for sand fraction -CHARACTER(LEN=28) :: YCLAY ! file name for clay fraction -CHARACTER(LEN=28) :: YSOC_TOP ! file name for organic carbon top soil -CHARACTER(LEN=28) :: YSOC_SUB ! file name for organic carbon sub soil -CHARACTER(LEN=28) :: YCTI ! file name for topographic index -CHARACTER(LEN=28) :: YRUNOFFB ! file name for runoffb parameter -CHARACTER(LEN=28) :: YWDRAIN ! file name for wdrain parameter -CHARACTER(LEN=28) :: YPERM ! file name for permafrost distribution +CHARACTER(LEN=NFILENAMELGTMAX) :: YSAND ! file name for sand fraction +CHARACTER(LEN=NFILENAMELGTMAX) :: YCLAY ! file name for clay fraction +CHARACTER(LEN=NFILENAMELGTMAX) :: YSOC_TOP ! file name for organic carbon top soil +CHARACTER(LEN=NFILENAMELGTMAX) :: YSOC_SUB ! file name for organic carbon sub soil +CHARACTER(LEN=NFILENAMELGTMAX) :: YCTI ! file name for topographic index +CHARACTER(LEN=NFILENAMELGTMAX) :: YRUNOFFB ! file name for runoffb parameter +CHARACTER(LEN=NFILENAMELGTMAX) :: YWDRAIN ! file name for wdrain parameter +CHARACTER(LEN=NFILENAMELGTMAX) :: YPERM ! file name for permafrost distribution CHARACTER(LEN=6) :: YSANDFILETYPE ! sand data file type CHARACTER(LEN=6) :: YCLAYFILETYPE ! clay data file type CHARACTER(LEN=6) :: YSOCFILETYPE ! organic carbon data file type @@ -205,8 +205,8 @@ LOGICAL :: LIMP_CTI ! Imposed maps of topographic index LOGICAL :: LIMP_PERM ! Imposed maps of permafrost distribution LOGICAL :: GLULCC ! land-use scheme activation key REAL, DIMENSION(150) :: ZSOILGRID ! Soil grid reference for DIF -CHARACTER(LEN=28) :: YPH ! file name for pH -CHARACTER(LEN=28) :: YFERT ! file name for fertilisation rate +CHARACTER(LEN=NFILENAMELGTMAX) :: YPH ! file name for pH +CHARACTER(LEN=NFILENAMELGTMAX) :: YFERT ! file name for fertilisation rate CHARACTER(LEN=6) :: YPHFILETYPE ! pH data file type CHARACTER(LEN=6) :: YFERTFILETYPE ! fertilisation data file type REAL :: XUNIF_PH ! uniform value of pH diff --git a/src/SURFEX/pgd_isba_par.F90 b/src/SURFEX/pgd_isba_par.F90 index f1b3e3f7e..40b4a5c7c 100644 --- a/src/SURFEX/pgd_isba_par.F90 +++ b/src/SURFEX/pgd_isba_par.F90 @@ -65,7 +65,7 @@ USE MODD_DATA_COVER_PAR, ONLY : NVEGTYPE, NVT_IRR, NVT_BOBD, NVT_BOND, NVT_BOGR, NVT_SHRB, NVT_C3W, & !#rustine NVT_C3S, NVT_FLTR, NVT_FLGR, NTYPE !#rustine -USE MODD_SURF_PAR, ONLY : XUNDEF, NUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF, NUNDEF ! USE MODD_AGRI, ONLY : LAGRIP, LIRRIGMODE, LMULTI_SEASON, JPSTAGE, XTHRESHOLD, XTHRESHOLD_DEFAULT, & NVEG_IRR, NVEG_IRR_DEFAULT, NVEG_IRR_USE_DEFAULT, NPATCH_TREE, NIRR_TYPE, & @@ -254,75 +254,75 @@ REAL, DIMENSION(NGROUND_MAX) :: XUNIF_WSAT ! ! name of files containing data ! - CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFNAM_VEGTYPE ! fractions of each vegtypes -! - CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX,NTIME_MAX) :: CFNAM_VEG ! vegetation fraction - CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX,NTIME_MAX) :: CFNAM_LAI ! LAI - CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX,NTIME_MAX) :: CFNAM_Z0 ! roughness length - CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX,NTIME_MAX) :: CFNAM_EMIS ! emissivity -! - CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX,NGROUND_MAX) :: CFNAM_DG ! soil depth - CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX,NGROUND_MAX) :: CFNAM_ROOTFRAC ! root fraction profiles - CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFNAM_GROUND_DEPTH! ground depth - CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFNAM_ROOT_DEPTH ! root depth - CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFNAM_ROOT_EXTINCTION! root extinction parameter - CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFNAM_ROOT_LIN ! root linear parameter - CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFNAM_DICE ! soil ice depth for runoff (m) -! - CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFNAM_RSMIN ! minimal stomatal resistance - CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFNAM_GAMMA ! gamma parameter - CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFNAM_WRMAX_CF ! coefficient for interception - CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFNAM_RGL ! Rgl - CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFNAM_CV ! Cv - CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFNAM_Z0_O_Z0H ! ratio of roughness lengths - CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX,NTIME_MAX) :: CFNAM_ALBNIR_VEG ! albedo of vegetation (near-infra-red) - CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX,NTIME_MAX) :: CFNAM_ALBVIS_VEG ! albedo of vegetation (visible) - CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX,NTIME_MAX) :: CFNAM_ALBUV_VEG ! albedo of vegetation (UV) - CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX,NTIME_MAX) :: CFNAM_ALBNIR_SOIL! albedo of soil (near-infra-red) - CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX,NTIME_MAX) :: CFNAM_ALBVIS_SOIL! albedo of soil (visible) - CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX,NTIME_MAX) :: CFNAM_ALBUV_SOIL ! albedo of soil (UV) - CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFNAM_GMES ! Gmes - CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFNAM_BSLAI ! Biomass over LAI - CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFNAM_LAIMIN ! minimum LAI - CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFNAM_SEFOLD ! e-folding time for senesence - CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFNAM_GC ! cuticular conductance - CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFNAM_DMAX ! Dmax - CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFNAM_F2I ! F2I - CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFNAM_H_TREE ! height of trees - CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFNAM_RE25 ! soil respiration parameter - CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFNAM_CE_NITRO ! CE for nitrogen - CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFNAM_CF_NITRO ! CF for nitrogen - CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFNAM_CNA_NITRO ! CNA for nitrogen -! - CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFNAM_IRRIGTYPE ! irrigation type - CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFNAM_IRRIGFRAC ! fraction of irrigation - CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX,NTIME_MAX) :: CFNAM_WATSUP ! irrigation amount (mm) - CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFNAM_IRRIGFREQ ! minimum time between two irrigation (s) - CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFNAM_IRRIGTIME ! irrigation amount application time (s) - CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX,NTIME_MAX) :: CFNAM_F2THRESHOLD! F2 threshold for irrigation triggering - CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFNAM_SEED_M ! - CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFNAM_SEED_D ! - CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFNAM_REAP_M ! - CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFNAM_REAP_D ! - CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFNAM_SEED_S2_M ! - CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFNAM_SEED_S2_D ! - CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFNAM_REAP_S2_M ! - CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFNAM_REAP_S2_D ! - CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFNAM_SEED_S3_M ! - CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFNAM_SEED_S3_D ! - CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFNAM_REAP_S3_M ! - CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFNAM_REAP_S3_D ! -! -CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX,NTIME_MAX) :: CFNAM_Z0LITTER -CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX,NTIME_MAX) :: CFNAM_GNDLITTER -CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX,NTIME_MAX) :: CFNAM_H_VEG -! -CHARACTER(LEN=28), DIMENSION(NGROUND_MAX) :: CFNAM_CONDSAT -CHARACTER(LEN=28), DIMENSION(NGROUND_MAX) :: CFNAM_MPOTSAT -CHARACTER(LEN=28), DIMENSION(NGROUND_MAX) :: CFNAM_BCOEF -CHARACTER(LEN=28), DIMENSION(NGROUND_MAX) :: CFNAM_WWILT -CHARACTER(LEN=28), DIMENSION(NGROUND_MAX) :: CFNAM_WFC -CHARACTER(LEN=28), DIMENSION(NGROUND_MAX) :: CFNAM_WSAT + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NVEGTYPE_MAX) :: CFNAM_VEGTYPE ! fractions of each vegtypes +! + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NVEGTYPE_MAX,NTIME_MAX) :: CFNAM_VEG ! vegetation fraction + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NVEGTYPE_MAX,NTIME_MAX) :: CFNAM_LAI ! LAI + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NVEGTYPE_MAX,NTIME_MAX) :: CFNAM_Z0 ! roughness length + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NVEGTYPE_MAX,NTIME_MAX) :: CFNAM_EMIS ! emissivity +! + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NVEGTYPE_MAX,NGROUND_MAX) :: CFNAM_DG ! soil depth + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NVEGTYPE_MAX,NGROUND_MAX) :: CFNAM_ROOTFRAC ! root fraction profiles + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NVEGTYPE_MAX) :: CFNAM_GROUND_DEPTH! ground depth + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NVEGTYPE_MAX) :: CFNAM_ROOT_DEPTH ! root depth + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NVEGTYPE_MAX) :: CFNAM_ROOT_EXTINCTION! root extinction parameter + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NVEGTYPE_MAX) :: CFNAM_ROOT_LIN ! root linear parameter + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NVEGTYPE_MAX) :: CFNAM_DICE ! soil ice depth for runoff (m) +! + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NVEGTYPE_MAX) :: CFNAM_RSMIN ! minimal stomatal resistance + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NVEGTYPE_MAX) :: CFNAM_GAMMA ! gamma parameter + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NVEGTYPE_MAX) :: CFNAM_WRMAX_CF ! coefficient for interception + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NVEGTYPE_MAX) :: CFNAM_RGL ! Rgl + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NVEGTYPE_MAX) :: CFNAM_CV ! Cv + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NVEGTYPE_MAX) :: CFNAM_Z0_O_Z0H ! ratio of roughness lengths + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NVEGTYPE_MAX,NTIME_MAX) :: CFNAM_ALBNIR_VEG ! albedo of vegetation (near-infra-red) + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NVEGTYPE_MAX,NTIME_MAX) :: CFNAM_ALBVIS_VEG ! albedo of vegetation (visible) + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NVEGTYPE_MAX,NTIME_MAX) :: CFNAM_ALBUV_VEG ! albedo of vegetation (UV) + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NVEGTYPE_MAX,NTIME_MAX) :: CFNAM_ALBNIR_SOIL! albedo of soil (near-infra-red) + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NVEGTYPE_MAX,NTIME_MAX) :: CFNAM_ALBVIS_SOIL! albedo of soil (visible) + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NVEGTYPE_MAX,NTIME_MAX) :: CFNAM_ALBUV_SOIL ! albedo of soil (UV) + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NVEGTYPE_MAX) :: CFNAM_GMES ! Gmes + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NVEGTYPE_MAX) :: CFNAM_BSLAI ! Biomass over LAI + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NVEGTYPE_MAX) :: CFNAM_LAIMIN ! minimum LAI + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NVEGTYPE_MAX) :: CFNAM_SEFOLD ! e-folding time for senesence + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NVEGTYPE_MAX) :: CFNAM_GC ! cuticular conductance + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NVEGTYPE_MAX) :: CFNAM_DMAX ! Dmax + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NVEGTYPE_MAX) :: CFNAM_F2I ! F2I + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NVEGTYPE_MAX) :: CFNAM_H_TREE ! height of trees + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NVEGTYPE_MAX) :: CFNAM_RE25 ! soil respiration parameter + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NVEGTYPE_MAX) :: CFNAM_CE_NITRO ! CE for nitrogen + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NVEGTYPE_MAX) :: CFNAM_CF_NITRO ! CF for nitrogen + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NVEGTYPE_MAX) :: CFNAM_CNA_NITRO ! CNA for nitrogen +! + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NVEGTYPE_MAX) :: CFNAM_IRRIGTYPE ! irrigation type + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NVEGTYPE_MAX) :: CFNAM_IRRIGFRAC ! fraction of irrigation + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NVEGTYPE_MAX,NTIME_MAX) :: CFNAM_WATSUP ! irrigation amount (mm) + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NVEGTYPE_MAX) :: CFNAM_IRRIGFREQ ! minimum time between two irrigation (s) + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NVEGTYPE_MAX) :: CFNAM_IRRIGTIME ! irrigation amount application time (s) + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NVEGTYPE_MAX,NTIME_MAX) :: CFNAM_F2THRESHOLD! F2 threshold for irrigation triggering + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NVEGTYPE_MAX) :: CFNAM_SEED_M ! + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NVEGTYPE_MAX) :: CFNAM_SEED_D ! + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NVEGTYPE_MAX) :: CFNAM_REAP_M ! + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NVEGTYPE_MAX) :: CFNAM_REAP_D ! + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NVEGTYPE_MAX) :: CFNAM_SEED_S2_M ! + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NVEGTYPE_MAX) :: CFNAM_SEED_S2_D ! + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NVEGTYPE_MAX) :: CFNAM_REAP_S2_M ! + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NVEGTYPE_MAX) :: CFNAM_REAP_S2_D ! + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NVEGTYPE_MAX) :: CFNAM_SEED_S3_M ! + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NVEGTYPE_MAX) :: CFNAM_SEED_S3_D ! + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NVEGTYPE_MAX) :: CFNAM_REAP_S3_M ! + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NVEGTYPE_MAX) :: CFNAM_REAP_S3_D ! +! +CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NVEGTYPE_MAX,NTIME_MAX) :: CFNAM_Z0LITTER +CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NVEGTYPE_MAX,NTIME_MAX) :: CFNAM_GNDLITTER +CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NVEGTYPE_MAX,NTIME_MAX) :: CFNAM_H_VEG +! +CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NGROUND_MAX) :: CFNAM_CONDSAT +CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NGROUND_MAX) :: CFNAM_MPOTSAT +CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NGROUND_MAX) :: CFNAM_BCOEF +CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NGROUND_MAX) :: CFNAM_WWILT +CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NGROUND_MAX) :: CFNAM_WFC +CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NGROUND_MAX) :: CFNAM_WSAT ! ! types of file containing data ! @@ -572,76 +572,76 @@ XUNIF_WWILT = XUNDEF XUNIF_WFC = XUNDEF XUNIF_WSAT = XUNDEF ! -CFNAM_VEGTYPE (:) = ' ' -! -CFNAM_VEG (:,:) = ' ' -CFNAM_LAI (:,:) = ' ' -CFNAM_Z0 (:,:) = ' ' -CFNAM_EMIS (:,:) = ' ' -! -CFNAM_DG (:,:) = ' ' -CFNAM_ROOTFRAC (:,:) = ' ' -CFNAM_DICE (:) = ' ' -! -CFNAM_GROUND_DEPTH (:) = ' ' -CFNAM_ROOT_DEPTH (:) = ' ' -CFNAM_ROOT_EXTINCTION (:) = ' ' -CFNAM_ROOT_LIN (:) = ' ' -! -CFNAM_RSMIN (:) = ' ' -CFNAM_GAMMA (:) = ' ' -CFNAM_WRMAX_CF (:) = ' ' -CFNAM_RGL (:) = ' ' -CFNAM_CV (:) = ' ' -CFNAM_Z0_O_Z0H (:) = ' ' -CFNAM_ALBNIR_VEG (:,:) = ' ' -CFNAM_ALBVIS_VEG (:,:) = ' ' -CFNAM_ALBUV_VEG (:,:) = ' ' -CFNAM_ALBNIR_SOIL (:,:) = ' ' -CFNAM_ALBVIS_SOIL (:,:) = ' ' -CFNAM_ALBUV_SOIL (:,:) = ' ' -CFNAM_GMES (:) = ' ' -CFNAM_BSLAI (:) = ' ' -CFNAM_LAIMIN (:) = ' ' -CFNAM_SEFOLD (:) = ' ' -CFNAM_GC (:) = ' ' -CFNAM_DMAX (:) = ' ' -CFNAM_F2I (:) = ' ' -CFNAM_H_TREE (:) = ' ' -CFNAM_RE25 (:) = ' ' -CFNAM_CE_NITRO (:) = ' ' -CFNAM_CF_NITRO (:) = ' ' -CFNAM_CNA_NITRO (:) = ' ' -! -CFNAM_IRRIGTYPE (:) = ' ' -CFNAM_IRRIGFRAC (:) = ' ' -CFNAM_WATSUP (:,:) = ' ' -CFNAM_IRRIGFREQ (:) = ' ' -CFNAM_IRRIGTIME (:) = ' ' -CFNAM_F2THRESHOLD(:,:) = ' ' -CFNAM_SEED_M (:) = ' ' -CFNAM_SEED_D (:) = ' ' -CFNAM_REAP_M (:) = ' ' -CFNAM_REAP_D (:) = ' ' -CFNAM_SEED_S2_M (:) = ' ' -CFNAM_SEED_S2_D (:) = ' ' -CFNAM_REAP_S2_M (:) = ' ' -CFNAM_REAP_S2_D (:) = ' ' -CFNAM_SEED_S3_M (:) = ' ' -CFNAM_SEED_S3_D (:) = ' ' -CFNAM_REAP_S3_M (:) = ' ' -CFNAM_REAP_S3_D (:) = ' ' -! -CFNAM_Z0LITTER (:,:) = ' ' -CFNAM_GNDLITTER (:,:) = ' ' -CFNAM_H_VEG (:,:) = ' ' -! -CFNAM_CONDSAT (:) = ' ' -CFNAM_MPOTSAT (:) = ' ' -CFNAM_BCOEF (:) = ' ' -CFNAM_WWILT (:) = ' ' -CFNAM_WFC (:) = ' ' -CFNAM_WSAT (:) = ' ' +CFNAM_VEGTYPE (:) = '' +! +CFNAM_VEG (:,:) = '' +CFNAM_LAI (:,:) = '' +CFNAM_Z0 (:,:) = '' +CFNAM_EMIS (:,:) = '' +! +CFNAM_DG (:,:) = '' +CFNAM_ROOTFRAC (:,:) = '' +CFNAM_DICE (:) = '' +! +CFNAM_GROUND_DEPTH (:) = '' +CFNAM_ROOT_DEPTH (:) = '' +CFNAM_ROOT_EXTINCTION (:) = '' +CFNAM_ROOT_LIN (:) = '' +! +CFNAM_RSMIN (:) = '' +CFNAM_GAMMA (:) = '' +CFNAM_WRMAX_CF (:) = '' +CFNAM_RGL (:) = '' +CFNAM_CV (:) = '' +CFNAM_Z0_O_Z0H (:) = '' +CFNAM_ALBNIR_VEG (:,:) = '' +CFNAM_ALBVIS_VEG (:,:) = '' +CFNAM_ALBUV_VEG (:,:) = '' +CFNAM_ALBNIR_SOIL (:,:) = '' +CFNAM_ALBVIS_SOIL (:,:) = '' +CFNAM_ALBUV_SOIL (:,:) = '' +CFNAM_GMES (:) = '' +CFNAM_BSLAI (:) = '' +CFNAM_LAIMIN (:) = '' +CFNAM_SEFOLD (:) = '' +CFNAM_GC (:) = '' +CFNAM_DMAX (:) = '' +CFNAM_F2I (:) = '' +CFNAM_H_TREE (:) = '' +CFNAM_RE25 (:) = '' +CFNAM_CE_NITRO (:) = '' +CFNAM_CF_NITRO (:) = '' +CFNAM_CNA_NITRO (:) = '' +! +CFNAM_IRRIGTYPE (:) = '' +CFNAM_IRRIGFRAC (:) = '' +CFNAM_WATSUP (:,:) = '' +CFNAM_IRRIGFREQ (:) = '' +CFNAM_IRRIGTIME (:) = '' +CFNAM_F2THRESHOLD(:,:) = '' +CFNAM_SEED_M (:) = '' +CFNAM_SEED_D (:) = '' +CFNAM_REAP_M (:) = '' +CFNAM_REAP_D (:) = '' +CFNAM_SEED_S2_M (:) = '' +CFNAM_SEED_S2_D (:) = '' +CFNAM_REAP_S2_M (:) = '' +CFNAM_REAP_S2_D (:) = '' +CFNAM_SEED_S3_M (:) = '' +CFNAM_SEED_S3_D (:) = '' +CFNAM_REAP_S3_M (:) = '' +CFNAM_REAP_S3_D (:) = '' +! +CFNAM_Z0LITTER (:,:) = '' +CFNAM_GNDLITTER (:,:) = '' +CFNAM_H_VEG (:,:) = '' +! +CFNAM_CONDSAT (:) = '' +CFNAM_MPOTSAT (:) = '' +CFNAM_BCOEF (:) = '' +CFNAM_WWILT (:) = '' +CFNAM_WFC (:) = '' +CFNAM_WSAT (:) = '' ! CFTYP_VEGTYPE (:) = ' ' ! diff --git a/src/SURFEX/pgd_megan.F90 b/src/SURFEX/pgd_megan.F90 index f8b715a7c..6bacba653 100644 --- a/src/SURFEX/pgd_megan.F90 +++ b/src/SURFEX/pgd_megan.F90 @@ -49,7 +49,7 @@ USE MODD_MEGAN_SURF_FIELDS_n,ONLY : MEGAN_SURF_FIELDS_t ! USE MODD_PGD_GRID, ONLY : NL USE MODD_PGDWORK, ONLY : CATYPE -USE MODD_SURF_PAR, ONLY : XUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF ! USE MODI_GET_LUOUT USE MODI_PGD_FIELD @@ -95,7 +95,7 @@ CHARACTER(LEN=20), DIMENSION(1000) :: YMEGAN_NAME CHARACTER(LEN=3), DIMENSION(1000) :: YMEGAN_AREA CHARACTER(LEN=3), DIMENSION(1000) :: CMEGAN_ATYPE ! avg type for dummy pgd fields ! ! 'ARI' , 'INV' -CHARACTER(LEN=28), DIMENSION(1000) :: CMEGAN_FILE ! data files +CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(1000) :: CMEGAN_FILE ! data files CHARACTER(LEN=6), DIMENSION(1000) :: CMEGAN_FILETYPE ! type of these files REAL, DIMENSION(:), ALLOCATABLE :: ZMEGAN_FIELD, ZMEGAN_FIELDS INTEGER, DIMENSION(:), ALLOCATABLE :: IMASK diff --git a/src/SURFEX/pgd_orography.F90 b/src/SURFEX/pgd_orography.F90 index 21eb1b6a8..0161ca1e5 100644 --- a/src/SURFEX/pgd_orography.F90 +++ b/src/SURFEX/pgd_orography.F90 @@ -54,7 +54,7 @@ USE MODD_PGD_GRID, ONLY : NL, CGRID, XGRID_PAR USE MODD_PGDWORK, ONLY : XALL, NSIZE_ALL, XSSQO, LSSQO, NSSO, & XEXT_ALL, XSUMVAL, NSIZE, LORORAD, & XRFSSO, XHALORADIUS, NFSSOMAX -USE MODD_SURF_PAR, ONLY : XUNDEF, NUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF, NUNDEF USE MODD_CSTS, ONLY : XPI ! USE MODI_GET_LUOUT @@ -105,7 +105,7 @@ TYPE(SURF_ATM_t), INTENT(INOUT) :: U TYPE(SSO_t), INTENT(INOUT) :: USS ! CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling - CHARACTER(LEN=28), INTENT(IN) :: HFILE ! atmospheric file name + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILE ! atmospheric file name CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE! atmospheric file type LOGICAL, INTENT(IN) :: OZS ! .true. if orography is imposed by atm. model ! @@ -136,10 +136,10 @@ INTEGER :: IZS ! size of orographic array in atmospheri !* 0.3 Declaration of namelists ! ------------------------ ! - CHARACTER(LEN=28) :: YZS ! file name for orography - CHARACTER(LEN=6) :: YFILETYPE ! data file type -CHARACTER(LEN=28) :: YSLOPE ! file name for slope and aspect -CHARACTER(LEN=6) :: YSLOPEFILETYPE ! data file type + CHARACTER(LEN=NFILENAMELGTMAX) :: YZS ! file name for orography + CHARACTER(LEN=6) :: YFILETYPE ! data file type +CHARACTER(LEN=NFILENAMELGTMAX) :: YSLOPE ! file name for slope and aspect +CHARACTER(LEN=6) :: YSLOPEFILETYPE ! data file type REAL :: ZUNIF_ZS ! uniform orography CHARACTER(LEN=3) :: YOROGTYPE ! orogpraphy type ! ! 'AVG' : average orography @@ -365,7 +365,7 @@ ELSEIF(GIMP_ZS)THEN !GIMP_ZS (impose topo from input file at the same resolution ! CALL ABOR1_SFX('Use another format than netcdf for topo input file with GIMP_ZS') CALL READ_PGD_NETCDF(UG, U, USS, & - HPROGRAM,'SURF ',' ',YZS,'ZS ',U%XZS) + HPROGRAM,'SURF ',' ',TRIM(YZS),'ZS ',U%XZS) USS%XSIL_ZS(:) = U%XZS(:) USS%XAVG_ZS(:) = U%XZS(:) diff --git a/src/SURFEX/pgd_seaflux.F90 b/src/SURFEX/pgd_seaflux.F90 index 50ba2923b..8c9473fcc 100644 --- a/src/SURFEX/pgd_seaflux.F90 +++ b/src/SURFEX/pgd_seaflux.F90 @@ -54,6 +54,7 @@ USE MODD_SSO_n, ONLY : SSO_t ! USE MODD_PGD_GRID, ONLY : NL USE MODD_DATA_COVER_PAR, ONLY : JPCOVER +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX ! USE MODI_READ_NAM_PGD_SEABATHY USE MODI_PGD_BATHYFIELD @@ -100,9 +101,9 @@ INTEGER :: ILUOUT !* 0.3 Declaration of namelists ! ------------------------ ! - CHARACTER(LEN=28) :: YSEABATHY ! file name for bathymetrie - CHARACTER(LEN=6) :: YSEABATHYFILETYPE ! bathymetry data file type - CHARACTER(LEN=28) :: YNCVARNAME ! variable to read in netcdf + CHARACTER(LEN=NFILENAMELGTMAX) :: YSEABATHY ! file name for bathymetrie + CHARACTER(LEN=6) :: YSEABATHYFILETYPE ! bathymetry data file type + CHARACTER(LEN=28) :: YNCVARNAME ! variable to read in netcdf ! file REAL :: XUNIF_SEABATHY ! uniform value of bathymetry REAL(KIND=JPRB) :: ZHOOK_HANDLE diff --git a/src/SURFEX/pgd_seaflux_par.F90 b/src/SURFEX/pgd_seaflux_par.F90 index e009b61fd..9aad369e8 100644 --- a/src/SURFEX/pgd_seaflux_par.F90 +++ b/src/SURFEX/pgd_seaflux_par.F90 @@ -48,7 +48,7 @@ USE MODD_SURF_ATM_GRID_n, ONLY : SURF_ATM_GRID_t USE MODD_SURF_ATM_n, ONLY : SURF_ATM_t USE MODD_SSO_n, ONLY : SSO_t ! -USE MODD_SURF_PAR, ONLY : XUNDEF, NUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF, NUNDEF ! USE MODD_PGDWORK, ONLY : CATYPE ! @@ -108,8 +108,8 @@ LOGICAL :: LSST_DATA ! ! name of files containing data ! - CHARACTER(LEN=28), DIMENSION(NTIME_MAX) :: CFNAM_SST ! sea surface temperature - CHARACTER(LEN=6), DIMENSION(NTIME_MAX) :: CFTYP_SST ! sea surface temperature + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NTIME_MAX) :: CFNAM_SST ! sea surface temperature + CHARACTER(LEN=6), DIMENSION(NTIME_MAX) :: CFTYP_SST ! sea surface temperature REAL(KIND=JPRB) :: ZHOOK_HANDLE ! NAMELIST/NAM_DATA_SEAFLUX/NTIME_SST, LSST_DATA, XUNIF_SST, CFNAM_SST, CFTYP_SST, & @@ -123,7 +123,7 @@ IF (LHOOK) CALL DR_HOOK('PGD_SEAFLUX_PAR',0,ZHOOK_HANDLE) NTIME_SST = 12 XUNIF_SST (:) = XUNDEF ! sea surface temperature ! -CFNAM_SST (:) = ' ' +CFNAM_SST (:) = '' ! CFTYP_SST (:) = ' ' ! diff --git a/src/SURFEX/pgd_snap_temp_profile.F90 b/src/SURFEX/pgd_snap_temp_profile.F90 index 37c63b916..e5339b755 100644 --- a/src/SURFEX/pgd_snap_temp_profile.F90 +++ b/src/SURFEX/pgd_snap_temp_profile.F90 @@ -35,7 +35,7 @@ USE MODI_GET_LUOUT USE MODI_TEST_NAM_VAR_SURF ! ! -USE MODD_SURF_PAR, ONLY : XUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF USE YOMHOOK ,ONLY : LHOOK, DR_HOOK USE PARKIND1 ,ONLY : JPRB IMPLICIT NONE @@ -44,7 +44,7 @@ IMPLICIT NONE ! ------------------------ ! CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! Type of program - CHARACTER(LEN=28), INTENT(IN) :: HFILENAME ! Name of the field file. + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILENAME ! Name of the field file. REAL, DIMENSION(:,:), INTENT(OUT):: PSNAP_COEF ! Snap coefficient INTEGER, INTENT(IN) :: KTPS ! Number of time step INTEGER, INTENT(IN) :: KSNAP ! Number of snaps diff --git a/src/SURFEX/pgd_surf_atm.F90 b/src/SURFEX/pgd_surf_atm.F90 index 9c35c67ef..2d09c380b 100644 --- a/src/SURFEX/pgd_surf_atm.F90 +++ b/src/SURFEX/pgd_surf_atm.F90 @@ -48,6 +48,7 @@ USE MODD_SURFEX_n, ONLY : SURFEX_t USE MODD_SURFEX_MPI, ONLY : NRANK, NPIO, NSIZE, NINDEX, NNUM USE MODD_SURF_CONF, ONLY : CPROGNAME USE MODD_PGD_GRID, ONLY : NL, LLATLONMASK, NGRID_PAR +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX ! USE MODI_GET_SIZE_FULL_n USE MODI_GET_LUOUT @@ -90,7 +91,7 @@ IMPLICIT NONE TYPE(SURFEX_t), INTENT(INOUT) :: YSC ! CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling -CHARACTER(LEN=28), INTENT(IN) :: HFILE ! atmospheric file name +CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILE ! atmospheric file name CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE! atmospheric file type LOGICAL, INTENT(IN) :: OZS ! .true. if orography is imposed by atm. model ! diff --git a/src/SURFEX/pgd_teb_garden_par.F90 b/src/SURFEX/pgd_teb_garden_par.F90 index 9db42ed77..97b5ee8b0 100644 --- a/src/SURFEX/pgd_teb_garden_par.F90 +++ b/src/SURFEX/pgd_teb_garden_par.F90 @@ -48,7 +48,7 @@ USE MODD_SSO_n, ONLY : SSO_t USE MODD_TEB_OPTION_n, ONLY : TEB_OPTIONS_t USE MODD_ISBA_OPTIONS_n, ONLY : ISBA_OPTIONS_t USE MODD_DATA_ISBA_n, ONLY : DATA_ISBA_t -USE MODD_SURF_PAR, ONLY : XUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF USE MODD_PGDWORK, ONLY : CATYPE ! USE MODI_TEST_NAM_VAR_SURF @@ -118,12 +118,12 @@ REAL :: XUNIF_RE25 ! Ecosystem Respi ! ! name of files containing data ! - CHARACTER(LEN=28),DIMENSION(NTIME_MAX) :: CFNAM_LAI_HVEG ! LAI of high vegetation - CHARACTER(LEN=28),DIMENSION(NTIME_MAX) :: CFNAM_LAI_LVEG ! LAI of low vegetation - CHARACTER(LEN=28) :: CFNAM_H_HVEG ! height of trees - CHARACTER(LEN=28) :: CFNAM_HTRUNK_HVEG ! height of TRUNK of trees - CHARACTER(LEN=28) :: CFNAM_WCROWN_HVEG ! width of crown of trees - CHARACTER(LEN=28) :: CFNAM_RE25 ! Ecosystem Respiration parameter (kg.m-2.s-1) + CHARACTER(LEN=NFILENAMELGTMAX),DIMENSION(NTIME_MAX) :: CFNAM_LAI_HVEG ! LAI of high vegetation + CHARACTER(LEN=NFILENAMELGTMAX),DIMENSION(NTIME_MAX) :: CFNAM_LAI_LVEG ! LAI of low vegetation + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_H_HVEG ! height of trees + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_HTRUNK_HVEG ! height of TRUNK of trees + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_WCROWN_HVEG ! width of crown of trees + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_RE25 ! Ecosystem Respiration parameter (kg.m-2.s-1) ! ! type of files containing data @@ -181,12 +181,12 @@ XUNIF_HTRUNK_HVEG = XUNDEF XUNIF_WCROWN_HVEG = XUNDEF XUNIF_RE25 = XUNDEF ! -CFNAM_LAI_HVEG = ' ' -CFNAM_LAI_LVEG = ' ' -CFNAM_H_HVEG = ' ' -CFNAM_HTRUNK_HVEG = ' ' -CFNAM_WCROWN_HVEG = ' ' -CFNAM_RE25 = ' ' +CFNAM_LAI_HVEG = '' +CFNAM_LAI_LVEG = '' +CFNAM_H_HVEG = '' +CFNAM_HTRUNK_HVEG = '' +CFNAM_WCROWN_HVEG = '' +CFNAM_RE25 = '' ! CFTYP_LAI_HVEG = ' ' CFTYP_LAI_LVEG = ' ' diff --git a/src/SURFEX/pgd_teb_greenroof_par.F90 b/src/SURFEX/pgd_teb_greenroof_par.F90 index 89b3f2a05..107e01778 100644 --- a/src/SURFEX/pgd_teb_greenroof_par.F90 +++ b/src/SURFEX/pgd_teb_greenroof_par.F90 @@ -49,7 +49,7 @@ USE MODD_SURF_ATM_n, ONLY : SURF_ATM_t USE MODD_SSO_n, ONLY : SSO_t USE MODD_ISBA_OPTIONS_n, ONLY : ISBA_OPTIONS_t USE MODD_ISBA_n, ONLY : ISBA_S_t, ISBA_K_t -USE MODD_SURF_PAR, ONLY : XUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF USE MODD_PGDWORK, ONLY : CATYPE ! USE MODI_READ_NAM_PGD_TEB_GREENROOF @@ -114,10 +114,10 @@ REAL,DIMENSION(NTIME_GR_MAX) :: ZUNIF_LAI_GR ! LAI of green ro ! ! name of files containing data ! - CHARACTER(LEN=28),DIMENSION(NLAYER_GR_MAX) :: YFNAM_OM_GR ! fraction of organic matter (OM) in green roof layer - CHARACTER(LEN=28),DIMENSION(NLAYER_GR_MAX) :: YFNAM_CLAY_GR ! fraction of clay for the non-OM part of the green roof layer - CHARACTER(LEN=28),DIMENSION(NLAYER_GR_MAX) :: YFNAM_SAND_GR ! fraction of sand for the non-OM part of the green roof layer - CHARACTER(LEN=28),DIMENSION(NTIME_GR_MAX) :: YFNAM_LAI_GR ! LAI of green roof + CHARACTER(LEN=NFILENAMELGTMAX),DIMENSION(NLAYER_GR_MAX) :: YFNAM_OM_GR ! fraction of organic matter (OM) in green roof layer + CHARACTER(LEN=NFILENAMELGTMAX),DIMENSION(NLAYER_GR_MAX) :: YFNAM_CLAY_GR ! fraction of clay for the non-OM part of the green roof layer + CHARACTER(LEN=NFILENAMELGTMAX),DIMENSION(NLAYER_GR_MAX) :: YFNAM_SAND_GR ! fraction of sand for the non-OM part of the green roof layer + CHARACTER(LEN=NFILENAMELGTMAX),DIMENSION(NTIME_GR_MAX) :: YFNAM_LAI_GR ! LAI of green roof ! ! type of files containing data ! @@ -147,10 +147,10 @@ ZUNIF_CLAY_GR = XUNDEF ZUNIF_SAND_GR = XUNDEF ZUNIF_LAI_GR = XUNDEF ! -YFNAM_OM_GR = ' ' -YFNAM_CLAY_GR = ' ' -YFNAM_SAND_GR = ' ' -YFNAM_LAI_GR = ' ' +YFNAM_OM_GR = '' +YFNAM_CLAY_GR = '' +YFNAM_SAND_GR = '' +YFNAM_LAI_GR = '' ! YFTYP_OM_GR = ' ' YFTYP_CLAY_GR = ' ' diff --git a/src/SURFEX/pgd_teb_hydro_par.F90 b/src/SURFEX/pgd_teb_hydro_par.F90 index 58a91d693..43e165f23 100644 --- a/src/SURFEX/pgd_teb_hydro_par.F90 +++ b/src/SURFEX/pgd_teb_hydro_par.F90 @@ -46,7 +46,7 @@ USE MODD_SURF_ATM_GRID_n, ONLY : SURF_ATM_GRID_t USE MODD_SURF_ATM_n, ONLY : SURF_ATM_t USE MODD_SSO_n, ONLY : SSO_t USE MODD_DATA_TEB_HYDRO_n, ONLY : DATA_TEB_HYDRO_t -USE MODD_SURF_PAR, ONLY : XUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF ! USE MODI_GET_LUOUT USE MODI_OPEN_NAMELIST @@ -102,15 +102,15 @@ REAL :: XUNIF_URBDRAIN ! Limitation ! ! name of files containing data ! -CHARACTER(LEN=28) :: CFNAM_DENS_WASTE ! waste water sewer length -CHARACTER(LEN=28) :: CFNAM_DENS_STORM ! storm water sewer length -CHARACTER(LEN=28) :: CFNAM_DSEWER ! waste water sewer depth -CHARACTER(LEN=28) :: CFNAM_WS_ROOF_MAX ! Max. capacity of surface roof water storage -CHARACTER(LEN=28) :: CFNAM_WS_ROAD_MAX ! Max. capacity of surface road water storage -CHARACTER(LEN=28) :: CFNAM_IP_SEWER ! Parameter for parasite infiltrations into sewer -CHARACTER(LEN=28) :: CFNAM_CONNEX ! Impervious surfaces connexion rate to the sewer -CHARACTER(LEN=28) :: CFNAM_INFIL_ROAD ! Water infiltration through the roads -CHARACTER(LEN=28) :: CFNAM_URBDRAIN ! Limitation of urban deep drainage (0-1) +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_DENS_WASTE ! waste water sewer length +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_DENS_STORM ! storm water sewer length +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_DSEWER ! waste water sewer depth +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_WS_ROOF_MAX ! Max. capacity of surface roof water storage +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_WS_ROAD_MAX ! Max. capacity of surface road water storage +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_IP_SEWER ! Parameter for parasite infiltrations into sewer +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_CONNEX ! Impervious surfaces connexion rate to the sewer +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_INFIL_ROAD ! Water infiltration through the roads +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_URBDRAIN ! Limitation of urban deep drainage (0-1) ! ! type of files containing data ! @@ -152,15 +152,15 @@ XUNIF_IP_SEWER = 0. XUNIF_CONNEX = 1. XUNIF_INFIL_ROAD = 0. XUNIF_URBDRAIN = 0. -CFNAM_DENS_WASTE = ' ' -CFNAM_DENS_STORM = ' ' -CFNAM_DSEWER = ' ' -CFNAM_WS_ROOF_MAX = ' ' -CFNAM_WS_ROAD_MAX = ' ' -CFNAM_IP_SEWER = ' ' -CFNAM_CONNEX = ' ' -CFNAM_INFIL_ROAD = ' ' -CFNAM_URBDRAIN = ' ' +CFNAM_DENS_WASTE = '' +CFNAM_DENS_STORM = '' +CFNAM_DSEWER = '' +CFNAM_WS_ROOF_MAX = '' +CFNAM_WS_ROAD_MAX = '' +CFNAM_IP_SEWER = '' +CFNAM_CONNEX = '' +CFNAM_INFIL_ROAD = '' +CFNAM_URBDRAIN = '' CFTYP_DENS_WASTE = ' ' CFTYP_DENS_STORM = ' ' CFTYP_DSEWER = ' ' diff --git a/src/SURFEX/pgd_teb_irrig.F90 b/src/SURFEX/pgd_teb_irrig.F90 index d0205cd5e..9981e18f2 100644 --- a/src/SURFEX/pgd_teb_irrig.F90 +++ b/src/SURFEX/pgd_teb_irrig.F90 @@ -47,7 +47,7 @@ USE MODD_SURF_ATM_n, ONLY : SURF_ATM_t USE MODD_SSO_n, ONLY : SSO_t USE MODD_TEB_IRRIG_n, ONLY : TEB_IRRIG_t ! -USE MODD_SURF_PAR, ONLY : XUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF ! USE MODD_PGDWORK, ONLY : CATYPE ! @@ -114,21 +114,21 @@ REAL :: XUNIF_RD_24H_IRRIG ! total irrigation over 24h fo ! ! name of files containing data ! - CHARACTER(LEN=28) :: CFNAM_GD_START_MONTH - CHARACTER(LEN=28) :: CFNAM_GD_END_MONTH - CHARACTER(LEN=28) :: CFNAM_GD_START_HOUR - CHARACTER(LEN=28) :: CFNAM_GD_END_HOUR - CHARACTER(LEN=28) :: CFNAM_GD_24H_IRRIG - CHARACTER(LEN=28) :: CFNAM_GR_START_MONTH - CHARACTER(LEN=28) :: CFNAM_GR_END_MONTH - CHARACTER(LEN=28) :: CFNAM_GR_START_HOUR - CHARACTER(LEN=28) :: CFNAM_GR_END_HOUR - CHARACTER(LEN=28) :: CFNAM_GR_24H_IRRIG - CHARACTER(LEN=28) :: CFNAM_RD_START_MONTH - CHARACTER(LEN=28) :: CFNAM_RD_END_MONTH - CHARACTER(LEN=28) :: CFNAM_RD_START_HOUR - CHARACTER(LEN=28) :: CFNAM_RD_END_HOUR - CHARACTER(LEN=28) :: CFNAM_RD_24H_IRRIG + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_GD_START_MONTH + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_GD_END_MONTH + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_GD_START_HOUR + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_GD_END_HOUR + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_GD_24H_IRRIG + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_GR_START_MONTH + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_GR_END_MONTH + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_GR_START_HOUR + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_GR_END_HOUR + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_GR_24H_IRRIG + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_RD_START_MONTH + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_RD_END_MONTH + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_RD_START_HOUR + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_RD_END_HOUR + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_RD_24H_IRRIG ! ! type of files containing data ! @@ -220,21 +220,21 @@ XUNIF_RD_START_HOUR = XUNDEF XUNIF_RD_END_HOUR = XUNDEF XUNIF_RD_24H_IRRIG = XUNDEF ! -CFNAM_GD_START_MONTH = ' ' -CFNAM_GD_END_MONTH = ' ' -CFNAM_GD_START_HOUR = ' ' -CFNAM_GD_END_HOUR = ' ' -CFNAM_GD_24H_IRRIG = ' ' -CFNAM_GR_START_MONTH = ' ' -CFNAM_GR_END_MONTH = ' ' -CFNAM_GR_START_HOUR = ' ' -CFNAM_GR_END_HOUR = ' ' -CFNAM_GR_24H_IRRIG = ' ' -CFNAM_RD_START_MONTH = ' ' -CFNAM_RD_END_MONTH = ' ' -CFNAM_RD_START_HOUR = ' ' -CFNAM_RD_END_HOUR = ' ' -CFNAM_RD_24H_IRRIG = ' ' +CFNAM_GD_START_MONTH = '' +CFNAM_GD_END_MONTH = '' +CFNAM_GD_START_HOUR = '' +CFNAM_GD_END_HOUR = '' +CFNAM_GD_24H_IRRIG = '' +CFNAM_GR_START_MONTH = '' +CFNAM_GR_END_MONTH = '' +CFNAM_GR_START_HOUR = '' +CFNAM_GR_END_HOUR = '' +CFNAM_GR_24H_IRRIG = '' +CFNAM_RD_START_MONTH = '' +CFNAM_RD_END_MONTH = '' +CFNAM_RD_START_HOUR = '' +CFNAM_RD_END_HOUR = '' +CFNAM_RD_24H_IRRIG = '' ! CFTYP_GD_START_MONTH = ' ' CFTYP_GD_END_MONTH = ' ' diff --git a/src/SURFEX/pgd_teb_par.F90 b/src/SURFEX/pgd_teb_par.F90 index e83c4ab25..925875bef 100644 --- a/src/SURFEX/pgd_teb_par.F90 +++ b/src/SURFEX/pgd_teb_par.F90 @@ -62,7 +62,7 @@ USE MODD_BLD_DESCRIPTION_n, ONLY : BLD_DESC_t USE MODD_DATA_TEB_n, ONLY : DATA_TEB_t USE MODD_TEB_OPTION_n, ONLY : TEB_OPTIONS_t ! -USE MODD_SURF_PAR, ONLY : XUNDEF, NUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF, NUNDEF ! USE MODI_GET_LUOUT USE MODI_OPEN_NAMELIST @@ -127,72 +127,72 @@ INTEGER :: NPAR_WALL_LAYER ! number of wall layers ! Geometric Parameters: ! INTEGER :: NUNIF_BLDTYPE - CHARACTER(LEN=28) :: CFNAM_BLDTYPE + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_BLDTYPE CHARACTER(LEN=6) :: CFTYP_BLDTYPE INTEGER :: NUNIF_IND_BLD_AGE - CHARACTER(LEN=28) :: CFNAM_IND_BLD_AGE + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_IND_BLD_AGE CHARACTER(LEN=6) :: CFTYP_IND_BLD_AGE INTEGER :: NUNIF_COL_BLD_AGE - CHARACTER(LEN=28) :: CFNAM_COL_BLD_AGE + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_COL_BLD_AGE CHARACTER(LEN=6) :: CFTYP_COL_BLD_AGE - CHARACTER(LEN=28) :: CCSVFILEARCHI - CHARACTER(LEN=28) :: CCSVFILECOMPO + CHARACTER(LEN=NFILENAMELGTMAX) :: CCSVFILEARCHI + CHARACTER(LEN=NFILENAMELGTMAX) :: CCSVFILECOMPO INTEGER :: NUNIF_USETYPE - CHARACTER(LEN=28) :: CFNAM_USETYPE + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_USETYPE CHARACTER(LEN=6) :: CFTYP_USETYPE INTEGER :: NUNIF_P1TERRITORY - CHARACTER(LEN=28) :: CFNAM_P1TERRITORY + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_P1TERRITORY CHARACTER(LEN=6) :: CFTYP_P1TERRITORY INTEGER :: NUNIF_PXTERRITORY - CHARACTER(LEN=28) :: CFNAM_PXTERRITORY + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_PXTERRITORY CHARACTER(LEN=6) :: CFTYP_PXTERRITORY REAL :: XUNIF_FRACIHS - CHARACTER(LEN=28) :: CFNAM_FRACIHS + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_FRACIHS CHARACTER(LEN=6) :: CFTYP_FRACIHS REAL :: XUNIF_FRACCHS - CHARACTER(LEN=28) :: CFNAM_FRACCHS + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_FRACCHS CHARACTER(LEN=6) :: CFTYP_FRACCHS REAL :: XUNIF_FRACCOM - CHARACTER(LEN=28) :: CFNAM_FRACCOM + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_FRACCOM CHARACTER(LEN=6) :: CFTYP_FRACCOM REAL :: XUNIF_FRACTER - CHARACTER(LEN=28) :: CFNAM_FRACTER + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_FRACTER CHARACTER(LEN=6) :: CFTYP_FRACTER REAL :: XUNIF_FRACIND - CHARACTER(LEN=28) :: CFNAM_FRACIND + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_FRACIND CHARACTER(LEN=6) :: CFTYP_FRACIND REAL :: XUNIF_FRACNHE - CHARACTER(LEN=28) :: CFNAM_FRACNHE + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_FRACNHE CHARACTER(LEN=6) :: CFTYP_FRACNHE REAL :: XUNIF_FRACPAV - CHARACTER(LEN=28) :: CFNAM_FRACPAV + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_FRACPAV CHARACTER(LEN=6) :: CFTYP_FRACPAV REAL :: XUNIF_FRACMRI - CHARACTER(LEN=28) :: CFNAM_FRACMRI + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_FRACMRI CHARACTER(LEN=6) :: CFTYP_FRACMRI REAL :: XUNIF_FRACHRI - CHARACTER(LEN=28) :: CFNAM_FRACHRI + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_FRACHRI CHARACTER(LEN=6) :: CFTYP_FRACHRI REAL :: XUNIF_FRACATB - CHARACTER(LEN=28) :: CFNAM_FRACATB + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_FRACATB CHARACTER(LEN=6) :: CFTYP_FRACATB REAL :: XUNIF_FOEQI_MAIS - CHARACTER(LEN=28) :: CFNAM_FOEQI_MAIS + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_FOEQI_MAIS CHARACTER(LEN=6) :: CFTYP_FOEQI_MAIS REAL :: XUNIF_FOEQI_APPT - CHARACTER(LEN=28) :: CFNAM_FOEQI_APPT + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_FOEQI_APPT CHARACTER(LEN=6) :: CFTYP_FOEQI_APPT REAL :: XUNIF_FAEQI_MAIS - CHARACTER(LEN=28) :: CFNAM_FAEQI_MAIS + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_FAEQI_MAIS CHARACTER(LEN=6) :: CFTYP_FAEQI_MAIS REAL :: XUNIF_FAEQI_APPT - CHARACTER(LEN=28) :: CFNAM_FAEQI_APPT + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_FAEQI_APPT CHARACTER(LEN=6) :: CFTYP_FAEQI_APPT REAL :: XUNIF_CRE_MAIS - CHARACTER(LEN=28) :: CFNAM_CRE_MAIS + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_CRE_MAIS CHARACTER(LEN=6) :: CFTYP_CRE_MAIS REAL :: XUNIF_CRE_APPT - CHARACTER(LEN=28) :: CFNAM_CRE_APPT + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_CRE_APPT CHARACTER(LEN=6) :: CFTYP_CRE_APPT ! CHARACTER(LEN=3) :: CBLD_ATYPE ! type of averaging for buildings @@ -208,16 +208,16 @@ REAL :: XUNIF_FRAC_HVEG ! fraction of high REAL :: XUNIF_FRAC_LVEG ! fraction of low vegetation (-) REAL :: XUNIF_FRAC_NVEG ! fraction of no vegetation (-) REAL :: XUNIF_ROAD_DIR ! road direction (deg from North, clockwise) - CHARACTER(LEN=28) :: CFNAM_BLD ! file name for BLD - CHARACTER(LEN=28) :: CFNAM_ROAD ! file name for ROAD - CHARACTER(LEN=28) :: CFNAM_BLD_HEIGHT ! file name for BLD_HEIGHT - CHARACTER(LEN=28) :: CFNAM_WALL_O_HOR ! file name for WALL_O_HOR - CHARACTER(LEN=28) :: CFNAM_Z0_TOWN ! file name for Z0_TOWN - CHARACTER(LEN=28) :: CFNAM_GREENROOF ! file name for GREENROOF - CHARACTER(LEN=28) :: CFNAM_FRAC_HVEG ! file name for FRAC_HVEG - CHARACTER(LEN=28) :: CFNAM_FRAC_LVEG ! file name for FRAC_LVEG - CHARACTER(LEN=28) :: CFNAM_FRAC_NVEG ! file name for FRAC_NVEG - CHARACTER(LEN=28) :: CFNAM_ROAD_DIR ! file name for ROAD_DIR + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_BLD ! file name for BLD + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_ROAD ! file name for ROAD + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_BLD_HEIGHT ! file name for BLD_HEIGHT + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_WALL_O_HOR ! file name for WALL_O_HOR + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_Z0_TOWN ! file name for Z0_TOWN + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_GREENROOF ! file name for GREENROOF + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_FRAC_HVEG ! file name for FRAC_HVEG + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_FRAC_LVEG ! file name for FRAC_LVEG + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_FRAC_NVEG ! file name for FRAC_NVEG + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_ROAD_DIR ! file name for ROAD_DIR CHARACTER(LEN=6) :: CFTYP_BLD ! file type for BLD CHARACTER(LEN=6) :: CFTYP_ROAD ! file type for ROAD CHARACTER(LEN=6) :: CFTYP_BLD_HEIGHT ! file type for BLD_HEIGHT @@ -233,21 +233,21 @@ REAL :: XUNIF_ROAD_DIR ! road direction ( ! REAL :: XUNIF_ALB_ROOF ! roof albedo (-) REAL :: XUNIF_EMIS_ROOF ! roof emissivity (-) - CHARACTER(LEN=28) :: CFNAM_ALB_ROOF ! file name for ALB_ROOF - CHARACTER(LEN=28) :: CFNAM_EMIS_ROOF ! file name for EMIS_ROOF + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_ALB_ROOF ! file name for ALB_ROOF + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_EMIS_ROOF ! file name for EMIS_ROOF CHARACTER(LEN=6) :: CFTYP_ALB_ROOF ! file name for ALB_ROOF CHARACTER(LEN=6) :: CFTYP_EMIS_ROOF ! file name for EMIS_ROOF REAL, DIMENSION(NROOF_MAX) :: XUNIF_HC_ROOF ! roof layers heat capacity (J/K/m3) REAL, DIMENSION(NROOF_MAX) :: XUNIF_TC_ROOF ! roof layers thermal conductivity (W/K/m) REAL, DIMENSION(NROOF_MAX) :: XUNIF_D_ROOF ! depth of roof layers (m) - CHARACTER(LEN=28), DIMENSION(NROOF_MAX) :: CFNAM_HC_ROOF ! file name for HC_ROOF - CHARACTER(LEN=28), DIMENSION(NROOF_MAX) :: CFNAM_TC_ROOF ! file name for TC_ROOF - CHARACTER(LEN=28), DIMENSION(NROOF_MAX) :: CFNAM_D_ROOF ! file name for D_ROOF + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NROOF_MAX) :: CFNAM_HC_ROOF ! file name for HC_ROOF + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NROOF_MAX) :: CFNAM_TC_ROOF ! file name for TC_ROOF + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NROOF_MAX) :: CFNAM_D_ROOF ! file name for D_ROOF CHARACTER(LEN=6), DIMENSION(NROOF_MAX) :: CFTYP_HC_ROOF ! file type for HC_ROOF CHARACTER(LEN=6), DIMENSION(NROOF_MAX) :: CFTYP_TC_ROOF ! file type for TC_ROOF CHARACTER(LEN=6), DIMENSION(NROOF_MAX) :: CFTYP_D_ROOF ! file type for D_ROOF REAL :: XUNIF_ROUGH_ROOF ! roof roughness coef - CHARACTER(LEN=28) :: CFNAM_ROUGH_ROOF ! file name for ROUGH_ROOF + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_ROUGH_ROOF ! file name for ROUGH_ROOF CHARACTER(LEN=6) :: CFTYP_ROUGH_ROOF ! file type for ROUGH_ROOF ! ! @@ -255,8 +255,8 @@ REAL :: XUNIF_ROUGH_ROOF ! roof roughness co ! REAL :: XUNIF_ALB_ROAD ! road albedo (-) REAL :: XUNIF_EMIS_ROAD ! road emissivity (-) - CHARACTER(LEN=28) :: CFNAM_ALB_ROAD ! file name for ALB_ROAD - CHARACTER(LEN=28) :: CFNAM_EMIS_ROAD ! file name for EMIS_ROAD + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_ALB_ROAD ! file name for ALB_ROAD + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_EMIS_ROAD ! file name for EMIS_ROAD CHARACTER(LEN=6) :: CFTYP_ALB_ROAD ! file type for ALB_ROAD CHARACTER(LEN=6) :: CFTYP_EMIS_ROAD ! file type for EMIS_ROAD REAL :: XUNIF_HC_COATING_ROAD ! road coating heat capacity (J/K/m3) @@ -264,11 +264,11 @@ REAL :: XUNIF_TC_COATING_ROAD ! road coating REAL :: XUNIF_D_COATING_ROAD ! depth of road coating (m) REAL :: XUNIF_HC_BASEMENT_ROAD ! road coating heat capacity (J/K/m3) REAL :: XUNIF_TC_BASEMENT_ROAD ! road coating thermal conductivity (W/K/m) - CHARACTER(LEN=28) :: CFNAM_HC_COATING_ROAD ! file name for HC_ROAD - CHARACTER(LEN=28) :: CFNAM_TC_COATING_ROAD ! file name for TC_ROAD - CHARACTER(LEN=28) :: CFNAM_D_COATING_ROAD ! file name for D_ROAD - CHARACTER(LEN=28) :: CFNAM_HC_BASEMENT_ROAD ! file name for HC_ROAD - CHARACTER(LEN=28) :: CFNAM_TC_BASEMENT_ROAD ! file name for TC_ROAD + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_HC_COATING_ROAD ! file name for HC_ROAD + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_TC_COATING_ROAD ! file name for TC_ROAD + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_D_COATING_ROAD ! file name for D_ROAD + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_HC_BASEMENT_ROAD ! file name for HC_ROAD + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_TC_BASEMENT_ROAD ! file name for TC_ROAD CHARACTER(LEN=6) :: CFTYP_HC_COATING_ROAD ! file type for HC_ROAD CHARACTER(LEN=6) :: CFTYP_TC_COATING_ROAD ! file type for TC_ROAD CHARACTER(LEN=6) :: CFTYP_D_COATING_ROAD ! file type for D_ROAD @@ -279,21 +279,21 @@ REAL :: XUNIF_TC_BASEMENT_ROAD ! road coating ! REAL :: XUNIF_ALB_WALL ! wall albedo (-) REAL :: XUNIF_EMIS_WALL ! wall emissivity (-) - CHARACTER(LEN=28) :: CFNAM_ALB_WALL ! file name for ALB_WALL - CHARACTER(LEN=28) :: CFNAM_EMIS_WALL ! file name for EMIS_WALL + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_ALB_WALL ! file name for ALB_WALL + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_EMIS_WALL ! file name for EMIS_WALL CHARACTER(LEN=6) :: CFTYP_ALB_WALL ! file type for ALB_WALL CHARACTER(LEN=6) :: CFTYP_EMIS_WALL ! file type for EMIS_WALL REAL, DIMENSION(NWALL_MAX) :: XUNIF_HC_WALL ! wall layers heat capacity (J/K/m3) REAL, DIMENSION(NWALL_MAX) :: XUNIF_TC_WALL ! wall layers thermal conductivity (W/K/m) REAL, DIMENSION(NWALL_MAX) :: XUNIF_D_WALL ! depth of wall layers (m) - CHARACTER(LEN=28), DIMENSION(NWALL_MAX) :: CFNAM_HC_WALL ! file name for HC_WALL - CHARACTER(LEN=28), DIMENSION(NWALL_MAX) :: CFNAM_TC_WALL ! file name for TC_WALL - CHARACTER(LEN=28), DIMENSION(NWALL_MAX) :: CFNAM_D_WALL ! file name for D_WALL + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NWALL_MAX) :: CFNAM_HC_WALL ! file name for HC_WALL + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NWALL_MAX) :: CFNAM_TC_WALL ! file name for TC_WALL + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(NWALL_MAX) :: CFNAM_D_WALL ! file name for D_WALL CHARACTER(LEN=6), DIMENSION(NWALL_MAX) :: CFTYP_HC_WALL ! file type for HC_WALL CHARACTER(LEN=6), DIMENSION(NWALL_MAX) :: CFTYP_TC_WALL ! file type for TC_WALL CHARACTER(LEN=6), DIMENSION(NWALL_MAX) :: CFTYP_D_WALL ! file type for D_WALL REAL :: XUNIF_ROUGH_WALL ! wall roughness coef - CHARACTER(LEN=28) :: CFNAM_ROUGH_WALL ! file name for ROUGH_WALL + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_ROUGH_WALL ! file name for ROUGH_WALL CHARACTER(LEN=6) :: CFTYP_ROUGH_WALL ! file type for ROUGH_WALL ! ! anthropogenic fluxes @@ -306,10 +306,10 @@ REAL :: XUNIF_H_INDUSTRY ! anthropogenic se ! ! heat fluxes due to factories (W/m2) REAL :: XUNIF_LE_INDUSTRY ! anthropogenic latent ! ! heat fluxes due to factories (W/m2) - CHARACTER(LEN=28) :: CFNAM_H_TRAFFIC ! file name for H_TRAFFIC - CHARACTER(LEN=28) :: CFNAM_LE_TRAFFIC ! file name for LE_TRAFFIC - CHARACTER(LEN=28) :: CFNAM_H_INDUSTRY ! file name for H_INDUSTRY - CHARACTER(LEN=28) :: CFNAM_LE_INDUSTRY ! file name for LE_INDUSTRY + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_H_TRAFFIC ! file name for H_TRAFFIC + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_LE_TRAFFIC ! file name for LE_TRAFFIC + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_H_INDUSTRY ! file name for H_INDUSTRY + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_LE_INDUSTRY ! file name for LE_INDUSTRY CHARACTER(LEN=6) :: CFTYP_H_TRAFFIC ! file type for H_TRAFFIC CHARACTER(LEN=6) :: CFTYP_LE_TRAFFIC ! file type for LE_TRAFFIC CHARACTER(LEN=6) :: CFTYP_H_INDUSTRY ! file type for H_INDUSTRY @@ -321,10 +321,10 @@ REAL :: XUNIF_EMIS_PANEL ! emissivity of s REAL :: XUNIF_ALB_PANEL ! albedo of solar panel (-) REAL :: XUNIF_EFF_PANEL ! efficiency of solar panel (-) REAL :: XUNIF_FRAC_PANEL ! fraction of solar panel (-) - CHARACTER(LEN=28) :: CFNAM_EMIS_PANEL ! file name for EMIS_PANEL - CHARACTER(LEN=28) :: CFNAM_ALB_PANEL ! file name for ALB_PANEL - CHARACTER(LEN=28) :: CFNAM_EFF_PANEL ! file name for EFF_PANEL - CHARACTER(LEN=28) :: CFNAM_FRAC_PANEL ! file name for FRAC_PANEL + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_EMIS_PANEL ! file name for EMIS_PANEL + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_ALB_PANEL ! file name for ALB_PANEL + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_EFF_PANEL ! file name for EFF_PANEL + CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_FRAC_PANEL ! file name for FRAC_PANEL CHARACTER(LEN=6) :: CFTYP_EMIS_PANEL ! file type for EMIS_PANEL CHARACTER(LEN=6) :: CFTYP_ALB_PANEL ! file type for ALB_PANEL CHARACTER(LEN=6) :: CFTYP_EFF_PANEL ! file type for EFF_PANEL @@ -334,15 +334,15 @@ REAL :: XUNIF_FRAC_PANEL ! fraction of s ! New variables for CO2 flux calculus ! REAL :: XUNIF_NB_POP ! uniform value for population per square kilometer -CHARACTER(LEN=28) :: CFNAM_NB_POP ! file name for population per square kilometer +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_NB_POP ! file name for population per square kilometer CHARACTER(LEN=6) :: CFTYP_NB_POP ! file type for population per square kilometer ! REAL :: XUNIF_SFCO2_RD ! uniform value for CO2 flux link to traffic (roads) : (kg/m2 of town/s) -CHARACTER(LEN=28) :: CFNAM_SFCO2_RD ! file name for CO2 flux link to traffic (roads) : (kg/m2 of town/s) +CHARACTER(LEN=NFILENAMELGTMAX) :: CFNAM_SFCO2_RD ! file name for CO2 flux link to traffic (roads) : (kg/m2 of town/s) CHARACTER(LEN=6) :: CFTYP_SFCO2_RD ! file type for CO2 flux link to traffic (roads) : (kg/m2 of town/s) ! REAL, DIMENSION(TOP%NTIME_CHANGE+1) :: XUNIF_DELTA_LEGAL_TIME ! uniform value for difference between UTC and legal time (in hour) -CHARACTER(LEN=28), DIMENSION(TOP%NTIME_CHANGE+1) :: CFNAM_DELTA_LEGAL_TIME ! file name for difference between UTC and legal time (in hour) +CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(TOP%NTIME_CHANGE+1) :: CFNAM_DELTA_LEGAL_TIME ! file name for difference between UTC and legal time (in hour) CHARACTER(LEN=6), DIMENSION(TOP%NTIME_CHANGE+1) :: CFTYP_DELTA_LEGAL_TIME ! file type for difference between UTC and legal time (in hour) ! INTEGER, PARAMETER :: NINFO_TIME=4 ! number of information needed to define the time (year, month, day, second) @@ -527,73 +527,72 @@ XPAR_POP_MONTHLY = XUNDEF XPAR_POP_DAILY = XUNDEF XPAR_POP_HOURLY = XUNDEF ! -CFNAM_BLDTYPE = ' ' -CFNAM_IND_BLD_AGE = ' ' -CFNAM_COL_BLD_AGE = ' ' -CFNAM_USETYPE = ' ' -CFNAM_P1TERRITORY = ' ' -CFNAM_PXTERRITORY = ' ' -CFNAM_FRACIHS = ' ' -CFNAM_FRACCHS = ' ' -CFNAM_FRACCOM = ' ' -CFNAM_FRACTER = ' ' -CFNAM_FRACIND = ' ' -CFNAM_FRACNHE = ' ' -CFNAM_FRACPAV = ' ' -CFNAM_FRACMRI = ' ' -CFNAM_FRACHRI = ' ' -CFNAM_FRACATB = ' ' -CFNAM_FOEQI_MAIS = ' ' -CFNAM_FOEQI_APPT = ' ' -CFNAM_FAEQI_MAIS = ' ' -CFNAM_FAEQI_APPT = ' ' -CFNAM_CRE_MAIS = ' ' -CFNAM_CRE_APPT = ' ' -CCSVFILEARCHI = ' ' -CCSVFILECOMPO = ' ' -CFNAM_BLD = ' ' -CFNAM_ROAD = ' ' -CFNAM_BLD_HEIGHT = ' ' -CFNAM_WALL_O_HOR = ' ' -CFNAM_Z0_TOWN = ' ' -CFNAM_ALB_ROOF (:) = ' ' -CFNAM_EMIS_ROOF(:) = ' ' -CFNAM_HC_ROOF (:) = ' ' -CFNAM_TC_ROOF (:) = ' ' -CFNAM_D_ROOF (:) = ' ' -CFNAM_ROUGH_ROOF(:) = ' ' -CFNAM_ROUGH_WALL(:) = ' ' -CFNAM_ALB_ROAD (:) = ' ' -CFNAM_EMIS_ROAD(:) = ' ' -CFNAM_HC_COATING_ROAD (:) = ' ' -CFNAM_TC_COATING_ROAD (:) = ' ' -CFNAM_D_COATING_ROAD (:) = ' ' -CFNAM_HC_BASEMENT_ROAD (:) = ' ' -CFNAM_TC_BASEMENT_ROAD (:) = ' ' -CFNAM_ALB_WALL (:) = ' ' -CFNAM_EMIS_WALL(:) = ' ' -CFNAM_HC_WALL (:) = ' ' -CFNAM_TC_WALL (:) = ' ' -CFNAM_D_WALL (:) = ' ' +CFNAM_BLDTYPE = '' +CFNAM_IND_BLD_AGE = '' +CFNAM_COL_BLD_AGE = '' +CFNAM_USETYPE = '' +CFNAM_P1TERRITORY = '' +CFNAM_PXTERRITORY = '' +CFNAM_FRACIHS = '' +CFNAM_FRACCHS = '' +CFNAM_FRACCOM = '' +CFNAM_FRACTER = '' +CFNAM_FRACIND = '' +CFNAM_FRACNHE = '' +CFNAM_FRACPAV = '' +CFNAM_FRACMRI = '' +CFNAM_FRACHRI = '' +CFNAM_FRACATB = '' +CFNAM_FOEQI_MAIS = '' +CFNAM_FOEQI_APPT = '' +CFNAM_FAEQI_MAIS = '' +CFNAM_FAEQI_APPT = '' +CFNAM_CRE_MAIS = '' +CFNAM_CRE_APPT = '' +CCSVFILEARCHI = '' +CCSVFILECOMPO = '' +CFNAM_BLD = '' +CFNAM_ROAD = '' +CFNAM_BLD_HEIGHT = '' +CFNAM_WALL_O_HOR = '' +CFNAM_Z0_TOWN = '' +CFNAM_ALB_ROOF (:) = '' +CFNAM_EMIS_ROOF(:) = '' +CFNAM_HC_ROOF (:) = '' +CFNAM_TC_ROOF (:) = '' +CFNAM_D_ROOF (:) = '' +CFNAM_ROUGH_ROOF(:) = '' +CFNAM_ROUGH_WALL(:) = '' +CFNAM_ALB_ROAD (:) = '' +CFNAM_EMIS_ROAD(:) = '' +CFNAM_HC_COATING_ROAD (:) = '' +CFNAM_TC_COATING_ROAD (:) = '' +CFNAM_D_COATING_ROAD (:) = '' +CFNAM_HC_BASEMENT_ROAD (:) = '' +CFNAM_TC_BASEMENT_ROAD (:) = '' +CFNAM_ALB_WALL (:) = '' +CFNAM_EMIS_WALL(:) = '' +CFNAM_HC_WALL (:) = '' +CFNAM_TC_WALL (:) = '' +CFNAM_D_WALL (:) = '' -CFNAM_H_TRAFFIC = ' ' -CFNAM_LE_TRAFFIC = ' ' -CFNAM_H_INDUSTRY = ' ' -CFNAM_LE_INDUSTRY = ' ' +CFNAM_H_TRAFFIC = '' +CFNAM_LE_TRAFFIC = '' +CFNAM_H_INDUSTRY = '' +CFNAM_LE_INDUSTRY = '' +CFNAM_GREENROOF = '' +CFNAM_FRAC_HVEG = '' +CFNAM_FRAC_LVEG = '' +CFNAM_FRAC_NVEG = '' +CFNAM_ROAD_DIR = '' -CFNAM_GREENROOF = ' ' -CFNAM_FRAC_HVEG = ' ' -CFNAM_FRAC_LVEG = ' ' -CFNAM_FRAC_NVEG = ' ' -CFNAM_ROAD_DIR = ' ' - -CFNAM_EMIS_PANEL = ' ' -CFNAM_ALB_PANEL = ' ' -CFNAM_EFF_PANEL = ' ' -CFNAM_FRAC_PANEL = ' ' -CFNAM_NB_POP = ' ' -CFNAM_SFCO2_RD = ' ' -CFNAM_DELTA_LEGAL_TIME= ' ' +CFNAM_EMIS_PANEL = '' +CFNAM_ALB_PANEL = '' +CFNAM_EFF_PANEL = '' +CFNAM_FRAC_PANEL = '' +CFNAM_NB_POP = '' +CFNAM_SFCO2_RD = '' +CFNAM_DELTA_LEGAL_TIME= '' ! CFTYP_BLDTYPE = ' ' CFTYP_IND_BLD_AGE = ' ' diff --git a/src/SURFEX/pgd_teb_veg.F90 b/src/SURFEX/pgd_teb_veg.F90 index ee806ef55..12f598bc1 100644 --- a/src/SURFEX/pgd_teb_veg.F90 +++ b/src/SURFEX/pgd_teb_veg.F90 @@ -59,7 +59,7 @@ USE MODD_ISBA_n, ONLY : ISBA_S_t, ISBA_K_t USE MODD_DATA_ISBA_n, ONLY : DATA_ISBA_t USE MODD_TEB_IRRIG_n, ONLY : TEB_IRRIG_t USE MODD_SURFEX_n, ONLY : DATA_TEB_t -USE MODD_SURF_PAR, ONLY : XUNDEF, NUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF, NUNDEF USE MODD_ISBA_PAR, ONLY : NOPTIMLAYER, XOPTIMGRID ! USE MODI_GET_LUOUT @@ -119,11 +119,11 @@ CHARACTER(LEN=3) :: YPHOTO ! photosynthesis option LOGICAL :: GTR_ML ! new radiative transfert CHARACTER(LEN=4) :: YALBEDO REAL :: ZRM_PATCH ! threshold to remove little fractions of patches -CHARACTER(LEN=28) :: YSAND ! file name for sand fraction -CHARACTER(LEN=28) :: YCLAY ! file name for clay fraction -CHARACTER(LEN=28) :: YCTI ! file name for topographic index -CHARACTER(LEN=28) :: YRUNOFFB ! file name for runoffb parameter -CHARACTER(LEN=28) :: YWDRAIN ! file name for wdrain parameter +CHARACTER(LEN=NFILENAMELGTMAX) :: YSAND ! file name for sand fraction +CHARACTER(LEN=NFILENAMELGTMAX) :: YCLAY ! file name for clay fraction +CHARACTER(LEN=NFILENAMELGTMAX) :: YCTI ! file name for topographic index +CHARACTER(LEN=NFILENAMELGTMAX) :: YRUNOFFB ! file name for runoffb parameter +CHARACTER(LEN=NFILENAMELGTMAX) :: YWDRAIN ! file name for wdrain parameter CHARACTER(LEN=6) :: YSANDFILETYPE ! sand data file type CHARACTER(LEN=6) :: YCLAYFILETYPE ! clay data file type CHARACTER(LEN=6) :: YCTIFILETYPE ! topographic index data file type @@ -140,9 +140,9 @@ REAL, DIMENSION(150) :: ZSOILGRID ! Soil layer thickness for DIF ! ! Not used in TEB garden ! -CHARACTER(LEN=28) :: YSOC_TOP ! file name for organic carbon -CHARACTER(LEN=28) :: YSOC_SUB ! file name for organic carbon -CHARACTER(LEN=28) :: YPERM ! file name for permafrost distribution +CHARACTER(LEN=NFILENAMELGTMAX) :: YSOC_TOP! file name for organic carbon +CHARACTER(LEN=NFILENAMELGTMAX) :: YSOC_SUB! file name for organic carbon +CHARACTER(LEN=NFILENAMELGTMAX) :: YPERM ! file name for permafrost distribution CHARACTER(LEN=6) :: YSOCFILETYPE ! organic carbon data file type CHARACTER(LEN=6) :: YPERMFILETYPE ! permafrost distribution data file type REAL :: XUNIF_SOC_TOP ! uniform value of organic carbon top soil (kg/m2) @@ -151,8 +151,8 @@ REAL :: XUNIF_PERM ! uniform permafrost distribution LOGICAL :: LIMP_SOC ! Imposed maps of organic carbon LOGICAL :: LIMP_PERM ! Imposed maps of permafrost distribution LOGICAL :: GMEB ! Multi-energy balance (MEB) -CHARACTER(LEN=28) :: YPH ! file name for pH -CHARACTER(LEN=28) :: YFERT ! file name for fertilisation rate +CHARACTER(LEN=NFILENAMELGTMAX) :: YPH ! file name for pH +CHARACTER(LEN=NFILENAMELGTMAX) :: YFERT ! file name for fertilisation rate CHARACTER(LEN=6) :: YPHFILETYPE ! pH data file type CHARACTER(LEN=6) :: YFERTFILETYPE ! fertilisation data file type REAL :: XUNIF_PH ! uniform value of pH diff --git a/src/SURFEX/pgd_topo_index.F90 b/src/SURFEX/pgd_topo_index.F90 index 9759a6fe3..a2903bc15 100644 --- a/src/SURFEX/pgd_topo_index.F90 +++ b/src/SURFEX/pgd_topo_index.F90 @@ -58,7 +58,7 @@ USE MODD_PGDWORK, ONLY : XALL, XEXT_ALL, NSIZE_ALL, & XMEAN_WORK, XSTD_WORK, & XSKEW_WORK, NSIZE, XSUMVAL ! -USE MODD_SURF_PAR, ONLY : XUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF ! ! USE MODD_SGH_PAR, ONLY : XREGP, XREGA @@ -108,7 +108,7 @@ LOGICAL, INTENT(INOUT) :: OCTI ! CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling INTEGER, INTENT(IN) :: KLU ! number of nature points -CHARACTER(LEN=28), INTENT(IN) :: HCTI ! topographic index file name +CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HCTI ! topographic index file name CHARACTER(LEN=6), INTENT(IN) :: HCTIFILETYPE ! topographic index file type LOGICAL, INTENT(IN) :: OIMP_CTI ! .true. if topographic index statistics is imposed ! @@ -477,7 +477,7 @@ REAL :: ZGLBLONMIN ! minimum longitude of data box in the fil REAL :: ZGLBLATMAX ! maximum latitude of data box in the file REAL :: ZGLBLONMAX ! maximum longitude of data box in the file ! -CHARACTER(LEN=28) :: YFILEHDR ! Name of the field file header +CHARACTER(LEN=NFILENAMELGTMAX) :: YFILEHDR ! Name of the field file header ! INTEGER :: INBLAT INTEGER :: INBLON diff --git a/src/SURFEX/pgd_tsz0_par.F90 b/src/SURFEX/pgd_tsz0_par.F90 index 5ee6a6549..601b6a9e6 100644 --- a/src/SURFEX/pgd_tsz0_par.F90 +++ b/src/SURFEX/pgd_tsz0_par.F90 @@ -85,8 +85,6 @@ INTEGER, PARAMETER :: NTIME_MAX = 37 ! REAL, DIMENSION(NTIME_MAX) :: XUNIF_DTS REAL, DIMENSION(NTIME_MAX) :: XUNIF_DHUGRD - CHARACTER(LEN=28), DIMENSION(NTIME_MAX) :: CFNAM_DTS - CHARACTER(LEN=28), DIMENSION(NTIME_MAX) :: CFNAM_DHUGRD CHARACTER(LEN=6), DIMENSION(NTIME_MAX) :: CFTYP_DTS CHARACTER(LEN=6), DIMENSION(NTIME_MAX) :: CFTYP_DHUGRD ! @@ -104,8 +102,6 @@ IF (LHOOK) CALL DR_HOOK('PGD_TSZ0_PAR',0,ZHOOK_HANDLE) NTIME = 25 XUNIF_DTS (:) = -0.250 XUNIF_DHUGRD(:) = 0.0 -CFNAM_DTS (:) = ' ' -CFNAM_DHUGRD(:) = ' ' CFTYP_DTS (:) = ' ' CFTYP_DHUGRD(:) = ' ' ! diff --git a/src/SURFEX/prep_flake.F90 b/src/SURFEX/prep_flake.F90 index 4d3798c1a..4e83c6276 100644 --- a/src/SURFEX/prep_flake.F90 +++ b/src/SURFEX/prep_flake.F90 @@ -58,7 +58,7 @@ USE MODD_READ_NAMELIST,ONLY : LNAM_READ USE MODD_SURF_ATM, ONLY : LVERTSHIFT USE MODD_PREP, ONLY : XZS_LS USE MODD_PREP_FLAKE, ONLY : LCLIM_LAKE -USE MODD_SURF_PAR, ONLY : XUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF ! USE MODD_CSTS, ONLY : XTT USE MODE_PREP_CTL, ONLY : PREP_CTL, PREP_CTL_CAN @@ -87,11 +87,11 @@ TYPE(GRID_CONF_PROJ_t),INTENT(INOUT) :: GCP ! TYPE (PREP_CTL), INTENT(INOUT) :: YDCTL ! - CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes - CHARACTER(LEN=28), INTENT(IN) :: HATMFILE ! name of the Atmospheric file - CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! type of the Atmospheric file - CHARACTER(LEN=28), INTENT(IN) :: HPGDFILE ! name of the Atmospheric file - CHARACTER(LEN=6), INTENT(IN) :: HPGDFILETYPE! type of the Atmospheric file + CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HATMFILE ! name of the Atmospheric file + CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! type of the Atmospheric file + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HPGDFILE ! name of the Atmospheric file + CHARACTER(LEN=6), INTENT(IN) :: HPGDFILETYPE! type of the Atmospheric file ! !* 0.2 declarations of local variables ! diff --git a/src/SURFEX/prep_flake_extern.F90 b/src/SURFEX/prep_flake_extern.F90 index 04f1b4820..40c2d9ce5 100644 --- a/src/SURFEX/prep_flake_extern.F90 +++ b/src/SURFEX/prep_flake_extern.F90 @@ -20,7 +20,7 @@ USE MODI_ABOR1_SFX USE MODI_GET_LUOUT ! USE MODD_PREP, ONLY : CINGRID_TYPE, CINTERP_TYPE -USE MODD_SURF_PAR, ONLY : XUNDEF, LEN_HREC +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF, LEN_HREC ! USE YOMHOOK ,ONLY : LHOOK, DR_HOOK USE PARKIND1 ,ONLY : JPRB @@ -33,10 +33,10 @@ TYPE(GRID_CONF_PROJ_t),INTENT(INOUT) :: GCP ! CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes CHARACTER(LEN=7), INTENT(IN) :: HSURF ! type of field - CHARACTER(LEN=28), INTENT(IN) :: HFILE ! name of file - CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE ! type of input file - CHARACTER(LEN=28), INTENT(IN) :: HFILEPGD ! name of file - CHARACTER(LEN=6), INTENT(IN) :: HFILEPGDTYPE ! type of input file + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILE ! name of file + CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE ! type of input file + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILEPGD ! name of file + CHARACTER(LEN=6), INTENT(IN) :: HFILEPGDTYPE ! type of input file INTEGER, INTENT(IN) :: KLUOUT ! logical unit of output listing REAL,DIMENSION(:,:), POINTER :: PFIELD ! field to interpolate horizontally ! @@ -95,7 +95,7 @@ ENDIF IF (IDIM_WATER==0) THEN CALL GET_LUOUT(HPROGRAM,ILUOUT) WRITE(ILUOUT,*) ' ' - WRITE(ILUOUT,*) 'No inland water data available in input file ',HFILE + WRITE(ILUOUT,*) 'No inland water data available in input file ',TRIM(HFILE) WRITE(ILUOUT,*) 'Please change your input file ' WRITE(ILUOUT,*) ' or ' WRITE(ILUOUT,*) 'specify inland water temperature XTS_WATER_UNIF' diff --git a/src/SURFEX/prep_flake_grib.F90 b/src/SURFEX/prep_flake_grib.F90 index 6af65bba6..edde694af 100644 --- a/src/SURFEX/prep_flake_grib.F90 +++ b/src/SURFEX/prep_flake_grib.F90 @@ -35,6 +35,7 @@ USE MODE_READ_GRIB USE MODD_TYPE_DATE_SURF ! USE MODD_GRID_GRIB, ONLY : CGRIB_FILE, CINMODEL +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX ! ! USE YOMHOOK ,ONLY : LHOOK, DR_HOOK @@ -46,7 +47,7 @@ IMPLICIT NONE ! CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes CHARACTER(LEN=7), INTENT(IN) :: HSURF ! type of field - CHARACTER(LEN=28), INTENT(IN) :: HFILE ! name of file + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILE ! name of file INTEGER, INTENT(IN) :: KLUOUT ! logical unit of output listing REAL,DIMENSION(:,:), POINTER :: PFIELD ! field to interpolate horizontally ! diff --git a/src/SURFEX/prep_hor_flake_field.F90 b/src/SURFEX/prep_hor_flake_field.F90 index 350c8bc66..e07e3e032 100644 --- a/src/SURFEX/prep_hor_flake_field.F90 +++ b/src/SURFEX/prep_hor_flake_field.F90 @@ -41,7 +41,7 @@ USE MODD_GRID_CONF_PROJ_n, ONLY : GRID_CONF_PROJ_t ! USE MODD_FLAKE_n, ONLY : FLAKE_t ! -USE MODD_SURF_PAR, ONLY : XUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF USE MODD_TYPE_DATE_SURF, ONLY : DATE_TIME USE MODD_SURFEX_MPI, ONLY : NRANK, NPIO, NCOMM, NPROC USE MODD_PREP, ONLY : CINGRID_TYPE, CINTERP_TYPE, XZS_LS, CMASK @@ -81,22 +81,22 @@ TYPE(GRID_CONF_PROJ_t),INTENT(INOUT) :: GCP INTEGER, INTENT(IN) :: KLAT TYPE(FLAKE_t), INTENT(INOUT) :: F ! - CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes - CHARACTER(LEN=7), INTENT(IN) :: HSURF ! type of field - CHARACTER(LEN=28), INTENT(IN) :: HATMFILE ! name of the Atmospheric file - CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! type of the Atmospheric file - CHARACTER(LEN=28), INTENT(IN) :: HPGDFILE ! name of the Atmospheric file - CHARACTER(LEN=6), INTENT(IN) :: HPGDFILETYPE! type of the Atmospheric file -LOGICAL, OPTIONAL, INTENT(OUT) :: ONOVALUE ! flag for the not given value + CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes + CHARACTER(LEN=7), INTENT(IN) :: HSURF ! type of field + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HATMFILE ! name of the Atmospheric file + CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! type of the Atmospheric file + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HPGDFILE ! name of the Atmospheric file + CHARACTER(LEN=6), INTENT(IN) :: HPGDFILETYPE! type of the Atmospheric file +LOGICAL, OPTIONAL, INTENT(OUT) :: ONOVALUE ! flag for the not given value ! ! !* 0.2 declarations of local variables ! - CHARACTER(LEN=6) :: YFILETYPE ! type of input file - CHARACTER(LEN=28) :: YFILE ! name of file - CHARACTER(LEN=6) :: YFILEPGDTYPE ! type of input file - CHARACTER(LEN=28) :: YFILEPGD ! name of file - TYPE (DATE_TIME) :: TZTIME_GRIB ! current date and time + CHARACTER(LEN=6) :: YFILETYPE ! type of input file + CHARACTER(LEN=NFILENAMELGTMAX) :: YFILE ! name of file + CHARACTER(LEN=6) :: YFILEPGDTYPE ! type of input file + CHARACTER(LEN=NFILENAMELGTMAX) :: YFILEPGD ! name of file + TYPE (DATE_TIME) :: TZTIME_GRIB ! current date and time REAL, POINTER, DIMENSION(:,:) :: ZFIELDIN=>NULL() ! field to interpolate horizontally REAL, ALLOCATABLE, DIMENSION(:,:) :: ZFIELDOUT ! field interpolated horizontally INTEGER :: ILUOUT ! output listing logical unit diff --git a/src/SURFEX/prep_hor_isba_cc_field.F90 b/src/SURFEX/prep_hor_isba_cc_field.F90 index 751e71645..ea031234b 100644 --- a/src/SURFEX/prep_hor_isba_cc_field.F90 +++ b/src/SURFEX/prep_hor_isba_cc_field.F90 @@ -50,7 +50,7 @@ USE MODD_PREP_ISBA, ONLY : LRESET_CSOIL USE MODD_SURFEX_MPI, ONLY : NRANK, NPIO, NCOMM, NPROC ! USE MODD_DATA_COVER_PAR, ONLY : NVEGTYPE -USE MODD_SURF_PAR, ONLY : XUNDEF,NUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF, NUNDEF USE MODD_AGRI, ONLY : NVEG_IRR ! USE MODE_PREP_CTL, ONLY : PREP_CTL, PREP_CTL_INT_PART2, PREP_CTL_INT_PART4 @@ -90,10 +90,10 @@ TYPE (PREP_CTL), INTENT(INOUT) :: YDCTL INTEGER, INTENT(IN) :: KNI ! number of grid cell CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes CHARACTER(LEN=8), INTENT(IN) :: HSURF ! type of field -CHARACTER(LEN=28), INTENT(IN) :: HATMFILE ! name of the Atmospheric file -CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! type of the Atmospheric file -CHARACTER(LEN=28), INTENT(IN) :: HPGDFILE ! name of the Atmospheric file -CHARACTER(LEN=6), INTENT(IN) :: HPGDFILETYPE! type of the Atmospheric file +CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HATMFILE ! name of the Atmospheric file +CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! type of the Atmospheric file +CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HPGDFILE ! name of the Atmospheric file +CHARACTER(LEN=6), INTENT(IN) :: HPGDFILETYPE! type of the Atmospheric file ! !* 0.2 declarations of local variables ! @@ -111,9 +111,9 @@ TYPE(ISBA_PE_t), POINTER :: PEK ! INTEGER,DIMENSION(:),INTENT(IN) :: NPAR_VEG_IRR_USE ! vegtype with irrigation CHARACTER(LEN=6) :: YFILETYPE ! type of input file -CHARACTER(LEN=28) :: YFILE ! name of file +CHARACTER(LEN=NFILENAMELGTMAX) :: YFILE ! name of file CHARACTER(LEN=6) :: YFILEPGDTYPE ! type of input file -CHARACTER(LEN=28) :: YFILEPGD ! name of file +CHARACTER(LEN=NFILENAMELGTMAX) :: YFILEPGD ! name of file REAL, POINTER, DIMENSION(:,:,:) :: ZFIELDIN ! field to interpolate horizontally REAL, POINTER, DIMENSION(:,:,:) :: ZFIELDOUTP ! field interpolated horizontally REAL, POINTER, DIMENSION(:,:,:) :: ZFIELDOUTV ! field interpolated horizontally diff --git a/src/SURFEX/prep_hor_isba_esc_field.F90 b/src/SURFEX/prep_hor_isba_esc_field.F90 index 38967a2c1..c686c0753 100644 --- a/src/SURFEX/prep_hor_isba_esc_field.F90 +++ b/src/SURFEX/prep_hor_isba_esc_field.F90 @@ -49,7 +49,7 @@ USE MODD_PREP, ONLY : LINTERP, CMASK USE MODD_PREP_ISBA, ONLY : LRESET_CSOIL, XGRID_SOIL ! USE MODD_DATA_COVER_PAR, ONLY : NVEGTYPE -USE MODD_SURF_PAR, ONLY : XUNDEF,NUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF, NUNDEF USE MODD_AGRI, ONLY : NVEG_IRR ! USE MODE_PREP_CTL, ONLY : PREP_CTL, PREP_CTL_INT_PART2, PREP_CTL_INT_PART4 @@ -95,17 +95,17 @@ TYPE (PREP_CTL), INTENT(INOUT) :: YDCTL INTEGER,DIMENSION(:), INTENT(IN) :: NPAR_VEG_IRR_USE ! vegtype with irrigation CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes CHARACTER(LEN=8), INTENT(IN) :: HSURF ! type of field -CHARACTER(LEN=28), INTENT(IN) :: HATMFILE ! name of the Atmospheric file -CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! type of the Atmospheric file -CHARACTER(LEN=28), INTENT(IN) :: HPGDFILE ! name of the Atmospheric file -CHARACTER(LEN=6), INTENT(IN) :: HPGDFILETYPE! type of the Atmospheric file +CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HATMFILE ! name of the Atmospheric file +CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! type of the Atmospheric file +CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HPGDFILE ! name of the Atmospheric file +CHARACTER(LEN=6), INTENT(IN) :: HPGDFILETYPE! type of the Atmospheric file ! !* 0.2 declarations of local variables ! CHARACTER(LEN=6) :: YFILETYPE ! type of input file -CHARACTER(LEN=28) :: YFILE ! name of file +CHARACTER(LEN=NFILENAMELGTMAX) :: YFILE ! name of file CHARACTER(LEN=6) :: YFILEPGDTYPE ! type of input file -CHARACTER(LEN=28) :: YFILEPGD ! name of file +CHARACTER(LEN=NFILENAMELGTMAX) :: YFILEPGD ! name of file ! REAL, POINTER, DIMENSION(:,:,:,:) :: ZFIELDIN ! field to interpolate horizontally REAL, POINTER, DIMENSION(:,:,:,:) :: ZFIELDOUTP ! field interpolated horizontally diff --git a/src/SURFEX/prep_hor_isba_field.F90 b/src/SURFEX/prep_hor_isba_field.F90 index 674cd3d6a..1edeffb4d 100644 --- a/src/SURFEX/prep_hor_isba_field.F90 +++ b/src/SURFEX/prep_hor_isba_field.F90 @@ -66,7 +66,7 @@ USE MODD_PREP_ISBA, ONLY : XGRID_SOIL, NGRID_LEVEL, LSNOW_IDEAL, & ! USE MODD_ISBA_PAR, ONLY : XWGMIN USE MODD_DATA_COVER_PAR, ONLY : NVEGTYPE -USE MODD_SURF_PAR, ONLY : XUNDEF,NUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF, NUNDEF USE MODD_AGRI, ONLY : NVEG_IRR ! USE MODE_PREP_CTL, ONLY : PREP_CTL, PREP_CTL_INT_PART2, PREP_CTL_INT_PART4 @@ -122,23 +122,23 @@ TYPE (PREP_CTL), INTENT(INOUT) :: YDCTL INTEGER,DIMENSION(:), INTENT(IN) :: NPAR_VEG_IRR_USE ! vegtype with irrigation CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes CHARACTER(LEN=7), INTENT(IN) :: HSURF ! type of field - CHARACTER(LEN=28), INTENT(IN) :: HATMFILE ! name of the Atmospheric file - CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! type of the Atmospheric file - CHARACTER(LEN=28), INTENT(IN) :: HPGDFILE ! name of the Atmospheric file - CHARACTER(LEN=6), INTENT(IN) :: HPGDFILETYPE! type of the Atmospheric file + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HATMFILE ! name of the Atmospheric file + CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! type of the Atmospheric file + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HPGDFILE ! name of the Atmospheric file + CHARACTER(LEN=6), INTENT(IN) :: HPGDFILETYPE! type of the Atmospheric file ! LOGICAL, OPTIONAL, INTENT(INOUT):: OKEY ! !* 0.2 declarations of local variables ! - CHARACTER(LEN=6) :: YFILETYPE ! type of input file - CHARACTER(LEN=28) :: YFILE ! name of file + CHARACTER(LEN=6) :: YFILETYPE ! type of input file + CHARACTER(LEN=NFILENAMELGTMAX) :: YFILE ! name of file CHARACTER(LEN=6) :: YFILETYPE_SNOW ! type of input file - CHARACTER(LEN=28) :: YFILE_SNOW ! name of file + CHARACTER(LEN=NFILENAMELGTMAX) :: YFILE_SNOW ! name of file CHARACTER(LEN=6) :: YFILEPGDTYPE_SNOW ! type of input file - CHARACTER(LEN=28) :: YFILEPGD_SNOW ! name of file + CHARACTER(LEN=NFILENAMELGTMAX) :: YFILEPGD_SNOW ! name of file CHARACTER(LEN=6) :: YFILEPGDTYPE ! type of input file - CHARACTER(LEN=28) :: YFILEPGD ! name of file + CHARACTER(LEN=NFILENAMELGTMAX) :: YFILEPGD ! name of file REAL, POINTER, DIMENSION(:,:,:) :: ZFIELDIN ! field to interpolate horizontally REAL, POINTER, DIMENSION(:,:,:) :: ZFIELDOUTP ! field interpolated horizontally REAL, POINTER, DIMENSION(:,:,:) :: ZFIELDOUTV ! diff --git a/src/SURFEX/prep_hor_ocean_field.F90 b/src/SURFEX/prep_hor_ocean_field.F90 index 9bb9915bd..4136dd52c 100644 --- a/src/SURFEX/prep_hor_ocean_field.F90 +++ b/src/SURFEX/prep_hor_ocean_field.F90 @@ -41,7 +41,7 @@ USE MODD_OCEAN_n, ONLY : OCEAN_t USE MODD_OCEAN_REL_n, ONLY : OCEAN_REL_t ! USE MODD_CSTS, ONLY : XTT -USE MODD_SURF_PAR, ONLY : XUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF USE MODD_OCEAN_GRID, ONLY : NOCKMIN,NOCKMAX,XZHOC USE MODD_PREP, ONLY : CINGRID_TYPE, CINTERP_TYPE, LINTERP ! @@ -69,13 +69,13 @@ TYPE(OCEAN_REL_t), INTENT(INOUT) :: OR INTEGER, INTENT(IN) :: KLAT REAL, DIMENSION(:), INTENT(IN) :: PSEABATHY ! - CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes - CHARACTER(LEN=28), INTENT(IN) :: HFILE ! file name - CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE ! file type -INTEGER, INTENT(IN) :: KLUOUT ! logical unit of output listing -LOGICAL, INTENT(IN) :: OUNIF ! flag for prescribed uniform field - CHARACTER(LEN=7) :: HSURF ! type of field - CHARACTER(LEN=28), INTENT(IN), OPTIONAL :: HNCVARNAME!var to read + CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILE ! file name + CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE ! file type +INTEGER, INTENT(IN) :: KLUOUT ! logical unit of output listing +LOGICAL, INTENT(IN) :: OUNIF ! flag for prescribed uniform field + CHARACTER(LEN=7), INTENT(IN) :: HSURF ! type of field + CHARACTER(LEN=28), INTENT(IN), OPTIONAL :: HNCVARNAME!var to read ! ! !* 0.2 declarations of local variables diff --git a/src/SURFEX/prep_hor_ocean_fields.F90 b/src/SURFEX/prep_hor_ocean_fields.F90 index 2b9515b7d..3e4932007 100644 --- a/src/SURFEX/prep_hor_ocean_fields.F90 +++ b/src/SURFEX/prep_hor_ocean_fields.F90 @@ -38,7 +38,7 @@ USE MODD_GRID_CONF_PROJ_n, ONLY : GRID_CONF_PROJ_t USE MODD_OCEAN_n, ONLY : OCEAN_t USE MODD_OCEAN_REL_n, ONLY : OCEAN_REL_t ! -USE MODD_SURF_PAR, ONLY : XUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF USE MODD_OCEAN_CSTS, ONLY : XRHOSWREF USE MODD_OCEAN_GRID, ONLY : XDZ1,XZHOC,NOCKMIN,NOCKMAX ! @@ -64,8 +64,8 @@ INTEGER, INTENT(IN) :: KLAT ! CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes CHARACTER(LEN=7), INTENT(IN) :: HSURF ! type of field - CHARACTER(LEN=28), INTENT(IN) :: HFILE ! file name - CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE ! file type + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILE ! file name + CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE ! file type INTEGER, INTENT(IN) :: KLUOUT ! logical unit of output listing LOGICAL, INTENT(IN) :: OUNIF ! flag for prescribed uniform field ! diff --git a/src/SURFEX/prep_hor_seaflux_field.F90 b/src/SURFEX/prep_hor_seaflux_field.F90 index d10cea8cb..e2ecb744e 100644 --- a/src/SURFEX/prep_hor_seaflux_field.F90 +++ b/src/SURFEX/prep_hor_seaflux_field.F90 @@ -46,6 +46,7 @@ USE MODD_SEAFLUX_n, ONLY : SEAFLUX_t USE MODD_TYPE_DATE_SURF, ONLY : DATE_TIME USE MODD_SURFEX_MPI, ONLY : NRANK, NPIO, NCOMM, NPROC USE MODD_PREP, ONLY : CINGRID_TYPE, CINTERP_TYPE, XZS_LS, CMASK +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX ! USE MODD_GRID_GRIB, ONLY : CINMODEL ! @@ -89,19 +90,19 @@ INTEGER, INTENT(IN) :: KLAT TYPE(SEAFLUX_t), INTENT(INOUT) :: S TYPE (PREP_CTL), INTENT(INOUT) :: YDCTL ! - CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes - CHARACTER(LEN=7), INTENT(IN) :: HSURF ! type of field - CHARACTER(LEN=28), INTENT(IN) :: HATMFILE ! name of the Atmospheric file - CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! type of the Atmospheric file - CHARACTER(LEN=28), INTENT(IN) :: HPGDFILE ! name of the Atmospheric file - CHARACTER(LEN=6), INTENT(IN) :: HPGDFILETYPE! type of the Atmospheric file + CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes + CHARACTER(LEN=7), INTENT(IN) :: HSURF ! type of field + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HATMFILE ! name of the Atmospheric file + CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE ! type of the Atmospheric file + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HPGDFILE ! name of the Atmospheric file + CHARACTER(LEN=6), INTENT(IN) :: HPGDFILETYPE ! type of the Atmospheric file ! !* 0.2 declarations of local variables ! - CHARACTER(LEN=6) :: YFILETYPE ! type of input file - CHARACTER(LEN=28) :: YFILE ! name of file - CHARACTER(LEN=6) :: YFILEPGDTYPE ! type of input file - CHARACTER(LEN=28) :: YFILEPGD ! name of file + CHARACTER(LEN=6) :: YFILETYPE ! type of input file + CHARACTER(LEN=NFILENAMELGTMAX) :: YFILE ! name of file + CHARACTER(LEN=6) :: YFILEPGDTYPE ! type of input file + CHARACTER(LEN=NFILENAMELGTMAX) :: YFILEPGD ! name of file REAL, POINTER, DIMENSION(:,:) :: ZFIELDIN ! field to interpolate horizontally REAL, POINTER, DIMENSION(:,:) :: ZFIELDOUT ! field interpolated horizontally TYPE (DATE_TIME) :: TZTIME_GRIB ! current date and time @@ -109,7 +110,7 @@ INTEGER :: ILUOUT ! output listing logical unit INTEGER :: INFOMPI, INL ! LOGICAL :: GUNIF ! flag for prescribed uniform field - CHARACTER (LEN=28) :: CLFILE + CHARACTER (LEN=NFILENAMELGTMAX) :: CLFILE INTEGER :: IRESP CHARACTER (LEN=100) :: CLCOMMENT CHARACTER (LEN=6) :: CLSCHEME diff --git a/src/SURFEX/prep_hor_snow_field.F90 b/src/SURFEX/prep_hor_snow_field.F90 index 934a2a66e..7399ec816 100644 --- a/src/SURFEX/prep_hor_snow_field.F90 +++ b/src/SURFEX/prep_hor_snow_field.F90 @@ -68,6 +68,7 @@ USE MODD_PREP_SNOW, ONLY : XGRID_SNOW, NIMPUR USE MODD_SURF_PAR, ONLY : XUNDEF USE MODD_DATA_COVER_PAR, ONLY : NVEGTYPE USE MODD_PREP, ONLY : LINTERP,CINTERP_TYPE,CINGRID_TYPE, CMASK +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX ! USE MODD_AGRI, ONLY : NVEG_IRR ! @@ -110,10 +111,10 @@ TYPE(GRID_CONF_PROJ_t), INTENT(INOUT) :: GCP TYPE (PREP_CTL), INTENT(INOUT) :: YDCTL ! CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes - CHARACTER(LEN=28), INTENT(IN) :: HFILE ! file name - CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE ! file type - CHARACTER(LEN=28), INTENT(IN) :: HFILEPGD ! file name - CHARACTER(LEN=6), INTENT(IN) :: HFILEPGDTYPE ! file type + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILE ! file name + CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE ! file type + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILEPGD ! file name + CHARACTER(LEN=6), INTENT(IN) :: HFILEPGDTYPE ! file type INTEGER, INTENT(IN) :: KLUOUT ! logical unit of output listing LOGICAL, INTENT(IN) :: OUNIF ! flag for prescribed uniform field CHARACTER(LEN=10) :: HSNSURF ! type of field diff --git a/src/SURFEX/prep_hor_snow_fields.F90 b/src/SURFEX/prep_hor_snow_fields.F90 index 15836e98c..868dc1d65 100644 --- a/src/SURFEX/prep_hor_snow_fields.F90 +++ b/src/SURFEX/prep_hor_snow_fields.F90 @@ -53,7 +53,7 @@ USE MODD_SURF_ATM_n, ONLY : SURF_ATM_t USE MODD_GRID_CONF_PROJ_n, ONLY : GRID_CONF_PROJ_t USE MODD_TYPE_SNOW USE MODD_TYPE_DATE_SURF, ONLY : DATE_TIME -USE MODD_SURF_PAR, ONLY : XUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF USE MODD_SNOW_PAR, ONLY : XAGLAMIN, XAGLAMAX ! USE MODE_PREP_CTL, ONLY : PREP_CTL, PREP_CTL_INT_PART2, PREP_CTL_INT_PART4 @@ -86,10 +86,10 @@ TYPE (PREP_CTL), INTENT(INOUT) :: YDCTL ! CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes CHARACTER(LEN=7), INTENT(IN) :: HSURF ! type of field - CHARACTER(LEN=28), INTENT(IN) :: HFILE ! file name - CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE ! file type - CHARACTER(LEN=28), INTENT(IN) :: HFILEPGD ! file name - CHARACTER(LEN=6), INTENT(IN) :: HFILEPGDTYPE ! file type + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILE ! file name + CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE ! file type + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILEPGD ! file name + CHARACTER(LEN=6), INTENT(IN) :: HFILEPGDTYPE ! file type INTEGER, INTENT(IN) :: KLUOUT ! logical unit of output listing LOGICAL, INTENT(IN) :: OUNIF ! flag for prescribed uniform field INTEGER, INTENT(IN) :: KPATCH ! patch number for output scheme diff --git a/src/SURFEX/prep_hor_teb_field.F90 b/src/SURFEX/prep_hor_teb_field.F90 index c613c36c2..b6e625203 100644 --- a/src/SURFEX/prep_hor_teb_field.F90 +++ b/src/SURFEX/prep_hor_teb_field.F90 @@ -55,7 +55,7 @@ USE MODD_PREP_TEB, ONLY : XGRID_ROOF, XGRID_ROAD, XGRID_WALL, XGRID_FLOO XHUI_BLD, XHUI_BLD_DEF ! USE MODD_CSTS, ONLY : XG, XP00 -USE MODD_SURF_PAR, ONLY : XUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF ! USE MODE_PREP_CTL, ONLY : PREP_CTL, PREP_CTL_INT_PART2, PREP_CTL_INT_PART4 USE MODD_PREP_SNOW, ONLY : NIMPUR @@ -98,10 +98,10 @@ TYPE (PREP_CTL), INTENT(INOUT) :: YDCTL ! CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes CHARACTER(LEN=7), INTENT(IN) :: HSURF ! type of field - CHARACTER(LEN=28), INTENT(IN) :: HATMFILE ! name of the Atmospheric file - CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! type of the Atmospheric file - CHARACTER(LEN=28), INTENT(IN) :: HPGDFILE ! name of the Atmospheric file - CHARACTER(LEN=6), INTENT(IN) :: HPGDFILETYPE! type of the Atmospheric file + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HATMFILE ! name of the Atmospheric file + CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! type of the Atmospheric file + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HPGDFILE ! name of the Atmospheric file + CHARACTER(LEN=6), INTENT(IN) :: HPGDFILETYPE! type of the Atmospheric file ! INTEGER, INTENT(IN) :: KPATCH INTEGER,DIMENSION(:), INTENT(IN) :: NPAR_VEG_IRR_USE ! vegtype with irrigation @@ -111,9 +111,9 @@ INTEGER,DIMENSION(:), INTENT(IN) :: NPAR_VEG_IRR_USE ! vegtype with irrigation TYPE(NSURF_SNOW) :: TNPSNOW ! CHARACTER(LEN=6) :: YFILETYPE ! type of input file - CHARACTER(LEN=28) :: YFILE ! name of file + CHARACTER(LEN=NFILENAMELGTMAX) :: YFILE ! name of file CHARACTER(LEN=6) :: YFILEPGDTYPE ! type of input file - CHARACTER(LEN=28) :: YFILEPGD ! name of file + CHARACTER(LEN=NFILENAMELGTMAX) :: YFILEPGD ! name of file REAL, DIMENSION(:), ALLOCATABLE :: ZSG1SNOW, ZSG2SNOW, ZHISTSNOW, ZAGESNOW REAL, DIMENSION(:,:), ALLOCATABLE :: ZIMPURSNOW REAL, POINTER, DIMENSION(:,:) :: ZFIELDIN ! field to interpolate horizontally diff --git a/src/SURFEX/prep_hor_teb_garden_field.F90 b/src/SURFEX/prep_hor_teb_garden_field.F90 index 839be56d9..cb5219f58 100644 --- a/src/SURFEX/prep_hor_teb_garden_field.F90 +++ b/src/SURFEX/prep_hor_teb_garden_field.F90 @@ -59,7 +59,7 @@ USE MODD_PREP_TEB_GARDEN, ONLY : XGRID_SOIL, NGRID_LEVEL, & ! USE MODD_ISBA_PAR, ONLY : XWGMIN USE MODD_DATA_COVER_PAR, ONLY : NVEGTYPE -USE MODD_SURF_PAR, ONLY : XUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF USE MODD_AGRI, ONLY : NVEG_IRR USE MODD_PREP_SNOW, ONLY : NIMPUR ! @@ -109,26 +109,26 @@ TYPE(GRID_t), INTENT(INOUT) :: TG TYPE(TEB_OPTIONS_t), INTENT(INOUT) :: TOP TYPE (PREP_CTL), INTENT(INOUT) :: YDCTL ! -INTEGER,DIMENSION(:),INTENT(IN) :: NPAR_VEG_IRR_USE ! vegtype with irrigation - CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes - CHARACTER(LEN=7), INTENT(IN) :: HSURF ! type of field - CHARACTER(LEN=28), INTENT(IN) :: HATMFILE ! name of the Atmospheric file - CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! type of the Atmospheric file - CHARACTER(LEN=28), INTENT(IN) :: HPGDFILE ! name of the Atmospheric file - CHARACTER(LEN=6), INTENT(IN) :: HPGDFILETYPE! type of the Atmospheric file +INTEGER, DIMENSION(:), INTENT(IN) :: NPAR_VEG_IRR_USE ! vegtype with irrigation + CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes + CHARACTER(LEN=7), INTENT(IN) :: HSURF ! type of field + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HATMFILE ! name of the Atmospheric file + CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! type of the Atmospheric file + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HPGDFILE ! name of the Atmospheric file + CHARACTER(LEN=6), INTENT(IN) :: HPGDFILETYPE! type of the Atmospheric file ! INTEGER, INTENT(IN) :: KPATCH ! !* 0.2 declarations of local variables ! - CHARACTER(LEN=6) :: YFILETYPE ! type of input file - CHARACTER(LEN=28) :: YFILE ! name of file - CHARACTER(LEN=6) :: YFILEPGDTYPE ! type of input file - CHARACTER(LEN=28) :: YFILEPGD ! name of file - CHARACTER(LEN=6) :: YFILETYPE_SNOW ! type of input file - CHARACTER(LEN=28) :: YFILE_SNOW ! name of file - CHARACTER(LEN=6) :: YFILEPGDTYPE_SNOW ! type of input file - CHARACTER(LEN=28) :: YFILEPGD_SNOW ! name of file + CHARACTER(LEN=6) :: YFILETYPE ! type of input file + CHARACTER(LEN=NFILENAMELGTMAX) :: YFILE ! name of file + CHARACTER(LEN=6) :: YFILEPGDTYPE ! type of input file + CHARACTER(LEN=NFILENAMELGTMAX) :: YFILEPGD ! name of file + CHARACTER(LEN=6) :: YFILETYPE_SNOW ! type of input file + CHARACTER(LEN=NFILENAMELGTMAX) :: YFILE_SNOW ! name of file + CHARACTER(LEN=6) :: YFILEPGDTYPE_SNOW ! type of input file + CHARACTER(LEN=NFILENAMELGTMAX) :: YFILEPGD_SNOW ! name of file REAL, POINTER, DIMENSION(:,:,:) :: ZFIELDIN=>NULL() ! field to interpolate horizontally REAL, POINTER, DIMENSION(:,:) :: ZFIELDIN_2D=>NULL() ! field to interpolate horizontally ! diff --git a/src/SURFEX/prep_hor_teb_greenroof_field.F90 b/src/SURFEX/prep_hor_teb_greenroof_field.F90 index 8bb313bbc..ba765f85d 100644 --- a/src/SURFEX/prep_hor_teb_greenroof_field.F90 +++ b/src/SURFEX/prep_hor_teb_greenroof_field.F90 @@ -57,7 +57,7 @@ USE MODD_PREP_TEB_GREENROOF, ONLY : XGRID_SOIL, NGRID_LEVEL, XAGESNOW_GR, XASNOW_GR, LSNOW_IDEAL_GR USE MODD_ISBA_PAR, ONLY : XWGMIN USE MODD_DATA_COVER_PAR, ONLY : NVEGTYPE -USE MODD_SURF_PAR, ONLY : XUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF USE MODD_AGRI, ONLY : NVEG_IRR USE MODD_PREP_SNOW, ONLY : NIMPUR ! @@ -111,23 +111,23 @@ TYPE (PREP_CTL), INTENT(INOUT) :: YDCTL INTEGER,DIMENSION(:),INTENT(IN) :: NPAR_VEG_IRR_USE ! vegtype with irrigation CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes CHARACTER(LEN=7), INTENT(IN) :: HSURF ! type of field - CHARACTER(LEN=28), INTENT(IN) :: HATMFILE ! name of the Atmospheric file - CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! type of the Atmospheric file - CHARACTER(LEN=28), INTENT(IN) :: HPGDFILE ! name of the Atmospheric file - CHARACTER(LEN=6), INTENT(IN) :: HPGDFILETYPE! type of the Atmospheric file + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HATMFILE ! name of the Atmospheric file + CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! type of the Atmospheric file + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HPGDFILE ! name of the Atmospheric file + CHARACTER(LEN=6), INTENT(IN) :: HPGDFILETYPE! type of the Atmospheric file ! INTEGER, INTENT(IN) :: KPATCH ! !* 0.2 declarations of local variables ! - CHARACTER(LEN=6) :: YFILETYPE ! type of input file - CHARACTER(LEN=28) :: YFILE ! name of file - CHARACTER(LEN=6) :: YFILEPGDTYPE ! type of input file - CHARACTER(LEN=28) :: YFILEPGD ! name of file - CHARACTER(LEN=6) :: YFILETYPE_SNOW ! type of input file - CHARACTER(LEN=28) :: YFILE_SNOW ! name of file - CHARACTER(LEN=6) :: YFILEPGDTYPE_SNOW ! type of input file - CHARACTER(LEN=28) :: YFILEPGD_SNOW ! name of file + CHARACTER(LEN=6) :: YFILETYPE ! type of input file + CHARACTER(LEN=NFILENAMELGTMAX) :: YFILE ! name of file + CHARACTER(LEN=6) :: YFILEPGDTYPE ! type of input file + CHARACTER(LEN=NFILENAMELGTMAX) :: YFILEPGD ! name of file + CHARACTER(LEN=6) :: YFILETYPE_SNOW ! type of input file + CHARACTER(LEN=NFILENAMELGTMAX) :: YFILE_SNOW ! name of file + CHARACTER(LEN=6) :: YFILEPGDTYPE_SNOW ! type of input file + CHARACTER(LEN=NFILENAMELGTMAX) :: YFILEPGD_SNOW ! name of file REAL, POINTER, DIMENSION(:,:,:) :: ZFIELDIN=>NULL() ! field to interpolate horizontally ! TYPE(NSURF_SNOW) :: TNPSNOW diff --git a/src/SURFEX/prep_hor_watflux_field.F90 b/src/SURFEX/prep_hor_watflux_field.F90 index 9b6bdcd2f..8977fcbff 100644 --- a/src/SURFEX/prep_hor_watflux_field.F90 +++ b/src/SURFEX/prep_hor_watflux_field.F90 @@ -38,6 +38,7 @@ USE MODD_WATFLUX_n, ONLY : WATFLUX_t ! USE MODD_TYPE_DATE_SURF, ONLY : DATE_TIME USE MODD_SURFEX_MPI, ONLY : NRANK, NPIO, NCOMM, NPROC +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX ! USE MODD_PREP, ONLY : CINGRID_TYPE, CINTERP_TYPE, XZS_LS, CMASK ! @@ -74,20 +75,20 @@ INTEGER, INTENT(IN) :: KLAT TYPE(WATFLUX_t), INTENT(INOUT) :: W TYPE (PREP_CTL), INTENT (INOUT) :: YDCTL ! - CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes - CHARACTER(LEN=7), INTENT(IN) :: HSURF ! type of field - CHARACTER(LEN=28), INTENT(IN) :: HATMFILE ! name of the Atmospheric file - CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! type of the Atmospheric file - CHARACTER(LEN=28), INTENT(IN) :: HPGDFILE ! name of the Atmospheric file - CHARACTER(LEN=6), INTENT(IN) :: HPGDFILETYPE! type of the Atmospheric file + CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes + CHARACTER(LEN=7), INTENT(IN) :: HSURF ! type of field + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HATMFILE ! name of the Atmospheric file + CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE ! type of the Atmospheric file + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HPGDFILE ! name of the Atmospheric file + CHARACTER(LEN=6), INTENT(IN) :: HPGDFILETYPE ! type of the Atmospheric file ! !* 0.2 declarations of local variables ! - CHARACTER(LEN=6) :: YFILETYPE ! type of input file - CHARACTER(LEN=28) :: YFILE ! name of file - CHARACTER(LEN=6) :: YFILEPGDTYPE ! type of input file - CHARACTER(LEN=28) :: YFILEPGD ! name of file - TYPE (DATE_TIME) :: TZTIME_GRIB ! current date and time + CHARACTER(LEN=6) :: YFILETYPE ! type of input file + CHARACTER(LEN=NFILENAMELGTMAX) :: YFILE ! name of file + CHARACTER(LEN=6) :: YFILEPGDTYPE ! type of input file + CHARACTER(LEN=NFILENAMELGTMAX) :: YFILEPGD ! name of file + TYPE (DATE_TIME) :: TZTIME_GRIB ! current date and time REAL, POINTER, DIMENSION(:,:) :: ZFIELDIN ! field to interpolate horizontally REAL, POINTER, DIMENSION(:,:) :: ZFIELDOUT ! field interpolated horizontally INTEGER :: ILUOUT ! output listing logical unit diff --git a/src/SURFEX/prep_inland_water.F90 b/src/SURFEX/prep_inland_water.F90 index d9e6db5ef..2b6459e14 100644 --- a/src/SURFEX/prep_inland_water.F90 +++ b/src/SURFEX/prep_inland_water.F90 @@ -40,6 +40,8 @@ USE MODD_SURF_ATM_GRID_n, ONLY : SURF_ATM_GRID_t USE MODD_SURF_ATM_n, ONLY : SURF_ATM_t USE MODD_GRID_CONF_PROJ_n, ONLY : GRID_CONF_PROJ_t ! +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX +! USE MODE_PREP_CTL, ONLY : PREP_CTL ! USE MODI_PREP_WATFLUX @@ -65,11 +67,11 @@ TYPE(FLAKE_MODEL_t), INTENT(INOUT) :: FM TYPE(WATFLUX_MODEL_t), INTENT(INOUT) :: WM TYPE (PREP_CTL), INTENT(INOUT) :: YDCTL ! - CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes - CHARACTER(LEN=28), INTENT(IN) :: HATMFILE ! name of the Atmospheric file - CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! type of the Atmospheric file - CHARACTER(LEN=28), INTENT(IN) :: HPGDFILE ! name of the Atmospheric file - CHARACTER(LEN=6), INTENT(IN) :: HPGDFILETYPE! type of the Atmospheric file + CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HATMFILE ! name of the Atmospheric file + CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE ! type of the Atmospheric file + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HPGDFILE ! name of the Atmospheric file + CHARACTER(LEN=6), INTENT(IN) :: HPGDFILETYPE ! type of the Atmospheric file REAL(KIND=JPRB) :: ZHOOK_HANDLE ! ! diff --git a/src/SURFEX/prep_isba.F90 b/src/SURFEX/prep_isba.F90 index 3e4206d8b..8290a43f3 100644 --- a/src/SURFEX/prep_isba.F90 +++ b/src/SURFEX/prep_isba.F90 @@ -73,7 +73,7 @@ USE MODD_DATA_COVER_PAR, ONLY : NVEGTYPE, NVT_SNOW USE MODD_SNOW_PAR, ONLY : XEMISSN USE MODD_ISBA_PAR, ONLY : XWGMIN USE MODD_CO2V_PAR, ONLY : XANFMINIT -USE MODD_SURF_PAR, ONLY : XUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF USE MODD_AGRI, ONLY : NVEG_IRR ! USE MODD_READ_NAMELIST, ONLY : LNAM_READ @@ -129,12 +129,12 @@ TYPE(ISBA_NPE_t), INTENT(INOUT) :: NPE ! TYPE (PREP_CTL), INTENT(INOUT) :: YDCTL ! -INTEGER,DIMENSION(:), INTENT(IN) :: NPAR_VEG_IRR_USE ! vegtype with irrigation -CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes -CHARACTER(LEN=28), INTENT(IN) :: HATMFILE ! name of the Atmospheric file -CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! type of the Atmospheric file -CHARACTER(LEN=28), INTENT(IN) :: HPGDFILE ! name of the Atmospheric file -CHARACTER(LEN=6), INTENT(IN) :: HPGDFILETYPE! type of the Atmospheric file +INTEGER, DIMENSION(:), INTENT(IN) :: NPAR_VEG_IRR_USE ! vegtype with irrigation +CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes +CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HATMFILE ! name of the Atmospheric file +CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE ! type of the Atmospheric file +CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HPGDFILE ! name of the Atmospheric file +CHARACTER(LEN=6), INTENT(IN) :: HPGDFILETYPE ! type of the Atmospheric file ! !* 0.2 declarations of local variables ! diff --git a/src/SURFEX/prep_isba_cc_extern.F90 b/src/SURFEX/prep_isba_cc_extern.F90 index 237c2dd23..4a4ac494f 100644 --- a/src/SURFEX/prep_isba_cc_extern.F90 +++ b/src/SURFEX/prep_isba_cc_extern.F90 @@ -32,7 +32,7 @@ USE MODD_GRID_CONF_PROJ_n, ONLY : GRID_CONF_PROJ_t ! USE MODD_SURFEX_MPI, ONLY : NRANK, NPIO USE MODD_PREP, ONLY : CINGRID_TYPE, CINTERP_TYPE -USE MODD_SURF_PAR, ONLY : XUNDEF, LEN_HREC +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF, LEN_HREC ! USE MODI_PREP_GRID_EXTERN USE MODI_READ_SURF @@ -51,10 +51,10 @@ TYPE(GRID_CONF_PROJ_t),INTENT(INOUT) :: GCP ! CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes CHARACTER(LEN=8), INTENT(IN) :: HSURF ! type of field - CHARACTER(LEN=28), INTENT(IN) :: HFILE ! name of file - CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE ! type of input file - CHARACTER(LEN=28), INTENT(IN) :: HFILEPGD ! name of file - CHARACTER(LEN=6), INTENT(IN) :: HFILEPGDTYPE ! type of input file + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILE ! name of file + CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE ! type of input file + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILEPGD ! name of file + CHARACTER(LEN=6), INTENT(IN) :: HFILEPGDTYPE ! type of input file INTEGER, INTENT(IN) :: KLUOUT ! logical unit of output listing REAL,DIMENSION(:,:,:), POINTER :: PFIELD ! field to interpolate horizontally (on final soil grid) LOGICAL, INTENT(INOUT):: OPREP_AGS diff --git a/src/SURFEX/prep_isba_esc_extern.F90 b/src/SURFEX/prep_isba_esc_extern.F90 index dd4525ed6..29eaf9886 100644 --- a/src/SURFEX/prep_isba_esc_extern.F90 +++ b/src/SURFEX/prep_isba_esc_extern.F90 @@ -31,7 +31,7 @@ USE MODD_GRID_CONF_PROJ_n, ONLY : GRID_CONF_PROJ_t ! USE MODD_SURFEX_MPI, ONLY : NRANK, NPIO USE MODD_PREP, ONLY : CINGRID_TYPE, CINTERP_TYPE -USE MODD_SURF_PAR, ONLY : XUNDEF, LEN_HREC +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF, LEN_HREC ! USE MODI_PREP_GRID_EXTERN USE MODI_READ_SURF @@ -50,10 +50,10 @@ TYPE(GRID_CONF_PROJ_t),INTENT(INOUT) :: GCP ! CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes CHARACTER(LEN=8), INTENT(IN) :: HSURF ! type of field - CHARACTER(LEN=28), INTENT(IN) :: HFILE ! name of file - CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE ! type of input file - CHARACTER(LEN=28), INTENT(IN) :: HFILEPGD ! name of file - CHARACTER(LEN=6), INTENT(IN) :: HFILEPGDTYPE ! type of input file + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILE ! name of file + CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE ! type of input file + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILEPGD ! name of file + CHARACTER(LEN=6), INTENT(IN) :: HFILEPGDTYPE ! type of input file INTEGER, INTENT(IN) :: KLUOUT ! logical unit of output listing REAL,DIMENSION(:,:,:,:), POINTER :: PFIELD ! field to interpolate horizontally (on final soil grid) LOGICAL, INTENT(INOUT):: OPREP diff --git a/src/SURFEX/prep_isba_extern.F90 b/src/SURFEX/prep_isba_extern.F90 index c429c5ad2..1112846ac 100644 --- a/src/SURFEX/prep_isba_extern.F90 +++ b/src/SURFEX/prep_isba_extern.F90 @@ -39,7 +39,7 @@ USE MODD_GRID_CONF_PROJ_n, ONLY : GRID_CONF_PROJ_t USE MODD_SURFEX_MPI, ONLY : NRANK,NPIO USE MODD_PREP, ONLY : CINGRID_TYPE, CINTERP_TYPE USE MODD_PREP_ISBA, ONLY : XGRID_SOIL, XWR_DEF -USE MODD_SURF_PAR, ONLY : XUNDEF, LEN_HREC +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF, LEN_HREC ! USE MODE_READ_EXTERN ! @@ -68,10 +68,10 @@ TYPE(GRID_CONF_PROJ_t),INTENT(INOUT) :: GCP INTEGER,DIMENSION(:), INTENT(IN) :: NPAR_VEG_IRR_USE ! vegtype with irrigation CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes CHARACTER(LEN=7), INTENT(IN) :: HSURF ! type of field - CHARACTER(LEN=28), INTENT(IN) :: HFILE ! name of file - CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE ! type of input file - CHARACTER(LEN=28), INTENT(IN) :: HFILEPGD ! name of file - CHARACTER(LEN=6), INTENT(IN) :: HFILEPGDTYPE ! type of input file + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILE ! name of file + CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE ! type of input file + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILEPGD ! name of file + CHARACTER(LEN=6), INTENT(IN) :: HFILEPGDTYPE ! type of input file INTEGER, INTENT(IN) :: KLUOUT ! logical unit of output listing REAL,DIMENSION(:,:,:), POINTER :: PFIELD ! field to interpolate horizontally (on final soil grid) LOGICAL, OPTIONAL, INTENT(INOUT):: OKEY diff --git a/src/SURFEX/prep_isba_grib.F90 b/src/SURFEX/prep_isba_grib.F90 index f21f91208..808c54026 100644 --- a/src/SURFEX/prep_isba_grib.F90 +++ b/src/SURFEX/prep_isba_grib.F90 @@ -36,7 +36,7 @@ USE MODI_INTERP_GRID_NAT ! USE MODD_PREP_ISBA, ONLY : XGRID_SOIL, XWR_DEF, XWRV_DEF, & XWRVN_DEF, XQC_DEF -USE MODD_SURF_PAR, ONLY : XUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF USE MODD_GRID_GRIB, ONLY : CGRIB_FILE, NNI, CINMODEL ! ! @@ -51,7 +51,7 @@ IMPLICIT NONE ! CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes CHARACTER(LEN=7), INTENT(IN) :: HSURF ! type of field -CHARACTER(LEN=28), INTENT(IN) :: HFILE ! name of file +CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILE ! name of file INTEGER, INTENT(IN) :: KLUOUT ! logical unit of output listing REAL,DIMENSION(:,:,:), POINTER :: PFIELD ! field to interpolate horizontally LOGICAL, OPTIONAL, INTENT(INOUT) :: OKEY diff --git a/src/SURFEX/prep_isba_netcdf.F90 b/src/SURFEX/prep_isba_netcdf.F90 index 1f2294226..db8943478 100644 --- a/src/SURFEX/prep_isba_netcdf.F90 +++ b/src/SURFEX/prep_isba_netcdf.F90 @@ -37,7 +37,7 @@ use modd_netcdf_sfx, only: IDCDF_KIND USE MODD_DATA_COVER_n, ONLY : DATA_COVER_t USE MODD_SURF_ATM_n, ONLY : SURF_ATM_t ! -USE MODD_SURF_PAR, ONLY : XUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF USE MODD_SURFEX_MPI, ONLY : NRANK, NPIO USE MODD_PREP, ONLY : CINTERP_TYPE ! @@ -63,7 +63,7 @@ TYPE(SURF_ATM_t), INTENT(INOUT) :: U ! CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes CHARACTER(LEN=7), INTENT(IN) :: HSURF ! type of field - CHARACTER(LEN=28), INTENT(IN) :: HFILE ! name of file + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILE ! name of file INTEGER, INTENT(IN) :: KLUOUT ! logical unit of output listing REAL,DIMENSION(:,:,:), POINTER :: PFIELD ! field to interpolate horizontally ! diff --git a/src/SURFEX/prep_nature.F90 b/src/SURFEX/prep_nature.F90 index 4351418b5..e4a27c555 100644 --- a/src/SURFEX/prep_nature.F90 +++ b/src/SURFEX/prep_nature.F90 @@ -38,6 +38,8 @@ USE MODD_SURF_ATM_n, ONLY : SURF_ATM_t USE MODD_SSO_n, ONLY : SSO_t USE MODD_GRID_CONF_PROJ_n, ONLY : GRID_CONF_PROJ_t ! +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX +! USE MODE_PREP_CTL, ONLY : PREP_CTL ! USE MODI_PREP_ISBA @@ -58,11 +60,11 @@ TYPE(SSO_t), INTENT(INOUT) :: USS TYPE(GRID_CONF_PROJ_t),INTENT(INOUT) :: GCP TYPE (PREP_CTL), INTENT(INOUT) :: YDCTL ! - CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes - CHARACTER(LEN=28), INTENT(IN) :: HATMFILE ! name of the Atmospheric file - CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! type of the Atmospheric file - CHARACTER(LEN=28), INTENT(IN) :: HPGDFILE ! name of the Atmospheric file - CHARACTER(LEN=6), INTENT(IN) :: HPGDFILETYPE! type of the Atmospheric file + CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HATMFILE ! name of the Atmospheric file + CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE ! type of the Atmospheric file + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HPGDFILE ! name of the Atmospheric file + CHARACTER(LEN=6), INTENT(IN) :: HPGDFILETYPE ! type of the Atmospheric file REAL(KIND=JPRB) :: ZHOOK_HANDLE ! ! diff --git a/src/SURFEX/prep_ocean_ascllv.F90 b/src/SURFEX/prep_ocean_ascllv.F90 index 0ef584a77..64cf21bb9 100644 --- a/src/SURFEX/prep_ocean_ascllv.F90 +++ b/src/SURFEX/prep_ocean_ascllv.F90 @@ -50,6 +50,7 @@ USE MODD_PREP, ONLY : CINTERP_TYPE USE MODD_PGD_GRID, ONLY : NL,LLATLONMASK,CGRID,XGRID_PAR,NGRID_PAR USE MODD_OCEAN_GRID , ONLY : NOCKMAX USE MODD_PGDWORK, ONLY : CATYPE +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX ! USE MODI_OPEN_FILE USE MODI_CLOSE_FILE @@ -78,9 +79,9 @@ TYPE(SURF_ATM_t), INTENT(INOUT) :: U ! CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes CHARACTER(LEN=7), INTENT(IN) :: HSURF ! type of field - CHARACTER(LEN=28), INTENT(IN) :: HFILE ! file name + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILE ! file name INTEGER, INTENT(IN) :: KLUOUT ! output listing logical unit -!CHARACTER(LEN=28), INTENT(IN), OPTIONAL :: HNCVARNAME!var to read +!CHARACTER(LEN=28), INTENT(IN), OPTIONAL :: HNCVARNAME!var to read REAL, POINTER, DIMENSION(:,:,:) :: PFIELD ! field to interpolate horizontally ! ! diff --git a/src/SURFEX/prep_ocean_netcdf.F90 b/src/SURFEX/prep_ocean_netcdf.F90 index bff8843c1..00f9a15a3 100644 --- a/src/SURFEX/prep_ocean_netcdf.F90 +++ b/src/SURFEX/prep_ocean_netcdf.F90 @@ -30,6 +30,7 @@ SUBROUTINE PREP_OCEAN_NETCDF(HPROGRAM,HSURF,HFILE,HFILETYPE,& ! USE MODD_PREP, ONLY : CINTERP_TYPE, CINGRID_TYPE USE MODD_GRID_LATLONREGUL, ONLY : NILENGTH, NINDEPTH, XILONARRAY +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX ! USE MODE_READ_NETCDF_MERCATOR ! @@ -43,10 +44,10 @@ IMPLICIT NONE ! CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes CHARACTER(LEN=7), INTENT(IN) :: HSURF ! type of field - CHARACTER(LEN=28), INTENT(IN) :: HFILE ! file name - CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE ! file type + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILE ! file name + CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE ! file type INTEGER, INTENT(IN) :: KLUOUT ! output listing logical unit - CHARACTER(LEN=28), INTENT(IN), OPTIONAL :: HNCVARNAME!var to read + CHARACTER(LEN=28), INTENT(IN), OPTIONAL :: HNCVARNAME!var to read REAL, POINTER, DIMENSION(:,:,:) :: PFIELD ! field to interpolate horizontally ! !* 0.2 declarations of local variables diff --git a/src/SURFEX/prep_sea.F90 b/src/SURFEX/prep_sea.F90 index 3ac99637d..53aab67a4 100644 --- a/src/SURFEX/prep_sea.F90 +++ b/src/SURFEX/prep_sea.F90 @@ -38,6 +38,8 @@ USE MODD_DATA_COVER_n, ONLY : DATA_COVER_t USE MODD_SURF_ATM_GRID_n, ONLY : SURF_ATM_GRID_t USE MODD_SURF_ATM_n, ONLY : SURF_ATM_t ! +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX +! USE MODE_PREP_CTL, ONLY : PREP_CTL ! USE MODI_PREP_SEAFLUX @@ -57,11 +59,11 @@ TYPE(GRID_CONF_PROJ_t),INTENT(INOUT) :: GCP TYPE(SEAFLUX_MODEL_t), INTENT(INOUT) :: SM TYPE (PREP_CTL), INTENT(INOUT) :: YDCTL ! - CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes - CHARACTER(LEN=28), INTENT(IN) :: HATMFILE ! name of the Atmospheric file - CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! type of the Atmospheric file - CHARACTER(LEN=28), INTENT(IN) :: HPGDFILE ! name of the Atmospheric file - CHARACTER(LEN=6), INTENT(IN) :: HPGDFILETYPE! type of the Atmospheric file + CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HATMFILE ! name of the Atmospheric file + CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! type of the Atmospheric file + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HPGDFILE ! name of the Atmospheric file + CHARACTER(LEN=6), INTENT(IN) :: HPGDFILETYPE! type of the Atmospheric file REAL(KIND=JPRB) :: ZHOOK_HANDLE ! ! diff --git a/src/SURFEX/prep_seaflux.F90 b/src/SURFEX/prep_seaflux.F90 index f84de95ff..96101b6f6 100644 --- a/src/SURFEX/prep_seaflux.F90 +++ b/src/SURFEX/prep_seaflux.F90 @@ -58,6 +58,7 @@ USE MODN_PREP_SEAFLUX USE MODD_READ_NAMELIST, ONLY : LNAM_READ USE MODD_PREP, ONLY : XZS_LS USE MODD_SURF_ATM, ONLY : LVERTSHIFT +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX ! USE MODE_PREP_CTL, ONLY : PREP_CTL ! @@ -83,11 +84,11 @@ TYPE(OCEAN_t), INTENT(INOUT) :: O TYPE(OCEAN_REL_t), INTENT(INOUT) :: OR TYPE (PREP_CTL), INTENT(INOUT) :: YDCTL ! -CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes -CHARACTER(LEN=28), INTENT(IN) :: HATMFILE ! name of the Atmospheric file -CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! type of the Atmospheric file -CHARACTER(LEN=28), INTENT(IN) :: HPGDFILE ! name of the Atmospheric file -CHARACTER(LEN=6), INTENT(IN) :: HPGDFILETYPE! type of the Atmospheric file +CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes +CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HATMFILE ! name of the Atmospheric file +CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! type of the Atmospheric file +CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HPGDFILE ! name of the Atmospheric file +CHARACTER(LEN=6), INTENT(IN) :: HPGDFILETYPE! type of the Atmospheric file ! !* 0.2 declarations of local variables ! diff --git a/src/SURFEX/prep_seaflux_extern.F90 b/src/SURFEX/prep_seaflux_extern.F90 index e003e2e6e..14476db4a 100644 --- a/src/SURFEX/prep_seaflux_extern.F90 +++ b/src/SURFEX/prep_seaflux_extern.F90 @@ -10,6 +10,7 @@ SUBROUTINE PREP_SEAFLUX_EXTERN (GCP,HPROGRAM,HSURF,HFILE,HFILETYPE,HFILEPGD,HFIL USE MODD_GRID_CONF_PROJ_n, ONLY : GRID_CONF_PROJ_t ! USE MODD_SURFEX_MPI, ONLY : NRANK,NPIO +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX ! USE MODD_TYPE_DATE_SURF ! @@ -32,10 +33,10 @@ TYPE(GRID_CONF_PROJ_t),INTENT(INOUT) :: GCP ! CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes CHARACTER(LEN=7), INTENT(IN) :: HSURF ! type of field - CHARACTER(LEN=28), INTENT(IN) :: HFILE ! name of file - CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE ! type of input file - CHARACTER(LEN=28), INTENT(IN) :: HFILEPGD ! name of file - CHARACTER(LEN=6), INTENT(IN) :: HFILEPGDTYPE ! type of input file + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILE ! name of file + CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE ! type of input file + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILEPGD ! name of file + CHARACTER(LEN=6), INTENT(IN) :: HFILEPGDTYPE ! type of input file INTEGER, INTENT(IN) :: KLUOUT ! logical unit of output listing REAL,DIMENSION(:,:), POINTER :: PFIELD ! field to interpolate horizontally ! diff --git a/src/SURFEX/prep_seaflux_grib.F90 b/src/SURFEX/prep_seaflux_grib.F90 index f4ee510ad..8ac5cae6c 100644 --- a/src/SURFEX/prep_seaflux_grib.F90 +++ b/src/SURFEX/prep_seaflux_grib.F90 @@ -33,6 +33,7 @@ SUBROUTINE PREP_SEAFLUX_GRIB(HPROGRAM,HSURF,HFILE,KLUOUT,PFIELD) USE MODE_READ_GRIB ! USE MODD_GRID_GRIB, ONLY : CGRIB_FILE, NNI, CINMODEL +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX ! USE YOMHOOK ,ONLY : LHOOK, DR_HOOK USE PARKIND1 ,ONLY : JPRB @@ -43,7 +44,7 @@ IMPLICIT NONE ! CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes CHARACTER(LEN=7), INTENT(IN) :: HSURF ! type of field - CHARACTER(LEN=28), INTENT(IN) :: HFILE ! name of file + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILE ! name of file INTEGER, INTENT(IN) :: KLUOUT ! logical unit of output listing REAL,DIMENSION(:,:), POINTER :: PFIELD ! field to interpolate horizontally ! diff --git a/src/SURFEX/prep_seaflux_netcdf.F90 b/src/SURFEX/prep_seaflux_netcdf.F90 index 3fdd63de8..34e9ea9bb 100644 --- a/src/SURFEX/prep_seaflux_netcdf.F90 +++ b/src/SURFEX/prep_seaflux_netcdf.F90 @@ -37,6 +37,7 @@ USE MODE_READ_NETCDF_MERCATOR USE MODD_SURFEX_MPI, ONLY : NRANK, NPIO, NCOMM, NPROC USE MODD_PREP, ONLY : CINGRID_TYPE, CINTERP_TYPE USE MODD_GRID_LATLONREGUL, ONLY : NILENGTH,NINDEPTH +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX ! ! USE YOMHOOK ,ONLY : LHOOK, DR_HOOK @@ -52,7 +53,7 @@ INCLUDE "mpif.h" ! CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes CHARACTER(LEN=7), INTENT(IN) :: HSURF ! type of field - CHARACTER(LEN=28), INTENT(IN) :: HFILE ! name of file + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILE ! name of file INTEGER, INTENT(IN) :: KLUOUT ! logical unit of output listing REAL,DIMENSION(:,:), POINTER :: PFIELD ! field to interpolate horizontally ! diff --git a/src/SURFEX/prep_seaice.F90 b/src/SURFEX/prep_seaice.F90 index 192d7df5f..9a3579992 100644 --- a/src/SURFEX/prep_seaice.F90 +++ b/src/SURFEX/prep_seaice.F90 @@ -40,7 +40,7 @@ USE MODD_SEAFLUX_n, ONLY : SEAFLUX_t USE MODD_SURF_ATM_n, ONLY : SURF_ATM_t USE MODD_GRID_CONF_PROJ_n, ONLY : GRID_CONF_PROJ_t ! -USE MODD_SURF_PAR, ONLY : XUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF USE MODI_GET_LUOUT USE MODI_GET_TYPE_DIM_N USE MODI_GLTOOLS_READNAM @@ -77,11 +77,11 @@ TYPE(GRID_CONF_PROJ_t),INTENT(INOUT) :: GCP ! TYPE (PREP_CTL), INTENT(INOUT) :: YDCTL ! -CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes -CHARACTER(LEN=28), INTENT(IN) :: HATMFILE ! name of the Atmospheric file -CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! type of the Atmospheric file -CHARACTER(LEN=28), INTENT(IN) :: HPGDFILE ! name of the Atmospheric file -CHARACTER(LEN=6), INTENT(IN) :: HPGDFILETYPE! type of the Atmospheric file +CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes +CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HATMFILE ! name of the Atmospheric file +CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! type of the Atmospheric file +CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HPGDFILE ! name of the Atmospheric file +CHARACTER(LEN=6), INTENT(IN) :: HPGDFILETYPE! type of the Atmospheric file ! !* 0.2 declarations of local variables ! diff --git a/src/SURFEX/prep_snow_extern.F90 b/src/SURFEX/prep_snow_extern.F90 index 6c84e717c..b92872c07 100644 --- a/src/SURFEX/prep_snow_extern.F90 +++ b/src/SURFEX/prep_snow_extern.F90 @@ -47,7 +47,7 @@ USE MODD_TYPE_SNOW USE MODD_PREP, ONLY : CINGRID_TYPE, CINTERP_TYPE USE MODD_PREP_SNOW, ONLY : XGRID_SNOW, NGRID_LEVEL USE MODD_DATA_COVER_PAR, ONLY : NVEGTYPE -USE MODD_SURF_PAR, ONLY : XUNDEF, LEN_HREC +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF, LEN_HREC USE MODD_CSTS, ONLY : XTT ! USE YOMHOOK ,ONLY : LHOOK, DR_HOOK @@ -75,10 +75,10 @@ TYPE(GRID_CONF_PROJ_t),INTENT(INOUT) :: GCP ! CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes CHARACTER(LEN=10), INTENT(IN) :: HSURF ! type of field -CHARACTER(LEN=28), INTENT(IN) :: HFILE ! name of file -CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE ! type of file -CHARACTER(LEN=28), INTENT(IN) :: HFILEPGD ! name of file -CHARACTER(LEN=6), INTENT(IN) :: HFILEPGDTYPE ! type of file +CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILE ! name of file +CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE ! type of file +CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILEPGD ! name of file +CHARACTER(LEN=6), INTENT(IN) :: HFILEPGDTYPE ! type of file INTEGER, INTENT(IN) :: KLUOUT ! logical unit of output listing REAL,DIMENSION(:,:,:), POINTER :: PFIELD ! field to interpolate horizontally LOGICAL, INTENT(INOUT) :: OSNOW_IDEAL diff --git a/src/SURFEX/prep_snow_grib.F90 b/src/SURFEX/prep_snow_grib.F90 index 39a918ecd..1051eee7c 100644 --- a/src/SURFEX/prep_snow_grib.F90 +++ b/src/SURFEX/prep_snow_grib.F90 @@ -34,7 +34,7 @@ USE MODE_READ_GRIB USE MODD_TYPE_DATE_SURF ! USE MODD_PREP_SNOW, ONLY : NGRID_LEVEL, XGRID_SNOW -USE MODD_SURF_PAR, ONLY : XUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF USE MODD_GRID_GRIB, ONLY : CGRIB_FILE, NNI, CINMODEL USE MODD_SNOW_PAR, ONLY : XANSMIN, XANSMAX, XRHOSMAX USE MODD_CSTS, ONLY : XTT @@ -49,7 +49,7 @@ IMPLICIT NONE ! CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes CHARACTER(LEN=10), INTENT(IN) :: HSURF ! type of field -CHARACTER(LEN=28), INTENT(IN) :: HFILE ! name of file +CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILE ! name of file INTEGER, INTENT(IN) :: KLUOUT ! logical unit of output listing INTEGER, INTENT(IN) :: KLAYER ! Number of layer of output snow scheme REAL,DIMENSION(:,:,:), POINTER :: PFIELD ! field to interpolate horizontally diff --git a/src/SURFEX/prep_surf_atm.F90 b/src/SURFEX/prep_surf_atm.F90 index cd7a3a3e8..6f90c7b1c 100644 --- a/src/SURFEX/prep_surf_atm.F90 +++ b/src/SURFEX/prep_surf_atm.F90 @@ -1,7 +1,8 @@ -!SFX_LIC Copyright 1994-2014 CNRS, Meteo-France and Universite Paul Sabatier +!SFX_LIC Copyright 2004-2023 CNRS, Meteo-France and Universite Paul Sabatier !SFX_LIC This is part of the SURFEX software governed by the CeCILL-C licence -!SFX_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt +!SFX_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt !SFX_LIC for details. version 1. +!----------------------------------------------------------------- ! ################################################################################# SUBROUTINE PREP_SURF_ATM (YSC, HPROGRAM,HATMFILE,HATMFILETYPE,HPGDFILE,HPGDFILETYPE,YDCTL) ! ################################################################################# @@ -33,6 +34,8 @@ SUBROUTINE PREP_SURF_ATM (YSC, HPROGRAM,HATMFILE,HATMFILETYPE,HPGDFILE,HPGDFILET ! USE MODD_SURFEX_n, ONLY : SURFEX_t ! +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX +! USE MODE_PREP_CTL, ONLY : PREP_CTL ! USE MODI_PREP_NATURE @@ -54,16 +57,16 @@ IMPLICIT NONE TYPE(SURFEX_t), INTENT(INOUT) :: YSC TYPE (PREP_CTL), INTENT(INOUT) :: YDCTL ! - CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes - CHARACTER(LEN=28), INTENT(IN) :: HATMFILE ! name of the Atmospheric file - CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! type of the Atmospheric file - CHARACTER(LEN=28), INTENT(IN) :: HPGDFILE ! name of the Atmospheric file - CHARACTER(LEN=6), INTENT(IN) :: HPGDFILETYPE! type of the Atmospheric file + CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HATMFILE ! name of the Atmospheric file + CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! type of the Atmospheric file + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HPGDFILE ! name of the Atmospheric file + CHARACTER(LEN=6), INTENT(IN) :: HPGDFILETYPE! type of the Atmospheric file ! !* 0.2 declarations of local variables - CHARACTER(LEN=28) :: YATMFILE ! name of the Atmospheric file + CHARACTER(LEN=NFILENAMELGTMAX) :: YATMFILE ! name of the Atmospheric file CHARACTER(LEN=6) :: YATMFILETYPE! type of the Atmospheric file - CHARACTER(LEN=28) :: YPGDFILE ! name of the Atmospheric file + CHARACTER(LEN=NFILENAMELGTMAX) :: YPGDFILE ! name of the Atmospheric file CHARACTER(LEN=6) :: YPGDFILETYPE! type of the Atmospheric file REAL(KIND=JPRB) :: ZHOOK_HANDLE @@ -76,13 +79,13 @@ IF (LHOOK) CALL DR_HOOK('PREP_SURF_ATM',0,ZHOOK_HANDLE) IF ( LEN_TRIM(HATMFILE)>0 ) THEN YATMFILE=HATMFILE ELSE - YATMFILE=' ' + YATMFILE='' ENDIF ! IF ( LEN_TRIM(HPGDFILE)>0 ) THEN YPGDFILE=HPGDFILE ELSE - YPGDFILE=' ' + YPGDFILE='' ENDIF ! IF ( LEN_TRIM(HATMFILETYPE)>0 ) THEN diff --git a/src/SURFEX/prep_teb.F90 b/src/SURFEX/prep_teb.F90 index 046dbdcf7..b4057032c 100644 --- a/src/SURFEX/prep_teb.F90 +++ b/src/SURFEX/prep_teb.F90 @@ -67,6 +67,7 @@ USE MODD_PREP_TEB_GREENROOF, ONLY : XWSNOW_GR, XRSNOW_GR, XTSNOW_GR, XLWCSNOW_GR XAGESNOW_GR ! USE MODD_SURF_ATM, ONLY : LVERTSHIFT +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX ! USE YOMHOOK ,ONLY : LHOOK, DR_HOOK USE PARKIND1 ,ONLY : JPRB @@ -96,12 +97,12 @@ TYPE(TEB_HYDRO_MODEL_t), INTENT(INOUT) :: HM ! TYPE (PREP_CTL), INTENT(INOUT) :: YDCTL ! -INTEGER,DIMENSION(:),INTENT(IN) :: NPAR_VEG_IRR_USE ! vegtype with irrigation - CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes - CHARACTER(LEN=28), INTENT(IN) :: HATMFILE ! name of the Atmospheric file - CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! type of the Atmospheric file - CHARACTER(LEN=28), INTENT(IN) :: HPGDFILE ! name of the Atmospheric file - CHARACTER(LEN=6), INTENT(IN) :: HPGDFILETYPE! type of the Atmospheric file +INTEGER, DIMENSION(:), INTENT(IN) :: NPAR_VEG_IRR_USE ! vegtype with irrigation + CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HATMFILE ! name of the Atmospheric file + CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! type of the Atmospheric file + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HPGDFILE ! name of the Atmospheric file + CHARACTER(LEN=6), INTENT(IN) :: HPGDFILETYPE! type of the Atmospheric file ! !* 0.2 declarations of local variables ! diff --git a/src/SURFEX/prep_teb_extern.F90 b/src/SURFEX/prep_teb_extern.F90 index a454066d1..201550544 100644 --- a/src/SURFEX/prep_teb_extern.F90 +++ b/src/SURFEX/prep_teb_extern.F90 @@ -19,6 +19,7 @@ USE MODD_BEM_OPTION_n, ONLY : BEM_OPTIONS_t ! USE MODD_SURFEX_MPI, ONLY : NRANK, NPIO USE MODD_TYPE_DATE_SURF +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX ! USE MODI_PREP_GRID_EXTERN USE MODI_READ_SURF @@ -51,10 +52,10 @@ TYPE(BEM_OPTIONS_t), INTENT(INOUT) :: BOP ! CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes CHARACTER(LEN=7), INTENT(IN) :: HSURF ! type of field - CHARACTER(LEN=28), INTENT(IN) :: HFILE ! name of file - CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE ! type of input file - CHARACTER(LEN=28), INTENT(IN) :: HFILEPGD ! name of file - CHARACTER(LEN=6), INTENT(IN) :: HFILEPGDTYPE ! type of input file + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILE ! name of file + CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE ! type of input file + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILEPGD ! name of file + CHARACTER(LEN=6), INTENT(IN) :: HFILEPGDTYPE ! type of input file INTEGER, INTENT(IN) :: KLUOUT ! logical unit of output listing INTEGER, INTENT(IN) :: KPATCH REAL,DIMENSION(:,:), POINTER :: PFIELD ! field to interpolate horizontally diff --git a/src/SURFEX/prep_teb_garden.F90 b/src/SURFEX/prep_teb_garden.F90 index e899185cf..2395ddbba 100644 --- a/src/SURFEX/prep_teb_garden.F90 +++ b/src/SURFEX/prep_teb_garden.F90 @@ -62,7 +62,7 @@ USE MODD_SURF_ATM, ONLY : LVERTSHIFT USE MODD_CSTS, ONLY : XTT, XG, XRD, XP00 USE MODD_ISBA_PAR, ONLY : XWGMIN USE MODD_CO2V_PAR, ONLY : XANFMINIT, XCA_NIT, XCC_NIT -USE MODD_SURF_PAR, ONLY : XUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF ! USE MODE_PREP_CTL, ONLY : PREP_CTL ! @@ -97,10 +97,10 @@ TYPE (PREP_CTL), INTENT(INOUT) :: YDCTL ! INTEGER, DIMENSION(:),INTENT(IN) :: NPAR_VEG_IRR_USE ! vegtype with irrigation CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes -CHARACTER(LEN=28), INTENT(IN) :: HATMFILE ! name of the Atmospheric file -CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! type of the Atmospheric file -CHARACTER(LEN=28), INTENT(IN) :: HPGDFILE ! name of the Atmospheric file -CHARACTER(LEN=6), INTENT(IN) :: HPGDFILETYPE! type of the Atmospheric file +CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HATMFILE ! name of the Atmospheric file +CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! type of the Atmospheric file +CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HPGDFILE ! name of the Atmospheric file +CHARACTER(LEN=6), INTENT(IN) :: HPGDFILETYPE! type of the Atmospheric file ! INTEGER, INTENT(IN) :: KPATCH ! diff --git a/src/SURFEX/prep_teb_garden_extern.F90 b/src/SURFEX/prep_teb_garden_extern.F90 index aea7b595e..1858c97de 100644 --- a/src/SURFEX/prep_teb_garden_extern.F90 +++ b/src/SURFEX/prep_teb_garden_extern.F90 @@ -53,7 +53,7 @@ USE MODI_MAKE_CHOICE_ARRAY USE MODD_PREP, ONLY : CINGRID_TYPE, CINTERP_TYPE USE MODD_PREP_TEB_GARDEN,ONLY : XGRID_SOIL, XWR_DEF USE MODD_DATA_COVER_PAR, ONLY : NVEGTYPE -USE MODD_SURF_PAR, ONLY : XUNDEF, LEN_HREC +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF, LEN_HREC USE MODD_AGRI, ONLY : NVEG_IRR ! USE YOMHOOK ,ONLY : LHOOK, DR_HOOK @@ -74,10 +74,10 @@ TYPE(GRID_CONF_PROJ_t), INTENT(INOUT) :: GCP INTEGER,DIMENSION(:),INTENT(IN) :: NPAR_VEG_IRR_USE ! vegtype with irrigation CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes CHARACTER(LEN=7), INTENT(IN) :: HSURF ! type of field - CHARACTER(LEN=28), INTENT(IN) :: HFILE ! name of file - CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE ! type of input file - CHARACTER(LEN=28), INTENT(IN) :: HFILEPGD ! name of file - CHARACTER(LEN=6), INTENT(IN) :: HFILEPGDTYPE ! type of input file + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILE ! name of file + CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE ! type of input file + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILEPGD ! name of file + CHARACTER(LEN=6), INTENT(IN) :: HFILEPGDTYPE ! type of input file INTEGER, INTENT(IN) :: KLUOUT ! logical unit of output listing INTEGER, INTENT(IN) :: KPATCH REAL,DIMENSION(:,:,:), POINTER :: PFIELD ! field to interpolate horizontally (on final soil grid) diff --git a/src/SURFEX/prep_teb_garden_grib.F90 b/src/SURFEX/prep_teb_garden_grib.F90 index 40dff4d06..d601e9c13 100644 --- a/src/SURFEX/prep_teb_garden_grib.F90 +++ b/src/SURFEX/prep_teb_garden_grib.F90 @@ -37,7 +37,7 @@ USE MODD_TYPE_DATE_SURF USE MODI_INTERP_GRID_NAT ! USE MODD_PREP_TEB_GARDEN,ONLY : XGRID_SOIL, XWR_DEF -USE MODD_SURF_PAR, ONLY : XUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF USE MODD_GRID_GRIB, ONLY : CGRIB_FILE, NNI, CINMODEL ! ! @@ -52,7 +52,7 @@ IMPLICIT NONE ! CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes CHARACTER(LEN=7), INTENT(IN) :: HSURF ! type of field - CHARACTER(LEN=28), INTENT(IN) :: HFILE ! name of file + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILE ! name of file INTEGER, INTENT(IN) :: KLUOUT ! logical unit of output listing REAL,DIMENSION(:,:,:), POINTER :: PFIELD ! field to interpolate horizontally ! diff --git a/src/SURFEX/prep_teb_greenroof.F90 b/src/SURFEX/prep_teb_greenroof.F90 index 9c2de8e30..a755ffb16 100644 --- a/src/SURFEX/prep_teb_greenroof.F90 +++ b/src/SURFEX/prep_teb_greenroof.F90 @@ -55,7 +55,7 @@ USE MODD_CSTS, ONLY : XTT, XG, XRD, XP00 USE MODD_SNOW_PAR, ONLY : XZ0SN USE MODD_ISBA_PAR, ONLY : XWGMIN USE MODD_CO2V_PAR, ONLY : XCC_NIT, XCA_NIT, XANFMINIT -USE MODD_SURF_PAR, ONLY : XUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF ! USE MODE_PREP_CTL, ONLY : PREP_CTL ! @@ -87,12 +87,12 @@ TYPE(GRID_t), INTENT(INOUT) :: TG TYPE(TEB_OPTIONS_t), INTENT(INOUT) :: TOP TYPE (PREP_CTL), INTENT(INOUT) :: YDCTL ! -INTEGER,DIMENSION(:),INTENT(IN) :: NPAR_VEG_IRR_USE ! vegtype with irrigation -CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes -CHARACTER(LEN=28), INTENT(IN) :: HATMFILE ! name of the Atmospheric file -CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! type of the Atmospheric file -CHARACTER(LEN=28), INTENT(IN) :: HPGDFILE ! name of the Atmospheric file -CHARACTER(LEN=6), INTENT(IN) :: HPGDFILETYPE! type of the Atmospheric file +INTEGER ,DIMENSION(:), INTENT(IN) :: NPAR_VEG_IRR_USE ! vegtype with irrigation +CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes +CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HATMFILE ! name of the Atmospheric file +CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! type of the Atmospheric file +CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HPGDFILE ! name of the Atmospheric file +CHARACTER(LEN=6), INTENT(IN) :: HPGDFILETYPE! type of the Atmospheric file ! INTEGER, INTENT(IN) :: KPATCH ! diff --git a/src/SURFEX/prep_teb_greenroof_extern.F90 b/src/SURFEX/prep_teb_greenroof_extern.F90 index c579375a7..aa096d267 100644 --- a/src/SURFEX/prep_teb_greenroof_extern.F90 +++ b/src/SURFEX/prep_teb_greenroof_extern.F90 @@ -54,7 +54,7 @@ USE MODI_MAKE_CHOICE_ARRAY USE MODD_PREP, ONLY : CINGRID_TYPE, CINTERP_TYPE USE MODD_PREP_TEB_GREENROOF, ONLY : XGRID_SOIL, XWR_DEF USE MODD_DATA_COVER_PAR, ONLY : NVEGTYPE -USE MODD_SURF_PAR, ONLY : XUNDEF, LEN_HREC +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF, LEN_HREC USE MODD_AGRI, ONLY : NVEG_IRR ! USE YOMHOOK ,ONLY : LHOOK, DR_HOOK @@ -75,10 +75,10 @@ TYPE(GRID_CONF_PROJ_t), INTENT(INOUT) :: GCP INTEGER,DIMENSION(:),INTENT(IN) :: NPAR_VEG_IRR_USE ! vegtype with irrigation CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes CHARACTER(LEN=7), INTENT(IN) :: HSURF ! type of field - CHARACTER(LEN=28), INTENT(IN) :: HFILE ! name of file - CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE ! type of input file - CHARACTER(LEN=28), INTENT(IN) :: HFILEPGD ! name of file - CHARACTER(LEN=6), INTENT(IN) :: HFILEPGDTYPE ! type of input file + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILE ! name of file + CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE ! type of input file + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILEPGD ! name of file + CHARACTER(LEN=6), INTENT(IN) :: HFILEPGDTYPE ! type of input file INTEGER, INTENT(IN) :: KLUOUT ! logical unit of output listing INTEGER, INTENT(IN) :: KPATCH REAL,DIMENSION(:,:,:), POINTER :: PFIELD ! field to interpolate horizontally (on final soil grid) diff --git a/src/SURFEX/prep_teb_greenroof_grib.F90 b/src/SURFEX/prep_teb_greenroof_grib.F90 index abf4f1929..400ed283b 100644 --- a/src/SURFEX/prep_teb_greenroof_grib.F90 +++ b/src/SURFEX/prep_teb_greenroof_grib.F90 @@ -38,7 +38,7 @@ USE MODI_INTERP_GRID_NAT ! USE MODD_PREP_TEB_GREENROOF, ONLY : XGRID_SOIL, XWR_DEF USE MODD_DATA_COVER_PAR, ONLY : NVEGTYPE -USE MODD_SURF_PAR, ONLY : XUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF USE MODD_GRID_GRIB, ONLY : CGRIB_FILE, NNI, CINMODEL ! ! @@ -53,7 +53,7 @@ IMPLICIT NONE ! CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes CHARACTER(LEN=7), INTENT(IN) :: HSURF ! type of field - CHARACTER(LEN=28), INTENT(IN) :: HFILE ! name of file + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILE ! name of file INTEGER, INTENT(IN) :: KLUOUT ! logical unit of output listing REAL,DIMENSION(:,:,:), POINTER :: PFIELD ! field to interpolate horizontally ! diff --git a/src/SURFEX/prep_teb_grib.F90 b/src/SURFEX/prep_teb_grib.F90 index d07285f90..638e63932 100644 --- a/src/SURFEX/prep_teb_grib.F90 +++ b/src/SURFEX/prep_teb_grib.F90 @@ -36,7 +36,7 @@ USE MODI_INTERP_GRID USE MODD_GRID_GRIB, ONLY : CGRIB_FILE, NNI, CINMODEL USE MODD_PREP_TEB, ONLY : XGRID_ROAD, XGRID_WALL, XGRID_ROOF, & XTI_BLD, XTDEEP_TEB, XTI_BLD_DEF -USE MODD_SURF_PAR, ONLY : XUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF ! ! !USE YOMHOOK ,ONLY : LHOOK, DR_HOOK @@ -48,7 +48,7 @@ IMPLICIT NONE ! CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes CHARACTER(LEN=7), INTENT(IN) :: HSURF ! type of field - CHARACTER(LEN=28), INTENT(IN) :: HFILE ! name of file + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILE ! name of file INTEGER, INTENT(IN) :: KLUOUT ! logical unit of output listing REAL,DIMENSION(:,:), POINTER :: PFIELD ! field to interpolate horizontally ! diff --git a/src/SURFEX/prep_town.F90 b/src/SURFEX/prep_town.F90 index 42ddb0873..2d66a1c05 100644 --- a/src/SURFEX/prep_town.F90 +++ b/src/SURFEX/prep_town.F90 @@ -43,6 +43,8 @@ USE MODD_SURFEX_n, ONLY : TEB_GARDEN_MODEL_t USE MODD_SURFEX_n, ONLY : TEB_GREENROOF_MODEL_t USE MODD_SURFEX_n, ONLY : TEB_HYDRO_MODEL_t ! +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX +! USE MODE_PREP_CTL, ONLY : PREP_CTL ! USE MODI_PREP_TEB @@ -66,12 +68,12 @@ TYPE(TEB_GREENROOF_MODEL_t), INTENT(INOUT) :: GRM TYPE(TEB_HYDRO_MODEL_t), INTENT(INOUT) :: HM TYPE (PREP_CTL), INTENT(INOUT) :: YDCTL ! -INTEGER,DIMENSION(:),INTENT(IN) :: NPAR_VEG_IRR_USE ! vegtype with irrigation - CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes - CHARACTER(LEN=28), INTENT(IN) :: HATMFILE ! name of the Atmospheric file - CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! type of the Atmospheric file - CHARACTER(LEN=28), INTENT(IN) :: HPGDFILE ! name of the Atmospheric file - CHARACTER(LEN=6), INTENT(IN) :: HPGDFILETYPE! type of the Atmospheric file +INTEGER ,DIMENSION(:), INTENT(IN) :: NPAR_VEG_IRR_USE ! vegtype with irrigation + CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HATMFILE ! name of the Atmospheric file + CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! type of the Atmospheric file + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HPGDFILE ! name of the Atmospheric file + CHARACTER(LEN=6), INTENT(IN) :: HPGDFILETYPE! type of the Atmospheric file REAL(KIND=JPRB) :: ZHOOK_HANDLE ! ! diff --git a/src/SURFEX/prep_watflux.F90 b/src/SURFEX/prep_watflux.F90 index 1246fd4b6..bcfa48e6c 100644 --- a/src/SURFEX/prep_watflux.F90 +++ b/src/SURFEX/prep_watflux.F90 @@ -50,6 +50,7 @@ USE MODD_READ_NAMELIST, ONLY : LNAM_READ USE MODN_PREP_WATFLUX USE MODD_PREP, ONLY : XZS_LS USE MODD_SURF_ATM, ONLY : LVERTSHIFT +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX ! USE MODE_PREP_CTL, ONLY : PREP_CTL ! @@ -74,11 +75,11 @@ TYPE(WATFLUX_t), INTENT(INOUT) :: W TYPE(CANOPY_t), INTENT(INOUT) :: SB TYPE (PREP_CTL), INTENT(INOUT) :: YDCTL ! - CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes - CHARACTER(LEN=28), INTENT(IN) :: HATMFILE ! name of the Atmospheric file - CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! type of the Atmospheric file - CHARACTER(LEN=28), INTENT(IN) :: HPGDFILE ! name of the Atmospheric file - CHARACTER(LEN=6), INTENT(IN) :: HPGDFILETYPE! type of the Atmospheric file + CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HATMFILE ! name of the Atmospheric file + CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! type of the Atmospheric file + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HPGDFILE ! name of the Atmospheric file + CHARACTER(LEN=6), INTENT(IN) :: HPGDFILETYPE! type of the Atmospheric file ! !* 0.2 declarations of local variables ! diff --git a/src/SURFEX/prep_watflux_extern.F90 b/src/SURFEX/prep_watflux_extern.F90 index 85599fc30..96d73e347 100644 --- a/src/SURFEX/prep_watflux_extern.F90 +++ b/src/SURFEX/prep_watflux_extern.F90 @@ -21,7 +21,7 @@ USE MODI_CLOSE_AUX_IO_SURF USE MODI_ABOR1_SFX USE MODI_GET_LUOUT ! -USE MODD_SURF_PAR, ONLY : XUNDEF, LEN_HREC +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF, LEN_HREC ! USE YOMHOOK ,ONLY : LHOOK, DR_HOOK USE PARKIND1 ,ONLY : JPRB @@ -34,10 +34,10 @@ TYPE(GRID_CONF_PROJ_t),INTENT(INOUT) :: GCP ! CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes CHARACTER(LEN=7), INTENT(IN) :: HSURF ! type of field - CHARACTER(LEN=28), INTENT(IN) :: HFILE ! name of file - CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE ! type of input file - CHARACTER(LEN=28), INTENT(IN) :: HFILEPGD ! name of file - CHARACTER(LEN=6), INTENT(IN) :: HFILEPGDTYPE ! type of input file + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILE ! name of file + CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE ! type of input file + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILEPGD ! name of file + CHARACTER(LEN=6), INTENT(IN) :: HFILEPGDTYPE ! type of input file INTEGER, INTENT(IN) :: KLUOUT ! logical unit of output listing REAL,DIMENSION(:,:), POINTER :: PFIELD ! field to interpolate horizontally ! diff --git a/src/SURFEX/prep_watflux_grib.F90 b/src/SURFEX/prep_watflux_grib.F90 index 40899d1d5..af85502c6 100644 --- a/src/SURFEX/prep_watflux_grib.F90 +++ b/src/SURFEX/prep_watflux_grib.F90 @@ -33,6 +33,7 @@ USE MODE_READ_GRIB USE MODD_TYPE_DATE_SURF ! USE MODD_GRID_GRIB, ONLY : CGRIB_FILE, CINMODEL +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX ! USE YOMHOOK ,ONLY : LHOOK, DR_HOOK USE PARKIND1 ,ONLY : JPRB @@ -43,7 +44,7 @@ IMPLICIT NONE ! CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes CHARACTER(LEN=7), INTENT(IN) :: HSURF ! type of field - CHARACTER(LEN=28), INTENT(IN) :: HFILE ! name of file + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILE ! name of file INTEGER, INTENT(IN) :: KLUOUT ! logical unit of output listing REAL,DIMENSION(:,:), POINTER :: PFIELD ! field to interpolate horizontally ! diff --git a/src/SURFEX/read_ascllv.F90 b/src/SURFEX/read_ascllv.F90 index aefd7a16e..681aaec7b 100644 --- a/src/SURFEX/read_ascllv.F90 +++ b/src/SURFEX/read_ascllv.F90 @@ -35,6 +35,7 @@ USE MODD_SURF_ATM_n, ONLY : SURF_ATM_t USE MODD_SSO_n, ONLY : SSO_t ! USE MODD_PGD_GRID, ONLY : LLATLONMASK +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX ! USE MODI_OPEN_FILE USE MODI_CLOSE_FILE @@ -57,7 +58,7 @@ TYPE(SSO_t), INTENT(INOUT) :: USS ! CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! Type of program CHARACTER(LEN=6), INTENT(IN) :: HSUBROUTINE ! Name of the subroutine to call - CHARACTER(LEN=28), INTENT(IN) :: HFILENAME ! Name of the field file. + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILENAME ! Name of the field file. ! ! !* 0.2 Declaration of local variables diff --git a/src/SURFEX/read_binllv.F90 b/src/SURFEX/read_binllv.F90 index 12027951e..3df079311 100644 --- a/src/SURFEX/read_binllv.F90 +++ b/src/SURFEX/read_binllv.F90 @@ -35,6 +35,7 @@ USE MODD_SURF_ATM_n, ONLY : SURF_ATM_t USE MODD_SSO_n, ONLY : SSO_t ! USE MODD_PGD_GRID, ONLY : LLATLONMASK +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX ! #ifdef SFX_MNH use modd_precision, only: MNHINT32 @@ -60,7 +61,7 @@ TYPE(SSO_t), INTENT(INOUT) :: USS ! CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! Type of program CHARACTER(LEN=6), INTENT(IN) :: HSUBROUTINE ! Name of the subroutine to call - CHARACTER(LEN=28), INTENT(IN) :: HFILENAME ! Name of the field file. + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILENAME ! Name of the field file. ! ! !* 0.2 Declaration of local variables diff --git a/src/SURFEX/read_binllvfast.F90 b/src/SURFEX/read_binllvfast.F90 index 93359d3f9..412196b65 100644 --- a/src/SURFEX/read_binllvfast.F90 +++ b/src/SURFEX/read_binllvfast.F90 @@ -38,7 +38,7 @@ USE MODD_SURF_ATM_GRID_n, ONLY : SURF_ATM_GRID_t USE MODD_SURF_ATM_n, ONLY : SURF_ATM_t USE MODD_SSO_n, ONLY : SSO_t ! -USE MODD_SURF_PAR, ONLY : XUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF USE MODD_PGD_GRID, ONLY : LLATLONMASK ! USE MODI_OPEN_FILE @@ -62,7 +62,7 @@ TYPE(SSO_t), INTENT(INOUT) :: USS ! CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! Type of program CHARACTER(LEN=6), INTENT(IN) :: HSUBROUTINE ! Name of the subroutine to call - CHARACTER(LEN=28), INTENT(IN) :: HFILENAME ! Name of the field file. + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILENAME ! Name of the field file. ! ! !* 0.2 Declaration of local variables diff --git a/src/SURFEX/read_csvdata_archi_teb.F90 b/src/SURFEX/read_csvdata_archi_teb.F90 index 8634f7045..5240a3188 100644 --- a/src/SURFEX/read_csvdata_archi_teb.F90 +++ b/src/SURFEX/read_csvdata_archi_teb.F90 @@ -37,7 +37,7 @@ SUBROUTINE READ_CSVDATA_ARCHI_TEB(BDD, HPROGRAM, HFILE) ! ----------- ! USE MODD_BLD_DESCRIPTION_n, ONLY : BLD_DESC_t - USE MODD_SURF_PAR, ONLY : XUNDEF, NUNDEF + USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF, NUNDEF ! USE MODI_OPEN_NAMELIST USE MODI_CLOSE_NAMELIST @@ -55,7 +55,7 @@ SUBROUTINE READ_CSVDATA_ARCHI_TEB(BDD, HPROGRAM, HFILE) ! TYPE(BLD_DESC_t), INTENT(INOUT) :: BDD CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM - CHARACTER(LEN=28), INTENT(IN) :: HFILE ! file to read + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILE ! file to read ! !* 0.2 Declaration of local variables ! ------------------------------ @@ -1429,7 +1429,7 @@ CONTAINS ! Read definitions in .csv file ! CHARACTER(LEN=6) , INTENT(IN) :: HPROGRAM - CHARACTER(LEN=28), INTENT(IN) :: HFILE + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILE CHARACTER(LEN=*) , INTENT(IN) :: YNAME ! INTEGER, INTENT(OUT) :: NTP diff --git a/src/SURFEX/read_csvdata_compo_teb.F90 b/src/SURFEX/read_csvdata_compo_teb.F90 index 24fcd9ab4..d3f5a97f2 100644 --- a/src/SURFEX/read_csvdata_compo_teb.F90 +++ b/src/SURFEX/read_csvdata_compo_teb.F90 @@ -36,7 +36,7 @@ SUBROUTINE READ_CSVDATA_COMPO_TEB(BDD, HPROGRAM, HFILE) USE MODD_BLD_DESCRIPTION_n, ONLY : BLD_DESC_t ! USE MODD_CSTS, ONLY : XSURF_EPSILON - USE MODD_SURF_PAR, ONLY : XUNDEF, NUNDEF + USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF, NUNDEF ! USE MODI_OPEN_NAMELIST USE MODI_CLOSE_NAMELIST @@ -54,7 +54,7 @@ SUBROUTINE READ_CSVDATA_COMPO_TEB(BDD, HPROGRAM, HFILE) ! TYPE(BLD_DESC_t), INTENT(INOUT) :: BDD CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM - CHARACTER(LEN=28), INTENT(IN) :: HFILE ! file to read + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILE ! file to read ! !* 0.2 Declaration of local variables ! ------------------------------ diff --git a/src/SURFEX/read_direct.F90 b/src/SURFEX/read_direct.F90 index 48a7486d7..b0d16fb88 100644 --- a/src/SURFEX/read_direct.F90 +++ b/src/SURFEX/read_direct.F90 @@ -79,6 +79,7 @@ USE MODD_PGDWORK, ONLY : NSIZE_ALL, XALL, NVALNBR, NVALCOUNT, XVALLIST, & USE MODI_REFRESH_PGDWORK ! USE MODD_CSTS ,ONLY : XSURF_EPSILON +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX ! IMPLICIT NONE ! @@ -92,15 +93,15 @@ TYPE(SSO_t), INTENT(INOUT) :: USS CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! Type of program CHARACTER(LEN=6), INTENT(IN) :: HSCHEME ! Scheme treated CHARACTER(LEN=6), INTENT(IN) :: HSUBROUTINE ! Name of the subroutine to call - CHARACTER(LEN=28), INTENT(IN) :: HFILENAME ! Name of the field file. + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILENAME ! Name of the field file. CHARACTER(LEN=20), INTENT(IN) :: HFIELD ! Name of the field. LOGICAL, OPTIONAL, INTENT(IN) :: OMULTITYPE ! !* 0.2 Declaration of local variables ! ------------------------------ ! - CHARACTER(LEN=28) :: YFILENAME ! Name of the field file without header - CHARACTER(LEN=28) :: YFILEHDR ! Name of the field file header + CHARACTER(LEN=NFILENAMELGTMAX) :: YFILENAME ! Name of the field file without header + CHARACTER(LEN=NFILENAMELGTMAX) :: YFILEHDR ! Name of the field file header ! CHARACTER(LEN=7) :: YTYPE ! type of numerical field stored in the ! ! direct access file ('INTEGER','REAL ') diff --git a/src/SURFEX/read_direct_gauss.F90 b/src/SURFEX/read_direct_gauss.F90 index 2ac8e4b30..f203b0587 100644 --- a/src/SURFEX/read_direct_gauss.F90 +++ b/src/SURFEX/read_direct_gauss.F90 @@ -76,6 +76,7 @@ USE MODD_PGDWORK, ONLY : NSIZE_ALL, XALL, NVALNBR, NVALCOUNT, XVALLIST, & USE MODI_REFRESH_PGDWORK ! USE MODD_CSTS, ONLY : XSURF_EPSILON +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX ! IMPLICIT NONE ! @@ -89,15 +90,15 @@ TYPE(SSO_t), INTENT(INOUT) :: USS CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! Type of program CHARACTER(LEN=6), INTENT(IN) :: HSCHEME ! Scheme treated CHARACTER(LEN=6), INTENT(IN) :: HSUBROUTINE ! Name of the subroutine to call - CHARACTER(LEN=28), INTENT(IN) :: HFILENAME ! Name of the field file. + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILENAME ! Name of the field file. CHARACTER(LEN=20), INTENT(IN) :: HFIELD ! Name of the field. LOGICAL, OPTIONAL, INTENT(IN) :: OMULTITYPE ! !* 0.2 Declaration of local variables ! ------------------------------ ! - CHARACTER(LEN=28) :: YFILENAME ! Name of the field file without header - CHARACTER(LEN=28) :: YFILEHDR ! Name of the field file header + CHARACTER(LEN=NFILENAMELGTMAX) :: YFILENAME ! Name of the field file without header + CHARACTER(LEN=NFILENAMELGTMAX) :: YFILEHDR ! Name of the field file header ! CHARACTER(LEN=7) :: YTYPE ! type of numerical field stored in the ! ! direct access file ('INTEGER','REAL ') diff --git a/src/SURFEX/read_flake_date.F90 b/src/SURFEX/read_flake_date.F90 index 3abff4b80..3bb0ab40d 100644 --- a/src/SURFEX/read_flake_date.F90 +++ b/src/SURFEX/read_flake_date.F90 @@ -44,7 +44,7 @@ ! ! USE MODD_TYPE_DATE_SURF -USE MODD_SURF_PAR, ONLY : XUNDEF, NUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF, NUNDEF ! USE MODI_READ_PRE_FLAKE_DAT_CONF USE MODI_READ_PRE_SURFA_DAT_CONF @@ -65,7 +65,7 @@ IMPLICIT NONE ! CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling CHARACTER(LEN=3), INTENT(IN) :: HINIT ! fields to initialize 'ALL', 'PRE', 'PGD' - CHARACTER(LEN=28), INTENT(IN) :: HATMFILE ! atmospheric file name + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HATMFILE ! atmospheric file name CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! atmospheric file type INTEGER, INTENT(IN) :: KYEAR ! current year (UTC) INTEGER, INTENT(IN) :: KMONTH ! current month (UTC) @@ -81,11 +81,11 @@ INTEGER, INTENT(IN) :: KLUOUT ! logical unit of output listing !* 0.2 Declarations of local variables ! ------------------------------- ! - CHARACTER(LEN=28) :: YFILE ! file name + CHARACTER(LEN=NFILENAMELGTMAX) :: YFILE ! file name CHARACTER(LEN=6) :: YFILETYPE ! file type - CHARACTER(LEN=28) :: YFILEPGD ! file name + CHARACTER(LEN=NFILENAMELGTMAX) :: YFILEPGD ! file name CHARACTER(LEN=6) :: YFILEPGDTYPE ! file type - CHARACTER(LEN=28) :: YFILEPGDIN ! file name + CHARACTER(LEN=NFILENAMELGTMAX) :: YFILEPGDIN ! file name CHARACTER(LEN=6) :: YFILEPGDINTYPE ! file type ! LOGICAL :: GUNIF ! flag for prescribed uniform field @@ -94,10 +94,10 @@ REAL(KIND=JPRB) :: ZHOOK_HANDLE !------------------------------------------------------------------------------- ! IF (LHOOK) CALL DR_HOOK('READ_FLAKE_DATE',0,ZHOOK_HANDLE) -YFILE = ' ' +YFILE = '' YFILETYPE = ' ' ! -YFILEPGDIN = ' ' +YFILEPGDIN = '' YFILEPGDINTYPE = ' ' ! !------------------------------------------------------------------------------- diff --git a/src/SURFEX/read_from_surfex_file.F90 b/src/SURFEX/read_from_surfex_file.F90 index e9ca0dceb..c78798f92 100644 --- a/src/SURFEX/read_from_surfex_file.F90 +++ b/src/SURFEX/read_from_surfex_file.F90 @@ -10,7 +10,7 @@ SUBROUTINE READ_FROM_SURFEX_FILE (DTCO, U, & ! USE MODD_DATA_COVER_n, ONLY : DATA_COVER_t USE MODD_SURF_ATM_n, ONLY : SURF_ATM_t -USE MODD_SURF_PAR, ONLY : LEN_HREC +USE MODD_SURF_PAR, ONLY : LEN_HREC, NFILENAMELGTMAX ! USE MODI_INIT_IO_SURF_n USE MODI_END_IO_SURF_n @@ -41,13 +41,13 @@ TYPE(SURF_ATM_t), INTENT(INOUT) :: U ! CHARACTER(LEN=6), INTENT(IN) :: HFTYP - CHARACTER(LEN=28), INTENT(IN) :: HFNAM + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFNAM CHARACTER(LEN=6), INTENT(IN) :: HMASK CHARACTER(LEN=6), INTENT(IN) :: HSCHEME REAL, DIMENSION(:), INTENT(OUT) :: PFIELD CHARACTER(LEN=*), OPTIONAL, INTENT(IN) :: HNAM ! - CHARACTER(LEN=28) :: HNAME + CHARACTER(LEN=NFILENAMELGTMAX) :: HNAME CHARACTER(LEN=LEN_HREC) :: YRECFM INTEGER :: IRESP, I0 ! diff --git a/src/SURFEX/read_isba_date.F90 b/src/SURFEX/read_isba_date.F90 index 363dfc4cf..7e401b1aa 100644 --- a/src/SURFEX/read_isba_date.F90 +++ b/src/SURFEX/read_isba_date.F90 @@ -44,7 +44,7 @@ ! ! USE MODD_TYPE_DATE_SURF -USE MODD_SURF_PAR, ONLY : XUNDEF, NUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF, NUNDEF ! USE MODI_READ_PREP_ISBA_DATE_CONF USE MODI_READ_PRE_SURFA_DAT_CONF @@ -65,7 +65,7 @@ IMPLICIT NONE ! CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling ISBA CHARACTER(LEN=3), INTENT(IN) :: HINIT ! fields to initialize 'ALL', 'PRE', 'PGD' - CHARACTER(LEN=28), INTENT(IN) :: HATMFILE ! atmospheric file name + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HATMFILE ! atmospheric file name CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! atmospheric file type INTEGER, INTENT(IN) :: KYEAR ! current year (UTC) INTEGER, INTENT(IN) :: KMONTH ! current month (UTC) @@ -78,11 +78,11 @@ INTEGER, INTENT(IN) :: KLUOUT ! logical unit of output listing !* 0.2 Declarations of local variables ! ------------------------------- ! - CHARACTER(LEN=28) :: YFILE ! file name + CHARACTER(LEN=NFILENAMELGTMAX) :: YFILE ! file name CHARACTER(LEN=6) :: YFILETYPE ! file type - CHARACTER(LEN=28) :: YFILEPGD ! file name + CHARACTER(LEN=NFILENAMELGTMAX) :: YFILEPGD ! file name CHARACTER(LEN=6) :: YFILEPGDTYPE ! file type - CHARACTER(LEN=28) :: YFILEPGDIN ! file name + CHARACTER(LEN=NFILENAMELGTMAX) :: YFILEPGDIN ! file name CHARACTER(LEN=6) :: YFILEPGDINTYPE ! file type ! LOGICAL :: GUNIF ! flag for prescribed uniform field @@ -91,10 +91,10 @@ REAL(KIND=JPRB) :: ZHOOK_HANDLE !------------------------------------------------------------------------------- ! IF (LHOOK) CALL DR_HOOK('READ_ISBA_DATE',0,ZHOOK_HANDLE) -YFILE = ' ' +YFILE = '' YFILETYPE = ' ' ! -YFILEPGDIN = ' ' +YFILEPGDIN = '' YFILEPGDINTYPE = ' ' ! !------------------------------------------------------------------------------- diff --git a/src/SURFEX/read_latlon.F90 b/src/SURFEX/read_latlon.F90 index 2ad17afae..07449e142 100644 --- a/src/SURFEX/read_latlon.F90 +++ b/src/SURFEX/read_latlon.F90 @@ -45,6 +45,7 @@ USE MODD_SURF_ATM_n, ONLY : SURF_ATM_t USE MODD_SSO_n, ONLY : SSO_t ! USE MODD_PGD_GRID, ONLY : XMESHLENGTH +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX ! USE MODI_GET_LUOUT USE MODI_OPEN_NAMELIST @@ -73,7 +74,7 @@ TYPE(SSO_t), INTENT(INOUT) :: USS CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! Type of program CHARACTER(LEN=6), INTENT(IN) :: HSCHEME ! Scheme treated CHARACTER(LEN=6), INTENT(IN) :: HSUBROUTINE ! Name of the subroutine to call - CHARACTER(LEN=28), INTENT(IN) :: HFILENAME ! Name of the field file. + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILENAME ! Name of the field file. ! !* 0.2 Declaration of local variables read in the data file head ! --------------------------------------------------------- diff --git a/src/SURFEX/read_nam_pgd_cover.F90 b/src/SURFEX/read_nam_pgd_cover.F90 index 5f5f39307..e55ff9ee2 100644 --- a/src/SURFEX/read_nam_pgd_cover.F90 +++ b/src/SURFEX/read_nam_pgd_cover.F90 @@ -41,6 +41,7 @@ ! ----------- ! USE MODD_DATA_COVER_PAR, ONLY : NCOVER +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX ! USE MODI_GET_LUOUT USE MODI_OPEN_NAMELIST @@ -58,7 +59,7 @@ IMPLICIT NONE ! ------------------------ ! CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! Type of program -CHARACTER(LEN=28), INTENT(OUT) :: HCOVER ! file name for cover types +CHARACTER(LEN=NFILENAMELGTMAX), INTENT(OUT) :: HCOVER ! file name for cover types CHARACTER(LEN=6), INTENT(OUT) :: HFILETYPE ! data file type REAL, DIMENSION(:), INTENT(OUT) :: PUNIF_COVER ! value of each cover (cover will be uniform on the horizontal) REAL, INTENT(OUT) :: PRM_COVER ! limit of coverage under which the cover is removed. Default is 1.E-6 @@ -84,7 +85,7 @@ LOGICAL :: GFOUND ! flag when namelist is present REAL, DIMENSION(NCOVER) :: XUNIF_COVER ! value of each cover (cover will be ! uniform on the horizontal) ! -CHARACTER(LEN=28) :: YCOVER ! file name for cover types +CHARACTER(LEN=NFILENAMELGTMAX) :: YCOVER ! file name for cover types CHARACTER(LEN=6) :: YCOVERFILETYPE ! data file type REAL :: XRM_COVER ! limit of coverage under which the ! cover is removed. Default is 1.E-6 @@ -118,7 +119,7 @@ NAMELIST/NAM_COVER/ YCOVER, YCOVERFILETYPE, XUNIF_COVER, XRM_COVER, XRM_COAST, ! IF (LHOOK) CALL DR_HOOK('READ_NAM_PGD_COVER',0,ZHOOK_HANDLE) XUNIF_COVER(:) = 0. -YCOVER = ' ' +YCOVER = '' YCOVERFILETYPE = ' ' XRM_COVER = 1.E-6 XRM_COAST = 1.0 diff --git a/src/SURFEX/read_nam_pgd_dms.F90 b/src/SURFEX/read_nam_pgd_dms.F90 index 2cccb4f88..ccc8ef360 100644 --- a/src/SURFEX/read_nam_pgd_dms.F90 +++ b/src/SURFEX/read_nam_pgd_dms.F90 @@ -46,6 +46,7 @@ USE MODI_CLOSE_NAMELIST ! USE MODE_POS_SURF ! +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX ! USE YOMHOOK ,ONLY : LHOOK, DR_HOOK USE PARKIND1 ,ONLY : JPRB @@ -72,7 +73,7 @@ INTEGER, INTENT(OUT) :: KDMS_NBR ! ! 'BLD' : where buildings are present CHARACTER(LEN=3), DIMENSION(1000), INTENT(OUT) :: HDMS_ATYPE ! avg type for megan pgd fields ! ! 'ARI' , 'INV' - CHARACTER(LEN=28), DIMENSION(1000), INTENT(OUT) :: HDMS_FILE ! data files + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(1000), INTENT(OUT) :: HDMS_FILE ! data files CHARACTER(LEN=6), DIMENSION(1000), INTENT(OUT) :: HDMS_FILETYPE ! type of these files ! ! @@ -102,8 +103,8 @@ INTEGER :: NDMS_NBR ! ! 'BLD' : where buildings are present CHARACTER(LEN=3), DIMENSION(1000) :: CDMS_ATYPE ! avg type for megan pgd fields ! ! 'ARI' , 'INV' - CHARACTER(LEN=28), DIMENSION(1000) :: CDMS_FILE ! data files - CHARACTER(LEN=6), DIMENSION(1000) :: CDMS_FILETYPE ! type of these files + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(1000) :: CDMS_FILE ! data files + CHARACTER(LEN=6), DIMENSION(1000) :: CDMS_FILETYPE ! type of these files REAL(KIND=JPRB) :: ZHOOK_HANDLE ! NAMELIST/NAM_DMS_PGD/ NDMS_NBR, CDMS_NAME, CDMS_AREA, & @@ -117,7 +118,7 @@ IF (LHOOK) CALL DR_HOOK('READ_NAM_PGD_DMS',0,ZHOOK_HANDLE) NDMS_NBR = 0 ! CDMS_NAME = " " -CDMS_FILE = " " +CDMS_FILE = "" CDMS_FILETYPE = " " CDMS_AREA = "ALL" CDMS_ATYPE = "ARI" diff --git a/src/SURFEX/read_nam_pgd_dummy.F90 b/src/SURFEX/read_nam_pgd_dummy.F90 index 971832bcb..f8f73b90b 100644 --- a/src/SURFEX/read_nam_pgd_dummy.F90 +++ b/src/SURFEX/read_nam_pgd_dummy.F90 @@ -46,6 +46,7 @@ USE MODI_CLOSE_NAMELIST ! USE MODE_POS_SURF ! +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX ! USE YOMHOOK ,ONLY : LHOOK, DR_HOOK USE PARKIND1 ,ONLY : JPRB @@ -72,8 +73,8 @@ INTEGER, INTENT(OUT) :: KDUMMY_NBR ! ! 'BLD' : where buildings are present CHARACTER(LEN=3), DIMENSION(1000), INTENT(OUT) :: HDUMMY_ATYPE ! avg type for dummy pgd fields ! ! 'ARI' , 'INV' - CHARACTER(LEN=28), DIMENSION(1000), INTENT(OUT) :: HDUMMY_FILE ! data files - CHARACTER(LEN=6), DIMENSION(1000), INTENT(OUT) :: HDUMMY_FILETYPE ! type of these files + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(1000), INTENT(OUT) :: HDUMMY_FILE ! data files + CHARACTER(LEN=6), DIMENSION(1000), INTENT(OUT) :: HDUMMY_FILETYPE ! type of these files ! ! !* 0.2 Declaration of local variables @@ -102,7 +103,7 @@ INTEGER :: NDUMMY_NBR ! ! 'BLD' : where buildings are present CHARACTER(LEN=3), DIMENSION(1000) :: CDUMMY_ATYPE ! avg type for dummy pgd fields ! ! 'ARI' , 'INV' - CHARACTER(LEN=28), DIMENSION(1000) :: CDUMMY_FILE ! data files + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(1000) :: CDUMMY_FILE ! data files CHARACTER(LEN=6), DIMENSION(1000) :: CDUMMY_FILETYPE ! type of these files REAL(KIND=JPRB) :: ZHOOK_HANDLE ! @@ -117,7 +118,7 @@ IF (LHOOK) CALL DR_HOOK('READ_NAM_PGD_DUMMY',0,ZHOOK_HANDLE) NDUMMY_NBR = 0 ! CDUMMY_NAME = " " -CDUMMY_FILE = " " +CDUMMY_FILE = "" CDUMMY_FILETYPE = " " CDUMMY_AREA = "ALL" CDUMMY_ATYPE = "ARI" diff --git a/src/SURFEX/read_nam_pgd_isba.F90 b/src/SURFEX/read_nam_pgd_isba.F90 index e2b3d2572..b9b4f7557 100644 --- a/src/SURFEX/read_nam_pgd_isba.F90 +++ b/src/SURFEX/read_nam_pgd_isba.F90 @@ -56,7 +56,7 @@ !* 0. DECLARATION ! ----------- ! -USE MODD_SURF_PAR, ONLY : XUNDEF, NUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF, NUNDEF ! USE MODI_GET_LUOUT USE MODI_OPEN_NAMELIST @@ -82,12 +82,12 @@ INTEGER, INTENT(OUT) :: KGROUND_LAYER ! number of soil layers LOGICAL, INTENT(OUT) :: OTR_ML ! new radiative transfert CHARACTER(LEN=4), INTENT(OUT) :: HALBEDO REAL, INTENT(OUT) :: PRM_PATCH ! threshold to remove little fractions of patches - CHARACTER(LEN=28), INTENT(OUT) :: HSAND ! file name for sand fraction - CHARACTER(LEN=28), INTENT(OUT) :: HCLAY ! file name for clay fraction - CHARACTER(LEN=28), INTENT(OUT) :: HCTI ! file name for topographic index - CHARACTER(LEN=28), INTENT(OUT) :: HPERM ! file name for permafrost distribution - CHARACTER(LEN=28), INTENT(OUT) :: HRUNOFFB ! file name for runoffb parameter - CHARACTER(LEN=28), INTENT(OUT) :: HWDRAIN ! file name for wdrain parameter + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(OUT) :: HSAND ! file name for sand fraction + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(OUT) :: HCLAY ! file name for clay fraction + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(OUT) :: HCTI ! file name for topographic index + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(OUT) :: HPERM ! file name for permafrost distribution + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(OUT) :: HRUNOFFB ! file name for runoffb parameter + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(OUT) :: HWDRAIN ! file name for wdrain parameter CHARACTER(LEN=6), INTENT(OUT) :: HSANDFILETYPE ! sand data file type CHARACTER(LEN=6), INTENT(OUT) :: HCLAYFILETYPE ! clay data file type CHARACTER(LEN=6), INTENT(OUT) :: HCTIFILETYPE ! topographic index data file type @@ -104,15 +104,15 @@ LOGICAL, INTENT(OUT) :: OIMP_CLAY ! Imposed values for Clay LOGICAL, INTENT(OUT) :: OIMP_CTI ! Imposed values for topographic index statistics LOGICAL, INTENT(OUT) :: OMEB ! MEB LOGICAL, INTENT(OUT) :: OIMP_PERM ! Imposed maps of permafrost distribution - CHARACTER(LEN=28), INTENT(OUT) :: HSOC_TOP ! file name for organic carbon - CHARACTER(LEN=28), INTENT(OUT) :: HSOC_SUB ! file name for organic carbon + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(OUT) :: HSOC_TOP ! file name for organic carbon + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(OUT) :: HSOC_SUB ! file name for organic carbon CHARACTER(LEN=6), INTENT(OUT) :: HSOCFILETYPE ! organic carbon data file type REAL, INTENT(OUT) :: PUNIF_SOC_TOP ! uniform value of organic carbon top soil (kg/m2) REAL, INTENT(OUT) :: PUNIF_SOC_SUB ! uniform value of organic carbon sub soil (kg/m2) LOGICAL, INTENT(OUT) :: OIMP_SOC ! Imposed maps of organic carbon REAL, DIMENSION(:), INTENT(OUT) :: PSOILGRID ! Soil layer thickness for DIF - CHARACTER(LEN=28), INTENT(OUT) :: HPH ! file name for pH - CHARACTER(LEN=28), INTENT(OUT) :: HFERT ! file name for fertilisation rate + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(OUT) :: HPH ! file name for pH + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(OUT) :: HFERT ! file name for fertilisation rate CHARACTER(LEN=6), INTENT(OUT) :: HPHFILETYPE ! pH data file type CHARACTER(LEN=6), INTENT(OUT) :: HFERTFILETYPE ! fertilisation data file type REAL, INTENT(OUT) :: PUNIF_PH ! uniform value of pH @@ -138,14 +138,14 @@ INTEGER :: NGROUND_LAYER ! number of soil layers LOGICAL :: LTR_ML ! new radiative transfert CHARACTER(LEN=4) :: CALBEDO REAL :: XRM_PATCH ! threshold to remove little fractions of patches - CHARACTER(LEN=28) :: YSAND ! file name for sand fraction - CHARACTER(LEN=28) :: YCLAY ! file name for clay fraction - CHARACTER(LEN=28) :: YCTI ! file name for topographic index - CHARACTER(LEN=28) :: YPERM ! file name for permafrost distribution - CHARACTER(LEN=28) :: YRUNOFFB ! file name for runoffb parameter - CHARACTER(LEN=28) :: YWDRAIN ! file name for wdrain parameter - CHARACTER(LEN=28) :: YPH ! file name for pH - CHARACTER(LEN=28) :: YFERT ! file name for fertilisation rate + CHARACTER(LEN=NFILENAMELGTMAX) :: YSAND ! file name for sand fraction + CHARACTER(LEN=NFILENAMELGTMAX) :: YCLAY ! file name for clay fraction + CHARACTER(LEN=NFILENAMELGTMAX) :: YCTI ! file name for topographic index + CHARACTER(LEN=NFILENAMELGTMAX) :: YPERM ! file name for permafrost distribution + CHARACTER(LEN=NFILENAMELGTMAX) :: YRUNOFFB ! file name for runoffb parameter + CHARACTER(LEN=NFILENAMELGTMAX) :: YWDRAIN ! file name for wdrain parameter + CHARACTER(LEN=NFILENAMELGTMAX) :: YPH ! file name for pH + CHARACTER(LEN=NFILENAMELGTMAX) :: YFERT ! file name for fertilisation rate CHARACTER(LEN=6) :: YSANDFILETYPE ! sand data file type CHARACTER(LEN=6) :: YCLAYFILETYPE ! clay data file type CHARACTER(LEN=6) :: YCTIFILETYPE ! topographic index data file type @@ -169,8 +169,8 @@ REAL :: XUNIF_FERT ! uniform value of fertilisation rate ! REAL, DIMENSION(150) :: XSOILGRID ! Soil layer thickness for DIF ! - CHARACTER(LEN=28) :: YSOC_TOP ! file name for organic carbon expressed in kg/m2 - CHARACTER(LEN=28) :: YSOC_SUB ! file name for organic carbon expressed in kg/m2 + CHARACTER(LEN=NFILENAMELGTMAX) :: YSOC_TOP ! file name for organic carbon expressed in kg/m2 + CHARACTER(LEN=NFILENAMELGTMAX) :: YSOC_SUB ! file name for organic carbon expressed in kg/m2 CHARACTER(LEN=6) :: YSOCFILETYPE ! organic carbon data file type REAL :: XUNIF_SOC_TOP ! uniform value of organic carbon (kg/m2) REAL :: XUNIF_SOC_SUB ! uniform value of organic carbon (kg/m2) @@ -218,16 +218,16 @@ XUNIF_PERM = XUNDEF XUNIF_PH = XUNDEF XUNIF_FERT = XUNDEF ! -YCLAY = ' ' -YSAND = ' ' -YSOC_TOP = ' ' -YSOC_SUB = ' ' -YCTI = ' ' -YPERM = ' ' -YRUNOFFB = ' ' -YWDRAIN = ' ' -YPH = ' ' -YFERT = ' ' +YCLAY = '' +YSAND = '' +YSOC_TOP = '' +YSOC_SUB = '' +YCTI = '' +YPERM = '' +YRUNOFFB = '' +YWDRAIN = '' +YPH = '' +YFERT = '' ! YCLAYFILETYPE = ' ' YSANDFILETYPE = ' ' diff --git a/src/SURFEX/read_nam_pgd_megan.F90 b/src/SURFEX/read_nam_pgd_megan.F90 index 19f90c326..e1792020a 100644 --- a/src/SURFEX/read_nam_pgd_megan.F90 +++ b/src/SURFEX/read_nam_pgd_megan.F90 @@ -46,6 +46,7 @@ USE MODI_CLOSE_NAMELIST ! USE MODE_POS_SURF ! +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX ! USE YOMHOOK ,ONLY : LHOOK, DR_HOOK USE PARKIND1 ,ONLY : JPRB @@ -72,8 +73,8 @@ INTEGER, INTENT(OUT) :: KMEGAN_NBR ! ! 'BLD' : where buildings are present CHARACTER(LEN=3), DIMENSION(1000), INTENT(OUT) :: HMEGAN_ATYPE ! avg type for megan pgd fields ! ! 'ARI' , 'INV' - CHARACTER(LEN=28), DIMENSION(1000), INTENT(OUT) :: HMEGAN_FILE ! data files - CHARACTER(LEN=6), DIMENSION(1000), INTENT(OUT) :: HMEGAN_FILETYPE ! type of these files + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(1000), INTENT(OUT) :: HMEGAN_FILE ! data files + CHARACTER(LEN=6), DIMENSION(1000), INTENT(OUT) :: HMEGAN_FILETYPE ! type of these files ! ! !* 0.2 Declaration of local variables @@ -102,8 +103,8 @@ INTEGER :: NMEGAN_NBR ! ! 'BLD' : where buildings are present CHARACTER(LEN=3), DIMENSION(1000) :: CMEGAN_ATYPE ! avg type for megan pgd fields ! ! 'ARI' , 'INV' - CHARACTER(LEN=28), DIMENSION(1000) :: CMEGAN_FILE ! data files - CHARACTER(LEN=6), DIMENSION(1000) :: CMEGAN_FILETYPE ! type of these files + CHARACTER(LEN=NFILENAMELGTMAX), DIMENSION(1000) :: CMEGAN_FILE ! data files + CHARACTER(LEN=6), DIMENSION(1000) :: CMEGAN_FILETYPE ! type of these files REAL(KIND=JPRB) :: ZHOOK_HANDLE ! NAMELIST/NAM_MEGAN_PGD/ NMEGAN_NBR, CMEGAN_NAME, CMEGAN_AREA, & @@ -117,7 +118,7 @@ IF (LHOOK) CALL DR_HOOK('READ_NAM_PGD_MEGAN',0,ZHOOK_HANDLE) NMEGAN_NBR = 0 ! CMEGAN_NAME = " " -CMEGAN_FILE = " " +CMEGAN_FILE = "" CMEGAN_FILETYPE = " " CMEGAN_AREA = "ALL" CMEGAN_ATYPE = "ARI" diff --git a/src/SURFEX/read_nam_pgd_orography.F90 b/src/SURFEX/read_nam_pgd_orography.F90 index 17402a60d..505ae354b 100644 --- a/src/SURFEX/read_nam_pgd_orography.F90 +++ b/src/SURFEX/read_nam_pgd_orography.F90 @@ -44,7 +44,7 @@ !* 0. DECLARATION ! ----------- ! -USE MODD_SURF_PAR, ONLY : XUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF ! USE MODI_GET_LUOUT USE MODI_OPEN_NAMELIST @@ -62,7 +62,7 @@ IMPLICIT NONE ! ------------------------ ! CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! Type of program - CHARACTER(LEN=28), INTENT(OUT) :: HZS ! file name for orography + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(OUT) :: HZS ! file name for orography CHARACTER(LEN=6), INTENT(OUT) :: HFILETYPE ! data file type REAL, INTENT(OUT) :: PUNIF_ZS ! uniform orography CHARACTER(LEN=3), INTENT(OUT) :: HOROGTYPE ! orogpraphy type @@ -79,7 +79,7 @@ REAL, INTENT(OUT) :: PHALORADIUS ! radius of the halo in which ! 'MANNERS' = Manners et al. 2012 LOGICAL, INTENT(OUT) :: OFSSOSVF ! compute SVF on fractional slopes if possible ! -CHARACTER(LEN=28), INTENT(OUT),OPTIONAL :: HSLOPE ! file name for slope +CHARACTER(LEN=NFILENAMELGTMAX), INTENT(OUT),OPTIONAL :: HSLOPE ! file name for slope CHARACTER(LEN=6), INTENT(OUT),OPTIONAL :: HSLOPEFILETYPE ! data file type LOGICAL, INTENT(OUT),OPTIONAL :: OEXPLICIT_SLOPE ! Slope is computed from explicit ZS field and not subgrid orography ! @@ -94,10 +94,10 @@ LOGICAL :: GFOUND ! flag when namelist is present !* 0.3 Declaration of namelists ! ------------------------ ! - CHARACTER(LEN=28) :: YZS ! file name for orography - CHARACTER(LEN=6) :: YZSFILETYPE ! data file type -CHARACTER(LEN=28) :: YSLOPE ! file name for slope -CHARACTER(LEN=6) :: YSLOPEFILETYPE ! data file type + CHARACTER(LEN=NFILENAMELGTMAX) :: YZS ! file name for orography + CHARACTER(LEN=6) :: YZSFILETYPE ! data file type +CHARACTER(LEN=NFILENAMELGTMAX) :: YSLOPE ! file name for slope +CHARACTER(LEN=6) :: YSLOPEFILETYPE ! data file type REAL :: XUNIF_ZS ! uniform orography CHARACTER(LEN=3) :: COROGTYPE ! orogpraphy type ! ! 'AVG' : average orography @@ -131,9 +131,9 @@ NAMELIST/NAM_ZS/YZS, YZSFILETYPE, XUNIF_ZS, COROGTYPE, XENV, LIMP_ZS , & ! IF (LHOOK) CALL DR_HOOK('READ_NAM_PGD_OROGRAPHY',0,ZHOOK_HANDLE) XUNIF_ZS = XUNDEF -YZS = ' ' +YZS = '' YZSFILETYPE = ' ' -YSLOPE = ' ' +YSLOPE = '' YSLOPEFILETYPE = ' ' ! COROGTYPE = 'ENV' diff --git a/src/SURFEX/read_nam_pgd_seabathy.F90 b/src/SURFEX/read_nam_pgd_seabathy.F90 index bd0762228..58059669d 100644 --- a/src/SURFEX/read_nam_pgd_seabathy.F90 +++ b/src/SURFEX/read_nam_pgd_seabathy.F90 @@ -41,7 +41,7 @@ !* 0. DECLARATION ! ----------- ! -USE MODD_SURF_PAR, ONLY : XUNDEF, NUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF, NUNDEF ! USE MODI_GET_LUOUT USE MODI_OPEN_NAMELIST @@ -57,12 +57,11 @@ IMPLICIT NONE !* 0.1 Declaration of arguments ! ------------------------ ! - CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! Type of program - CHARACTER(LEN=28), INTENT(OUT) :: HSEABATHY ! file name for bathymetry - CHARACTER(LEN=6), INTENT(OUT) :: HSEABATHYFILETYPE ! bathymetry data file type - CHARACTER(LEN=28), INTENT(OUT) :: HNCVARNAME ! variable to read in netcdf - ! file -REAL, INTENT(OUT) :: PUNIF_SEABATHY ! uniform value of bathymetry + CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! Type of program + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(OUT) :: HSEABATHY ! file name for bathymetry + CHARACTER(LEN=6), INTENT(OUT) :: HSEABATHYFILETYPE ! bathymetry data file type + CHARACTER(LEN=28), INTENT(OUT) :: HNCVARNAME ! variable to read in netcdf file +REAL, INTENT(OUT) :: PUNIF_SEABATHY ! uniform value of bathymetry ! ! !* 0.2 Declaration of local variables @@ -75,9 +74,9 @@ LOGICAL :: GFOUND ! flag when namelist is present !* 0.3 Declaration of namelists ! ------------------------ ! - CHARACTER(LEN=28) :: YSEABATHY ! file name for bathymetry - CHARACTER(LEN=6) :: YSEABATHYFILETYPE ! bathymetry data file type - CHARACTER(LEN=28) :: YNCVARNAME ! variable to read in netcdf + CHARACTER(LEN=NFILENAMELGTMAX) :: YSEABATHY ! file name for bathymetry + CHARACTER(LEN=6) :: YSEABATHYFILETYPE ! bathymetry data file type + CHARACTER(LEN=28) :: YNCVARNAME ! variable to read in netcdf ! file REAL :: XUNIF_SEABATHY ! uniform value of bathymetry REAL(KIND=JPRB) :: ZHOOK_HANDLE @@ -91,7 +90,7 @@ NAMELIST/NAM_SEABATHY/ YSEABATHY, YSEABATHYFILETYPE, YNCVARNAME, XUNIF_SEABATHY ! IF (LHOOK) CALL DR_HOOK('READ_NAM_PGD_SEABATHY',0,ZHOOK_HANDLE) XUNIF_SEABATHY = -300. -YSEABATHY = ' ' +YSEABATHY = '' YSEABATHYFILETYPE = ' ' YNCVARNAME='rose ' ! diff --git a/src/SURFEX/read_nam_pgd_teb_greenroof.F90 b/src/SURFEX/read_nam_pgd_teb_greenroof.F90 index 1ca63bdd4..94cf52cf5 100644 --- a/src/SURFEX/read_nam_pgd_teb_greenroof.F90 +++ b/src/SURFEX/read_nam_pgd_teb_greenroof.F90 @@ -42,7 +42,7 @@ !* 0. DECLARATION ! ----------- ! -USE MODD_SURF_PAR, ONLY : XUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF ! USE MODI_GET_LUOUT USE MODI_OPEN_NAMELIST @@ -68,10 +68,10 @@ REAL,DIMENSION(:), INTENT(OUT) :: PUNIF_OM_GR REAL,DIMENSION(:), INTENT(OUT) :: PUNIF_CLAY_GR REAL,DIMENSION(:), INTENT(OUT) :: PUNIF_SAND_GR REAL,DIMENSION(:), INTENT(OUT) :: PUNIF_LAI_GR - CHARACTER(LEN=28),DIMENSION(:), INTENT(OUT) :: HFNAM_OM_GR - CHARACTER(LEN=28),DIMENSION(:), INTENT(OUT) :: HFNAM_CLAY_GR - CHARACTER(LEN=28),DIMENSION(:), INTENT(OUT) :: HFNAM_SAND_GR - CHARACTER(LEN=28),DIMENSION(:), INTENT(OUT) :: HFNAM_LAI_GR + CHARACTER(LEN=NFILENAMELGTMAX),DIMENSION(:), INTENT(OUT) :: HFNAM_OM_GR + CHARACTER(LEN=NFILENAMELGTMAX),DIMENSION(:), INTENT(OUT) :: HFNAM_CLAY_GR + CHARACTER(LEN=NFILENAMELGTMAX),DIMENSION(:), INTENT(OUT) :: HFNAM_SAND_GR + CHARACTER(LEN=NFILENAMELGTMAX),DIMENSION(:), INTENT(OUT) :: HFNAM_LAI_GR CHARACTER(LEN=6),DIMENSION(:), INTENT(OUT) :: HFTYP_OM_GR CHARACTER(LEN=6),DIMENSION(:), INTENT(OUT) :: HFTYP_CLAY_GR CHARACTER(LEN=6),DIMENSION(:), INTENT(OUT) :: HFTYP_SAND_GR @@ -106,10 +106,10 @@ REAL,DIMENSION(NTIME_GR_MAX) :: XUNIF_LAI_GR ! LAI of green ro ! ! name of files containing data ! - CHARACTER(LEN=28),DIMENSION(NLAYER_GR_MAX) :: CFNAM_OM_GR ! fraction of organic matter (OM) in green roof layer - CHARACTER(LEN=28),DIMENSION(NLAYER_GR_MAX) :: CFNAM_CLAY_GR ! fraction of clay for the non-OM part of the green roof layer - CHARACTER(LEN=28),DIMENSION(NLAYER_GR_MAX) :: CFNAM_SAND_GR ! fraction of sand for the non-OM part of the green roof layer - CHARACTER(LEN=28),DIMENSION(NTIME_GR_MAX) :: CFNAM_LAI_GR ! LAI of green roof + CHARACTER(LEN=NFILENAMELGTMAX),DIMENSION(NLAYER_GR_MAX) :: CFNAM_OM_GR ! fraction of organic matter (OM) in green roof layer + CHARACTER(LEN=NFILENAMELGTMAX),DIMENSION(NLAYER_GR_MAX) :: CFNAM_CLAY_GR ! fraction of clay for the non-OM part of the green roof layer + CHARACTER(LEN=NFILENAMELGTMAX),DIMENSION(NLAYER_GR_MAX) :: CFNAM_SAND_GR ! fraction of sand for the non-OM part of the green roof layer + CHARACTER(LEN=NFILENAMELGTMAX),DIMENSION(NTIME_GR_MAX) :: CFNAM_LAI_GR ! LAI of green roof ! ! type of files containing data ! @@ -142,10 +142,10 @@ XUNIF_CLAY_GR = XUNDEF XUNIF_SAND_GR = XUNDEF XUNIF_LAI_GR = XUNDEF ! -CFNAM_OM_GR = ' ' -CFNAM_CLAY_GR = ' ' -CFNAM_SAND_GR = ' ' -CFNAM_LAI_GR = ' ' +CFNAM_OM_GR = '' +CFNAM_CLAY_GR = '' +CFNAM_SAND_GR = '' +CFNAM_LAI_GR = '' ! CFTYP_OM_GR = ' ' CFTYP_CLAY_GR = ' ' diff --git a/src/SURFEX/read_netcdf.F90 b/src/SURFEX/read_netcdf.F90 index faa41334b..2bde3ddd8 100644 --- a/src/SURFEX/read_netcdf.F90 +++ b/src/SURFEX/read_netcdf.F90 @@ -34,6 +34,7 @@ use modd_netcdf_sfx, only : IDCDF_KIND USE MODD_SURF_ATM_GRID_n, ONLY : SURF_ATM_GRID_t USE MODD_SURF_ATM_n, ONLY : SURF_ATM_t USE MODD_SSO_n, ONLY : SSO_t +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX ! USE MODD_PGD_GRID, ONLY : LLATLONMASK ! @@ -57,7 +58,7 @@ TYPE(SSO_t), INTENT(INOUT) :: USS ! CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! Type of program CHARACTER(LEN=6), INTENT(IN) :: HSUBROUTINE ! Name of the subroutine to call - CHARACTER(LEN=28), INTENT(IN) :: HFILENAME ! Name of the field file. + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILENAME ! Name of the field file. CHARACTER(LEN=28), INTENT(IN) :: HNCVARNAME ! Name of the variable in netcdf file ! ! diff --git a/src/SURFEX/read_pgd_isban.F90 b/src/SURFEX/read_pgd_isban.F90 index 6293f5626..f1fc4640d 100644 --- a/src/SURFEX/read_pgd_isban.F90 +++ b/src/SURFEX/read_pgd_isban.F90 @@ -75,7 +75,7 @@ USE MODD_DATA_COVER, ONLY : LDATA_IRRIG USE MODD_DATA_COVER_PAR, ONLY : JPCOVER, NCAR_FILES USE MODD_AGRI, ONLY : LIRRIGMODE, XTHRESHOLD_DEFAULT, XTHRESHOLD, NVEG_IRR, NPATCH_TREE ! -USE MODD_SURF_PAR, ONLY : XUNDEF, LEN_HREC +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF, LEN_HREC USE MODD_ISBA_PAR, ONLY : XOPTIMGRID ! USE MODI_READ_NAM_PGD_ISBA @@ -153,14 +153,14 @@ CHARACTER(LEN=3) :: YPHOTO ! photosynthesis option LOGICAL :: GTR_ML ! new radiative transfert CHARACTER(LEN=4) :: YALBEDO REAL :: ZRM_PATCH ! threshold to remove little fractions of patches -CHARACTER(LEN=28) :: YSAND ! file name for sand fraction -CHARACTER(LEN=28) :: YCLAY ! file name for clay fraction -CHARACTER(LEN=28) :: YSOC_TOP ! file name for organic carbon top soil -CHARACTER(LEN=28) :: YSOC_SUB ! file name for organic carbon sub soil -CHARACTER(LEN=28) :: YCTI ! file name for topographic index -CHARACTER(LEN=28) :: YRUNOFFB ! file name for runoffb parameter -CHARACTER(LEN=28) :: YWDRAIN ! file name for wdrain parameter -CHARACTER(LEN=28) :: YPERM ! file name for permafrost distribution +CHARACTER(LEN=NFILENAMELGTMAX) :: YSAND ! file name for sand fraction +CHARACTER(LEN=NFILENAMELGTMAX) :: YCLAY ! file name for clay fraction +CHARACTER(LEN=NFILENAMELGTMAX) :: YSOC_TOP ! file name for organic carbon top soil +CHARACTER(LEN=NFILENAMELGTMAX) :: YSOC_SUB ! file name for organic carbon sub soil +CHARACTER(LEN=NFILENAMELGTMAX) :: YCTI ! file name for topographic index +CHARACTER(LEN=NFILENAMELGTMAX) :: YRUNOFFB ! file name for runoffb parameter +CHARACTER(LEN=NFILENAMELGTMAX) :: YWDRAIN ! file name for wdrain parameter +CHARACTER(LEN=NFILENAMELGTMAX) :: YPERM ! file name for permafrost distribution CHARACTER(LEN=6) :: YSANDFILETYPE ! sand data file type CHARACTER(LEN=6) :: YCLAYFILETYPE ! clay data file type CHARACTER(LEN=6) :: YSOCFILETYPE ! organic carbon data file type @@ -182,8 +182,8 @@ LOGICAL :: LIMP_CTI ! Imposed maps of topographic index LOGICAL :: LIMP_PERM ! Imposed maps of permafrost distribution LOGICAL :: GLULCC REAL, DIMENSION(150) :: ZSOILGRID ! Soil grid reference for DIF -CHARACTER(LEN=28) :: YPH ! file name for pH -CHARACTER(LEN=28) :: YFERT ! file name for fertilisation rate +CHARACTER(LEN=NFILENAMELGTMAX) :: YPH ! file name for pH +CHARACTER(LEN=NFILENAMELGTMAX) :: YFERT ! file name for fertilisation rate CHARACTER(LEN=6) :: YPHFILETYPE ! pH data file type CHARACTER(LEN=6) :: YFERTFILETYPE ! fertilisation data file type REAL :: XUNIF_PH ! uniform value of pH diff --git a/src/SURFEX/read_pgd_netcdf.F90 b/src/SURFEX/read_pgd_netcdf.F90 index 904eac340..d22814cfe 100644 --- a/src/SURFEX/read_pgd_netcdf.F90 +++ b/src/SURFEX/read_pgd_netcdf.F90 @@ -45,6 +45,8 @@ USE MODE_READ_CDF, ONLY :HANDLE_ERR_CDF USE MODI_PT_BY_PT_TREATMENT USE MODI_GET_LUOUT +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX + USE YOMHOOK ,ONLY : LHOOK, DR_HOOK USE PARKIND1 ,ONLY : JPRB ! @@ -63,7 +65,7 @@ TYPE(SSO_t), INTENT(INOUT) :: USS CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! Type of program CHARACTER(LEN=6), INTENT(IN) :: HSCHEME ! Scheme treated CHARACTER(LEN=6), INTENT(IN) :: HSUBROUTINE ! Name of the subroutine to call - CHARACTER(LEN=28), INTENT(IN) :: HFILENAME ! Name of the field file. + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILENAME ! Name of the field file. CHARACTER(LEN=20), INTENT(IN) :: HFIELD ! name of variable REAL,DIMENSION(:),INTENT(INOUT),OPTIONAL :: PFIELD ! output a variable diff --git a/src/SURFEX/read_prep_file_date.F90 b/src/SURFEX/read_prep_file_date.F90 index 14b892279..304593f78 100644 --- a/src/SURFEX/read_prep_file_date.F90 +++ b/src/SURFEX/read_prep_file_date.F90 @@ -32,7 +32,7 @@ SUBROUTINE READ_PREP_FILE_DATE (HPROGRAM,HFILE,HFILETYPE,TPTIME,KLUOUT) USE MODD_IO_BUFF, ONLY : CREC, NREC ! USE MODD_TYPE_DATE_SURF -USE MODD_SURF_PAR, ONLY: LEN_HREC +USE MODD_SURF_PAR, ONLY: LEN_HREC, NFILENAMELGTMAX ! USE MODI_PREP_GRIB_GRID USE MODI_READ_BUFFER @@ -52,7 +52,7 @@ IMPLICIT NONE ! ! CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes - CHARACTER(LEN=28), INTENT(IN) :: HFILE ! name of file + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILE ! name of file CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE ! file type TYPE (DATE_TIME), INTENT(OUT) :: TPTIME ! grib date and time INTEGER, INTENT(IN) :: KLUOUT ! logical unit of output listing diff --git a/src/SURFEX/read_prep_flake_conf.F90 b/src/SURFEX/read_prep_flake_conf.F90 index 59e8ed234..0a9424d38 100644 --- a/src/SURFEX/read_prep_flake_conf.F90 +++ b/src/SURFEX/read_prep_flake_conf.F90 @@ -58,7 +58,7 @@ USE MODD_PREP_FLAKE, ONLY : CFILE_FLAKE, CFILEPGD_FLAKE, CTYPE, CTYPEPGD, & XUNIF_H_B1, & LCLIM_LAKE ! -USE MODD_SURF_PAR, ONLY : XUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF ! ! USE YOMHOOK ,ONLY : LHOOK, DR_HOOK @@ -71,18 +71,18 @@ IMPLICIT NONE !* 0.1 Declarations of arguments ! ------------------------- ! - CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling ISBA - CHARACTER(LEN=7), INTENT(IN) :: HVAR ! variable treated - CHARACTER(LEN=28), INTENT(OUT) :: HFILE ! file name - CHARACTER(LEN=6), INTENT(OUT) :: HFILETYPE! file type - CHARACTER(LEN=28), INTENT(OUT) :: HFILEPGD ! file name - CHARACTER(LEN=6), INTENT(OUT) :: HFILEPGDTYPE! file type - CHARACTER(LEN=28), INTENT(IN) :: HATMFILE ! atmospheric file name - CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! atmospheric file type - CHARACTER(LEN=28), INTENT(IN) :: HPGDFILE ! atmospheric file name - CHARACTER(LEN=6), INTENT(IN) :: HPGDFILETYPE! atmospheric file type -INTEGER, INTENT(IN) :: KLUOUT ! logical unit of output listing -LOGICAL, INTENT(OUT) :: OUNIF ! flag for prescribed uniform field + CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling ISBA + CHARACTER(LEN=7), INTENT(IN) :: HVAR ! variable treated + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(OUT) :: HFILE ! file name + CHARACTER(LEN=6), INTENT(OUT) :: HFILETYPE! file type + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(OUT) :: HFILEPGD ! file name + CHARACTER(LEN=6), INTENT(OUT) :: HFILEPGDTYPE! file type + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HATMFILE ! atmospheric file name + CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! atmospheric file type + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HPGDFILE ! atmospheric file name + CHARACTER(LEN=6), INTENT(IN) :: HPGDFILETYPE! atmospheric file type +INTEGER, INTENT(IN) :: KLUOUT ! logical unit of output listing +LOGICAL, INTENT(OUT) :: OUNIF ! flag for prescribed uniform field ! !* 0.2 Declarations of local variables @@ -92,7 +92,7 @@ INTEGER :: IRESP ! IRESP : return-code if a problem appears ! at the open of the file in LFI routines INTEGER :: ILUNAM ! Logical unit of namelist file ! - CHARACTER(LEN=28) :: YNAMELIST ! namelist file + CHARACTER(LEN=NFILENAMELGTMAX) :: YNAMELIST ! namelist file ! LOGICAL :: GFOUND ! Return code when searching namelist REAL(KIND=JPRB) :: ZHOOK_HANDLE @@ -100,10 +100,10 @@ REAL(KIND=JPRB) :: ZHOOK_HANDLE ! ! IF (LHOOK) CALL DR_HOOK('READ_PREP_FLAKE_CONF',0,ZHOOK_HANDLE) -HFILE = ' ' +HFILE = '' HFILETYPE = ' ' ! -HFILEPGD = ' ' +HFILEPGD = '' HFILEPGDTYPE = ' ' ! OUNIF = .FALSE. @@ -142,65 +142,65 @@ SELECT CASE (HVAR) CASE('T_SNOW ') OUNIF = (XUNIF_T_SNOW/=XUNDEF) IF (HFILETYPE=='GRIB '.OR.HFILETYPE=='ASCLLV') THEN ! all fields but TS - HFILE = ' ' ! are not readed + HFILE = '' ! are not read HFILETYPE = ' ' ! from grib files END IF CASE('T_ICE ') OUNIF = (XUNIF_T_ICE/=XUNDEF) IF (HFILETYPE=='GRIB '.OR.HFILETYPE=='ASCLLV') THEN - HFILE = ' ' + HFILE = '' HFILETYPE = ' ' END IF CASE('T_MNW ') OUNIF = .FALSE. IF (HFILETYPE=='GRIB '.OR.HFILETYPE=='ASCLLV') THEN - HFILE = ' ' + HFILE = '' HFILETYPE = ' ' END IF CASE('T_WML ') OUNIF = (XUNIF_T_WML/=XUNDEF) - HFILE = ' ' + HFILE = '' HFILETYPE = ' ' CASE('T_BOT ') OUNIF = (XUNIF_T_BOT/=XUNDEF) IF (HFILETYPE=='GRIB '.OR.HFILETYPE=='ASCLLV') THEN - HFILE = ' ' + HFILE = '' HFILETYPE = ' ' END IF CASE('T_B1 ') OUNIF = (XUNIF_T_B1/=XUNDEF) IF (HFILETYPE=='GRIB '.OR.HFILETYPE=='ASCLLV') THEN - HFILE = ' ' + HFILE = '' HFILETYPE = ' ' END IF CASE('CT ') OUNIF = (XUNIF_CT/=XUNDEF) IF (HFILETYPE=='GRIB '.OR.HFILETYPE=='ASCLLV') THEN - HFILE = ' ' + HFILE = '' HFILETYPE = ' ' END IF CASE('H_SNOW ') OUNIF = (XUNIF_H_SNOW/=XUNDEF) IF (HFILETYPE=='GRIB '.OR.HFILETYPE=='ASCLLV') THEN - HFILE = ' ' + HFILE = '' HFILETYPE = ' ' END IF CASE('H_ICE ') OUNIF = (XUNIF_H_ICE/=XUNDEF) IF (HFILETYPE=='GRIB '.OR.HFILETYPE=='ASCLLV') THEN - HFILE = ' ' + HFILE = '' HFILETYPE = ' ' END IF CASE('H_ML ') IF (HFILETYPE=='GRIB '.OR.HFILETYPE=='ASCLLV') THEN - HFILE = ' ' + HFILE = '' HFILETYPE = ' ' END IF OUNIF = (XUNIF_H_ML/=XUNDEF) CASE('H_B1 ') OUNIF = (XUNIF_H_B1/=XUNDEF) IF (HFILETYPE=='GRIB '.OR.HFILETYPE=='ASCLLV') THEN - HFILE = ' ' + HFILE = '' HFILETYPE = ' ' END IF END SELECT diff --git a/src/SURFEX/read_prep_garden_snow.F90 b/src/SURFEX/read_prep_garden_snow.F90 index 86167c933..767177485 100644 --- a/src/SURFEX/read_prep_garden_snow.F90 +++ b/src/SURFEX/read_prep_garden_snow.F90 @@ -48,7 +48,7 @@ USE MODN_PREP_GARDEN_SNOW USE MODD_READ_NAMELIST, ONLY : LNAM_READ ! -USE MODD_SURF_PAR, ONLY : XUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF USE MODD_SNOW_PAR, ONLY : XANSMIN, XRHOSMAX USE MODD_CSTS, ONLY : XTT ! @@ -78,10 +78,10 @@ IMPLICIT NONE CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling ISBA CHARACTER(LEN=3), INTENT(OUT) :: HSNOW ! snow scheme INTEGER, INTENT(OUT) :: KSNOW_LAYER ! number of snow layers -CHARACTER(LEN=28), OPTIONAL, INTENT(OUT) :: HFILE ! file name -CHARACTER(LEN=6), OPTIONAL, INTENT(OUT) :: HFILETYPE ! file type - CHARACTER(LEN=28),OPTIONAL, INTENT(OUT) :: HFILEPGD ! file name - CHARACTER(LEN=6), OPTIONAL, INTENT(OUT) :: HFILEPGDTYPE ! file type +CHARACTER(LEN=NFILENAMELGTMAX), OPTIONAL, INTENT(OUT) :: HFILE ! file name +CHARACTER(LEN=6), OPTIONAL, INTENT(OUT) :: HFILETYPE ! file type + CHARACTER(LEN=NFILENAMELGTMAX),OPTIONAL, INTENT(OUT) :: HFILEPGD ! file name + CHARACTER(LEN=6), OPTIONAL, INTENT(OUT) :: HFILEPGDTYPE ! file type LOGICAL, OPTIONAL, INTENT(OUT) :: OUNIF ! uniform snow ! !* 0.2 Declarations of local variables @@ -89,7 +89,7 @@ CHARACTER(LEN=6), OPTIONAL, INTENT(OUT) :: HFILETYPE ! file type ! CHARACTER(LEN=3) :: CSNOW INTEGER :: NSNOW_LAYER -CHARACTER(LEN=28) :: CFILE_SNOW, CFILEPGD_SNOW +CHARACTER(LEN=NFILENAMELGTMAX) :: CFILE_SNOW, CFILEPGD_SNOW LOGICAL :: LSNOW_IDEAL, LSNOW_FRAC_TOT, LSWEMAX REAL :: XASNOW, XSWEMAX REAL, DIMENSION(NSNOW_LAYER_MAX) :: XWSNOW, XZSNOW, XRSNOW, XTSNOW, XLWCSNOW, XSG1SNOW, XSG2SNOW,& @@ -168,8 +168,8 @@ IF (LNAM_READ) THEN ! CSNOW = 'D95' NSNOW_LAYER = 1 - CFILE_SNOW = ' ' - CFILEPGD_SNOW = ' ' + CFILE_SNOW = '' + CFILEPGD_SNOW = '' LSNOW_IDEAL = .FALSE. LSNOW_FRAC_TOT = .FALSE. XWSNOW(:) = XUNDEF @@ -287,7 +287,7 @@ IF(PRESENT(HFILE))THEN IF(LFILE)THEN HFILE = CFILE_SNOW_GD ELSE - HFILE = ' ' + HFILE = '' ENDIF ENDIF IF(PRESENT(HFILETYPE))THEN @@ -308,7 +308,7 @@ IF(PRESENT(HFILEPGD))THEN IF(LFILE)THEN HFILEPGD = CFILEPGD_SNOW_GD ELSE - HFILEPGD = ' ' + HFILEPGD = '' ENDIF ENDIF IF (LFILE.AND.PRESENT(OUNIF)) OUNIF=.FALSE. diff --git a/src/SURFEX/read_prep_greenroof_snow.F90 b/src/SURFEX/read_prep_greenroof_snow.F90 index bad766550..bb7b69d9d 100644 --- a/src/SURFEX/read_prep_greenroof_snow.F90 +++ b/src/SURFEX/read_prep_greenroof_snow.F90 @@ -44,7 +44,7 @@ USE MODN_PREP_GREENROOF_SNOW USE MODD_READ_NAMELIST, ONLY : LNAM_READ ! -USE MODD_SURF_PAR, ONLY : XUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF USE MODD_SNOW_PAR, ONLY : XANSMIN, XRHOSMAX USE MODD_CSTS, ONLY : XTT ! @@ -74,10 +74,10 @@ IMPLICIT NONE CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling ISBA CHARACTER(LEN=3), INTENT(OUT) :: HSNOW ! snow scheme INTEGER, INTENT(OUT) :: KSNOW_LAYER ! number of snow layers - CHARACTER(LEN=28), OPTIONAL, INTENT(OUT) :: HFILE ! file name - CHARACTER(LEN=6), OPTIONAL, INTENT(OUT) :: HFILETYPE ! file type - CHARACTER(LEN=28), OPTIONAL, INTENT(OUT) :: HFILEPGD ! file name - CHARACTER(LEN=6), OPTIONAL, INTENT(OUT) :: HFILEPGDTYPE ! file type + CHARACTER(LEN=NFILENAMELGTMAX), OPTIONAL, INTENT(OUT) :: HFILE ! file name + CHARACTER(LEN=6), OPTIONAL, INTENT(OUT) :: HFILETYPE ! file type + CHARACTER(LEN=NFILENAMELGTMAX), OPTIONAL, INTENT(OUT) :: HFILEPGD ! file name + CHARACTER(LEN=6), OPTIONAL, INTENT(OUT) :: HFILEPGDTYPE ! file type LOGICAL, OPTIONAL, INTENT(OUT) :: OUNIF ! uniform snow ! !* 0.2 Declarations of local variables @@ -85,7 +85,7 @@ INTEGER, INTENT(OUT) :: KSNOW_LAYER ! number of snow layers ! CHARACTER(LEN=3) :: CSNOW INTEGER :: NSNOW_LAYER -CHARACTER(LEN=28) :: CFILE_SNOW, CFILEPGD_SNOW +CHARACTER(LEN=NFILENAMELGTMAX) :: CFILE_SNOW, CFILEPGD_SNOW LOGICAL :: LSNOW_IDEAL, LSNOW_FRAC_TOT, LSWEMAX REAL :: XASNOW, XSWEMAX REAL, DIMENSION(NSNOW_LAYER_MAX) :: XWSNOW, XZSNOW, XRSNOW, XTSNOW, XLWCSNOW, XSG1SNOW, XSG2SNOW,& @@ -163,7 +163,7 @@ IF (LNAM_READ) THEN ! CSNOW = '3-L' NSNOW_LAYER = 3 - CFILE_SNOW = ' ' + CFILE_SNOW = '' LSNOW_IDEAL = .FALSE. LSNOW_FRAC_TOT = .FALSE. XWSNOW(:) = XUNDEF @@ -275,7 +275,7 @@ IF(PRESENT(HFILE))THEN IF(LFILE)THEN HFILE = CFILE_SNOW_GR ELSE - HFILE = ' ' + HFILE = '' ENDIF ENDIF IF(PRESENT(HFILETYPE))THEN @@ -296,7 +296,7 @@ IF(PRESENT(HFILEPGD))THEN IF(LFILE)THEN HFILEPGD = CFILEPGD_SNOW_GR ELSE - HFILEPGD = ' ' + HFILEPGD = '' ENDIF ENDIF IF (LFILE.AND.PRESENT(OUNIF)) OUNIF=.FALSE. diff --git a/src/SURFEX/read_prep_isba_conf.F90 b/src/SURFEX/read_prep_isba_conf.F90 index ce579c66a..5eb0bd788 100644 --- a/src/SURFEX/read_prep_isba_conf.F90 +++ b/src/SURFEX/read_prep_isba_conf.F90 @@ -53,7 +53,7 @@ USE MODD_PREP_ISBA, ONLY : CFILE_ISBA, CTYPE, CFILEPGD_ISBA, CTYPEPGD, & XTG_SURF, XTG_ROOT, XTG_DEEP, & XWSNOW, XTSNOW, XRSNOW, XASNOW ! -USE MODD_SURF_PAR, ONLY : XUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF ! ! USE YOMHOOK ,ONLY : LHOOK, DR_HOOK @@ -66,18 +66,18 @@ IMPLICIT NONE !* 0.1 Declarations of arguments ! ------------------------- ! - CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling ISBA - CHARACTER(LEN=7), INTENT(IN) :: HVAR ! variable treated - CHARACTER(LEN=28), INTENT(OUT) :: HFILE ! file name - CHARACTER(LEN=6), INTENT(OUT) :: HFILETYPE ! file type - CHARACTER(LEN=28), INTENT(OUT) :: HFILEPGD ! file name - CHARACTER(LEN=6), INTENT(OUT) :: HFILEPGDTYPE! file type - CHARACTER(LEN=28), INTENT(IN) :: HATMFILE ! atmospheric file name - CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! atmospheric file type - CHARACTER(LEN=28), INTENT(IN) :: HPGDFILE ! atmospheric file name - CHARACTER(LEN=6), INTENT(IN) :: HPGDFILETYPE! atmospheric file type -INTEGER, INTENT(IN) :: KLUOUT ! logical unit of output listing -LOGICAL, INTENT(OUT) :: OUNIF ! flag for prescribed uniform field + CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling ISBA + CHARACTER(LEN=7), INTENT(IN) :: HVAR ! variable treated + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(OUT) :: HFILE ! file name + CHARACTER(LEN=6), INTENT(OUT) :: HFILETYPE ! file type + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(OUT) :: HFILEPGD ! file name + CHARACTER(LEN=6), INTENT(OUT) :: HFILEPGDTYPE! file type + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HATMFILE ! atmospheric file name + CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! atmospheric file type + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HPGDFILE ! atmospheric file name + CHARACTER(LEN=6), INTENT(IN) :: HPGDFILETYPE! atmospheric file type +INTEGER, INTENT(IN) :: KLUOUT ! logical unit of output listing +LOGICAL, INTENT(OUT) :: OUNIF ! flag for prescribed uniform field ! !* 0.2 Declarations of local variables @@ -88,10 +88,10 @@ REAL(KIND=JPRB) :: ZHOOK_HANDLE ! ! IF (LHOOK) CALL DR_HOOK('READ_PREP_ISBA_CONF',0,ZHOOK_HANDLE) -HFILE = ' ' +HFILE = '' HFILETYPE = ' ' ! -HFILEPGD = ' ' +HFILEPGD = '' HFILEPGDTYPE = ' ' ! OUNIF = .FALSE. diff --git a/src/SURFEX/read_prep_isba_snow.F90 b/src/SURFEX/read_prep_isba_snow.F90 index 1649148ea..8cfcee3ea 100644 --- a/src/SURFEX/read_prep_isba_snow.F90 +++ b/src/SURFEX/read_prep_isba_snow.F90 @@ -51,7 +51,7 @@ USE MODN_PREP_ISBA_SNOW USE MODD_READ_NAMELIST, ONLY : LNAM_READ ! -USE MODD_SURF_PAR, ONLY : XUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF USE MODD_SNOW_PAR, ONLY : XANSMIN, XRHOSMAX USE MODD_CSTS, ONLY : XTT ! @@ -84,10 +84,10 @@ IMPLICIT NONE CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling ISBA CHARACTER(LEN=3), INTENT(OUT) :: HSNOW ! snow scheme INTEGER, INTENT(OUT) :: KSNOW_LAYER ! number of snow layers - CHARACTER(LEN=28), OPTIONAL, INTENT(OUT) :: HFILE ! file name - CHARACTER(LEN=6), OPTIONAL, INTENT(OUT) :: HFILETYPE ! file type - CHARACTER(LEN=28), OPTIONAL, INTENT(OUT) :: HFILEPGD ! file name - CHARACTER(LEN=6), OPTIONAL, INTENT(OUT) :: HFILEPGDTYPE ! file type + CHARACTER(LEN=NFILENAMELGTMAX), OPTIONAL, INTENT(OUT) :: HFILE ! file name + CHARACTER(LEN=6), OPTIONAL, INTENT(OUT) :: HFILETYPE ! file type + CHARACTER(LEN=NFILENAMELGTMAX), OPTIONAL, INTENT(OUT) :: HFILEPGD ! file name + CHARACTER(LEN=6), OPTIONAL, INTENT(OUT) :: HFILEPGDTYPE ! file type LOGICAL, OPTIONAL, INTENT(OUT) :: OUNIF ! uniform snow ! !* 0.2 Declarations of local variables @@ -294,7 +294,7 @@ IF(PRESENT(HFILE))THEN IF(LFILE)THEN HFILE = CFILE_SNOW ELSE - HFILE = ' ' + HFILE = '' ENDIF ENDIF IF(PRESENT(HFILETYPE))THEN @@ -315,7 +315,7 @@ IF(PRESENT(HFILEPGD))THEN IF(LFILE)THEN HFILEPGD = CFILEPGD_SNOW ELSE - HFILEPGD = ' ' + HFILEPGD = '' ENDIF ENDIF IF (LFILE.AND.PRESENT(OUNIF)) OUNIF=.FALSE. diff --git a/src/SURFEX/read_prep_seaflux_conf.F90 b/src/SURFEX/read_prep_seaflux_conf.F90 index d0d819072..601481f8f 100644 --- a/src/SURFEX/read_prep_seaflux_conf.F90 +++ b/src/SURFEX/read_prep_seaflux_conf.F90 @@ -56,7 +56,7 @@ USE MODI_PREP_OCEAN_MERCATORVERGRID USE MODD_PREP_SEAFLUX, ONLY : CFILE_SEAFLX, CTYPE_SEAFLX, CFILEPGD_SEAFLX, CTYPEPGD, & CFILEWAVE_SEAFLX, CTYPEWAVE, XSST_UNIF, XSSS_UNIF, XSIC_UNIF ! -USE MODD_SURF_PAR, ONLY : XUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF ! ! USE YOMHOOK ,ONLY : LHOOK, DR_HOOK @@ -71,18 +71,18 @@ IMPLICIT NONE ! LOGICAL, INTENT(IN) :: OMERCATOR ! -CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling ISBA -CHARACTER(LEN=7), INTENT(IN) :: HVAR ! variable treated -CHARACTER(LEN=28), INTENT(OUT) :: HFILE ! file name -CHARACTER(LEN=6), INTENT(OUT) :: HFILETYPE! file type -CHARACTER(LEN=28), INTENT(OUT) :: HFILEPGD ! file name -CHARACTER(LEN=6), INTENT(OUT) :: HFILEPGDTYPE! file type -CHARACTER(LEN=28), INTENT(IN) :: HATMFILE ! atmospheric file name -CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! atmospheric file type -CHARACTER(LEN=28), INTENT(IN) :: HPGDFILE ! atmospheric file name -CHARACTER(LEN=6), INTENT(IN) :: HPGDFILETYPE! atmospheric file type -INTEGER, INTENT(IN) :: KLUOUT ! logical unit of output listing -LOGICAL, INTENT(OUT) :: OUNIF ! flag for prescribed uniform field +CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling ISBA +CHARACTER(LEN=7), INTENT(IN) :: HVAR ! variable treated +CHARACTER(LEN=NFILENAMELGTMAX), INTENT(OUT) :: HFILE ! file name +CHARACTER(LEN=6), INTENT(OUT) :: HFILETYPE! file type +CHARACTER(LEN=NFILENAMELGTMAX), INTENT(OUT) :: HFILEPGD ! file name +CHARACTER(LEN=6), INTENT(OUT) :: HFILEPGDTYPE! file type +CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HATMFILE ! atmospheric file name +CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! atmospheric file type +CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HPGDFILE ! atmospheric file name +CHARACTER(LEN=6), INTENT(IN) :: HPGDFILETYPE! atmospheric file type +INTEGER, INTENT(IN) :: KLUOUT ! logical unit of output listing +LOGICAL, INTENT(OUT) :: OUNIF ! flag for prescribed uniform field ! !* 0.2 Declarations of local variables @@ -92,7 +92,7 @@ INTEGER :: IRESP ! IRESP : return-code if a problem appears ! at the open of the file in LFI routines INTEGER :: ILUNAM ! Logical unit of namelist file ! - CHARACTER(LEN=28) :: YNAMELIST ! namelist file + CHARACTER(LEN=NFILENAMELGTMAX) :: YNAMELIST ! namelist file ! LOGICAL :: GFOUND ! Return code when searching namelist REAL(KIND=JPRB) :: ZHOOK_HANDLE @@ -100,10 +100,10 @@ REAL(KIND=JPRB) :: ZHOOK_HANDLE ! ! IF (LHOOK) CALL DR_HOOK('READ_PREP_SEAFLUX_CONF',0,ZHOOK_HANDLE) -HFILE = ' ' +HFILE = '' HFILETYPE = ' ' ! -HFILEPGD = ' ' +HFILEPGD = '' HFILEPGDTYPE = ' ' ! OUNIF = .FALSE. diff --git a/src/SURFEX/read_prep_surf_atm_conf.F90 b/src/SURFEX/read_prep_surf_atm_conf.F90 index a2d4af29c..6bb1f2778 100644 --- a/src/SURFEX/read_prep_surf_atm_conf.F90 +++ b/src/SURFEX/read_prep_surf_atm_conf.F90 @@ -40,6 +40,8 @@ !* 0. DECLARATIONS ! ------------ ! +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX +! USE MODE_POS_SURF ! USE MODN_PREP_SURF_ATM @@ -52,16 +54,16 @@ IMPLICIT NONE !* 0.1 Declarations of arguments ! ------------------------- ! - CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling ISBA - CHARACTER(LEN=28), INTENT(OUT) :: HFILE ! file name - CHARACTER(LEN=6), INTENT(OUT) :: HFILETYPE ! file type - CHARACTER(LEN=28), INTENT(OUT) :: HFILEPGD ! file name - CHARACTER(LEN=6), INTENT(OUT) :: HFILEPGDTYPE! file type - CHARACTER(LEN=28), INTENT(IN) :: HATMFILE ! atmospheric file name - CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! atmospheric file type - CHARACTER(LEN=28), INTENT(IN) :: HPGDFILE ! atmospheric file name - CHARACTER(LEN=6), INTENT(IN) :: HPGDFILETYPE! atmospheric file type -INTEGER, INTENT(IN) :: KLUOUT ! logical unit of output listing + CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling ISBA + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(OUT) :: HFILE ! file name + CHARACTER(LEN=6), INTENT(OUT) :: HFILETYPE ! file type + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(OUT) :: HFILEPGD ! file name + CHARACTER(LEN=6), INTENT(OUT) :: HFILEPGDTYPE! file type + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HATMFILE ! atmospheric file name + CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! atmospheric file type + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HPGDFILE ! atmospheric file name + CHARACTER(LEN=6), INTENT(IN) :: HPGDFILETYPE! atmospheric file type +INTEGER, INTENT(IN) :: KLUOUT ! logical unit of output listing @@ -74,7 +76,7 @@ INTEGER :: IRESP ! IRESP : return-code if a problem appears ! at the open of the file in LFI routines INTEGER :: ILUNAM ! Logical unit of namelist file ! - CHARACTER(LEN=28) :: YNAMELIST ! namelist file + CHARACTER(LEN=NFILENAMELGTMAX) :: YNAMELIST ! namelist file ! LOGICAL :: GFOUND ! Return code when searching namelist REAL(KIND=JPRB) :: ZHOOK_HANDLE diff --git a/src/SURFEX/read_prep_teb_conf.F90 b/src/SURFEX/read_prep_teb_conf.F90 index 7972a1807..95670acc1 100644 --- a/src/SURFEX/read_prep_teb_conf.F90 +++ b/src/SURFEX/read_prep_teb_conf.F90 @@ -49,7 +49,7 @@ USE MODD_PREP_TEB, ONLY : CFILE_TEB, CTYPE, CFILEPGD_TEB, CTYPEPGD, XT_CAN, XQ_CAN, XWS_ROOF_DEF, XWS_ROAD_DEF, XTI_BLD_DEF, & XHUI_BLD_DEF, XHUI_BLD, XTS_BLD_DEF ! -USE MODD_SURF_PAR, ONLY : XUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF ! USE MODE_THERMOS ! @@ -63,18 +63,18 @@ IMPLICIT NONE !* 0.1 Declarations of arguments ! ------------------------- ! - CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling ISBA - CHARACTER(LEN=7), INTENT(IN) :: HVAR ! variable treated - CHARACTER(LEN=28), INTENT(OUT) :: HFILE ! file name - CHARACTER(LEN=6), INTENT(OUT) :: HFILETYPE! file type - CHARACTER(LEN=28), INTENT(OUT) :: HFILEPGD ! file name - CHARACTER(LEN=6), INTENT(OUT) :: HFILEPGDTYPE! file type - CHARACTER(LEN=28), INTENT(IN) :: HATMFILE ! atmospheric file name - CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! atmospheric file type - CHARACTER(LEN=28), INTENT(IN) :: HPGDFILE ! atmospheric file name - CHARACTER(LEN=6), INTENT(IN) :: HPGDFILETYPE! atmospheric file type -INTEGER, INTENT(IN) :: KLUOUT ! logical unit of output listing -LOGICAL, INTENT(OUT) :: OUNIF ! flag for prescribed uniform field + CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling ISBA + CHARACTER(LEN=7), INTENT(IN) :: HVAR ! variable treated + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(OUT) :: HFILE ! file name + CHARACTER(LEN=6), INTENT(OUT) :: HFILETYPE! file type + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(OUT) :: HFILEPGD ! file name + CHARACTER(LEN=6), INTENT(OUT) :: HFILEPGDTYPE! file type + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HATMFILE ! atmospheric file name + CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! atmospheric file type + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HPGDFILE ! atmospheric file name + CHARACTER(LEN=6), INTENT(IN) :: HPGDFILETYPE! atmospheric file type +INTEGER, INTENT(IN) :: KLUOUT ! logical unit of output listing +LOGICAL, INTENT(OUT) :: OUNIF ! flag for prescribed uniform field ! !* 0.2 Declarations of local variables ! ------------------------------- @@ -84,10 +84,10 @@ REAL(KIND=JPRB) :: ZHOOK_HANDLE ! ! IF (LHOOK) CALL DR_HOOK('READ_PREP_TEB_CONF',0,ZHOOK_HANDLE) -HFILE = ' ' +HFILE = '' HFILETYPE = ' ' ! -HFILEPGD = ' ' +HFILEPGD = '' HFILEPGDTYPE = ' ' ! OUNIF = .FALSE. diff --git a/src/SURFEX/read_prep_teb_garden_conf.F90 b/src/SURFEX/read_prep_teb_garden_conf.F90 index 191190ef2..57a539473 100644 --- a/src/SURFEX/read_prep_teb_garden_conf.F90 +++ b/src/SURFEX/read_prep_teb_garden_conf.F90 @@ -51,7 +51,7 @@ USE MODD_PREP_TEB_GARDEN, ONLY : CFILE_GD, CTYPE, CFILEPGD_GD, CTYPEPGD, & CFILE_TG_SURF_GD, CFILE_TG_ROOT_GD, CFILE_TG_DEEP_GD, & XTG_SURF_GD, XTG_ROOT_GD, XTG_DEEP_GD ! -USE MODD_SURF_PAR, ONLY : XUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF ! ! USE YOMHOOK ,ONLY : LHOOK, DR_HOOK @@ -64,18 +64,18 @@ IMPLICIT NONE !* 0.1 Declarations of arguments ! ------------------------- ! - CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling - CHARACTER(LEN=7), INTENT(IN) :: HVAR ! variable treated - CHARACTER(LEN=28), INTENT(OUT) :: HFILE ! file name - CHARACTER(LEN=6), INTENT(OUT) :: HFILETYPE ! file type - CHARACTER(LEN=28), INTENT(OUT) :: HFILEPGD ! file name - CHARACTER(LEN=6), INTENT(OUT) :: HFILEPGDTYPE! file type - CHARACTER(LEN=28), INTENT(IN) :: HATMFILE ! atmospheric file name - CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! atmospheric file type - CHARACTER(LEN=28), INTENT(IN) :: HPGDFILE ! atmospheric file name - CHARACTER(LEN=6), INTENT(IN) :: HPGDFILETYPE! atmospheric file type -INTEGER, INTENT(IN) :: KLUOUT ! logical unit of output listing -LOGICAL, INTENT(OUT) :: OUNIF ! flag for prescribed uniform field + CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling + CHARACTER(LEN=7), INTENT(IN) :: HVAR ! variable treated + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(OUT) :: HFILE ! file name + CHARACTER(LEN=6), INTENT(OUT) :: HFILETYPE ! file type + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(OUT) :: HFILEPGD ! file name + CHARACTER(LEN=6), INTENT(OUT) :: HFILEPGDTYPE! file type + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HATMFILE ! atmospheric file name + CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! atmospheric file type + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HPGDFILE ! atmospheric file name + CHARACTER(LEN=6), INTENT(IN) :: HPGDFILETYPE! atmospheric file type +INTEGER, INTENT(IN) :: KLUOUT ! logical unit of output listing +LOGICAL, INTENT(OUT) :: OUNIF ! flag for prescribed uniform field ! !* 0.2 Declarations of local variables @@ -85,7 +85,7 @@ INTEGER :: IRESP ! IRESP : return-code if a problem appears ! at the open of the file in LFI routines INTEGER :: ILUNAM ! Logical unit of namelist file ! - CHARACTER(LEN=28) :: YNAMELIST ! namelist file + CHARACTER(LEN=NFILENAMELGTMAX) :: YNAMELIST ! namelist file ! LOGICAL :: GFOUND ! Return code when searching namelist REAL(KIND=JPRB) :: ZHOOK_HANDLE diff --git a/src/SURFEX/read_prep_teb_greenroof_conf.F90 b/src/SURFEX/read_prep_teb_greenroof_conf.F90 index 22a81467f..334886494 100644 --- a/src/SURFEX/read_prep_teb_greenroof_conf.F90 +++ b/src/SURFEX/read_prep_teb_greenroof_conf.F90 @@ -53,7 +53,7 @@ USE MODD_PREP_TEB_GREENROOF, ONLY : CFILE_GR, CTYPE, CFILEPGD_GR, CTYPEPGD, & CFILE_TG_SURF_GR, CFILE_TG_ROOT_GR, CFILE_TG_DEEP_GR, & XTG_SURF_GR, XTG_ROOT_GR, XTG_DEEP_GR ! -USE MODD_SURF_PAR, ONLY : XUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF ! ! USE YOMHOOK ,ONLY : LHOOK, DR_HOOK @@ -66,18 +66,18 @@ IMPLICIT NONE !* 0.1 Declarations of arguments ! ------------------------- ! - CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling - CHARACTER(LEN=7), INTENT(IN) :: HVAR ! variable treated - CHARACTER(LEN=28), INTENT(OUT) :: HFILE ! file name - CHARACTER(LEN=6), INTENT(OUT) :: HFILETYPE ! file type - CHARACTER(LEN=28), INTENT(OUT) :: HFILEPGD ! file name - CHARACTER(LEN=6), INTENT(OUT) :: HFILEPGDTYPE! file type - CHARACTER(LEN=28), INTENT(IN) :: HATMFILE ! atmospheric file name - CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! atmospheric file type - CHARACTER(LEN=28), INTENT(IN) :: HPGDFILE ! atmospheric file name - CHARACTER(LEN=6), INTENT(IN) :: HPGDFILETYPE! atmospheric file type -INTEGER, INTENT(IN) :: KLUOUT ! logical unit of output listing -LOGICAL, INTENT(OUT) :: OUNIF ! flag for prescribed uniform field + CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling + CHARACTER(LEN=7), INTENT(IN) :: HVAR ! variable treated + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(OUT) :: HFILE ! file name + CHARACTER(LEN=6), INTENT(OUT) :: HFILETYPE ! file type + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(OUT) :: HFILEPGD ! file name + CHARACTER(LEN=6), INTENT(OUT) :: HFILEPGDTYPE! file type + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HATMFILE ! atmospheric file name + CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! atmospheric file type + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HPGDFILE ! atmospheric file name + CHARACTER(LEN=6), INTENT(IN) :: HPGDFILETYPE! atmospheric file type +INTEGER, INTENT(IN) :: KLUOUT ! logical unit of output listing +LOGICAL, INTENT(OUT) :: OUNIF ! flag for prescribed uniform field ! !* 0.2 Declarations of local variables @@ -87,7 +87,7 @@ INTEGER :: IRESP ! IRESP : return-code if a problem appears ! at the open of the file in LFI routines INTEGER :: ILUNAM ! Logical unit of namelist file ! - CHARACTER(LEN=28) :: YNAMELIST ! namelist file + CHARACTER(LEN=NFILENAMELGTMAX) :: YNAMELIST ! namelist file ! LOGICAL :: GFOUND ! Return code when searching namelist REAL(KIND=JPRB) :: ZHOOK_HANDLE diff --git a/src/SURFEX/read_prep_teb_snow.F90 b/src/SURFEX/read_prep_teb_snow.F90 index 14ea53abd..ed0a2b7d6 100644 --- a/src/SURFEX/read_prep_teb_snow.F90 +++ b/src/SURFEX/read_prep_teb_snow.F90 @@ -41,7 +41,7 @@ USE MODN_PREP_TEB_SNOW USE MODD_READ_NAMELIST, ONLY : LNAM_READ ! -USE MODD_SURF_PAR, ONLY : XUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF ! USE MODE_POS_SURF USE MODI_TEST_NAM_VAR_SURF @@ -73,10 +73,10 @@ IMPLICIT NONE CHARACTER(LEN=3), INTENT(OUT) :: HSNOW_ROAD ! snow scheme for roads INTEGER, INTENT(OUT) :: KSNOW_ROOF ! snow scheme layers for roofs INTEGER, INTENT(OUT) :: KSNOW_ROAD ! snow scheme layers for roads - CHARACTER(LEN=28), OPTIONAL, INTENT(OUT) :: HFILE ! file name - CHARACTER(LEN=6), OPTIONAL, INTENT(OUT) :: HFILETYPE ! file type - CHARACTER(LEN=28), OPTIONAL, INTENT(OUT) :: HFILEPGD ! file name - CHARACTER(LEN=6), OPTIONAL, INTENT(OUT) :: HFILEPGDTYPE ! file type + CHARACTER(LEN=NFILENAMELGTMAX), OPTIONAL, INTENT(OUT) :: HFILE ! file name + CHARACTER(LEN=6), OPTIONAL, INTENT(OUT) :: HFILETYPE ! file type + CHARACTER(LEN=NFILENAMELGTMAX), OPTIONAL, INTENT(OUT) :: HFILEPGD ! file name + CHARACTER(LEN=6), OPTIONAL, INTENT(OUT) :: HFILEPGDTYPE ! file type ! !* 0.2 Declarations of local variables @@ -106,9 +106,9 @@ IF (LNAM_READ) THEN CSNOW_ROOF = '1-L' CSNOW_ROAD = '1-L' ! - CFILE_SNOW_TEB = ' ' + CFILE_SNOW_TEB = '' CTYPE_SNOW = ' ' - CFILEPGD_SNOW_TEB = ' ' + CFILEPGD_SNOW_TEB = '' CTYPEPGD_SNOW = ' ' ! XWSNOW_ROOF(:) = 0. diff --git a/src/SURFEX/read_prep_watflux_conf.F90 b/src/SURFEX/read_prep_watflux_conf.F90 index 41934e61d..b739a1541 100644 --- a/src/SURFEX/read_prep_watflux_conf.F90 +++ b/src/SURFEX/read_prep_watflux_conf.F90 @@ -45,7 +45,7 @@ USE MODI_READ_PREP_SURF_ATM_CONF USE MODN_PREP_WATFLUX USE MODD_PREP_WATFLUX, ONLY : CFILE_WATFLX, CTYPE, CFILEPGD_WATFLX, CTYPEPGD, XTS_WATER_UNIF ! -USE MODD_SURF_PAR, ONLY : XUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF ! ! USE YOMHOOK ,ONLY : LHOOK, DR_HOOK @@ -58,18 +58,18 @@ IMPLICIT NONE !* 0.1 Declarations of arguments ! ------------------------- ! - CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling ISBA - CHARACTER(LEN=7), INTENT(IN) :: HVAR ! variable treated - CHARACTER(LEN=28), INTENT(OUT) :: HFILE ! file name - CHARACTER(LEN=6), INTENT(OUT) :: HFILETYPE! file type - CHARACTER(LEN=28), INTENT(OUT) :: HFILEPGD ! file name - CHARACTER(LEN=6), INTENT(OUT) :: HFILEPGDTYPE! file type - CHARACTER(LEN=28), INTENT(IN) :: HATMFILE ! atmospheric file name - CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! atmospheric file type - CHARACTER(LEN=28), INTENT(IN) :: HPGDFILE ! atmospheric file name - CHARACTER(LEN=6), INTENT(IN) :: HPGDFILETYPE! atmospheric file type -INTEGER, INTENT(IN) :: KLUOUT ! logical unit of output listing -LOGICAL, INTENT(OUT) :: OUNIF ! flag for prescribed uniform field + CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling ISBA + CHARACTER(LEN=7), INTENT(IN) :: HVAR ! variable treated + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(OUT) :: HFILE ! file name + CHARACTER(LEN=6), INTENT(OUT) :: HFILETYPE! file type + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(OUT) :: HFILEPGD ! file name + CHARACTER(LEN=6), INTENT(OUT) :: HFILEPGDTYPE! file type + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HATMFILE ! atmospheric file name + CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! atmospheric file type + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HPGDFILE ! atmospheric file name + CHARACTER(LEN=6), INTENT(IN) :: HPGDFILETYPE! atmospheric file type +INTEGER, INTENT(IN) :: KLUOUT ! logical unit of output listing +LOGICAL, INTENT(OUT) :: OUNIF ! flag for prescribed uniform field ! !* 0.2 Declarations of local variables @@ -78,8 +78,6 @@ LOGICAL, INTENT(OUT) :: OUNIF ! flag for prescribed uniform field INTEGER :: IRESP ! IRESP : return-code if a problem appears ! at the open of the file in LFI routines INTEGER :: ILUNAM ! Logical unit of namelist file -! - CHARACTER(LEN=28) :: YNAMELIST ! namelist file ! LOGICAL :: GFOUND ! Return code when searching namelist REAL(KIND=JPRB) :: ZHOOK_HANDLE @@ -87,10 +85,10 @@ REAL(KIND=JPRB) :: ZHOOK_HANDLE ! ! IF (LHOOK) CALL DR_HOOK('READ_PREP_WATFLUX_CONF',0,ZHOOK_HANDLE) -HFILE = ' ' +HFILE = '' HFILETYPE = ' ' ! -HFILEPGD = ' ' +HFILEPGD = '' HFILEPGDTYPE = ' ' ! OUNIF = .FALSE. diff --git a/src/SURFEX/read_seaflux_date.F90 b/src/SURFEX/read_seaflux_date.F90 index 110b7ea6c..18ab47e18 100644 --- a/src/SURFEX/read_seaflux_date.F90 +++ b/src/SURFEX/read_seaflux_date.F90 @@ -46,7 +46,7 @@ USE MODD_OCEAN_n, ONLY : OCEAN_t ! USE MODD_TYPE_DATE_SURF -USE MODD_SURF_PAR, ONLY : NUNDEF, XUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, NUNDEF, XUNDEF ! USE MODI_READ_PRE_SEAF_DAT_CONF USE MODI_READ_PRE_SURFA_DAT_CONF @@ -68,7 +68,7 @@ LOGICAL, INTENT(IN) :: OMERCATOR ! CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling CHARACTER(LEN=3), INTENT(IN) :: HINIT ! fields to initialize 'ALL', 'PRE', 'PGD' - CHARACTER(LEN=28), INTENT(IN) :: HATMFILE ! atmospheric file name + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HATMFILE ! atmospheric file name CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! atmospheric file type INTEGER, INTENT(IN) :: KYEAR ! current year (UTC) INTEGER, INTENT(IN) :: KMONTH ! current month (UTC) @@ -81,11 +81,11 @@ INTEGER, INTENT(IN) :: KLUOUT ! logical unit of output listing !* 0.2 Declarations of local variables ! ------------------------------- ! - CHARACTER(LEN=28) :: YFILE ! file name + CHARACTER(LEN=NFILENAMELGTMAX) :: YFILE ! file name CHARACTER(LEN=6) :: YFILETYPE ! file type - CHARACTER(LEN=28) :: YFILEPGD ! file name + CHARACTER(LEN=NFILENAMELGTMAX) :: YFILEPGD ! file name CHARACTER(LEN=6) :: YFILEPGDTYPE ! file type - CHARACTER(LEN=28) :: YFILEPGDIN ! file name + CHARACTER(LEN=NFILENAMELGTMAX) :: YFILEPGDIN ! file name CHARACTER(LEN=6) :: YFILEPGDINTYPE ! file type ! LOGICAL :: GUNIF ! flag for prescribed uniform field @@ -94,10 +94,10 @@ REAL(KIND=JPRB) :: ZHOOK_HANDLE !------------------------------------------------------------------------------- ! IF (LHOOK) CALL DR_HOOK('READ_SEAFLUX_DATE',0,ZHOOK_HANDLE) -YFILE = ' ' +YFILE = '' YFILETYPE = ' ' ! -YFILEPGDIN = ' ' +YFILEPGDIN = '' YFILEPGDINTYPE = ' ' ! !------------------------------------------------------------------------------- diff --git a/src/SURFEX/read_surf_atm_date.F90 b/src/SURFEX/read_surf_atm_date.F90 index 1c072fbea..160d4dd9b 100644 --- a/src/SURFEX/read_surf_atm_date.F90 +++ b/src/SURFEX/read_surf_atm_date.F90 @@ -45,7 +45,7 @@ ! ! USE MODD_TYPE_DATE_SURF -USE MODD_SURF_PAR, ONLY : XUNDEF, NUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF, NUNDEF ! USE MODI_READ_PRE_SURFA_DAT_CONF USE MODI_READ_PREP_SURF_ATM_CONF @@ -67,7 +67,7 @@ IMPLICIT NONE CHARACTER(LEN=3), INTENT(IN) :: HINIT ! fields to initialize 'ALL', 'PRE', 'PGD' TYPE (DATE_TIME), INTENT(OUT) :: TPTIME ! time and date INTEGER, INTENT(IN) :: KLUOUT ! logical unit of output listing - CHARACTER(LEN=28), INTENT(IN) :: HATMFILE ! atmospheric file name + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HATMFILE ! atmospheric file name CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! atmospheric file type INTEGER, INTENT(IN) :: KYEAR ! current year (UTC) INTEGER, INTENT(IN) :: KMONTH ! current month (UTC) @@ -78,21 +78,21 @@ REAL, INTENT(IN) :: PTIME ! current time since midnight (UTC !* 0.2 Declarations of local variables ! ------------------------------- ! - CHARACTER(LEN=28) :: YFILE ! file name + CHARACTER(LEN=NFILENAMELGTMAX) :: YFILE ! file name CHARACTER(LEN=6) :: YFILETYPE ! file type - CHARACTER(LEN=28) :: YFILEPGD ! file name + CHARACTER(LEN=NFILENAMELGTMAX) :: YFILEPGD ! file name CHARACTER(LEN=6) :: YFILEPGDTYPE ! file type - CHARACTER(LEN=28) :: YFILEPGDIN ! file name + CHARACTER(LEN=NFILENAMELGTMAX) :: YFILEPGDIN ! file name CHARACTER(LEN=6) :: YFILEPGDINTYPE ! file type REAL(KIND=JPRB) :: ZHOOK_HANDLE ! !------------------------------------------------------------------------------- ! IF (LHOOK) CALL DR_HOOK('READ_SURF_ATM_DATE',0,ZHOOK_HANDLE) -YFILE = ' ' +YFILE = '' YFILETYPE = ' ' ! -YFILEPGDIN = ' ' +YFILEPGDIN = '' YFILEPGDINTYPE = ' ' ! !------------------------------------------------------------------------------- diff --git a/src/SURFEX/read_teb_date.F90 b/src/SURFEX/read_teb_date.F90 index 875ce0e70..914b379fe 100644 --- a/src/SURFEX/read_teb_date.F90 +++ b/src/SURFEX/read_teb_date.F90 @@ -44,7 +44,7 @@ ! ! USE MODD_TYPE_DATE_SURF -USE MODD_SURF_PAR, ONLY : NUNDEF, XUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, NUNDEF, XUNDEF ! USE MODI_READ_PREP_TEB_DATE_CONF USE MODI_READ_PRE_SURFA_DAT_CONF @@ -65,7 +65,7 @@ IMPLICIT NONE ! CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling CHARACTER(LEN=3), INTENT(IN) :: HINIT ! fields to initialize 'ALL', 'PRE', 'PGD' - CHARACTER(LEN=28), INTENT(IN) :: HATMFILE ! atmospheric file name + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HATMFILE ! atmospheric file name CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! atmospheric file type INTEGER, INTENT(IN) :: KYEAR ! current year (UTC) INTEGER, INTENT(IN) :: KMONTH ! current month (UTC) @@ -78,11 +78,11 @@ INTEGER, INTENT(IN) :: KLUOUT ! logical unit of output listing !* 0.2 Declarations of local variables ! ------------------------------- ! - CHARACTER(LEN=28) :: YFILE ! file name + CHARACTER(LEN=NFILENAMELGTMAX) :: YFILE ! file name CHARACTER(LEN=6) :: YFILETYPE ! file type - CHARACTER(LEN=28) :: YFILEPGD ! file name + CHARACTER(LEN=NFILENAMELGTMAX) :: YFILEPGD ! file name CHARACTER(LEN=6) :: YFILEPGDTYPE ! file type - CHARACTER(LEN=28) :: YFILEPGDIN ! file name + CHARACTER(LEN=NFILENAMELGTMAX) :: YFILEPGDIN ! file name CHARACTER(LEN=6) :: YFILEPGDINTYPE ! file type ! LOGICAL :: GUNIF ! flag for prescribed uniform field @@ -91,10 +91,10 @@ REAL(KIND=JPRB) :: ZHOOK_HANDLE !------------------------------------------------------------------------------- ! IF (LHOOK) CALL DR_HOOK('READ_TEB_DATE',0,ZHOOK_HANDLE) -YFILE = ' ' +YFILE = '' YFILETYPE = ' ' ! -YFILEPGDIN = ' ' +YFILEPGDIN = '' YFILEPGDINTYPE = ' ' ! !------------------------------------------------------------------------------- diff --git a/src/SURFEX/read_teb_patch.F90 b/src/SURFEX/read_teb_patch.F90 index 0ae80daff..eaf17207e 100644 --- a/src/SURFEX/read_teb_patch.F90 +++ b/src/SURFEX/read_teb_patch.F90 @@ -10,7 +10,7 @@ ! ! USE MODI_READ_SURF -USE MODD_SURF_PAR, ONLY: LEN_HREC +USE MODD_SURF_PAR, ONLY: LEN_HREC, NFILENAMELGTMAX ! USE MODI_OPEN_AUX_IO_SURF USE MODI_CLOSE_AUX_IO_SURF @@ -23,7 +23,7 @@ IMPLICIT NONE !* dummy arguments ! --------------- ! - CHARACTER(LEN=28), INTENT(IN) :: HFILEPGD ! name of file + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILEPGD ! name of file CHARACTER(LEN=6), INTENT(IN) :: HFILEPGDTYPE ! type of file INTEGER, INTENT(IN) :: KVERSION INTEGER, INTENT(IN) :: KBUGFIX diff --git a/src/SURFEX/read_watflux_date.F90 b/src/SURFEX/read_watflux_date.F90 index 22038938f..94eec935f 100644 --- a/src/SURFEX/read_watflux_date.F90 +++ b/src/SURFEX/read_watflux_date.F90 @@ -43,7 +43,7 @@ ! ! USE MODD_TYPE_DATE_SURF -USE MODD_SURF_PAR, ONLY : XUNDEF, NUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF, NUNDEF ! USE MODI_READ_PRE_WATF_DAT_CONF USE MODI_READ_PRE_SURFA_DAT_CONF @@ -64,7 +64,7 @@ IMPLICIT NONE ! CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling CHARACTER(LEN=3), INTENT(IN) :: HINIT ! fields to initialize 'ALL', 'PRE', 'PGD' - CHARACTER(LEN=28), INTENT(IN) :: HATMFILE ! atmospheric file name + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HATMFILE ! atmospheric file name CHARACTER(LEN=6), INTENT(IN) :: HATMFILETYPE! atmospheric file type INTEGER, INTENT(IN) :: KYEAR ! current year (UTC) INTEGER, INTENT(IN) :: KMONTH ! current month (UTC) @@ -76,11 +76,11 @@ INTEGER, INTENT(IN) :: KLUOUT ! logical unit of output listing !* 0.2 Declarations of local variables ! ------------------------------- ! - CHARACTER(LEN=28) :: YFILE ! file name + CHARACTER(LEN=NFILENAMELGTMAX) :: YFILE ! file name CHARACTER(LEN=6) :: YFILETYPE ! file type - CHARACTER(LEN=28) :: YFILEPGD ! file name + CHARACTER(LEN=NFILENAMELGTMAX) :: YFILEPGD ! file name CHARACTER(LEN=6) :: YFILEPGDTYPE ! file type - CHARACTER(LEN=28) :: YFILEPGDIN ! file name + CHARACTER(LEN=NFILENAMELGTMAX) :: YFILEPGDIN ! file name CHARACTER(LEN=6) :: YFILEPGDINTYPE ! file type ! LOGICAL :: GUNIF ! flag for prescribed uniform field @@ -89,10 +89,10 @@ REAL(KIND=JPRB) :: ZHOOK_HANDLE !------------------------------------------------------------------------------- ! IF (LHOOK) CALL DR_HOOK('READ_WATFLUX_DATE',0,ZHOOK_HANDLE) -YFILE = ' ' +YFILE = '' YFILETYPE = ' ' ! -YFILEPGDIN = ' ' +YFILEPGDIN = '' YFILEPGDINTYPE = ' ' ! !------------------------------------------------------------------------------- diff --git a/src/SURFEX/read_z1d_netcdf.F90 b/src/SURFEX/read_z1d_netcdf.F90 index e60057624..68564acf0 100644 --- a/src/SURFEX/read_z1d_netcdf.F90 +++ b/src/SURFEX/read_z1d_netcdf.F90 @@ -30,7 +30,7 @@ ! use modd_netcdf_sfx, only : IDCDF_KIND USE MODD_OCEAN_GRID -USE MODD_SURF_PAR, ONLY : NUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, NUNDEF USE MODD_PREP_SEAFLUX, ONLY : CFILE_SEAFLX,CTYPE_SEAFLX USE MODE_READ_NETCDF_MERCATOR ! @@ -42,7 +42,7 @@ IMPLICIT NONE !* 0.1 Declaration of arguments ! ------------------------ ! -CHARACTER (LEN=28) :: YFILENAME +CHARACTER (LEN=NFILENAMELGTMAX) :: YFILENAME CHARACTER (LEN=28) :: YNCVARNAME INTEGER(kind=IDCDF_KIND) :: JDIMENSION ! diff --git a/src/SURFEX/set_surfex_file_name_asc.F90 b/src/SURFEX/set_surfex_file_name_asc.F90 index bfef263f9..3f140fe2f 100644 --- a/src/SURFEX/set_surfex_file_name_asc.F90 +++ b/src/SURFEX/set_surfex_file_name_asc.F90 @@ -5,14 +5,15 @@ SUBROUTINE SET_SURFEX_FILE_NAME_ASC(HNAME_IN,HNAME_OUT) ! USE MODD_IO_SURF_ASC, ONLY : CFILEIN +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX ! USE YOMHOOK ,ONLY : LHOOK, DR_HOOK USE PARKIND1 ,ONLY : JPRB ! IMPLICIT NONE ! - CHARACTER(LEN=28), OPTIONAL, INTENT(IN) :: HNAME_IN - CHARACTER(LEN=28), OPTIONAL, INTENT(OUT) :: HNAME_OUT + CHARACTER(LEN=NFILENAMELGTMAX), OPTIONAL, INTENT(IN) :: HNAME_IN + CHARACTER(LEN=NFILENAMELGTMAX), OPTIONAL, INTENT(OUT) :: HNAME_OUT REAL(KIND=JPRB) :: ZHOOK_HANDLE ! IF (LHOOK) CALL DR_HOOK('SET_SURFEX_FILE_NAME_ASC',0,ZHOOK_HANDLE) diff --git a/src/SURFEX/set_surfex_filein.F90 b/src/SURFEX/set_surfex_filein.F90 index 0d3647e4c..2a38891c2 100644 --- a/src/SURFEX/set_surfex_filein.F90 +++ b/src/SURFEX/set_surfex_filein.F90 @@ -64,6 +64,8 @@ USE MODI_SET_SURFEX_FILE_NAME_ARO ! USE MODI_ABOR1_SFX ! +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX +! USE YOMHOOK ,ONLY : LHOOK, DR_HOOK USE PARKIND1 ,ONLY : JPRB ! @@ -80,7 +82,7 @@ REAL(KIND=JPRB) :: ZHOOK_HANDLE !* 0.2 Declarations of local variables ! ------------------------------- ! - CHARACTER(LEN=28) :: YFILE + CHARACTER(LEN=NFILENAMELGTMAX) :: YFILE ! !------------------------------------------------------------------------------- ! diff --git a/src/SURFEX/sfx_oasis_init.F90 b/src/SURFEX/sfx_oasis_init.F90 index 703950942..d4f996891 100644 --- a/src/SURFEX/sfx_oasis_init.F90 +++ b/src/SURFEX/sfx_oasis_init.F90 @@ -60,6 +60,8 @@ USE MODI_ABOR1_SFX ! USE MODD_XIOS , ONLY : LXIOS ! Should we call XIOS_INITIALIZE instead of OASIS_GET_LOCAL_COMM ! +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX +! #ifdef WXIOS USE XIOS, ONLY : XIOS_INITIALIZE #endif @@ -80,7 +82,7 @@ INCLUDE 'mpif.h' !* 0.1 Declarations of arguments ! ------------------------- ! - CHARACTER(LEN=28), INTENT(IN ) :: HNAMELIST + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN ) :: HNAMELIST INTEGER, INTENT(OUT) :: KLOCAL_COMM ! value of local communicator CHARACTER(LEN=3), INTENT(IN ), OPTIONAL :: HINIT ! choice of fields to initialize ! diff --git a/src/SURFEX/soda.F90 b/src/SURFEX/soda.F90 index 164a9be91..b5c197696 100644 --- a/src/SURFEX/soda.F90 +++ b/src/SURFEX/soda.F90 @@ -136,6 +136,8 @@ USE MODI_TEST_NAM_VAR_SURF USE MODI_INIT_OUTPUT_NC_n USE MODI_CLOSE_FILEOUT_OL ! +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX +! USE MODE_EKF, ONLY : GET_FILE_NAME, SET_FILEIN ! USE YOMHOOK, ONLY : LHOOK,DR_HOOK @@ -158,12 +160,12 @@ TYPE(DATE) :: TDATE_END CHARACTER(LEN=200) :: YMFILE ! Name of the observation, perturbed or reference file! CHARACTER(LEN=3) :: YINIT CHARACTER(LEN=2), PARAMETER :: YTEST = 'OK' ! must be equal to 'OK' - CHARACTER(LEN=28) :: YATMFILE =' ' ! name of the Atmospheric file - CHARACTER(LEN=6) :: YATMFILETYPE =' ' ! type of the Atmospheric file - CHARACTER(LEN=28) :: YLUOUT ='LISTING_SODA ' ! name of listing - CHARACTER(LEN=6) :: YPROGRAM2 = 'FA ' - CHARACTER(LEN=28) :: YFILEIN - CHARACTER(LEN=3) :: YVAR + CHARACTER(LEN=NFILENAMELGTMAX) :: YATMFILE = '' ! name of the Atmospheric file + CHARACTER(LEN=6) :: YATMFILETYPE = ' ' ! type of the Atmospheric file + CHARACTER(LEN=NFILENAMELGTMAX) :: YLUOUT = 'LISTING_SODA' ! name of listing + CHARACTER(LEN=6) :: YPROGRAM2 = 'FA ' + CHARACTER(LEN=NFILENAMELGTMAX) :: YFILEIN + CHARACTER(LEN=3) :: YVAR ! CHARACTER(LEN=100) :: YNAME CHARACTER(LEN=10) :: YRANK diff --git a/src/SURFEX/treat_bathyfield.F90 b/src/SURFEX/treat_bathyfield.F90 index 616da4fc4..d764deb62 100644 --- a/src/SURFEX/treat_bathyfield.F90 +++ b/src/SURFEX/treat_bathyfield.F90 @@ -49,7 +49,7 @@ USE MODD_SURF_ATM_GRID_n, ONLY : SURF_ATM_GRID_t USE MODD_SURF_ATM_n, ONLY : SURF_ATM_t USE MODD_SSO_n, ONLY : SSO_t ! -USE MODD_SURF_PAR, ONLY : XUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF USE MODD_PGDWORK, ONLY : NSIZE, NSIZE_ALL, XALL, XSUMVAL ! USE MODD_SURFEX_MPI, ONLY : NRANK, NPIO, NPROC, NCOMM, NREQ, NINDEX, IDX_R, & @@ -94,7 +94,7 @@ TYPE(SSO_t), INTENT(INOUT) :: USS CHARACTER(LEN=6), INTENT(IN) :: HSCHEME ! Scheme treated CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE ! Type of the data file CHARACTER(LEN=6), INTENT(IN) :: HSUBROUTINE ! Name of the subroutine to call - CHARACTER(LEN=28), INTENT(IN) :: HFILENAME ! Name of the field file. + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILENAME ! Name of the field file. CHARACTER(LEN=28), INTENT(IN) :: HNCVARNAME ! Name of the variable in netcdf file CHARACTER(LEN=20), INTENT(IN) :: HFIELD ! Name of the field. REAL, DIMENSION(:), INTENT(INOUT), OPTIONAL :: PPGDARRAY ! field on MESONH grid diff --git a/src/SURFEX/treat_field.F90 b/src/SURFEX/treat_field.F90 index 1621ccdbd..204492403 100644 --- a/src/SURFEX/treat_field.F90 +++ b/src/SURFEX/treat_field.F90 @@ -58,7 +58,7 @@ USE MODD_SURF_ATM_GRID_n, ONLY : SURF_ATM_GRID_t USE MODD_SURF_ATM_n, ONLY : SURF_ATM_t USE MODD_SSO_n, ONLY : SSO_t ! -USE MODD_SURF_PAR, ONLY : XUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF USE MODD_PGDWORK, ONLY : NSIZE, NSIZE_ALL, XALL, NSSO_ALL, XSSO_ALL, & XSUMVAL, XEXT_ALL, CATYPE, & XSSQO, LSSQO, NSSO, XMIN_WORK, XMAX_WORK, & @@ -112,7 +112,7 @@ TYPE(SSO_t), INTENT(INOUT) :: USS CHARACTER(LEN=6), INTENT(IN) :: HSCHEME ! Scheme treated CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE ! Type of the data file CHARACTER(LEN=6), INTENT(IN) :: HSUBROUTINE ! Name of the subroutine to call - CHARACTER(LEN=28), INTENT(IN) :: HFILENAME ! Name of the field file. + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILENAME ! Name of the field file. CHARACTER(LEN=20), INTENT(IN) :: HFIELD ! Name of the field. REAL, DIMENSION(:,:), INTENT(INOUT), OPTIONAL :: PPGDARRAY ! field on MESONH grid ! diff --git a/src/SURFEX/zoom_pgd_cover.F90 b/src/SURFEX/zoom_pgd_cover.F90 index 48e6b7a17..c272decc4 100644 --- a/src/SURFEX/zoom_pgd_cover.F90 +++ b/src/SURFEX/zoom_pgd_cover.F90 @@ -51,7 +51,7 @@ USE MODD_SURF_ATM_GRID_n, ONLY : SURF_ATM_GRID_t USE MODD_SURF_ATM_n, ONLY : SURF_ATM_t USE MODD_GRID_CONF_PROJ_n, ONLY : GRID_CONF_PROJ_t ! -USE MODD_SURF_PAR, ONLY : XUNDEF,LEN_HREC +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF, LEN_HREC USE MODD_DATA_COVER_PAR, ONLY : JPCOVER USE MODD_PREP, ONLY : CINGRID_TYPE, CINTERP_TYPE ! @@ -92,7 +92,7 @@ TYPE(SURF_ATM_t), INTENT(INOUT) :: U TYPE(GRID_CONF_PROJ_t),INTENT(INOUT) :: GCP ! CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling - CHARACTER(LEN=28), INTENT(IN) :: HINIFILE ! input atmospheric file name + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HINIFILE ! input atmospheric file name CHARACTER(LEN=6), INTENT(IN) :: HINIFILETYPE! input atmospheric file type LOGICAL, INTENT(OUT) :: OECOCLIMAP ! flag to use ecoclimap ! diff --git a/src/SURFEX/zoom_pgd_inland_water.F90 b/src/SURFEX/zoom_pgd_inland_water.F90 index 325f84266..9aa3af0ee 100644 --- a/src/SURFEX/zoom_pgd_inland_water.F90 +++ b/src/SURFEX/zoom_pgd_inland_water.F90 @@ -55,6 +55,8 @@ USE MODD_SURF_ATM_n, ONLY : SURF_ATM_t USE MODD_SSO_n, ONLY : SSO_t USE MODD_WATFLUX_n, ONLY : WATFLUX_t ! +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX +! USE YOMHOOK ,ONLY : LHOOK, DR_HOOK USE PARKIND1 ,ONLY : JPRB ! @@ -75,12 +77,12 @@ TYPE(SSO_t), INTENT(INOUT) :: USS TYPE(GRID_t), INTENT(INOUT) :: WG TYPE(WATFLUX_t), INTENT(INOUT) :: W ! -CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling -CHARACTER(LEN=28), INTENT(IN) :: HINIFILE ! input atmospheric file name -CHARACTER(LEN=6), INTENT(IN) :: HINIFILETYPE! input atmospheric file type -CHARACTER(LEN=28), INTENT(IN) :: HFILE ! output file name -CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE ! output file type -LOGICAL, INTENT(IN) :: OECOCLIMAP +CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling +CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HINIFILE ! input atmospheric file name +CHARACTER(LEN=6), INTENT(IN) :: HINIFILETYPE! input atmospheric file type +CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILE ! output file name +CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE ! output file type +LOGICAL, INTENT(IN) :: OECOCLIMAP REAL(KIND=JPRB) :: ZHOOK_HANDLE ! ! diff --git a/src/SURFEX/zoom_pgd_isba.F90 b/src/SURFEX/zoom_pgd_isba.F90 index 4ea66e8b9..cdcc01f01 100644 --- a/src/SURFEX/zoom_pgd_isba.F90 +++ b/src/SURFEX/zoom_pgd_isba.F90 @@ -56,7 +56,7 @@ USE MODD_SURF_PAR, ONLY : LEN_HREC USE MODD_SSO_n, ONLY : SSO_t USE MODD_MEGAN_SURF_FIELDS_n, ONLY : MEGAN_SURF_FIELDS_t ! -USE MODD_SURF_PAR, ONLY : XUNDEF +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF USE MODD_DATA_COVER_PAR, ONLY : JPCOVER USE MODD_ISBA_PAR, ONLY : XOPTIMGRID USE MODD_PREP, ONLY : CINGRID_TYPE, CINTERP_TYPE @@ -99,12 +99,12 @@ TYPE(SURF_ATM_t), INTENT(INOUT) :: U TYPE(SSO_t), INTENT(INOUT) :: USS TYPE(GRID_CONF_PROJ_t),INTENT(INOUT) :: GCP ! - CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling - CHARACTER(LEN=28), INTENT(IN) :: HINIFILE ! input atmospheric file name - CHARACTER(LEN=6), INTENT(IN) :: HINIFILETYPE! input atmospheric file type - CHARACTER(LEN=28), INTENT(IN) :: HFILE ! output file name - CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE ! output file type -LOGICAL, INTENT(IN) :: OECOCLIMAP ! flag to use ecoclimap + CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HINIFILE ! input atmospheric file name + CHARACTER(LEN=6), INTENT(IN) :: HINIFILETYPE! input atmospheric file type + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILE ! output file name + CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE ! output file type +LOGICAL, INTENT(IN) :: OECOCLIMAP ! flag to use ecoclimap ! ! !* 0.2 Declaration of local variables diff --git a/src/SURFEX/zoom_pgd_isba_full.F90 b/src/SURFEX/zoom_pgd_isba_full.F90 index a63024f15..da79dd3ed 100644 --- a/src/SURFEX/zoom_pgd_isba_full.F90 +++ b/src/SURFEX/zoom_pgd_isba_full.F90 @@ -56,6 +56,7 @@ USE MODD_SURF_ATM_n, ONLY : SURF_ATM_t USE MODD_GRID_CONF_PROJ_n, ONLY : GRID_CONF_PROJ_t ! USE MODD_PREP, ONLY : CINGRID_TYPE, CINTERP_TYPE, LINTERP +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX ! USE MODD_TYPE_DATE_SURF, ONLY : DATE ! @@ -92,9 +93,9 @@ TYPE(SURF_ATM_GRID_t), INTENT(INOUT) :: UG TYPE(SURF_ATM_t), INTENT(INOUT) :: U TYPE(GRID_CONF_PROJ_t),INTENT(INOUT) :: GCP ! - CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling - CHARACTER(LEN=28), INTENT(IN) :: HINIFILE ! input atmospheric file name - CHARACTER(LEN=6), INTENT(IN) :: HINIFILETYPE ! input atmospheric file type + CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HINIFILE ! input atmospheric file name + CHARACTER(LEN=6), INTENT(IN) :: HINIFILETYPE ! input atmospheric file type ! !* 0.2 Declaration of local variables ! ------------------------------ diff --git a/src/SURFEX/zoom_pgd_nature.F90 b/src/SURFEX/zoom_pgd_nature.F90 index aece2f924..804637c8e 100644 --- a/src/SURFEX/zoom_pgd_nature.F90 +++ b/src/SURFEX/zoom_pgd_nature.F90 @@ -48,6 +48,8 @@ USE MODD_SURF_ATM_n, ONLY : SURF_ATM_t USE MODD_SSO_n, ONLY : SSO_t USE MODD_GRID_CONF_PROJ_n, ONLY : GRID_CONF_PROJ_t ! +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX +! USE YOMHOOK ,ONLY : LHOOK, DR_HOOK USE PARKIND1 ,ONLY : JPRB ! @@ -66,12 +68,12 @@ TYPE(SURF_ATM_t), INTENT(INOUT) :: U TYPE(SSO_t), INTENT(INOUT) :: USS TYPE(GRID_CONF_PROJ_t),INTENT(INOUT) :: GCP ! - CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling - CHARACTER(LEN=28), INTENT(IN) :: HINIFILE ! input atmospheric file name - CHARACTER(LEN=6), INTENT(IN) :: HINIFILETYPE! input atmospheric file type - CHARACTER(LEN=28), INTENT(IN) :: HFILE ! output file name - CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE ! output file type -LOGICAL, INTENT(IN) :: OECOCLIMAP ! flag to use ecoclimap + CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HINIFILE ! input atmospheric file name + CHARACTER(LEN=6), INTENT(IN) :: HINIFILETYPE! input atmospheric file type + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILE ! output file name + CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE ! output file type +LOGICAL, INTENT(IN) :: OECOCLIMAP ! flag to use ecoclimap REAL(KIND=JPRB) :: ZHOOK_HANDLE ! ! diff --git a/src/SURFEX/zoom_pgd_orography.F90 b/src/SURFEX/zoom_pgd_orography.F90 index 24ecb4ed7..24b52d79b 100644 --- a/src/SURFEX/zoom_pgd_orography.F90 +++ b/src/SURFEX/zoom_pgd_orography.F90 @@ -48,7 +48,7 @@ USE MODD_SSO_n, ONLY : SSO_t USE MODD_GRID_CONF_PROJ_n, ONLY : GRID_CONF_PROJ_t ! USE MODD_PREP, ONLY : CINGRID_TYPE, CINTERP_TYPE, LINTERP -USE MODD_SURF_PAR, ONLY : XUNDEF,LEN_HREC +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF, LEN_HREC ! USE MODI_OPEN_AUX_IO_SURF USE MODI_READ_SURF @@ -84,8 +84,8 @@ TYPE(GRID_CONF_PROJ_t),INTENT(INOUT) :: GCP CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling REAL, DIMENSION(:), INTENT(IN) :: PSEA ! sea fraction REAL, DIMENSION(:), INTENT(IN) :: PWATER ! inland water fraction - CHARACTER(LEN=28), INTENT(IN) :: HINIFILE ! input atmospheric file name - CHARACTER(LEN=6), INTENT(IN) :: HINIFILETYPE! input atmospheric file type + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HINIFILE ! input atmospheric file name + CHARACTER(LEN=6), INTENT(IN) :: HINIFILETYPE! input atmospheric file type ! ! !* 0.2 Declaration of local variables diff --git a/src/SURFEX/zoom_pgd_sea.F90 b/src/SURFEX/zoom_pgd_sea.F90 index 6f8b761a6..2970c32ad 100644 --- a/src/SURFEX/zoom_pgd_sea.F90 +++ b/src/SURFEX/zoom_pgd_sea.F90 @@ -48,6 +48,8 @@ USE MODD_SURF_ATM_GRID_n, ONLY : SURF_ATM_GRID_t USE MODD_SURF_ATM_n, ONLY : SURF_ATM_t USE MODD_GRID_CONF_PROJ_n, ONLY : GRID_CONF_PROJ_t ! +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX +! USE YOMHOOK ,ONLY : LHOOK, DR_HOOK USE PARKIND1 ,ONLY : JPRB ! @@ -66,11 +68,11 @@ TYPE(SURF_ATM_GRID_t), INTENT(INOUT) :: UG TYPE(SURF_ATM_t), INTENT(INOUT) :: U TYPE(GRID_CONF_PROJ_t),INTENT(INOUT) :: GCP ! - CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling - CHARACTER(LEN=28), INTENT(IN) :: HINIFILE ! input atmospheric file name - CHARACTER(LEN=6), INTENT(IN) :: HINIFILETYPE! input atmospheric file type - CHARACTER(LEN=28), INTENT(IN) :: HFILE ! output file name - CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE ! output file type + CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HINIFILE ! input atmospheric file name + CHARACTER(LEN=6), INTENT(IN) :: HINIFILETYPE! input atmospheric file type + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILE ! output file name + CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE ! output file type REAL(KIND=JPRB) :: ZHOOK_HANDLE ! ! diff --git a/src/SURFEX/zoom_pgd_seaflux.F90 b/src/SURFEX/zoom_pgd_seaflux.F90 index 25b314bdd..3740ffcd9 100644 --- a/src/SURFEX/zoom_pgd_seaflux.F90 +++ b/src/SURFEX/zoom_pgd_seaflux.F90 @@ -52,6 +52,7 @@ USE MODD_GRID_CONF_PROJ_n, ONLY : GRID_CONF_PROJ_t ! USE MODD_DATA_COVER_PAR, ONLY : JPCOVER USE MODD_PREP, ONLY : CINGRID_TYPE, CINTERP_TYPE, LINTERP +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX ! ! USE MODI_GET_LUOUT @@ -87,11 +88,11 @@ TYPE(SURF_ATM_GRID_t), INTENT(INOUT) :: UG TYPE(SURF_ATM_t), INTENT(INOUT) :: U TYPE(GRID_CONF_PROJ_t),INTENT(INOUT) :: GCP ! - CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! Type of program - CHARACTER(LEN=28), INTENT(IN) :: HINIFILE ! input atmospheric file name - CHARACTER(LEN=6), INTENT(IN) :: HINIFILETYPE! input atmospheric file type - CHARACTER(LEN=28), INTENT(IN) :: HFILE ! output file name - CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE ! output file type + CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! Type of program + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HINIFILE ! input atmospheric file name + CHARACTER(LEN=6), INTENT(IN) :: HINIFILETYPE! input atmospheric file type + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILE ! output file name + CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE ! output file type ! ! !* 0.2 Declaration of local variables diff --git a/src/SURFEX/zoom_pgd_surf_atm.F90 b/src/SURFEX/zoom_pgd_surf_atm.F90 index aa3625fcf..975b2edb5 100644 --- a/src/SURFEX/zoom_pgd_surf_atm.F90 +++ b/src/SURFEX/zoom_pgd_surf_atm.F90 @@ -61,6 +61,8 @@ USE MODI_ZOOM_PGD_TOWN USE MODI_READ_COVER_GARDEN USE MODI_GOTO_MODEL_MNH ! +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX +! USE YOMHOOK ,ONLY : LHOOK, DR_HOOK USE PARKIND1 ,ONLY : JPRB ! @@ -72,11 +74,11 @@ IMPLICIT NONE ! TYPE(SURFEX_t), INTENT(INOUT) :: YSC ! - CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling - CHARACTER(LEN=28), INTENT(IN) :: HINIFILE ! input atmospheric file name - CHARACTER(LEN=6), INTENT(IN) :: HINIFILETYPE! input atmospheric file type - CHARACTER(LEN=28), INTENT(IN) :: HFILE ! output atmospheric file name - CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE ! output atmospheric file type + CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HINIFILE ! input atmospheric file name + CHARACTER(LEN=6), INTENT(IN) :: HINIFILETYPE! input atmospheric file type + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILE ! output atmospheric file name + CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE ! output atmospheric file type ! ! !* 0.2 Declaration of local variables diff --git a/src/SURFEX/zoom_pgd_teb.F90 b/src/SURFEX/zoom_pgd_teb.F90 index 329ad9412..e3051bdb0 100644 --- a/src/SURFEX/zoom_pgd_teb.F90 +++ b/src/SURFEX/zoom_pgd_teb.F90 @@ -58,7 +58,7 @@ USE MODD_TEB_OPTION_n, ONLY : TEB_OPTIONS_t ! USE MODD_DATA_COVER_PAR, ONLY : JPCOVER ! -USE MODD_SURF_PAR, ONLY : XUNDEF,LEN_HREC +USE MODD_SURF_PAR, ONLY : NFILENAMELGTMAX, XUNDEF, LEN_HREC USE MODD_PREP, ONLY : CINGRID_TYPE, CINTERP_TYPE, LINTERP USE MODD_ISBA_PAR, ONLY : XOPTIMGRID ! @@ -104,7 +104,7 @@ TYPE(TEB_OPTIONS_t), INTENT(INOUT) :: TOP TYPE(DATA_TEB_HYDRO_t), INTENT(INOUT) :: DTH ! CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling - CHARACTER(LEN=28), INTENT(IN) :: HINIFILE ! file to read + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HINIFILE ! file to read CHARACTER(LEN=6), INTENT(IN) :: HINIFILETYPE! file type LOGICAL, INTENT(IN) :: OECOCLIMAP ! flag to use ecoclimap LOGICAL, INTENT(IN) :: OGARDEN ! flag to use garden diff --git a/src/SURFEX/zoom_pgd_town.F90 b/src/SURFEX/zoom_pgd_town.F90 index 3df0cad7e..66fd200e2 100644 --- a/src/SURFEX/zoom_pgd_town.F90 +++ b/src/SURFEX/zoom_pgd_town.F90 @@ -57,6 +57,8 @@ USE MODD_GRID_CONF_PROJ_n, ONLY : GRID_CONF_PROJ_t USE MODD_SFX_GRID_n, ONLY : GRID_t USE MODD_TEB_OPTION_n, ONLY : TEB_OPTIONS_t ! +USE MODD_SURF_PAR, ONLY: NFILENAMELGTMAX +! USE YOMHOOK ,ONLY : LHOOK, DR_HOOK USE PARKIND1 ,ONLY : JPRB ! @@ -81,11 +83,11 @@ TYPE(GRID_t), INTENT(INOUT) :: TG TYPE(TEB_OPTIONS_t), INTENT(INOUT) :: TOP TYPE(DATA_TEB_HYDRO_t), INTENT(INOUT) :: DTH ! - CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling - CHARACTER(LEN=28), INTENT(IN) :: HINIFILE ! input atmospheric file name - CHARACTER(LEN=6), INTENT(IN) :: HINIFILETYPE! input atmospheric file type - CHARACTER(LEN=28), INTENT(IN) :: HFILE ! output file name - CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE ! output file type + CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HINIFILE ! input atmospheric file name + CHARACTER(LEN=6), INTENT(IN) :: HINIFILETYPE! input atmospheric file type + CHARACTER(LEN=NFILENAMELGTMAX), INTENT(IN) :: HFILE ! output file name + CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE ! output file type LOGICAL, INTENT(IN) :: OECOCLIMAP ! flag to use ecoclimap LOGICAL, INTENT(IN) :: OGARDEN ! flag to use garden REAL(KIND=JPRB) :: ZHOOK_HANDLE -- GitLab