diff --git a/conf/profile_mesonh.ihm b/conf/profile_mesonh.ihm index 11c7060f121da936de1c2838919ed1763808d31b..76104c7e5d1eddb54269074bb1995f51e0fb4ce3 100755 --- a/conf/profile_mesonh.ihm +++ b/conf/profile_mesonh.ihm @@ -97,7 +97,7 @@ export MNH_REAL=${MNH_REAL} # # Len of HREC characters # -export LEN_HREC=${LEN_HREC} +export MNH_LEN_HREC=${MNH_LEN_HREC} # # FOREFIRE # diff --git a/src/LIB/NEWLFI/src/lficom0.h b/src/LIB/NEWLFI/src/lficom0.h index 68fa8a59464e2e891ee1e6a0413126fe334d3d6a..94f300e2eae737d25ac267c423f707e7b30ce1e9 100644 --- a/src/LIB/NEWLFI/src/lficom0.h +++ b/src/LIB/NEWLFI/src/lficom0.h @@ -62,7 +62,7 @@ C C LOGICAL LPCRAY, LPRECH C - PARAMETER ( JPNCPN=LEN_HREC, JPLARD=512, JPNPDF=20, JPXUFM=100 ) + PARAMETER ( JPNCPN=MNH_LEN_HREC, JPLARD=512, JPNPDF=20, JPXUFM=100 ) PARAMETER ( JPNXFI=300, JPFACX=120, JPNPIA=4, JPNXPR=100 ) C C Implementation-dependent symbolic constants (except for JPNCMO and diff --git a/src/MNH/read_surf_mnh.f90 b/src/MNH/read_surf_mnh.f90 index f051ed7393a5eb3042200c278fb0c6af3ebcbf0a..ec583329c42680984f4d6f6ae92faebfc1e66aa1 100644 --- a/src/MNH/read_surf_mnh.f90 +++ b/src/MNH/read_surf_mnh.f90 @@ -21,7 +21,7 @@ SUBROUTINE PREPARE_METADATA_READ_SURF(HREC,HDIR,KGRID,KTYPE,KDIMS,HSUBR,TPFIELD) use modd_field, only: tfielddata, tfieldlist, TYPECHAR, TYPEDATE, TYPELOG use mode_field, only: Find_field_id_from_mnhname ! -CHARACTER(LEN=LEN_HREC),INTENT(IN) :: HREC ! name of the article to write +CHARACTER(LEN=MNH_LEN_HREC),INTENT(IN) :: HREC ! name of the article to write CHARACTER(LEN=2), INTENT(IN) :: HDIR ! Expected type of the data field (XX,XY,--...) INTEGER, INTENT(IN) :: KGRID ! Localization on the model grid INTEGER, INTENT(IN) :: KTYPE ! Datatype @@ -158,7 +158,7 @@ IMPLICIT NONE ! !* 0.1 Declarations of arguments ! -CHARACTER(LEN=LEN_HREC),INTENT(IN) :: HREC ! name of the article to be read +CHARACTER(LEN=MNH_LEN_HREC),INTENT(IN) :: HREC ! name of the article to be read REAL, INTENT(OUT) :: PFIELD ! the real scalar to be read INTEGER, INTENT(OUT) :: KRESP ! KRESP : return-code if a problem appears CHARACTER(LEN=*), INTENT(OUT) :: HCOMMENT ! comment @@ -312,7 +312,7 @@ IMPLICIT NONE ! !* 0.1 Declarations of arguments ! -CHARACTER(LEN=LEN_HREC),INTENT(IN) :: HREC ! name of the article to be read +CHARACTER(LEN=MNH_LEN_HREC),INTENT(IN) :: HREC ! name of the article to be read INTEGER, INTENT(IN) :: KL ! number of points REAL, DIMENSION(KL), INTENT(OUT):: PFIELD ! array containing the data field INTEGER, INTENT(OUT):: KRESP ! KRESP : return-code if a problem appears @@ -334,7 +334,7 @@ REAL, DIMENSION(:,:), ALLOCATABLE :: ZWORK ! work array read in the file REAL, DIMENSION(:), ALLOCATABLE :: ZWORK1D! work array read in the file REAL :: ZW ! work value -CHARACTER(LEN=LEN_HREC) :: YREC +CHARACTER(LEN=MNH_LEN_HREC) :: YREC CHARACTER(LEN=2) :: YSTORAGE_TYPE ! INTEGER :: IID, IRESP @@ -598,7 +598,7 @@ IMPLICIT NONE ! !* 0.1 Declarations of arguments ! -CHARACTER(LEN=LEN_HREC), INTENT(IN) :: HREC ! name of the article to be read +CHARACTER(LEN=MNH_LEN_HREC), INTENT(IN) :: HREC ! name of the article to be read INTEGER, INTENT(IN) :: KL1 ! number of points INTEGER, INTENT(IN) :: KL2 ! second dimension REAL, DIMENSION(KL1,KL2),INTENT(OUT) :: PFIELD ! array containing the data field @@ -735,7 +735,7 @@ IMPLICIT NONE ! !* 0.1 Declarations of arguments ! -CHARACTER(LEN=LEN_HREC), INTENT(IN) :: HREC ! name of the article to be read +CHARACTER(LEN=MNH_LEN_HREC), INTENT(IN) :: HREC ! name of the article to be read INTEGER, INTENT(IN) :: KL1,KL2 ! number of points REAL, DIMENSION(KL1,KL2), INTENT(OUT):: PFIELD ! array containing the data field LOGICAL,DIMENSION(JPCOVER),INTENT(IN) :: OFLAG ! mask for array filling @@ -753,7 +753,7 @@ INTEGER :: IGRID ! IGRID : grid indicator INTEGER :: ILENCH ! ILENCH : length of comment string INTEGER :: ILUOUT ! -CHARACTER(LEN=LEN_HREC) :: YREC +CHARACTER(LEN=MNH_LEN_HREC) :: YREC CHARACTER(LEN=2) :: YDIR CHARACTER(LEN=2) :: YSTORAGE_TYPE ! @@ -928,7 +928,7 @@ IMPLICIT NONE ! !* 0.1 Declarations of arguments ! -CHARACTER(LEN=LEN_HREC),INTENT(IN) :: HREC ! name of the article to be read +CHARACTER(LEN=MNH_LEN_HREC),INTENT(IN) :: HREC ! name of the article to be read INTEGER, INTENT(IN) :: KL1 ! number of points INTEGER, INTENT(IN) :: KCOVER ! index of the vertical level, it should be a index such that LCOVER(KCOVER)=.TRUE. REAL, DIMENSION(KL1), INTENT(OUT):: PFIELD ! array containing the data field @@ -946,7 +946,7 @@ INTEGER :: IGRID ! IGRID : grid indicator INTEGER :: ILENCH ! ILENCH : length of comment string INTEGER :: ILUOUT ! -CHARACTER(LEN=LEN_HREC) :: YREC +CHARACTER(LEN=MNH_LEN_HREC) :: YREC CHARACTER(LEN=2) :: YDIR CHARACTER(LEN=2) :: YSTORAGE_TYPE ! @@ -1107,7 +1107,7 @@ IMPLICIT NONE ! !* 0.1 Declarations of arguments ! -CHARACTER(LEN=LEN_HREC),INTENT(IN) :: HREC ! name of the article to be read +CHARACTER(LEN=MNH_LEN_HREC),INTENT(IN) :: HREC ! name of the article to be read INTEGER, INTENT(OUT) :: KFIELD ! the integer to be read INTEGER, INTENT(OUT) :: KRESP ! KRESP : return-code if a problem appears CHARACTER(LEN=*), INTENT(OUT) :: HCOMMENT ! comment @@ -1203,7 +1203,7 @@ IMPLICIT NONE ! !* 0.1 Declarations of arguments ! -CHARACTER(LEN=LEN_HREC),INTENT(IN) :: HREC ! name of the article to be read +CHARACTER(LEN=MNH_LEN_HREC),INTENT(IN) :: HREC ! name of the article to be read INTEGER, INTENT(IN) :: KL ! number of points INTEGER, DIMENSION(KL), INTENT(OUT) :: KFIELD ! the integer to be read INTEGER, INTENT(OUT) :: KRESP ! KRESP : return-code if a problem appears @@ -1312,7 +1312,7 @@ IMPLICIT NONE ! !* 0.1 Declarations of arguments ! -CHARACTER(LEN=LEN_HREC),INTENT(IN) :: HREC ! name of the article to be read +CHARACTER(LEN=MNH_LEN_HREC),INTENT(IN) :: HREC ! name of the article to be read CHARACTER(LEN=40), INTENT(OUT) :: HFIELD ! the integer to be read INTEGER, INTENT(OUT) :: KRESP ! KRESP : return-code if a problem appears CHARACTER(LEN=*), INTENT(OUT) :: HCOMMENT ! comment @@ -1467,7 +1467,7 @@ IMPLICIT NONE ! !* 0.1 Declarations of arguments ! -CHARACTER(LEN=LEN_HREC),INTENT(IN) :: HREC ! name of the article to be read +CHARACTER(LEN=MNH_LEN_HREC),INTENT(IN) :: HREC ! name of the article to be read INTEGER, INTENT(IN) :: KL ! number of points LOGICAL, DIMENSION(KL), INTENT(OUT) :: OFIELD ! array containing the data field INTEGER, INTENT(OUT) :: KRESP ! KRESP : return-code if a problem appears @@ -1580,7 +1580,7 @@ IMPLICIT NONE ! !* 0.1 Declarations of arguments ! -CHARACTER(LEN=LEN_HREC),INTENT(IN) :: HREC ! name of the article to be read +CHARACTER(LEN=MNH_LEN_HREC),INTENT(IN) :: HREC ! name of the article to be read LOGICAL, INTENT(OUT) :: OFIELD ! array containing the data field INTEGER, INTENT(OUT) :: KRESP ! KRESP : return-code if a problem appears CHARACTER(LEN=*), INTENT(OUT) :: HCOMMENT ! comment @@ -1676,7 +1676,7 @@ IMPLICIT NONE ! !* 0.1 Declarations of arguments ! -CHARACTER(LEN=LEN_HREC),INTENT(IN) :: HREC ! name of the article to be read +CHARACTER(LEN=MNH_LEN_HREC),INTENT(IN) :: HREC ! name of the article to be read INTEGER, INTENT(OUT) :: KYEAR ! year INTEGER, INTENT(OUT) :: KMONTH ! month INTEGER, INTENT(OUT) :: KDAY ! day @@ -1690,7 +1690,7 @@ INTEGER :: IGRID ! IGRID : grid indicator INTEGER :: ILENCH ! ILENCH : length of comment string INTEGER :: ILUOUT ! -CHARACTER(LEN=LEN_HREC) :: YRECFM ! Name of the article to be written +CHARACTER(LEN=MNH_LEN_HREC) :: YRECFM ! Name of the article to be written CHARACTER(LEN=40) :: YFILETYPE40! MESONH file type CHARACTER(LEN=2) :: YFILETYPE2 ! MESONH file type INTEGER, DIMENSION(3) :: ITDATE @@ -1798,7 +1798,7 @@ IMPLICIT NONE ! !* 0.1 Declarations of arguments ! -CHARACTER(LEN=LEN_HREC), INTENT(IN) :: HREC ! name of the article to be read +CHARACTER(LEN=MNH_LEN_HREC), INTENT(IN) :: HREC ! name of the article to be read INTEGER, INTENT(IN) :: KL1 ! number of points INTEGER, DIMENSION(KL1), INTENT(OUT) :: KYEAR ! year @@ -1814,7 +1814,7 @@ INTEGER :: IGRID ! IGRID : grid indicator INTEGER :: ILENCH ! ILENCH : length of comment string INTEGER :: ILUOUT ! -CHARACTER(LEN=LEN_HREC) :: YRECFM ! Name of the article to be written +CHARACTER(LEN=MNH_LEN_HREC) :: YRECFM ! Name of the article to be written CHARACTER(LEN=40) :: YFILETYPE40! MESONH file type CHARACTER(LEN=2) :: YFILETYPE2 ! MESONH file type INTEGER, DIMENSION(3,KL1) :: ITDATE diff --git a/src/MNH/turb_ver_thermo_flux.f90 b/src/MNH/turb_ver_thermo_flux.f90 index cf539984e7751f862a6251a3e80b048274740073..f64c31a26f43162eb6c1f3e3c653e414051f8c7c 100644 --- a/src/MNH/turb_ver_thermo_flux.f90 +++ b/src/MNH/turb_ver_thermo_flux.f90 @@ -501,7 +501,6 @@ REAL, DIMENSION(:), ALLOCATABLE :: ZYHAT_ll ! Position y in the conformal ! ! CHARACTER (LEN=100) :: YCOMMENT ! comment string in LFIFM file -CHARACTER (LEN=LEN_HREC) :: YRECFM ! Name of the desired field in LFIFM file ! REAL :: ZTIME1, ZTIME2 REAL :: ZDELTAX diff --git a/src/MNH/write_surf_mnh.f90 b/src/MNH/write_surf_mnh.f90 index 58e08d8dc9a0d7189d1b0a6b53f3b0b5ae157b48..0bd7657985e384b35cbf3111e3da3aeb06937930 100644 --- a/src/MNH/write_surf_mnh.f90 +++ b/src/MNH/write_surf_mnh.f90 @@ -16,7 +16,7 @@ use modd_field, only: tfielddata, tfieldlist, TYPECHAR, TYPEDATE, TYPELOG use mode_field, only: Find_field_id_from_mnhname USE MODE_MSG ! -CHARACTER(LEN=LEN_HREC),INTENT(IN) :: HREC ! name of the article to write +CHARACTER(LEN=MNH_LEN_HREC),INTENT(IN) :: HREC ! name of the article to write CHARACTER(LEN=2), INTENT(IN) :: HDIR ! Expected type of the data field (XX,XY,--...) CHARACTER(LEN=100), INTENT(IN) :: HCOMMENT ! Comment string INTEGER, INTENT(IN) :: KGRID ! Localization on the model grid @@ -187,7 +187,7 @@ IMPLICIT NONE ! !* 0.1 Declarations of arguments ! -CHARACTER(LEN=LEN_HREC),INTENT(IN) :: HREC ! name of the article to write +CHARACTER(LEN=MNH_LEN_HREC),INTENT(IN) :: HREC ! name of the article to write REAL, INTENT(IN) :: PFIELD ! the real scalar to write INTEGER, INTENT(OUT) :: KRESP ! return-code if a problem appears CHARACTER(LEN=100), INTENT(IN) :: HCOMMENT ! Comment string @@ -307,7 +307,7 @@ IMPLICIT NONE ! !* 0.1 Declarations of arguments ! -CHARACTER(LEN=LEN_HREC),INTENT(IN) :: HREC ! name of the article to write +CHARACTER(LEN=MNH_LEN_HREC),INTENT(IN) :: HREC ! name of the article to write INTEGER, INTENT(IN) :: KL ! number of points REAL, DIMENSION(KL), INTENT(IN) :: PFIELD ! array containing the data field INTEGER, INTENT(OUT) :: KRESP ! return-code if a problem appears @@ -570,7 +570,7 @@ IMPLICIT NONE ! !* 0.1 Declarations of arguments ! -CHARACTER(LEN=LEN_HREC), INTENT(IN) :: HREC ! name of the article to write +CHARACTER(LEN=MNH_LEN_HREC), INTENT(IN) :: HREC ! name of the article to write INTEGER, INTENT(IN) :: KL1,KL2 ! number of points REAL, DIMENSION(KL1,KL2), INTENT(IN) :: PFIELD ! array containing the data field LOGICAL,DIMENSION(:), INTENT(IN) :: OFLAG ! mask for array filling @@ -595,7 +595,7 @@ INTEGER :: IIU, IJU, IIB, IJB, IIE, IJE ! dimensions of horizontal fie INTEGER, DIMENSION(:), ALLOCATABLE :: IMASK ! mask for unpacking REAL :: ZUNDEF ! undefined value in SURFEX CHARACTER(LEN=2) :: YDIR -CHARACTER(LEN=LEN_HREC) :: YREC +CHARACTER(LEN=MNH_LEN_HREC) :: YREC ! !JUANZ INTEGER :: NCOVER,ICOVER,IKL2, JL2 @@ -771,7 +771,7 @@ IMPLICIT NONE ! !* 0.1 Declarations of arguments ! -CHARACTER(LEN=LEN_HREC), INTENT(IN) :: HREC ! name of the article to write +CHARACTER(LEN=MNH_LEN_HREC), INTENT(IN) :: HREC ! name of the article to write INTEGER, INTENT(IN) :: KL1,KL2 ! number of points REAL, DIMENSION(KL1,KL2), INTENT(IN) :: PFIELD ! array containing the data field INTEGER, INTENT(OUT) :: KRESP ! return-code if a problem appears @@ -914,7 +914,7 @@ IMPLICIT NONE ! !* 0.1 Declarations of arguments ! -CHARACTER(LEN=LEN_HREC),INTENT(IN) :: HREC ! name of the article to write +CHARACTER(LEN=MNH_LEN_HREC),INTENT(IN) :: HREC ! name of the article to write INTEGER, INTENT(IN) :: KFIELD ! the integer to write INTEGER, INTENT(OUT) :: KRESP ! return-code if a problem appears CHARACTER(LEN=100), INTENT(IN) :: HCOMMENT ! Comment string @@ -1011,7 +1011,7 @@ IMPLICIT NONE ! !* 0.1 Declarations of arguments ! -CHARACTER(LEN=LEN_HREC),INTENT(IN) :: HREC ! name of the article to write +CHARACTER(LEN=MNH_LEN_HREC),INTENT(IN) :: HREC ! name of the article to write INTEGER, INTENT(IN) :: KL ! number of points INTEGER, DIMENSION(KL), INTENT(IN) :: KFIELD ! the integers to be written INTEGER, INTENT(OUT) :: KRESP ! return-code if a problem appears @@ -1111,7 +1111,7 @@ IMPLICIT NONE ! !* 0.1 Declarations of arguments ! -CHARACTER(LEN=LEN_HREC),INTENT(IN) :: HREC ! name of the article to write +CHARACTER(LEN=MNH_LEN_HREC),INTENT(IN) :: HREC ! name of the article to write CHARACTER(LEN=40), INTENT(IN) :: HFIELD ! the string to write INTEGER, INTENT(OUT) :: KRESP ! return-code if a problem appears CHARACTER(LEN=100), INTENT(IN) :: HCOMMENT ! Comment string @@ -1210,7 +1210,7 @@ IMPLICIT NONE ! !* 0.1 Declarations of arguments ! -CHARACTER(LEN=LEN_HREC),INTENT(IN) :: HREC ! name of the article to write +CHARACTER(LEN=MNH_LEN_HREC),INTENT(IN) :: HREC ! name of the article to write INTEGER, INTENT(IN) :: KL ! number of points LOGICAL, DIMENSION(KL), INTENT(IN) :: OFIELD ! array containing the data field INTEGER, INTENT(OUT) :: KRESP ! return-code if a problem appears @@ -1322,7 +1322,7 @@ IMPLICIT NONE ! !* 0.1 Declarations of arguments ! -CHARACTER(LEN=LEN_HREC),INTENT(IN) :: HREC ! name of the article to write +CHARACTER(LEN=MNH_LEN_HREC),INTENT(IN) :: HREC ! name of the article to write LOGICAL, INTENT(IN) :: OFIELD ! array containing the data field INTEGER, INTENT(OUT) :: KRESP ! return-code if a problem appears CHARACTER(LEN=100), INTENT(IN) :: HCOMMENT ! Comment string @@ -1406,7 +1406,7 @@ IMPLICIT NONE ! !* 0.1 Declarations of arguments ! -CHARACTER(LEN=LEN_HREC), INTENT(IN) :: HREC ! name of the article to be written +CHARACTER(LEN=MNH_LEN_HREC), INTENT(IN) :: HREC ! name of the article to be written INTEGER, INTENT(IN) :: KYEAR ! year INTEGER, INTENT(IN) :: KMONTH ! month INTEGER, INTENT(IN) :: KDAY ! day @@ -1417,7 +1417,7 @@ CHARACTER(LEN=100), INTENT(IN) :: HCOMMENT ! Comment string !* 0.2 Declarations of local variables ! ! -CHARACTER(LEN=LEN_HREC) :: YRECFM ! Name of the article to be written +CHARACTER(LEN=MNH_LEN_HREC) :: YRECFM ! Name of the article to be written INTEGER, DIMENSION(3) :: ITDATE CHARACTER(LEN=5) :: YMSG TYPE (DATE_TIME) :: TZDATA @@ -1499,7 +1499,7 @@ IMPLICIT NONE ! !* 0.1 Declarations of arguments ! -CHARACTER(LEN=LEN_HREC), INTENT(IN) :: HREC ! name of the article to be written +CHARACTER(LEN=MNH_LEN_HREC), INTENT(IN) :: HREC ! name of the article to be written INTEGER, INTENT(IN) :: KL1 ! number of points INTEGER, DIMENSION(KL1), INTENT(IN) :: KYEAR ! year INTEGER, DIMENSION(KL1), INTENT(IN) :: KMONTH ! month diff --git a/src/Makefile.MESONH.mk b/src/Makefile.MESONH.mk index c5770feb3d53e10292fe3041a0aa9d2585780adf..491b867250c6dc4089380c76daee0fd59fb72fdf 100644 --- a/src/Makefile.MESONH.mk +++ b/src/Makefile.MESONH.mk @@ -57,7 +57,7 @@ CPPFLAGS += -DMNH_REAL=$(MNH_REAL) # # Len of HREC characters # -CPPFLAGS += -DLEN_HREC=$(LEN_HREC) +CPPFLAGS += -DMNH_LEN_HREC=$(MNH_LEN_HREC) # OBJS_NOCB += spll_dxf.o spll_dxm.o spll_dyf.o spll_dym.o \ diff --git a/src/SURFEX/modd_surf_par.F90 b/src/SURFEX/modd_surf_par.F90 index f38334f2d6003bdf0e8379982f11d71094f4bd59..ec9c0a949b60feaaefe96fe44dfafc2ee3061970 100644 --- a/src/SURFEX/modd_surf_par.F90 +++ b/src/SURFEX/modd_surf_par.F90 @@ -58,6 +58,15 @@ INTEGER, PARAMETER :: NUNDEF = 1E+9 ! HUGE(NUNDEF) ! undefined value REAL, PARAMETER :: XSURF_EPSILON = EPSILON(XSURF_EPSILON) ! minimum REAL, PARAMETER :: XSURF_HUGE = HUGE(XSURF_HUGE) REAL, PARAMETER :: XSURF_TINY = TINY(XSURF_TINY) +#ifdef SFX_MNH +INTEGER, PARAMETER :: LEN_HREC = MNH_LEN_HREC ! Length of record variable written in output files. + ! !!!!!!!!!!!!!!!!!!! WARNING. !!!!!!!!!!!!!!!!!!!!!!!!!!! + ! The use of 16 is forbidden for operational use. + ! Developpers must restrict length of I/O + ! variable names to 12 as much as possible. +#else +INTEGER, PARAMETER :: LEN_HREC = 12 +#endif !----------------------------------------------------------------------------------------------------- ! END MODULE MODD_SURF_PAR diff --git a/src/configure b/src/configure index c0845c0d5f5e52acd0d7cca1d31c9316e03c1c79..f0ac84bf57479c11747e72f4b901fc38c414d034 100755 --- a/src/configure +++ b/src/configure @@ -32,7 +32,7 @@ export VERSION_NCL=${VERSION_NCL:-"ncl-6.4.0"} export VERSION_ECRAD=${VERSION_ECRAD:-"1.4.0"} export VER_ECRAD=${VERSION_ECRAD//./} -export LEN_HREC=${LEN_HREC:-16} +export MNH_LEN_HREC=${MNH_LEN_HREC:-16} # export NEED_TOOLS=YES