From 32e8e0e2d8454b9cba9108ca434c8cb1123a2abd Mon Sep 17 00:00:00 2001 From: Jean Bidlot Date: Sat, 20 Dec 2025 22:43:01 +0000 Subject: [PATCH 01/14] add lam_highres confiuration --- share/ecwam/scripts/ecwam_configure.sh | 28 +++--- .../scripts/ecwam_run_create_bathymetry.sh | 6 +- share/ecwam/scripts/ecwam_run_model.sh | 2 + share/ecwam/scripts/ecwam_run_preset.sh | 2 + tests/etopo1_oper_an_fc_O1280.yml | 1 + tests/etopo1_oper_an_fc_O48_cy50r1.yml | 1 + tests/etopo1_oper_an_fc_lam_highres.yml | 88 +++++++++++++++++++ 7 files changed, 115 insertions(+), 13 deletions(-) create mode 100644 tests/etopo1_oper_an_fc_lam_highres.yml diff --git a/share/ecwam/scripts/ecwam_configure.sh b/share/ecwam/scripts/ecwam_configure.sh index e73435dee..11fd331f3 100644 --- a/share/ecwam/scripts/ecwam_configure.sh +++ b/share/ecwam/scripts/ecwam_configure.sh @@ -162,16 +162,6 @@ function ecwam_configure { amoeap=357.0000 deptha=5.0 iper=1 - elif [[ $wamresol = medite25 ]] ; then - xdella=0.2500000 - amosop=9.00000 - amonop=90.00000 - amowep=-98.00000 - amoeap=42.0000 - iper=0 - ##!! - cldomain=m - ##!! elif [[ $wamresol = medite25 ]] ; then xdella=0.2500000 amosop=30.00000 @@ -205,6 +195,24 @@ function ecwam_configure { ##!! cldomain=m ##!! + elif [[ $wamresol = lam_highres ]] ; then + xdella=0.016666667 + amosop=30.00000 + amonop=46.00000 + amowep=10.00000 + amoeap=24.0000 + iper=0 + deptha=1.0 + irgg=0 + fr1=0.05 + ifre1=1 + ##!! + cldomain=m + ##!! + llobstrct=F + llgrib_bathy_out=T + llgrib_obstrt_out=T + llobstrout=F elif [[ $wamresol = onegrdpt ]] ; then # one grid point setup xdella=0.5000000 diff --git a/share/ecwam/scripts/ecwam_run_create_bathymetry.sh b/share/ecwam/scripts/ecwam_run_create_bathymetry.sh index 54cdcd03f..5bab5c6f2 100755 --- a/share/ecwam/scripts/ecwam_run_create_bathymetry.sh +++ b/share/ecwam/scripts/ecwam_run_create_bathymetry.sh @@ -173,12 +173,12 @@ else echo "\n\n\t Getting ETOPO1 data set\n" log ${SCRIPTS_DIR}/ecwam_retrieve.sh ${ETOPO1} ${DATA_DIR}/${ETOPO1} ln -sf ${DATA_DIR}/${ETOPO1} ETOPO1_Ice_g_int.xyz - CREATE_WAM_BATHYMETRY_EXE=${CREATE_WAM_BATHYMETRY_ETOPO1} + CREATE_WAM_BATHYMETRY_EXE=${CREATE_WAM_BATHYMETRY_ETOPO1}-${prec} else echo "\n\n\t Getting ETOPO2 data set\n" log ${SCRIPTS_DIR}/ecwam_retrieve.sh ${ETOPO2} ${DATA_DIR}/${ETOPO2} ln -sf ${DATA_DIR}/${ETOPO2} etopo2_2006apr.dat - CREATE_WAM_BATHYMETRY_EXE=${CREATE_WAM_BATHYMETRY_ETOPO2} + CREATE_WAM_BATHYMETRY_EXE=${CREATE_WAM_BATHYMETRY_ETOPO2}-${prec} fi assert_executable_is_available ${CREATE_WAM_BATHYMETRY_EXE} || abort 4 @@ -264,4 +264,4 @@ for ip in 0 1 2; do echo "\n\t wam_grib_subgrid_${ip} is available in DATA_DIR with symlink in RUN_DIR:\n\n\t ${RUN_DIR}/wam_subgrid_${ip} -> ${DATA_DIR}/data/bathymetry/${subgrid_files[$ip]}" done -cleanup \ No newline at end of file +cleanup diff --git a/share/ecwam/scripts/ecwam_run_model.sh b/share/ecwam/scripts/ecwam_run_model.sh index ec9b699ba..e2c698871 100755 --- a/share/ecwam/scripts/ecwam_run_model.sh +++ b/share/ecwam/scripts/ecwam_run_model.sh @@ -78,6 +78,7 @@ done # MODEL SETUP: ############## +cldomain=$(read_config cldomain --default=g) wamnang=$(read_config directions) wamnfre=$(read_config frequencies) @@ -214,6 +215,7 @@ cat > wam_namelist << EOF NFRE = 36, NFRE_RED = ${wamnfre}, CLHEADER = " WAVE MODEL ", + CLDOMAIN = "${cldomain}", CBPLTDT = "${begofrn}", CEPLTDT = "${endofrn}", CDATEF = "${begoffo}", diff --git a/share/ecwam/scripts/ecwam_run_preset.sh b/share/ecwam/scripts/ecwam_run_preset.sh index c9b72d33a..fc278d78a 100755 --- a/share/ecwam/scripts/ecwam_run_preset.sh +++ b/share/ecwam/scripts/ecwam_run_preset.sh @@ -145,6 +145,7 @@ begoffo=$(read_config forcings.at[1].begin --format="%Y%m%d%H%M%S" --default=${e # MODEL SETUP: ############## +cldomain=$(read_config cldomain --default=g) wamnang=$(read_config directions) wamnfre=$(read_config frequencies) @@ -192,6 +193,7 @@ ln -s ${DATA_DIR}/${forcings_file} sfcwindin cat > PREINFO < Date: Sun, 21 Dec 2025 15:09:21 +0000 Subject: [PATCH 02/14] fix for FR1 and IFRE1 --- share/ecwam/scripts/ecwam_configure.sh | 3 +-- .../scripts/ecwam_run_create_bathymetry.sh | 21 ++++++++++++------- share/ecwam/scripts/ecwam_run_model.sh | 9 +++++--- share/ecwam/scripts/ecwam_run_preset.sh | 5 +++++ tests/aqua_era5_O48.yml | 2 ++ tests/aqua_oper_an_fc_O48.yml | 2 ++ tests/etopo1_era5_O48.yml | 2 ++ tests/etopo1_oper_an_fc_O1280.yml | 2 ++ tests/etopo1_oper_an_fc_O320.yml | 2 ++ tests/etopo1_oper_an_fc_O320_cy49r2.yml | 2 ++ tests/etopo1_oper_an_fc_O48.yml | 2 ++ tests/etopo1_oper_an_fc_O48_cy49r1.yml | 2 ++ tests/etopo1_oper_an_fc_O48_cy50r1.yml | 2 ++ tests/etopo1_oper_an_fc_O48_iphys_0.yml | 2 ++ tests/etopo1_oper_an_fc_O640.yml | 2 ++ tests/etopo1_oper_an_fc_lam_highres.yml | 10 +++++---- 16 files changed, 54 insertions(+), 16 deletions(-) diff --git a/share/ecwam/scripts/ecwam_configure.sh b/share/ecwam/scripts/ecwam_configure.sh index 11fd331f3..cddc52479 100644 --- a/share/ecwam/scripts/ecwam_configure.sh +++ b/share/ecwam/scripts/ecwam_configure.sh @@ -204,12 +204,11 @@ function ecwam_configure { iper=0 deptha=1.0 irgg=0 - fr1=0.05 + fr1=0.055 ifre1=1 ##!! cldomain=m ##!! - llobstrct=F llgrib_bathy_out=T llgrib_obstrt_out=T llobstrout=F diff --git a/share/ecwam/scripts/ecwam_run_create_bathymetry.sh b/share/ecwam/scripts/ecwam_run_create_bathymetry.sh index 5bab5c6f2..14b75a1b8 100755 --- a/share/ecwam/scripts/ecwam_run_create_bathymetry.sh +++ b/share/ecwam/scripts/ecwam_run_create_bathymetry.sh @@ -245,13 +245,20 @@ EOF mkdir -p ${DATA_DIR}/data/bathymetry/$(dirname ${WAM_TOPO}) mv wam_topo_${cwamresol} ${DATA_DIR}/data/bathymetry/${WAM_TOPO} - for ip in 0 1 2; do - if [[ ! -r wam_grib_subgrid_${ip} ]] ; then - echo "\n\n\t File wam_grib_subgrid_${ip} does not exist\n\n" - abort 9 - fi - mv wam_grib_subgrid_${ip} ${DATA_DIR}/data/bathymetry/${subgrid_files[$ip]} - done + if [[ $llobstrout = T ]] ; then + for ip in 0 1 2; do + if [[ ! -r wam_grib_subgrid_${ip} ]] ; then + echo "\n\n\t File wam_grib_subgrid_${ip} does not exist\n\n" + abort 9 + fi + mv wam_grib_subgrid_${ip} ${DATA_DIR}/data/bathymetry/${subgrid_files[$ip]} + done + else + for ip in 0 1 2 + do + echo "llobstrout was set to true. no need for this file" > ${DATA_DIR}/data/bathymetry/${subgrid_files[$ip]} + done + fi fi diff --git a/share/ecwam/scripts/ecwam_run_model.sh b/share/ecwam/scripts/ecwam_run_model.sh index e2c698871..c46dbfcca 100755 --- a/share/ecwam/scripts/ecwam_run_model.sh +++ b/share/ecwam/scripts/ecwam_run_model.sh @@ -81,7 +81,8 @@ done cldomain=$(read_config cldomain --default=g) wamnang=$(read_config directions) wamnfre=$(read_config frequencies) - +fr1=$(read_config fr1 --default=4.177248E-02) +ifre1=$(read_config ifre1 --default=1) nproma=$(read_config nproma --default=24) iphys=$(read_config iphys --default=1) llgcbz0=$(read_config llgcbz0 --default=F) @@ -211,11 +212,13 @@ ln -s ${DATA_DIR}/${forcings_file} sfcwindin cat > wam_namelist << EOF &NALINE + CLHEADER = " WAVE MODEL ", + CLDOMAIN = "${cldomain}", NANG = ${wamnang}, NFRE = 36, NFRE_RED = ${wamnfre}, - CLHEADER = " WAVE MODEL ", - CLDOMAIN = "${cldomain}", + FR1 = ${fr1}, + IFRE1 = ${ifre1}, CBPLTDT = "${begofrn}", CEPLTDT = "${endofrn}", CDATEF = "${begoffo}", diff --git a/share/ecwam/scripts/ecwam_run_preset.sh b/share/ecwam/scripts/ecwam_run_preset.sh index fc278d78a..f0e80f5d1 100755 --- a/share/ecwam/scripts/ecwam_run_preset.sh +++ b/share/ecwam/scripts/ecwam_run_preset.sh @@ -148,6 +148,8 @@ begoffo=$(read_config forcings.at[1].begin --format="%Y%m%d%H%M%S" --default=${e cldomain=$(read_config cldomain --default=g) wamnang=$(read_config directions) wamnfre=$(read_config frequencies) +fr1=$(read_config fr1 --default=4.177248E-02) +ifre1=$(read_config ifre1 --default=1) forcings_file=$(read_config forcings.file) @@ -216,6 +218,9 @@ cat > PREINFO < Date: Sun, 21 Dec 2025 22:26:27 +0000 Subject: [PATCH 03/14] correction in readwind for LICERUN false --- share/ecwam/scripts/ecwam_run_preset.sh | 4 ++-- src/ecwam/readwind.F90 | 10 +++++----- tests/etopo1_oper_an_fc_lam_highres.yml | 26 +++++++++++++++---------- 3 files changed, 23 insertions(+), 17 deletions(-) diff --git a/share/ecwam/scripts/ecwam_run_preset.sh b/share/ecwam/scripts/ecwam_run_preset.sh index f0e80f5d1..49077dbf2 100755 --- a/share/ecwam/scripts/ecwam_run_preset.sh +++ b/share/ecwam/scripts/ecwam_run_preset.sh @@ -154,8 +154,8 @@ ifre1=$(read_config ifre1 --default=1) forcings_file=$(read_config forcings.file) opti=1 -fetch=50000.0 -fmax=0.2000000 +fetch=1200.0 +fmax=0.4000000 llunstr=F lgribout=F diff --git a/src/ecwam/readwind.F90 b/src/ecwam/readwind.F90 index 512701709..2fdb9595b 100644 --- a/src/ecwam/readwind.F90 +++ b/src/ecwam/readwind.F90 @@ -382,7 +382,11 @@ SUBROUTINE READWIND (CDTWIR, FILNM, LLNOTOPENED, IREAD, & ELSEIF (IPARAM == 31 .OR. IPARAM == 139) THEN IPARAMCI=IPARAM - IF (LLNOTREAD(IVAR)) THEN + IF (.NOT.LICERUN .AND. & + & (IPARAM == 31 .OR. IPARAM == 139) ) THEN +! SKIP SEA ICE MASK INFORMATION AS IT IS NOT NEEDED + GOTO 2002 + ELSEIF (LLNOTREAD(IVAR)) THEN DO J = NYS, NYE JSN = NGY-J+1 DO I = NXS, MIN(NLONRGG_LOC(JSN), NXE) @@ -390,10 +394,6 @@ SUBROUTINE READWIND (CDTWIR, FILNM, LLNOTOPENED, IREAD, & ENDDO ENDDO LLNOTREAD(IVAR)=.FALSE. - ELSEIF (.NOT.LICERUN .AND. & - & (IPARAM == 31 .OR. IPARAM == 139) ) THEN -! SKIP SEA ICE MASK INFORMATION AS IT IS NOT NEEDED - GOTO 2002 ELSE LLABORT=.TRUE. ENDIF diff --git a/tests/etopo1_oper_an_fc_lam_highres.yml b/tests/etopo1_oper_an_fc_lam_highres.yml index 7bcbdc44d..6fac9cf09 100644 --- a/tests/etopo1_oper_an_fc_lam_highres.yml +++ b/tests/etopo1_oper_an_fc_lam_highres.yml @@ -23,8 +23,14 @@ begin: ${analysis.begin} end: ${forecast.end} nproma: 24 +llgcbz0: T +llnormagam: T +lciwa3: T +lciscal: T forcings: + sea_ice: True + file: data/forcings/oper_an_12h_fc_2023010100_36h_O1280.grib at: @@ -62,29 +68,29 @@ validation: # initial analysis time - name: swh time: 2022-12-31 12:00:00 - average: 0.1333968766800869E+01 + average: 3.187297962906810e-01 relative_tolerance: 1.e-14 - hashes: ['0x3FF557EFA234B912'] + hashes: ['0x3FD46611A8D511E4'] # initial forecast time - name: swh time: 2023-01-01 00:00:00 - average: 0.1513401152656281E+01 - hashes: ['0x3FF836E4208632E9'] + average: 2.302391668008772e-01 + hashes: ['0x3FCD787A1DD582E1'] # 6h into forcast - name: swh time: 2023-01-01 06:00:00 - average: 0.1591519358217514E+01 + average: 2.536693790443732e-01 relative_tolerance: 1.e-14 - hashes: ['0x3FF976DD00A7EC10'] + hashes: ['0x3FD03C1E7DBF8061'] - name: swh time: 2023-01-01 06:00:00 - minimum: 0.1593042438860915E-01 + minimum: 2.172002527339524e-02 relative_tolerance: 1.e-14 - hashes: ['0x3F905010AF0ABA82'] + hashes: ['0x3F963DC638DEBF23'] - name: swh time: 2023-01-01 06:00:00 - maximum: 0.7670097764777837E+01 + maximum: 9.275511810397952e-01 relative_tolerance: 1.e-14 - hashes: ['0x401EAE2E1BC35FC1'] + hashes: ['0x3FEDAE7FD07DD3BA'] From 86b8ba9dd7dbc78411e37a1386faaacbdb002597 Mon Sep 17 00:00:00 2001 From: Jean Bidlot Date: Mon, 22 Dec 2025 00:04:01 +0000 Subject: [PATCH 04/14] fix readwind.F90 --- src/ecwam/readwind.F90 | 13 ++++++------- tests/etopo1_oper_an_fc_lam_highres.yml | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/ecwam/readwind.F90 b/src/ecwam/readwind.F90 index 2fdb9595b..0e905b121 100644 --- a/src/ecwam/readwind.F90 +++ b/src/ecwam/readwind.F90 @@ -310,6 +310,7 @@ SUBROUTINE READWIND (CDTWIR, FILNM, LLNOTOPENED, IREAD, & & CDSTRING='READWIND IDUM:') IF (IRANK /= IREAD) THEN ISIZE=IDUM(1) + IF (ALLOCATED(KGRIB)) DEALLOCATE(KGRIB) ALLOCATE(KGRIB(ISIZE)) ENDIF @@ -382,8 +383,7 @@ SUBROUTINE READWIND (CDTWIR, FILNM, LLNOTOPENED, IREAD, & ELSEIF (IPARAM == 31 .OR. IPARAM == 139) THEN IPARAMCI=IPARAM - IF (.NOT.LICERUN .AND. & - & (IPARAM == 31 .OR. IPARAM == 139) ) THEN + IF (.NOT.LICERUN) THEN ! SKIP SEA ICE MASK INFORMATION AS IT IS NOT NEEDED GOTO 2002 ELSEIF (LLNOTREAD(IVAR)) THEN @@ -400,7 +400,10 @@ SUBROUTINE READWIND (CDTWIR, FILNM, LLNOTOPENED, IREAD, & ELSEIF (IPARAM == 92) THEN - IF (LLNOTREAD(IVAR)) THEN + IF (.NOT.LICETH) THEN +! SKIP SEA ICE THICKNESS INFORMATION AS IT IS NOT NEEDED + GOTO 2002 + ELSEIF (LLNOTREAD(IVAR)) THEN DO J = NYS, NYE JSN = NGY-J+1 DO I = NXS, MIN(NLONRGG_LOC(JSN), NXE) @@ -408,10 +411,6 @@ SUBROUTINE READWIND (CDTWIR, FILNM, LLNOTOPENED, IREAD, & ENDDO ENDDO LLNOTREAD(IVAR)=.FALSE. - ELSEIF (.NOT.LICETH .AND. & - & (IPARAM == 92) ) THEN -! SKIP SEA ICE THICKNESS INFORMATION AS IT IS NOT NEEDED - GOTO 2002 ELSE LLABORT=.TRUE. ENDIF diff --git a/tests/etopo1_oper_an_fc_lam_highres.yml b/tests/etopo1_oper_an_fc_lam_highres.yml index 6fac9cf09..a1e24f7d5 100644 --- a/tests/etopo1_oper_an_fc_lam_highres.yml +++ b/tests/etopo1_oper_an_fc_lam_highres.yml @@ -29,7 +29,7 @@ lciwa3: T lciscal: T forcings: - sea_ice: True + sea_ice: False file: data/forcings/oper_an_12h_fc_2023010100_36h_O1280.grib From 58a08974d03d77eade894ffd4268a16175f613d9 Mon Sep 17 00:00:00 2001 From: Jean Bidlot Date: Tue, 23 Dec 2025 23:21:14 +0000 Subject: [PATCH 05/14] fix outblock.F90 for LICERUN false --- src/ecwam/outblock.F90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ecwam/outblock.F90 b/src/ecwam/outblock.F90 index a4ea528d6..d32e0c2a2 100644 --- a/src/ecwam/outblock.F90 +++ b/src/ecwam/outblock.F90 @@ -64,7 +64,7 @@ SUBROUTINE OUTBLOCK (KIJS, KIJL, MIJ, & & NIPRMOUT, ITOBOUT ,NTEWH ,IPRMINFO USE YOWCOUP , ONLY : LWNEMOCOUSTRN USE YOWFRED , ONLY : FR, TH , DFIM, DELTH, COSTH, SINTH, XKMSS_CUTOFF - USE YOWICE , ONLY : FLMIN ,LICERUN ,LMASKICE + USE YOWICE , ONLY : FLMIN ,LMASKICE USE YOWPARAM , ONLY : NANG ,NFRE USE YOWPCONS , ONLY : ZMISS ,DEG ,EPSUS ,EPSU10, G, ZPI USE YOWSTAT , ONLY : IREFRA @@ -173,7 +173,7 @@ SUBROUTINE OUTBLOCK (KIJS, KIJL, MIJ, & IF (LSECONDORDER) CALL CAL_SECOND_ORDER_SPEC(KIJS, KIJL, FL2ND, WAVNUM, DEPTH, SIG) ! Adapting the noise level structure to be more consistent in sea ice conditions - IF (LICERUN .AND. .NOT. LMASKICE) THEN + IF (.NOT. LMASKICE) THEN DO IJ=KIJS,KIJL ZTHRS(IJ) = (1._JWRB - 0.9_JWRB*MIN(CICOVER(IJ),0.99_JWRB))*FLMIN ENDDO From e288132412165b8011e6176969c0565c4195e6ed Mon Sep 17 00:00:00 2001 From: Jean Bidlot Date: Fri, 16 Jan 2026 23:36:19 +0000 Subject: [PATCH 06/14] save --- share/ecwam/scripts/ecwam_helper_functions.sh | 11 +- share/ecwam/scripts/ecwam_run_model.sh | 94 +++++++++--- share/ecwam/scripts/ecwam_run_preset.sh | 10 +- src/ecwam/mstart.F90 | 25 +++- src/programs/preset.F90 | 8 +- tests/etopo1_oper_an_fc_O320.yml | 59 +++++--- tests/etopo1_oper_an_fc_O320_cy49r2.yml | 25 +++- tests/etopo1_oper_an_fc_O48.yml | 57 +++++--- tests/etopo1_oper_an_fc_O640.yml | 44 ++++-- tests/etopo1_oper_an_fc_grib_restart_O320.yml | 135 ++++++++++++++++++ ...=> etopo1_oper_an_fc_grib_restart_O48.yml} | 38 ++--- tests/etopo1_oper_an_fc_lam_highres.yml | 26 ++-- 12 files changed, 412 insertions(+), 120 deletions(-) create mode 100644 tests/etopo1_oper_an_fc_grib_restart_O320.yml rename tests/{etopo1_oper_an_fc_O48_cy50r1.yml => etopo1_oper_an_fc_grib_restart_O48.yml} (81%) diff --git a/share/ecwam/scripts/ecwam_helper_functions.sh b/share/ecwam/scripts/ecwam_helper_functions.sh index 4a83e029e..7ce11d55b 100644 --- a/share/ecwam/scripts/ecwam_helper_functions.sh +++ b/share/ecwam/scripts/ecwam_helper_functions.sh @@ -97,17 +97,19 @@ function find_preproc_files() { function find_preset_files() { date=${1} + header_list=${2} SEARCH_LOCATION=${ECWAM_PRESET_RUN_DIR:-${RUN_DIR}} found=true - files=(restart/LAW${date}_000000000000 restart/BLS${date}_000000000000) - for file in "${files[@]}"; do + for header in "${header_list}"; do + file="restart/${header}${date}_000000000000" if [[ ! ( -r ${SEARCH_LOCATION}/${file} ) ]] ; then found=false fi done if $found ; then mkdir -p ${RUN_DIR}/restart - for file in "${files[@]}"; do + for header in "${header_list}"; do + file="restart/${header}${date}_000000000000" if [[ ! ( -r ${RUN_DIR}/${file} ) ]] ; then echo " ln -sf ${SEARCH_LOCATION}/${file} ${RUN_DIR}/${file}" ln -sf ${SEARCH_LOCATION}/${file} ${RUN_DIR}/${file} @@ -116,7 +118,8 @@ function find_preset_files() { else builtin echo builtin echo "ERROR: Initial condition files not found in ${SEARCH_LOCATION}:" - for file in "${files[@]}"; do + for header in "${header_list}"; do + file="restart/${header}${date}_000000000000" if [[ ! ( -r ${SEARCH_LOCATION}/${file} ) ]] ; then builtin echo " - ${file}" fi diff --git a/share/ecwam/scripts/ecwam_run_model.sh b/share/ecwam/scripts/ecwam_run_model.sh index c46dbfcca..8da85a2a6 100755 --- a/share/ecwam/scripts/ecwam_run_model.sh +++ b/share/ecwam/scripts/ecwam_run_model.sh @@ -30,12 +30,27 @@ endofrn=$(read_config end --format="%Y%m%d%H%M%S") begoffo=$(read_config forcing.at[1].begin --format="%Y%m%d%H%M%S" --default=${endofrn} ) find_preproc_files -find_preset_files ${begofrn} -lgribin=F -lgribout=F +lgribin=$(read_config lgribin --default=F) +lgribout=$(read_config lgribout --default=F) +# Note that lnocdin=T is only meaningful for grib restart (lgribin=T) (rather than pure binary) +# for which the model drag coefficient and the corresponding 10m wind speed are not available +# For cycling the runs, one will need to extract the relevant parameters from the grib output MPP* +# and place them in the relevant CDWAVEIN* and UWAVEIN* files lnocdin=T + +if [[ ${lgribin} = T ]]; then + if [[ ${lnocdin} = T ]]; then + initial_file_header_list="SGS" + else + initial_file_header_list="SGS CDWAVEIN UWAVEIN" + fi +else + initial_file_header_list="LAW BLS" +fi +find_preset_files ${begofrn} ${initial_file_header_list} + output_fields=$(read_config output.fields.name[:] --default="") output_statistics=$(read_config output.statistics.name[:] --default="") @@ -81,17 +96,21 @@ done cldomain=$(read_config cldomain --default=g) wamnang=$(read_config directions) wamnfre=$(read_config frequencies) -fr1=$(read_config fr1 --default=4.177248E-02) +fr1=$(read_config fr1/ --default=4.177248E-02) ifre1=$(read_config ifre1 --default=1) +lsubgrid=$(read_config lsubgrid --default=T) +irefra=$(read_config advection.irefra --default=0) + +iphys=$(read_config physics.iphys --default=1) +llgcbz0=$(read_config physics.llgcbz0 --default=F) +llnormagam=$(read_config physics.llnormagam --default=F) +lmaskice=$(read_config physics.lmaskice --default=T) +lciwa1=$(read_config physics.lciwa1 --default=F) +lciwa2=$(read_config physics.lciwa2 --default=F) +lciwa3=$(read_config physics.lciwa3 --default=F) +lciscal=$(read_config physics.lciscal --default=F) + nproma=$(read_config nproma --default=24) -iphys=$(read_config iphys --default=1) -llgcbz0=$(read_config llgcbz0 --default=F) -llnormagam=$(read_config llnormagam --default=F) -irefra=$(read_config irefra --default=0) -lciwa1=$(read_config lciwa1 --default=F) -lciwa2=$(read_config lciwa2 --default=F) -lciwa3=$(read_config lciwa3 --default=F) -lciscal=$(read_config lciscal --default=F) # read timesteps phys_tstp=$(read_config physics.timestep --format=seconds --default=900) @@ -119,6 +138,7 @@ fi ppfreq=$(read_config output.fields.at[0].timestep --format=hours --default=02:00) forcings_file=$(read_config forcings.file) +currents_file=$(read_config currents.file --default=NOTFOUND ) function cleanup() { shopt -s nullglob @@ -146,7 +166,7 @@ function cleanup() { done mkdir -p ${RUN_DIR}/restart/ - for outfile in ${WORK_DIR}/LAW* ${WORK_DIR}/BLS*; do + for outfile in ${WORK_DIR}/LAW* ${WORK_DIR}/BLS* ${WORK_DIR}/SGS* ; do mv ${outfile} ${RUN_DIR}/restart/ done @@ -187,14 +207,33 @@ done # Initial stress and spectrum ############################# -for preset_file in LAW${begofrn}_000000000000 BLS${begofrn}_000000000000; do +rm -rf specwavein cdwavein uwavein + +for header in ${initial_file_header_list}; do + preset_file=${header}${begofrn}_000000000000 + if [[ -r ${RUN_DIR}/restart/${preset_file} ]] ; then - ln -sf ${RUN_DIR}/restart/${preset_file} ${preset_file} + if [[ ${lgribin} = T ]]; then + # Grib restart files + if [[ ${header} = SGS ]] ; then + ln -sf ${RUN_DIR}/restart/${preset_file} specwavein + elif [[ ${header} = CDWAVEIN ]] ; then + ln -sf ${RUN_DIR}/restart/${preset_file} cdwavein + elif [[ ${header} = UWAVEIN ]] ; then + ln -sf ${RUN_DIR}/restart/${preset_file} uwavein + else + ln -sf ${RUN_DIR}/restart/${preset_file} ${preset_file} + fi + else + # Pure binary restart files + ln -sf ${RUN_DIR}/restart/${preset_file} ${preset_file} + fi else echo "\n\n\tPRESET FILE ${preset_file} was not found in ${RUN_DIR}/restart" trace_ls ${RUN_DIR}/restart exit 1 fi + done # Forcing @@ -207,6 +246,18 @@ log ${SCRIPTS_DIR}/ecwam_retrieve.sh ${forcings_file} ${DATA_DIR}/${forcings_fil ln -s ${DATA_DIR}/${forcings_file} sfcwindin + +# Surface currents (if needed) +############################## +if [ "${currents_file}" != NOTFOUND ]; then + log ${SCRIPTS_DIR}/ecwam_retrieve.sh ${currents_file} ${DATA_DIR}/${currents_file} || { + echo "ERROR: Could not retrieve surface currents ${currents_file}" + exit 4 +} + + ln -s ${DATA_DIR}/${currents_file} currents +fi + # NAMELIST ########## @@ -239,14 +290,17 @@ cat > wam_namelist << EOF LLCAPCHNK = T, LLGCBZ0 = ${llgcbz0}, LLNORMAGAM = ${llnormagam}, + LCIWA1 = ${lciwa1}, + LCIWA2 = ${lciwa2}, + LCIWA3 = ${lciwa3}, + LCISCAL = ${lciscal}, IPROPAGS = 2, - LSUBGRID = F, + LSUBGRID = ${lsubgrid}, IREFRA = ${irefra}, LICERUN = ${licerun}, - LMASKICE = T, + LMASKICE = ${lmaskice}, LWAMRSETCI = T, NGRIB_VERSION = 2, - LL_GRID_SIMPLE_MATRIX = F, LLRSTGRIBPARAM = F, YCLASS = "rd", YEXPVER = "wave", @@ -266,10 +320,6 @@ cat > wam_namelist << EOF LLNORMWAMOUT = T, LLNORMWAMOUT_GLOBAL = T, CNORMWAMOUT_FILE = "statistics.log", - LCIWA1 = ${lciwa1}, - LCIWA2 = ${lciwa2}, - LCIWA3 = ${lciwa3}, - LCISCAL = ${lciscal}, ${OUTPUT_FLAGS} / ${NAWI} diff --git a/share/ecwam/scripts/ecwam_run_preset.sh b/share/ecwam/scripts/ecwam_run_preset.sh index 49077dbf2..f48c5566b 100755 --- a/share/ecwam/scripts/ecwam_run_preset.sh +++ b/share/ecwam/scripts/ecwam_run_preset.sh @@ -156,8 +156,14 @@ forcings_file=$(read_config forcings.file) opti=1 fetch=1200.0 fmax=0.4000000 +lmaskice=$(read_config lmaskice --default=T) +if [[ $(read_config forcings.sea_ice --default=True) == "True" ]] ; then + licerun=T +else + licerun=F +fi llunstr=F -lgribout=F +lgribout=$(read_config lgribout --default=F) assert_executable_is_available ${PRESET}-${prec} || abort 4 @@ -208,6 +214,8 @@ cat > PREINFO < CILIMIT) THEN + FL1(IJ,K,M) = MAX((1.0_JWRB - CICOVER(IJ)) * FL1(IJ,K,M), 0.0_JWRB) + ENDIF + ENDDO + ENDDO + ENDDO + ENDIF + END SUBROUTINE MSTART diff --git a/src/programs/preset.F90 b/src/programs/preset.F90 index e5259c023..eca1575c7 100644 --- a/src/programs/preset.F90 +++ b/src/programs/preset.F90 @@ -85,6 +85,7 @@ PROGRAM preset USE YOWGRID , ONLY : DELPHI ,IJS , IJL , NTOTIJ , & & NPROMA_WAM, NCHNK, KIJL4CHNK, IJFROMCHNK, & & IJSLOC ,IJLLOC ,IJGLOBAL_OFFSET + USE YOWICE , ONLY : LICERUN ,LMASKICE USE YOWMAP , ONLY : CLDOMAIN ,BLK2GLO ,IRGG ,AMOWEP , & & AMOSOP ,AMOEAP ,AMONOP ,XDELLA ,XDELLO , & & BLK2LOC ,NGX ,NGY ,NIBLO @@ -186,6 +187,7 @@ PROGRAM preset & CLDOMAIN, & & NANG, IFRE1, FR1, NFRE, NFRE_RED, & & IOPTI, ITEST, ITESTB, & + & LICERUN, LMASKICE, & & ALFA, FM, GAMMA, SA, SB, THETA, FETCH, SWAMPWIND , & & USERID, RUNID, PATH, CPATH, & & CDATEA, IDELWI, CLTUNIT, & @@ -253,6 +255,9 @@ PROGRAM preset CLTUNIT= 'H' IDELWI = 0 + LICERUN = .FALSE. + LMASKICE = .TRUE. + LLUNSTR =.FALSE. LPREPROC =.FALSE. @@ -633,7 +638,8 @@ PROGRAM preset DO ICHNK = 1, NCHNK CALL MSTART (IOPTI, FETCH, FRMAX, THETAQ, & & FM, ALFA, GAMMA, SA, SB, & - & 1, NPROMA_WAM, VARS_4D%FL1(:,:,:,ICHNK), & + & 1, NPROMA_WAM, VARS_4D%FL1(:,:,:,ICHNK), & + & FF_NOW%CICOVER(:,ICHNK), & & FF_NOW%WSWAVE(:,ICHNK), FF_NOW%WDWAVE(:,ICHNK)) ENDDO !$OMP END PARALLEL DO diff --git a/tests/etopo1_oper_an_fc_O320.yml b/tests/etopo1_oper_an_fc_O320.yml index 2c699f7da..a05570de7 100644 --- a/tests/etopo1_oper_an_fc_O320.yml +++ b/tests/etopo1_oper_an_fc_O320.yml @@ -1,14 +1,23 @@ grid: O320 +cldomain: g directions: 24 frequencies: 29 fr1: 4.177248E-02 ifre1: 3 bathymetry: ETOPO1 +lsubgrid: T advection: - timestep: 900 + irefra: 2 + timestep: 450 physics: + iphys: 1 timestep: 900 + llgcbz0: T + llnormagam: T + lmaskice: F + lciwa3: T + lciscal: T analysis.begin: 2022-12-31 12:00:00 analysis.end: 2023-01-01 00:00:00 @@ -19,6 +28,8 @@ begin: ${analysis.begin} end: ${forecast.end} nproma: 64 +lgribin: F +lgribout: F forcings: file: data/forcings/oper_an_12h_fc_2023010100_36h_O320.grib @@ -31,6 +42,10 @@ forcings: end: ${forecast.end} timestep: 01:00 +currents: + file: data/forcings/daily_average_surface_currents_ORAS6_20221231_20230102_O320.grib + input_step: 86400 + output: fields: name: @@ -48,7 +63,7 @@ output: restart: format: binary # (default : binary) or grib at: - - time: ${end} + - time: ${analysis.end} validation: @@ -58,33 +73,33 @@ validation: # initial analysis time - name: swh time: 2022-12-31 12:00:00 - average: 0.1334550046812762E+01 + average: 0.3873838464703652E+00 relative_tolerance: 1.e-14 - hashes: ['0x3FF55A51265EFA31'] + hashes: ['0x3FD8CAE59DE5B098'] # initial forecast time - name: swh time: 2023-01-01 00:00:00 - average: 0.1522689283126691E+01 + average: 0.1055436157420307E+01 relative_tolerance: 1.e-14 - hashes: ['0x3FF85CEF700FFB2D'] + hashes: ['0x3FF0E31106322D94'] - # 6h into forcast + # 6h into forecast - name: swh time: 2023-01-01 06:00:00 - average: 0.1602300108466806E+01 + average: 0.1216412130066364E+01 relative_tolerance: 1.e-14 - hashes: ['0x3FF9A3057043DFFE'] + hashes: ['x3FF3766C90D17BD2'] - name: swh time: 2023-01-01 06:00:00 - minimum: 0.1582178271632631E-01 + minimum: 0.4390841548729450E-02 relative_tolerance: 1.e-14 - hashes: ['0x3F903395DD52FC09'] + hashes: ['0x3F71FC218DA8CCD8'] - name: swh time: 2023-01-01 06:00:00 - maximum: 0.7470872982664355E+01 + maximum: 0.6931936421923670E+01 relative_tolerance: 1.e-14 - hashes: ['0x401DE22C86F4741A'] + hashes: ['0x401BBA4D8A987424'] single_precision: @@ -98,23 +113,23 @@ validation: # initial forecast time - name: swh time: 2023-01-01 00:00:00 - average: 0.1522688508033752E+01 + average: 0.1522839903831482E+01 relative_tolerance: 1.e-6 - hashes: ['0x3FF85CEEA0000000'] + hashes: ['0x3FF85D8D60000000'] - # 6h into forcast + # 6h into forecast - name: swh time: 2023-01-01 06:00:00 - average: 0.1602300763130188E+01 + average: 0.1602508664131165E+01 relative_tolerance: 1.e-6 - hashes: ['0x3FF9A30620000000'] + hashes: ['0x3FF9A3E020000000'] - name: swh time: 2023-01-01 06:00:00 - minimum: 0.1582174561917782E-01 + minimum: 0.1582271233201027E-01 relative_tolerance: 1.e-6 - hashes: ['0x3F90339360000000'] + hashes: ['0x3F9033D440000000'] - name: swh time: 2023-01-01 06:00:00 - maximum: 0.7470870494842529E+01 + maximum: 0.7461367130279541E+01 relative_tolerance: 1.e-6 - hashes: ['0x401DE22BE0000000'] + hashes: ['0x401DD870A0000000'] diff --git a/tests/etopo1_oper_an_fc_O320_cy49r2.yml b/tests/etopo1_oper_an_fc_O320_cy49r2.yml index 5abe265ed..46d5e968b 100644 --- a/tests/etopo1_oper_an_fc_O320_cy49r2.yml +++ b/tests/etopo1_oper_an_fc_O320_cy49r2.yml @@ -1,14 +1,23 @@ grid: O320 +cldomain: g directions: 24 frequencies: 29 fr1: 4.177248E-02 ifre1: 3 bathymetry: ETOPO1 +lsubgrid: T advection: + irefra: 2 timestep: 450 physics: + iphys: 1 timestep: 900 + llgcbz0: T + llnormagam: T + lmaskice: T + lciwa3: F + lciscal: T analysis.begin: 2022-12-31 12:00:00 analysis.end: 2023-01-01 00:00:00 @@ -19,7 +28,8 @@ begin: ${analysis.begin} end: ${forecast.end} nproma: 64 -irefra: 2 +lgribin: F +lgribout: F forcings: file: data/forcings/oper_an_12h_fc_2023010100_36h_O320.grib @@ -33,6 +43,7 @@ forcings: timestep: 01:00 currents: + file: data/forcings/daily_average_surface_currents_ORAS6_20221231_20230102_O320.grib input_step: 86400 output: @@ -52,7 +63,7 @@ output: restart: format: binary # (default : binary) or grib at: - - time: ${end} + - time: ${analysis.end} validation: @@ -62,31 +73,31 @@ validation: # initial analysis time - name: swh time: 2022-12-31 12:00:00 - average: 0.1334550046812762E+01 + average: 0.3989519075200000E-00 relative_tolerance: 1.e-14 hashes: ['0x3FF55A51265EFA31'] # initial forecast time - name: swh time: 2023-01-01 00:00:00 - average: 0.1522843092815532E+01 + average: 0.1101270486170951E+01 relative_tolerance: 1.e-14 hashes: ['0x3FF85D90B80950B2'] # 6h into forecast - name: swh time: 2023-01-01 06:00:00 - average: 0.1602510880624898E+01 + average: 0.1268335673012586E+01 relative_tolerance: 1.e-14 hashes: ['0x3FF9A3E272FC4A20'] - name: swh time: 2023-01-01 06:00:00 - minimum: 0.1582275045416100E-01 + minimum: 0.1588329468551577E-01 relative_tolerance: 1.e-14 hashes: ['0x3F9033D6CEEEFDF6'] - name: swh time: 2023-01-01 06:00:00 - maximum: 0.7461369035298830E+01 + maximum: 0.6931935014221872E+01 relative_tolerance: 1.e-14 hashes: ['0x401DD8711FD7FB70'] diff --git a/tests/etopo1_oper_an_fc_O48.yml b/tests/etopo1_oper_an_fc_O48.yml index d7af245ce..1e2902dca 100644 --- a/tests/etopo1_oper_an_fc_O48.yml +++ b/tests/etopo1_oper_an_fc_O48.yml @@ -1,14 +1,23 @@ grid: O48 +cldomain: g directions: 12 frequencies: 25 fr1: 4.177248E-02 ifre1: 1 bathymetry: ETOPO1 +lsubgrid: T advection: + irefra: 0 timestep: 900 physics: + iphys: 1 timestep: 900 + llgcbz0: T + llnormagam: T + lmaskice: F + lciwa3: T + lciscal: T analysis.begin: 2022-12-31 12:00:00 analysis.end: 2023-01-01 00:00:00 @@ -19,6 +28,8 @@ begin: ${analysis.begin} end: ${forecast.end} nproma: 32 +lgribin: F +lgribout: F forcings: file: data/forcings/oper_an_12h_fc_2023010100_36h_O48.grib @@ -26,7 +37,7 @@ forcings: at: - begin: ${analysis.begin} end: ${analysis.end} - timestep: 06:00 + timestep: 06:00 - begin: ${forecast.begin} end: ${forecast.end} timestep: 01:00 @@ -38,7 +49,7 @@ output: - mwd # Mean wave direction - mwp # Mean wave period - pp1d # Peak wave period - - dwi # 10 metre wind direction + - dwi # 10 metre wind direction - cdww # Coefficient of drag with waves - wind # 10 metre wind speed format: grib # (default : grib) or binary @@ -48,7 +59,7 @@ output: restart: format: binary # (default : binary) or grib at: - - time: ${end} + - time: ${analysis.end} validation: @@ -58,33 +69,33 @@ validation: # initial analysis time - name: swh time: 2022-12-31 12:00:00 - average: 0.1337362278436861E+01 + average: 0.3832217447705822E+00 relative_tolerance: 1.e-14 - hashes: ['0x3FF565D5FD0CA556'] + hashes: ['0x3FD886B47F39F725'] # initial forecast time - name: swh time: 2023-01-01 00:00:00 - average: 0.1559703647315126E+01 + average: 0.1059077112061130E+01 relative_tolerance: 1.e-14 - hashes: ['0x3FF8F48BCFCAB9E6'] + hashes: ['0x3FF0F1FAD783EA34'] - # 6h into forcast + # 6h into forecast - name: swh time: 2023-01-01 06:00:00 - average: 0.1644591617144662E+01 + average: 0.1223563702803160E+01 relative_tolerance: 1.e-14 - hashes: ['0x3FFA503F4CAE97DB'] + hashes: ['0x3FF393B78881CBB7'] - name: swh time: 2023-01-01 06:00:00 - minimum: 0.1938981429960242E-01 + minimum: 0.4326539111291028E-02 relative_tolerance: 1.e-14 - hashes: ['0x3F93DAEC692B5224'] + hashes: ['0x3F9382527C89D368'] - name: swh time: 2023-01-01 06:00:00 - maximum: 0.6986921476900227E+01 + maximum: 0.6511460010823872E+01 relative_tolerance: 1.e-14 - hashes: ['0x401BF29B8B2C06A6'] + hashes: ['0x401B3A7CE5412342'] single_precision: @@ -98,23 +109,23 @@ validation: # initial forecast time - name: swh time: 2023-01-01 00:00:00 - average: 0.1559746265411377E+01 + average: 0.1549576163291931E+01 relative_tolerance: 1.e-6 - hashes: ['0x3FF8F4B880000000'] + hashes: ['0x3FF8CB1060000000'] - # 6h into forcast + # 6h into forecast - name: swh time: 2023-01-01 06:00:00 - average: 0.1644564986228943E+01 + average: 0.1632413744926453E+01 relative_tolerance: 1.e-6 - hashes: ['0x3FFA502360000000'] + hashes: ['0x3FFA1E5DE0000000'] - name: swh time: 2023-01-01 06:00:00 - minimum: 0.1938981935381889E-01 + minimum: 0.1905178464949131E-01 relative_tolerance: 1.e-6 - hashes: ['0x3F93DAECC0000000'] + hashes: ['0x3F93824FA0000000'] - name: swh time: 2023-01-01 06:00:00 - maximum: 0.6986917018890381E+01 + maximum: 0.6807114124298096E+01 relative_tolerance: 1.e-6 - hashes: ['0x401BF29A60000000'] + hashes: ['0x401B3A7C20000000'] diff --git a/tests/etopo1_oper_an_fc_O640.yml b/tests/etopo1_oper_an_fc_O640.yml index c48aa6cbd..a154d79c1 100644 --- a/tests/etopo1_oper_an_fc_O640.yml +++ b/tests/etopo1_oper_an_fc_O640.yml @@ -1,14 +1,26 @@ grid: O640 +cldomain: g directions: 36 frequencies: 29 fr1: 4.177248E-02 ifre1: 3 bathymetry: ETOPO1 +lsubgrid: T advection: - timestep: 450 + irefra: 2 + timestep: 720 + fast_waves: + timestep: 360 + max_frequency: 4 physics: - timestep: 450 + iphys: 1 + timestep: 720 + llgcbz0: T + llnormagam: T + lmaskice: F + lciwa3: T + lciscal: T analysis.begin: 2022-12-31 12:00:00 analysis.end: 2023-01-01 00:00:00 @@ -19,6 +31,8 @@ begin: ${analysis.begin} end: ${forecast.end} nproma: 24 +lgribin: F +lgribout: F forcings: file: data/forcings/oper_an_12h_fc_2023010100_36h_O640.grib @@ -31,6 +45,10 @@ forcings: end: ${forecast.end} timestep: 01:00 +currents: + file: data/forcings/daily_average_surface_currents_ORAS6_20221231_20230102_O640.grib + input_step: 86400 + output: fields: name: @@ -48,7 +66,7 @@ output: restart: format: binary # (default : binary) or grib at: - - time: ${end} + - time: ${analysis.end} validation: @@ -58,30 +76,30 @@ validation: # initial analysis time - name: swh time: 2022-12-31 12:00:00 - average: 0.1333763376011752E+01 + average: 0.3986617006033982E+00 relative_tolerance: 1.e-14 - hashes: ['0x3FF5571844092B1F'] + hashes: ['0x3FD983AC5D909901'] # initial forecast time - name: swh time: 2023-01-01 00:00:00 - average: 0.1505943670306413E+01 + average: 0.1113687318265157E+01 relative_tolerance: 1.e-14 - hashes: ['0x3FF8185863D95918'] + hashes: ['0x3FF1D1A9CB1EB361'] # 6h into forcast - name: swh time: 2023-01-01 06:00:00 - average: 0.1586225037945644E+01 + average: 0.1280083657131184E+01 relative_tolerance: 1.e-14 - hashes: ['0x3FF9612D81612A98'] + hashes: ['0x3FF47B3900385C34'] - name: swh time: 2023-01-01 06:00:00 - minimum: 0.1484097208178847E-01 + minimum: 0.1479235042580692E-01 relative_tolerance: 1.e-14 - hashes: ['0x3F8E64F18DDB6741'] + hashes: ['0x3F8E4B73AA7A7EEB'] - name: swh time: 2023-01-01 06:00:00 - maximum: 0.7616438850798844E+01 + maximum: 0.7308171473440704E+01 relative_tolerance: 1.e-14 - hashes: ['0x401E773BBF00A8D1'] + hashes: ['0x401D3B914D7FF3AB'] diff --git a/tests/etopo1_oper_an_fc_grib_restart_O320.yml b/tests/etopo1_oper_an_fc_grib_restart_O320.yml new file mode 100644 index 000000000..301d21002 --- /dev/null +++ b/tests/etopo1_oper_an_fc_grib_restart_O320.yml @@ -0,0 +1,135 @@ +grid: O320 +cldomain: g +directions: 24 +frequencies: 29 +fr1: 4.177248E-02 +ifre1: 3 +bathymetry: ETOPO1 +lsubgrid: T + +advection: + irefra: 2 + timestep: 450 +physics: + iphys: 1 + timestep: 900 + llgcbz0: T + llnormagam: T + lmaskice: F + lciwa3: T + lciscal: T + +analysis.begin: 2022-12-31 12:00:00 +analysis.end: 2023-01-01 00:00:00 +forecast.begin: 2023-01-01 00:00:00 +forecast.end: 2023-01-01 06:00:00 + +begin: ${analysis.begin} +end: ${forecast.end} + +nproma: 64 +lgribin: T +lgribout: T + +forcings: + file: data/forcings/oper_an_12h_fc_2023010100_36h_O320.grib + + at: + - begin: ${analysis.begin} + end: ${analysis.end} + timestep: 06:00 + - begin: ${forecast.begin} + end: ${forecast.end} + timestep: 01:00 + +currents: + file: data/forcings/daily_average_surface_currents_ORAS6_20221231_20230102_O320.grib + input_step: 86400 + +output: + fields: + name: + - swh # Significant height of combined wind waves and swell + - mwd # Mean wave direction + - mwp # Mean wave period + - pp1d # Peak wave period + - dwi # 10 metre wind direction + - cdww # Coefficient of drag with waves + - wind # 10 metre wind speed + format: grib # (default : grib) or binary + at: + - timestep: 01:00 + + restart: + format: binary # (default : binary) or grib + at: + - time: ${analysis.end} + + +validation: + + double_precision: + + # initial analysis time + - name: swh + time: 2022-12-31 12:00:00 + average: 0.3742546353686318E+00 + relative_tolerance: 1.e-14 + hashes: ['x3FD7F3C9B6D2382D'] + + # initial forecast time + - name: swh + time: 2023-01-01 00:00:00 + average: 0.1052356486085158E+01 + relative_tolerance: 1.e-14 + hashes: ['0x3FF0D673C13781F8'] + + # 6h into forecast + - name: swh + time: 2023-01-01 06:00:00 + average: 0.1214299649742646E+01 + relative_tolerance: 1.e-14 + hashes: ['0x3FF36DC5783305D2'] + - name: swh + time: 2023-01-01 06:00:00 + minimum: 0.4390841548729450E-02 + relative_tolerance: 1.e-14 + hashes: ['0x3F71FC218DA8CCD8'] + - name: swh + time: 2023-01-01 06:00:00 + maximum: 0.6929218326423498E+01 + relative_tolerance: 1.e-14 + hashes: ['0x401BB785024B54C3'] + + single_precision: + + # initial analysis time + - name: swh + time: 2022-12-31 12:00:00 + average: 0.1334386110305786E+01 + relative_tolerance: 1.e-6 + hashes: ['0x3FF559A540000000'] + + # initial forecast time + - name: swh + time: 2023-01-01 00:00:00 + average: 0.1522839903831482E+01 + relative_tolerance: 1.e-6 + hashes: ['0x3FF85D8D60000000'] + + # 6h into forecast + - name: swh + time: 2023-01-01 06:00:00 + average: 0.1602508664131165E+01 + relative_tolerance: 1.e-6 + hashes: ['0x3FF9A3E020000000'] + - name: swh + time: 2023-01-01 06:00:00 + minimum: 0.1582271233201027E-01 + relative_tolerance: 1.e-6 + hashes: ['0x3F9033D440000000'] + - name: swh + time: 2023-01-01 06:00:00 + maximum: 0.7461367130279541E+01 + relative_tolerance: 1.e-6 + hashes: ['0x401DD870A0000000'] diff --git a/tests/etopo1_oper_an_fc_O48_cy50r1.yml b/tests/etopo1_oper_an_fc_grib_restart_O48.yml similarity index 81% rename from tests/etopo1_oper_an_fc_O48_cy50r1.yml rename to tests/etopo1_oper_an_fc_grib_restart_O48.yml index e754d5f41..5446c9df8 100644 --- a/tests/etopo1_oper_an_fc_O48_cy50r1.yml +++ b/tests/etopo1_oper_an_fc_grib_restart_O48.yml @@ -5,11 +5,19 @@ frequencies: 25 fr1: 4.177248E-02 ifre1: 1 bathymetry: ETOPO1 +lsubgrid: T advection: + irefra: 0 timestep: 900 physics: + iphys: 1 timestep: 900 + llgcbz0: T + llnormagam: T + lmaskice: F + lciwa3: T + lciscal: T analysis.begin: 2022-12-31 12:00:00 analysis.end: 2023-01-01 00:00:00 @@ -20,10 +28,8 @@ begin: ${analysis.begin} end: ${forecast.end} nproma: 32 -llgcbz0: T -llnormagam: T -lciwa3: T -lciscal: T +lgribin: T +lgribout: T forcings: file: data/forcings/oper_an_12h_fc_2023010100_36h_O48.grib @@ -31,7 +37,7 @@ forcings: at: - begin: ${analysis.begin} end: ${analysis.end} - timestep: 06:00 + timestep: 06:00 - begin: ${forecast.begin} end: ${forecast.end} timestep: 01:00 @@ -43,7 +49,7 @@ output: - mwd # Mean wave direction - mwp # Mean wave period - pp1d # Peak wave period - - dwi # 10 metre wind direction + - dwi # 10 metre wind direction - cdww # Coefficient of drag with waves - wind # 10 metre wind speed format: grib # (default : grib) or binary @@ -53,7 +59,7 @@ output: restart: format: binary # (default : binary) or grib at: - - time: ${end} + - time: ${analysis.end} validation: @@ -63,33 +69,33 @@ validation: # initial analysis time - name: swh time: 2022-12-31 12:00:00 - average: 0.1337362278436861E+01 + average: 0.4060662972705505E+00 relative_tolerance: 1.e-14 - hashes: ['0x3FF565D5FD0CA556'] + hashes: ['0x3FD9FCFD7EB23AA2'] # initial forecast time - name: swh time: 2023-01-01 00:00:00 - average: 0.1549542256416082E+01 + average: 0.1063234106230750E+01 relative_tolerance: 1.e-14 - hashes: ['0x3FF8CAECD2313BDF'] + hashes: ['0x3FF10301C4240BBA'] # 6h into forecast - name: swh time: 2023-01-01 06:00:00 - average: 0.1632449648145021E+01 + average: 0.1226326812216435E+01 relative_tolerance: 1.e-14 - hashes: ['0x3FFA1E8385B264A5'] + hashes: ['0x3FF39F08DD0AD71F'] - name: swh time: 2023-01-01 06:00:00 - minimum: 0.1905182728883706E-01 + minimum: 0.4326539111291028E-02 relative_tolerance: 1.e-14 hashes: ['0x3F9382527C89D368'] - name: swh time: 2023-01-01 06:00:00 - maximum: 0.6807117063618366E+01 + maximum: 0.6512642507920472E+01 relative_tolerance: 1.e-14 - hashes: ['0x401B3A7CE5412342'] + hashes: ['0x401A0CF228583B3C'] single_precision: diff --git a/tests/etopo1_oper_an_fc_lam_highres.yml b/tests/etopo1_oper_an_fc_lam_highres.yml index a1e24f7d5..988ca29dd 100644 --- a/tests/etopo1_oper_an_fc_lam_highres.yml +++ b/tests/etopo1_oper_an_fc_lam_highres.yml @@ -5,14 +5,22 @@ frequencies: 36 fr1: 0.055 ifre1: 1 bathymetry: ETOPO1 +lsubgrid: F advection: + irefra: 0 timestep: 120 fast_waves: timestep: 60 max_frequency: 5 physics: + iphys: 1 timestep: 240 + llgcbz0: T + llnormagam: T + lmaskice: F + lciwa3: T + lciscal: T analysis.begin: 2022-12-31 12:00:00 analysis.end: 2023-01-01 00:00:00 @@ -23,10 +31,8 @@ begin: ${analysis.begin} end: ${forecast.end} nproma: 24 -llgcbz0: T -llnormagam: T -lciwa3: T -lciscal: T +lgribin: F +lgribout: F forcings: sea_ice: False @@ -58,7 +64,7 @@ output: restart: format: binary # (default : binary) or grib at: - - time: ${end} + - time: ${analysis.end} validation: @@ -68,29 +74,29 @@ validation: # initial analysis time - name: swh time: 2022-12-31 12:00:00 - average: 3.187297962906810e-01 + average: 3.188565402145367e-01 relative_tolerance: 1.e-14 hashes: ['0x3FD46611A8D511E4'] # initial forecast time - name: swh time: 2023-01-01 00:00:00 - average: 2.302391668008772e-01 + average: 2.297867064718079e-01 hashes: ['0x3FCD787A1DD582E1'] # 6h into forcast - name: swh time: 2023-01-01 06:00:00 - average: 2.536693790443732e-01 + average: 2.531205436037192e-01 relative_tolerance: 1.e-14 hashes: ['0x3FD03C1E7DBF8061'] - name: swh time: 2023-01-01 06:00:00 - minimum: 2.172002527339524e-02 + minimum: 1.261118225844372e-02 relative_tolerance: 1.e-14 hashes: ['0x3F963DC638DEBF23'] - name: swh time: 2023-01-01 06:00:00 - maximum: 9.275511810397952e-01 + maximum: 9.275915911218660e-01 relative_tolerance: 1.e-14 hashes: ['0x3FEDAE7FD07DD3BA'] From 32e9f9e89dc17de1e4908827d8d0ed4bfd952ace Mon Sep 17 00:00:00 2001 From: Jean Bidlot Date: Mon, 19 Jan 2026 12:30:32 +0000 Subject: [PATCH 07/14] correct parameters.yml --- share/ecwam/parameters.yml | 130 ++++++++++++++++++++----------------- 1 file changed, 69 insertions(+), 61 deletions(-) diff --git a/share/ecwam/parameters.yml b/share/ecwam/parameters.yml index 1fb6f7bb7..be381d21d 100644 --- a/share/ecwam/parameters.yml +++ b/share/ecwam/parameters.yml @@ -47,13 +47,13 @@ parameters: mpts: index: 16 description: Mean period of total swell - '017': + awh: index: 17 description: Altimeter wave height - '018': + acwh': index: 18 description: Corrected altimeter wave height - '019': + arrc: index: 19 description: Altimeter range correction mp1: @@ -113,124 +113,132 @@ parameters: vcu: index: 38 description: Northward sea water velocity - '039': + phioc: index: 39 description: Normalised energy flux to ocean - '040': + phiaw: index: 40 description: Normalised energy flux to waves - '041': + tauoc: index: 41 description: Normalised momentum flux to ocean - '042': + swh1: index: 42 description: Swell partition 1 wave height - '043': + mwd1: index: 43 description: Swell partition 1 direction - '044': + mwp1: index: 44 description: Swell partition 1 mean period - '045': + swh2: index: 45 description: Swell partition 2 wave height - '046': + mwd2: index: 46 description: Swell partition 2 direction - '047': + mwp2: index: 47 description: Swell partition 2 mean period - '048': + swh3: index: 48 description: Swell partition 3 wave height - '049': + mwd3: index: 49 description: Swell partition 3 direction - '050': + mwp3: index: 50 description: Swell partition 3 mean period - '051': + mswsi: index: 51 description: Mean square strain in ice - '052': + sh10: index: 52 description: Wave height with period > 10s - '053': + rhoao: index: 53 description: Surface air density - '054': + wstar: index: 54 description: Convective velocity scale ci: index: 55 description: Sea ice area fraction - '056': + sithick: index: 56 description: Sea ice thickness - '057': + wss: index: 57 description: Spectral skewness - sst: + sic: index: 58 - description: Specified sea surface temperature (NEMO) + description: Sea ice cover (NEMO) '059': index: 59 - description: Sea ice cover (NEMO) - '060': - index: 60 description: Sea ice thickness (NEMO) ucurr: - index: 61 + index: 60 description: U-component of current (NEMO) vcurr: - index: 62 + index: 61 description: V-component of current (NEMO) - '063': - index: 63 + wefxm: + index: 62 description: Wave energy flux magnitude - '064': - index: 64 + wefxd': + index: 63 description: Wave energy flux direction - '065': - index: 65 + h1012: + index: 64 description: Significant wave height 10<=T<=12 - '066': - index: 66 + h1214: + index: 65 description: Significant wave height 12<=T<=14 - '067': - index: 67 + h1417: + index: 66 description: Significant wave height 14<=T<=17 - '068': - index: 68 + h1721: + index: 67 description: Significant wave height 17<=T<=21 - '069': - index: 69 + h2125: + index: 68 description: Significant wave height 21<=T<=25 - '070': - index: 70 + h2530: + index: 69 description: Significant wave height 25<=T<=30 - '071': - index: 71 + weta: + index: 70 description: Wave induced sea level correction - '072': - index: 72 + wraf: + index: 71 description: Spectral width index - '073': - index: 73 + wnslc: + index: 72 description: Number of freak waves events - '074': - index: 74 + utaua: + index: 73 description: U-component atmospheric stress - '075': - index: 75 + vtaua: + index: 74 description: V-component atmospheric stress - '076': - index: 76 + utauo: + index: 75 description: U-component stress into oceans - '077': - index: 77 + vtauo: + index: 76 description: V-component stress into oceans - '078': - index: 78 + wphio: + index: 77 description: Turbulence energy flux into oceans - + tdcmax: + index: 78 + description: Time domain maximum crest height + tdhmax: + index: 79 + description: Time domain maximum wave height + stcmax: + index: 80 + description: Space time maximum crest type + sthmax: + index: 81 + description: Space time maximum wave height From ffa2a311442ef7041899cef251979f0c716eefbc Mon Sep 17 00:00:00 2001 From: Josh Kousal Date: Wed, 1 Oct 2025 11:50:22 +0000 Subject: [PATCH 08/14] resolve merge commit --- share/ecwam/parameters.yml | 63 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/share/ecwam/parameters.yml b/share/ecwam/parameters.yml index be381d21d..fdff66b7e 100644 --- a/share/ecwam/parameters.yml +++ b/share/ecwam/parameters.yml @@ -242,3 +242,66 @@ parameters: sthmax: index: 81 description: Space time maximum wave height +======= + '062': + index: 62 + description: Wave energy flux magnitude + '063': + index: 63 + description: Wave energy flux direction + '064': + index: 64 + description: Significant wave height 10<=T<=12 + '065': + index: 65 + description: Significant wave height 12<=T<=14 + '066': + index: 66 + description: Significant wave height 14<=T<=17 + '067': + index: 67 + description: Significant wave height 17<=T<=21 + '068': + index: 68 + description: Significant wave height 21<=T<=25 + '069': + index: 69 + description: Significant wave height 25<=T<=30 + '070': + index: 70 + description: Wave induced sea level correction + '071': + index: 71 + description: Spectral width index + '072': + index: 72 + description: Number of freak waves events + '073': + index: 73 + description: U-component atmospheric stress + '074': + index: 74 + description: V-component atmospheric stress + '075': + index: 75 + description: U-component stress into oceans + '076': + index: 76 + description: V-component stress into oceans + '077': + index: 77 + description: Turbulence energy flux into oceans + '078': + index: 78 + description: Time domain maximum crest height + '079': + index: 79 + description: Time domain maximum wave height + '080': + index: 80 + description: Space time maximum crest type + '081': + index: 81 + description: Space time maximum wave height + +>>>>>>> 0e200832 (update parameters.yml to be in line with mpcrtbl) From 087fa2801c4b8200920a6e37e6d8654cbd25aaa0 Mon Sep 17 00:00:00 2001 From: Josh Kousal Date: Mon, 26 Jan 2026 10:40:16 +0000 Subject: [PATCH 09/14] update with new parameter IDs (sit,ocu,vcu); naming of new parameters 78-81 --- share/ecwam/parameters.yml | 10 +++++----- src/ecwam/mpcrtbl.F90 | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/share/ecwam/parameters.yml b/share/ecwam/parameters.yml index fdff66b7e..7ffd56a16 100644 --- a/share/ecwam/parameters.yml +++ b/share/ecwam/parameters.yml @@ -291,16 +291,16 @@ parameters: '077': index: 77 description: Turbulence energy flux into oceans - '078': + tdcmax: index: 78 description: Time domain maximum crest height - '079': + tdhmax: index: 79 description: Time domain maximum wave height - '080': + stcmax: index: 80 - description: Space time maximum crest type - '081': + description: Space time maximum crest height + sthmax: index: 81 description: Space time maximum wave height diff --git a/src/ecwam/mpcrtbl.F90 b/src/ecwam/mpcrtbl.F90 index 8d140a04d..b0f3fac61 100644 --- a/src/ecwam/mpcrtbl.F90 +++ b/src/ecwam/mpcrtbl.F90 @@ -249,11 +249,11 @@ SUBROUTINE MPCRTBL & 'V-COMP SURFACE STOKES DRIFT' ) ! PARAMETER 037 - IR = DEFINE_PARAMETER( 37, 'ocu', 151131, 0, 0, 0, .False., .True., & + IR = DEFINE_PARAMETER( 37, 'ocu', 262140, 0, 0, 0, .False., .True., & & 'U-COMP SURFACE CURRENT' ) ! PARAMETER 038 - IR = DEFINE_PARAMETER( 38, 'vcu', 151132, 0, 0, 0, .False., .True., & + IR = DEFINE_PARAMETER( 38, 'vcu', 262139, 0, 0, 0, .False., .True., & & 'V-COMP SURFACE CURRENT' ) ! PARAMETER 039 @@ -336,12 +336,12 @@ SUBROUTINE MPCRTBL & 'SEA ICE COVER' ) ! PARAMETER 056 - IR = DEFINE_PARAMETER( 56, '056', 174098, 0, 0, 0, .False., .True., & + IR = DEFINE_PARAMETER( 56, '056', 262000, 0, 0, 0, .False., .True., & & 'SEA ICE THICKNESS' ) ! PARAMETER 057 IR = DEFINE_PARAMETER( 57, '057', 140207, 0, 0, 0, .True., .True., & - & 'SPECTRAL SKWENESS' ) + & 'SPECTRAL SKEWNESS' ) ! PARAMETER 058 IR = DEFINE_PARAMETER( 58, 'sic', 003091, 0, 0, 0, .False., .False., & From 0cea8058db5cefd90504d1e26fe7d0b2888f3e99 Mon Sep 17 00:00:00 2001 From: Jean Bidlot Date: Mon, 26 Jan 2026 15:34:16 +0000 Subject: [PATCH 10/14] surface ocean currents and sea ice thickness are now encoded with grib2 only paramId --- src/ecwam/wgrib_edition.F90 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ecwam/wgrib_edition.F90 b/src/ecwam/wgrib_edition.F90 index 16ad0acf2..bed8cdea4 100644 --- a/src/ecwam/wgrib_edition.F90 +++ b/src/ecwam/wgrib_edition.F90 @@ -30,6 +30,8 @@ INTEGER FUNCTION WGRIB_EDITION (IPARAMID) IF ( IPARAMID >= 140131 .AND. IPARAMID <= 140134 ) THEN WGRIB_EDITION = 2 +ELSEIF ( IPARAMID >= 262000 .AND. IPARAMID <= 262999 ) THEN + WGRIB_EDITION = 2 ELSE WGRIB_EDITION = 0 ENDIF From 95570671036713f15eac3f9bd967b8c2960f30ce Mon Sep 17 00:00:00 2001 From: Jean Bidlot Date: Mon, 26 Jan 2026 16:48:51 +0000 Subject: [PATCH 11/14] correcting my bad merge --- share/ecwam/parameters.yml | 63 -------------------------------------- 1 file changed, 63 deletions(-) diff --git a/share/ecwam/parameters.yml b/share/ecwam/parameters.yml index 7ffd56a16..be381d21d 100644 --- a/share/ecwam/parameters.yml +++ b/share/ecwam/parameters.yml @@ -242,66 +242,3 @@ parameters: sthmax: index: 81 description: Space time maximum wave height -======= - '062': - index: 62 - description: Wave energy flux magnitude - '063': - index: 63 - description: Wave energy flux direction - '064': - index: 64 - description: Significant wave height 10<=T<=12 - '065': - index: 65 - description: Significant wave height 12<=T<=14 - '066': - index: 66 - description: Significant wave height 14<=T<=17 - '067': - index: 67 - description: Significant wave height 17<=T<=21 - '068': - index: 68 - description: Significant wave height 21<=T<=25 - '069': - index: 69 - description: Significant wave height 25<=T<=30 - '070': - index: 70 - description: Wave induced sea level correction - '071': - index: 71 - description: Spectral width index - '072': - index: 72 - description: Number of freak waves events - '073': - index: 73 - description: U-component atmospheric stress - '074': - index: 74 - description: V-component atmospheric stress - '075': - index: 75 - description: U-component stress into oceans - '076': - index: 76 - description: V-component stress into oceans - '077': - index: 77 - description: Turbulence energy flux into oceans - tdcmax: - index: 78 - description: Time domain maximum crest height - tdhmax: - index: 79 - description: Time domain maximum wave height - stcmax: - index: 80 - description: Space time maximum crest height - sthmax: - index: 81 - description: Space time maximum wave height - ->>>>>>> 0e200832 (update parameters.yml to be in line with mpcrtbl) From 6ee97cddef33a27fa5d28da5226cbe3b99c843b9 Mon Sep 17 00:00:00 2001 From: jrbidlot <58005536+jrbidlot@users.noreply.github.com> Date: Fri, 17 Jul 2026 12:08:40 +0100 Subject: [PATCH 12/14] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- share/ecwam/scripts/ecwam_run_model.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/ecwam/scripts/ecwam_run_model.sh b/share/ecwam/scripts/ecwam_run_model.sh index 8285dd0c8..0e2a5a265 100755 --- a/share/ecwam/scripts/ecwam_run_model.sh +++ b/share/ecwam/scripts/ecwam_run_model.sh @@ -96,7 +96,7 @@ done cldomain=$(read_config cldomain --default=g) wamnang=$(read_config directions) wamnfre=$(read_config frequencies) -fr1=$(read_config fr1/ --default=4.177248E-02) +fr1=$(read_config fr1 --default=4.177248E-02) ifre1=$(read_config ifre1 --default=1) lsubgrid=$(read_config lsubgrid --default=T) irefra=$(read_config advection.irefra --default=0) From 1f1a9924d68636fe65b89265e54b4f7bf9c45353 Mon Sep 17 00:00:00 2001 From: Jean Bidlot Date: Sun, 19 Jul 2026 11:51:33 +0000 Subject: [PATCH 13/14] fix issues found by co-pilot --- share/ecwam/scripts/ecwam_helper_functions.sh | 12 +- .../scripts/ecwam_run_create_bathymetry.sh | 2 +- share/ecwam/scripts/ecwam_run_preset.sh | 3 +- tests/CMakeLists.txt | 10 +- tests/etopo1_era5_O48.yml | 12 +- tests/etopo1_oper_an_fc_O1280.yml | 22 +- tests/etopo1_oper_an_fc_O320.yml | 12 +- tests/etopo1_oper_an_fc_O48.yml | 16 +- tests/etopo1_oper_an_fc_O48_iphys_0.yml | 16 +- tests/etopo1_oper_an_fc_O640.yml | 12 +- tests/etopo1_oper_an_fc_grib_restart_O320.yml | 16 +- tests/etopo1_oper_an_fc_grib_restart_O48.yml | 18 +- tests/etopo1_oper_an_fc_grib_restart_O96.yml | 195 ++++++++++++++++++ tests/etopo1_oper_an_fc_lam_highres.yml | 26 +-- 14 files changed, 283 insertions(+), 89 deletions(-) create mode 100644 tests/etopo1_oper_an_fc_grib_restart_O96.yml diff --git a/share/ecwam/scripts/ecwam_helper_functions.sh b/share/ecwam/scripts/ecwam_helper_functions.sh index 7ce11d55b..82c0e1729 100644 --- a/share/ecwam/scripts/ecwam_helper_functions.sh +++ b/share/ecwam/scripts/ecwam_helper_functions.sh @@ -96,11 +96,13 @@ function find_preproc_files() { } function find_preset_files() { - date=${1} - header_list=${2} + local date="$1" + shift # remove first argument + local -a header_list=("$@") # remaining arguments become a list + SEARCH_LOCATION=${ECWAM_PRESET_RUN_DIR:-${RUN_DIR}} found=true - for header in "${header_list}"; do + for header in "${header_list[@]}"; do file="restart/${header}${date}_000000000000" if [[ ! ( -r ${SEARCH_LOCATION}/${file} ) ]] ; then found=false @@ -108,7 +110,7 @@ function find_preset_files() { done if $found ; then mkdir -p ${RUN_DIR}/restart - for header in "${header_list}"; do + for header in "${header_list[@]}"; do file="restart/${header}${date}_000000000000" if [[ ! ( -r ${RUN_DIR}/${file} ) ]] ; then echo " ln -sf ${SEARCH_LOCATION}/${file} ${RUN_DIR}/${file}" @@ -118,7 +120,7 @@ function find_preset_files() { else builtin echo builtin echo "ERROR: Initial condition files not found in ${SEARCH_LOCATION}:" - for header in "${header_list}"; do + for header in "${header_list[@]}"; do file="restart/${header}${date}_000000000000" if [[ ! ( -r ${SEARCH_LOCATION}/${file} ) ]] ; then builtin echo " - ${file}" diff --git a/share/ecwam/scripts/ecwam_run_create_bathymetry.sh b/share/ecwam/scripts/ecwam_run_create_bathymetry.sh index 14b75a1b8..944adda51 100755 --- a/share/ecwam/scripts/ecwam_run_create_bathymetry.sh +++ b/share/ecwam/scripts/ecwam_run_create_bathymetry.sh @@ -256,7 +256,7 @@ EOF else for ip in 0 1 2 do - echo "llobstrout was set to true. no need for this file" > ${DATA_DIR}/data/bathymetry/${subgrid_files[$ip]} + echo "llobstrout was set to false. No need for this file" > ${DATA_DIR}/data/bathymetry/${subgrid_files[$ip]} done fi diff --git a/share/ecwam/scripts/ecwam_run_preset.sh b/share/ecwam/scripts/ecwam_run_preset.sh index 38f7800a9..2f929cbe3 100755 --- a/share/ecwam/scripts/ecwam_run_preset.sh +++ b/share/ecwam/scripts/ecwam_run_preset.sh @@ -156,7 +156,8 @@ forcings_file=$(read_config forcings.file) opti=1 fetch=1200.0 fmax=0.4000000 -lmaskice=$(read_config lmaskice --default=T) +lmaskice=$(read_config physics.lmaskice --default=$(read_config lmaskice --default=T)) + if [[ $(read_config forcings.sea_ice --default=True) == "True" ]] ; then licerun=T else diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index cc31fd28e..733856496 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -24,9 +24,9 @@ foreach( prec sp dp ) ecwam_add_test( ${PROJECT_NAME}_test_etopo1_oper_an_fc_O48 CONFIG etopo1_oper_an_fc_O48.yml MPI 4 OMP 1 PREC ${prec} ) ecwam_add_test( ${PROJECT_NAME}_test_etopo1_oper_an_fc_O48 CONFIG etopo1_oper_an_fc_O48.yml MPI 1 OMP 4 PREC ${prec} ) - ecwam_add_test( ${PROJECT_NAME}_test_etopo1_oper_an_fc_grib_restart_O48 CONFIG etopo1_oper_an_fc_grib_restart_O48.yml PREC ${prec} ) - ecwam_add_test( ${PROJECT_NAME}_test_etopo1_oper_an_fc_grib_restart_O48 CONFIG etopo1_oper_an_fc_grib_restart_O48.yml MPI 4 OMP 1 PREC ${prec} ) - ecwam_add_test( ${PROJECT_NAME}_test_etopo1_oper_an_fc_grib_restart_O48 CONFIG etopo1_oper_an_fc_grib_restart_O48.yml MPI 1 OMP 4 PREC ${prec} ) + ecwam_add_test( ${PROJECT_NAME}_test_etopo1_oper_an_fc_grib_restart_O96 CONFIG etopo1_oper_an_fc_grib_restart_O96.yml PREC ${prec} ) + ecwam_add_test( ${PROJECT_NAME}_test_etopo1_oper_an_fc_grib_restart_O96 CONFIG etopo1_oper_an_fc_grib_restart_O96.yml MPI 4 OMP 1 PREC ${prec} ) + ecwam_add_test( ${PROJECT_NAME}_test_etopo1_oper_an_fc_grib_restart_O96 CONFIG etopo1_oper_an_fc_grib_restart_O96.yml MPI 1 OMP 4 PREC ${prec} ) # This configuration is retained for the test-base purely for coverage reasons, and is not used for # research or operational forecasts. As such, Loki transformations remove the relevant code-paths as @@ -38,9 +38,5 @@ foreach( prec sp dp ) ecwam_add_test( ${PROJECT_NAME}_test_etopo1_oper_an_fc_O48_iphys_0 CONFIG etopo1_oper_an_fc_O48_iphys_0.yml MPI 1 OMP 4 PREC ${prec} ) endif() - ecwam_add_test( ${PROJECT_NAME}_test_etopo1_oper_an_fc_grib_restart_O320 CONFIG etopo1_oper_an_fc_grib_restart_O320.yml PREC ${prec} ) - ecwam_add_test( ${PROJECT_NAME}_test_etopo1_oper_an_fc_grib_restart_O320 CONFIG etopo1_oper_an_fc_grib_restart_O320.yml MPI 32 OMP 2 PREC ${prec} ) - ecwam_add_test( ${PROJECT_NAME}_test_etopo1_oper_an_fc_grib_restart_O320 CONFIG etopo1_oper_an_fc_grib_restart_O320.yml MPI 16 OMP 4 PREC ${prec} ) - endif() endforeach() diff --git a/tests/etopo1_era5_O48.yml b/tests/etopo1_era5_O48.yml index 6cd1aede9..217129040 100644 --- a/tests/etopo1_era5_O48.yml +++ b/tests/etopo1_era5_O48.yml @@ -121,23 +121,23 @@ validation: # initial time - name: swh time: 2022-01-01 00:00:00 - average: 3.800154336489329e-01 + average: 3.798319828376563e-01 relative_tolerance: 1.e-14 - hashes: ['0x3FD8522C40DFD5CF'] + hashes: ['0x3FD84F2ACE10CDE6'] # After 1h - name: swh time: 2022-01-01 01:00:00 - average: 4.840666128606942e-01 + average: 4.840283485796651e-01 relative_tolerance: 1.e-14 - hashes: ['0x3FDEFAF287D49E82'] + hashes: ['0x3FDEFA5209DF23A1'] # After 6h - name: swh time: 2022-01-01 06:00:00 - average: 7.970856539059511e-01 + average: 7.970841426388247e-01 relative_tolerance: 1.e-14 - hashes: ['0x3FE981B9C5F460F3'] + hashes: ['0x3FE981B69A99680C'] - name: swh time: 2022-01-01 06:00:00 minimum: 4.326228740126664e-03 diff --git a/tests/etopo1_oper_an_fc_O1280.yml b/tests/etopo1_oper_an_fc_O1280.yml index 290275cf6..3462dc435 100644 --- a/tests/etopo1_oper_an_fc_O1280.yml +++ b/tests/etopo1_oper_an_fc_O1280.yml @@ -46,7 +46,7 @@ forcings: timestep: 01:00 currents: - file: data/forcings/daily_average_surface_currents_ORAS6_20221231_20230102_O640.grib + file: data/forcings/daily_average_surface_currents_ORAS6_20221231_20230102_O1280.grib input_step: 86400 output: @@ -76,30 +76,30 @@ validation: # initial analysis time - name: swh time: 2022-12-31 12:00:00 - average: 3.880528141821628e-01 + average: 3.878921852381331e-01 relative_tolerance: 1.e-14 - hashes: ['0x3FD8D5DB78821F33'] + hashes: ['0x3FD8D339BE7E313F'] # initial forecast time - name: swh time: 2023-01-01 00:00:00 - average: 1.052387295795608e+00 + average: 1.052671880035781e+00 relative_tolerance: 1.e-14 - hashes: ['0x3FF0D6940FA2B032'] + hashes: ['0x3FF0D7BE7822C29D'] # 6h into forcast - name: swh time: 2023-01-01 06:00:00 - average: 1.212691777675868e+00 + average: 1.213041806873566e+00 relative_tolerance: 1.e-14 - hashes: ['0x3FF3672F7E53EF71'] + hashes: ['0x3FF3689E86933E53'] - name: swh time: 2023-01-01 06:00:00 - minimum: 4.388205014719627e-03 + minimum: 4.387390382286470e-03 relative_tolerance: 1.e-14 - hashes: ['0x3F71F95DD06BFCA7'] + hashes: ['0x3F71F883234EAA3F'] - name: swh time: 2023-01-01 06:00:00 - maximum: 7.157768268022219e+00 + maximum: 7.162006493701588e+00 relative_tolerance: 1.e-14 - hashes: ['0x401CA18E013E020A'] + hashes: ['0x401CA5E507C0C076'] diff --git a/tests/etopo1_oper_an_fc_O320.yml b/tests/etopo1_oper_an_fc_O320.yml index 3d78fcaac..d3b600161 100644 --- a/tests/etopo1_oper_an_fc_O320.yml +++ b/tests/etopo1_oper_an_fc_O320.yml @@ -134,23 +134,23 @@ validation: # initial analysis time - name: swh time: 2022-12-31 12:00:00 - average: 0.3873838464703652E+00 + average: 3.872165538593810e-01 relative_tolerance: 1.e-14 - hashes: ['0x3FD8CAE59DE5B098'] + hashes: ['0x3FD8C827F0D2EF6F'] # initial forecast time - name: swh time: 2023-01-01 00:00:00 - average: 0.1055436157420307E+01 + average: 1.055434588222599e+00 relative_tolerance: 1.e-14 - hashes: ['0x3FF0E31106322D94'] + hashes: ['0x3FF0E30F60F7BB8E'] # 6h into forecast - name: swh time: 2023-01-01 06:00:00 - average: 0.1216412130066364E+01 + average: 1.216411067836199e+00 relative_tolerance: 1.e-14 - hashes: ['0x3FF3766C90D17BD2'] + hashes: ['0x3FF3766B73AD9524'] - name: swh time: 2023-01-01 06:00:00 minimum: 0.4390841548729450E-02 diff --git a/tests/etopo1_oper_an_fc_O48.yml b/tests/etopo1_oper_an_fc_O48.yml index 14d8886bf..ec2f2e404 100644 --- a/tests/etopo1_oper_an_fc_O48.yml +++ b/tests/etopo1_oper_an_fc_O48.yml @@ -130,23 +130,23 @@ validation: # initial analysis time - name: swh time: 2022-12-31 12:00:00 - average: 0.3832217447705822E+00 + average: 3.830924202241996e-01 relative_tolerance: 1.e-14 - hashes: ['0x3FD886B47F39F725'] + hashes: ['0x3FD88496120D56DC'] # initial forecast time - name: swh time: 2023-01-01 00:00:00 - average: 0.1059077112061130E+01 + average: 1.059076530679594e+00 relative_tolerance: 1.e-14 - hashes: ['0x3FF0F1FAD783EA34'] + hashes: ['0x3FF0F1FA3B73AE11'] # 6h into forecast - name: swh time: 2023-01-01 06:00:00 - average: 0.1223563702803160E+01 + average: 1.223563306057211e+00 relative_tolerance: 1.e-14 - hashes: ['0x3FF393B78881CBB7'] + hashes: ['0x3FF393B71E019F2A'] - name: swh time: 2023-01-01 06:00:00 minimum: 0.4326539111291028E-02 @@ -154,9 +154,9 @@ validation: hashes: ['0x3F71B8B47FCE4627'] - name: swh time: 2023-01-01 06:00:00 - maximum: 0.6511460010823872E+01 + maximum: 6.511460010823870e+00 relative_tolerance: 1.e-14 - hashes: ['0x401A0BBC2C4ECD25'] + hashes: ['0x401A0BBC2C4ECD23'] single_precision: diff --git a/tests/etopo1_oper_an_fc_O48_iphys_0.yml b/tests/etopo1_oper_an_fc_O48_iphys_0.yml index 169f74c50..bc88a4516 100644 --- a/tests/etopo1_oper_an_fc_O48_iphys_0.yml +++ b/tests/etopo1_oper_an_fc_O48_iphys_0.yml @@ -69,23 +69,23 @@ validation: # initial analysis time - name: swh time: 2022-12-31 12:00:00 - average: 3.832217447705822e-01 + average: 3.830924202241996e-01 relative_tolerance: 1.e-14 - hashes: ['0x3FD886B47F39F725'] + hashes: ['0x3FD88496120D56DC'] # initial forecast time - name: swh time: 2023-01-01 00:00:00 - average: 1.120573261003681e+00 + average: 1.120570318637665e+00 relative_tolerance: 1.e-14 - hashes: ['0x3FF1EDDE3A4C86AE'] + hashes: ['0x3FF1EDDB2476AC52'] # 6h into forcast - name: swh time: 2023-01-01 06:00:00 - average: 1.252365905908569e+00 + average: 1.252364915640471e+00 relative_tolerance: 1.e-14 - hashes: ['0x3FF409B0D5080B22'] + hashes: ['0x3FF409AFCB355685'] - name: swh time: 2023-01-01 06:00:00 minimum: 4.326539111291028e-03 @@ -93,9 +93,9 @@ validation: hashes: ['0x3F71B8B47FCE4627'] - name: swh time: 2023-01-01 06:00:00 - maximum: 7.335172288887107e+00 + maximum: 7.335172288887112e+00 relative_tolerance: 1.e-14 - hashes: ['0x401D5737678D2EAF'] + hashes: ['0x401D5737678D2EB4'] single_precision: diff --git a/tests/etopo1_oper_an_fc_O640.yml b/tests/etopo1_oper_an_fc_O640.yml index 53fe7558f..6796f6838 100644 --- a/tests/etopo1_oper_an_fc_O640.yml +++ b/tests/etopo1_oper_an_fc_O640.yml @@ -76,23 +76,23 @@ validation: # initial analysis time - name: swh time: 2022-12-31 12:00:00 - average: 0.3876882900771382E+00 + average: 3.875267447586148e-01 relative_tolerance: 1.e-14 - hashes: ['0x3FD8CFE28BBB1A21'] + hashes: ['0x3FD8CD3CF9C411DC'] # initial forecast time - name: swh time: 2023-01-01 00:00:00 - average: 0.1054428799392716E+01 + average: 1.054427510278385e+00 relative_tolerance: 1.e-14 - hashes: ['0x3FF0DEF0BB95A2DC'] + hashes: ['0x3FF0DEEF618A5FB6'] # 6h into forcast - name: swh time: 2023-01-01 06:00:00 - average: 0.1213610063910966E+01 + average: 1.213609084519249e+00 relative_tolerance: 1.e-14 - hashes: ['0x3FF36AF262E9814E'] + hashes: ['0x3FF36AF15C023804'] - name: swh time: 2023-01-01 06:00:00 minimum: 0.4387775653038153E-02 diff --git a/tests/etopo1_oper_an_fc_grib_restart_O320.yml b/tests/etopo1_oper_an_fc_grib_restart_O320.yml index 8bcfffb2d..0945ee6d3 100644 --- a/tests/etopo1_oper_an_fc_grib_restart_O320.yml +++ b/tests/etopo1_oper_an_fc_grib_restart_O320.yml @@ -134,23 +134,23 @@ validation: # initial analysis time - name: swh time: 2022-12-31 12:00:00 - average: 0.3742546353686318E+00 + average: 3.740910048130137e-01 relative_tolerance: 1.e-14 - hashes: ['0x3FD7F3C9B6D2382D'] + hashes: ['0x3FD7F11B65D9943B'] # initial forecast time - name: swh time: 2023-01-01 00:00:00 - average: 0.1052356486085158E+01 + average: 1.052354948638135e+00 relative_tolerance: 1.e-14 - hashes: ['0x3FF0D673C13781F8'] + hashes: ['0x3FF0D6722482F3EB'] # 6h into forecast - name: swh time: 2023-01-01 06:00:00 - average: 0.1214299649742646E+01 + average: 1.214298695088632e+00 relative_tolerance: 1.e-14 - hashes: ['0x3FF36DC5783305D2'] + hashes: ['0x3FF36DC477EFB2C9'] - name: swh time: 2023-01-01 06:00:00 minimum: 0.4390841548729450E-02 @@ -158,9 +158,9 @@ validation: hashes: ['0x3F71FC218DA8CCD8'] - name: swh time: 2023-01-01 06:00:00 - maximum: 0.6929218326423498E+01 + maximum: 6.929218100210148e+00 relative_tolerance: 1.e-14 - hashes: ['0x401BB785024B54C3'] + hashes: ['0x401BB784F31D03EE'] single_precision: diff --git a/tests/etopo1_oper_an_fc_grib_restart_O48.yml b/tests/etopo1_oper_an_fc_grib_restart_O48.yml index 75888580d..9e1e93047 100644 --- a/tests/etopo1_oper_an_fc_grib_restart_O48.yml +++ b/tests/etopo1_oper_an_fc_grib_restart_O48.yml @@ -130,33 +130,33 @@ validation: # initial analysis time - name: swh time: 2022-12-31 12:00:00 - average: 0.4060662972705505E+00 + average: 4.059280839077075e-01 relative_tolerance: 1.e-14 - hashes: ['0x3FD9FCFD7EB23AA2'] + hashes: ['0x3FD9FAB9C93A56CC'] # initial forecast time - name: swh time: 2023-01-01 00:00:00 - average: 0.1063234106230750E+01 + average: 1.063233424309939e+00 relative_tolerance: 1.e-14 - hashes: ['0x3FF10301C4240BBA'] + hashes: ['0x3FF103010D16CDF0'] # 6h into forecast - name: swh time: 2023-01-01 06:00:00 - average: 0.1226326812216435E+01 + average: 1.226326314190551e+00 relative_tolerance: 1.e-14 - hashes: ['0x3FF39F08DD0AD71F'] + hashes: ['0x3FF39F08575AC31F'] - name: swh time: 2023-01-01 06:00:00 - minimum: 0.4326539111291028E-02 + minimum: 4.326539111291028e-03 relative_tolerance: 1.e-14 hashes: ['0x3F71B8B47FCE4627'] - name: swh time: 2023-01-01 06:00:00 - maximum: 0.6512642507920472E+01 + maximum: 6.512645602565808e+00 relative_tolerance: 1.e-14 - hashes: ['0x401A0CF228583B3C'] + hashes: ['0x401A0CF2F805D55C'] single_precision: diff --git a/tests/etopo1_oper_an_fc_grib_restart_O96.yml b/tests/etopo1_oper_an_fc_grib_restart_O96.yml new file mode 100644 index 000000000..5a50a22eb --- /dev/null +++ b/tests/etopo1_oper_an_fc_grib_restart_O96.yml @@ -0,0 +1,195 @@ +grid: O96 +cldomain: g +directions: 24 +frequencies: 25 +fr1: 4.177248E-02 +ifre1: 1 +bathymetry: ETOPO1 +lsubgrid: T + +advection: + irefra: 2 + timestep: 1200 + fast_waves: + timestep: 600 + max_frequency: 3 +physics: + iphys: 1 + timestep: 1200 + llgcbz0: T + llnormagam: T + lmaskice: F + lciwa3: T + lciscal: T + +analysis.begin: 2022-12-31 12:00:00 +analysis.end: 2023-01-01 00:00:00 +forecast.begin: 2023-01-01 00:00:00 +forecast.end: 2023-01-01 06:00:00 + +begin: ${analysis.begin} +end: ${forecast.end} + +nproma: 32 +lgribin: T +lgribout: T + +forcings: + file: data/forcings/oper_an_12h_fc_2023010100_36h_O48.grib + + at: + - begin: ${analysis.begin} + end: ${analysis.end} + timestep: 06:00 + - begin: ${forecast.begin} + end: ${forecast.end} + timestep: 01:00 + +output: + fields: + name: + - swh # Significant height of combined wind waves and swell + - mwd # Mean wave direction + - mwp # Mean wave period + - pp1d # Peak wave period + - dwi # 10 metre wind direction + - cdww # Coefficient of drag with waves + - wind # 10 metre wind speed + - msqs # Mean square slope of waves + - shww # Significant height of wind waves + - shts # Significant height of total swell + - mdww # Mean direction of wind waves + - mdts # Mean direction of total swell + - mpww # Mean period of wind waves + - mpts # Mean period of total swell + - mp1 # Mean wave period based on first moment + - mp2 # Mean zero-crossing wave period + - wdw # Wave spectral directional width + - p1ww # Mean wave period based on first moment for wind waves + - p1ps # Mean wave period based on first moment for swell + - p2ww # Mean wave period based on second moment for wind waves + - p2ps # Mean wave period based on second moment for swell + - dwww # Wave spectral directional width for wind waves + - dwps # Wave spectral directional width for swell + - wsk # Wave spectral kurtosis + - bfi # Benjamin-Feir index + - wsp # Wave spectral peakedness + - wmb # Model bathymetry + - hmax # Maximum individual wave height + - tmax # Period corresponding to maximum individual wave height + - ust # U-component stokes drift + - vst # V-component stokes drift + - phioc # Normalised energy flux to ocean + - phiaw # Normalised energy flux to waves + - tauoc # Normalised momentum flux to ocean + - swh1 # Swell partition 1 wave height + - mwd1 # Swell partition 1 direction + - mwp1 # Swell partition 1 mean period + - swh2 # Swell partition 2 wave height + - mwd2 # Swell partition 2 direction + - mwp2 # Swell partition 2 mean period + - swh3 # Swell partition 3 wave height + - mwd3 # Swell partition 3 direction + - mwp3 # Swell partition 3 mean period + - sh10 # Wave height with period > 10s + - wss # Spectral skewness + - wefxm # Wave energy flux magnitude + - wefxd # Wave energy flux direction + - h1012 # Significant wave height 10<=T<=12 + - h1214 # Significant wave height 12<=T<=14 + - h1417 # Significant wave height 14<=T<=17 + - h1721 # Significant wave height 17<=T<=21 + - h2125 # Significant wave height 21<=T<=25 + - h2530 # Significant wave height 25<=T<=30 + - weta # Wave induced sea level correction + - wraf # Spectral width index + - wnslc # Number of freak waves events + - utaua # U-component atmospheric stress + - vtaua # V-component atmospheric stress + - utauo # U-component stress into oceans + - vtauo # V-component stress into oceans + - wphio # Turbulence energy flux into oceans + - tdcmax # Time domain maximum crest height + - tdhmax # Time domain maximum wave height + - stcmax # Space time maximum crest height + - sthmax # Space time maximum wave height + - sibm # Sea ice break up memory + - xwrs # U-component wave radiative stress to sea ice + - ywrs # V-component wave radiative stress to sea ice + format: grib # (default : grib) or binary + at: + - timestep: 01:00 + + restart: + format: binary # (default : binary) or grib + at: + - time: ${analysis.end} + + +validation: + + double_precision: + + # initial analysis time + - name: swh + time: 2022-12-31 12:00:00 + average: 4.039332563619328e-01 + relative_tolerance: 1.e-14 + hashes: ['0x3FD9DA0ADF75D79E'] + + # initial forecast time + - name: swh + time: 2023-01-01 00:00:00 + average: 9.740975537893722e-01 + relative_tolerance: 1.e-14 + hashes: ['0x3FEF2BCEA2147251'] + + # 6h into forecast + - name: swh + time: 2023-01-01 06:00:00 + average: 1.116009510311353e+00 + relative_tolerance: 1.e-14 + hashes: ['0x3FF1DB2CC9CCFEEA'] + - name: swh + time: 2023-01-01 06:00:00 + minimum: 4.326592382617202e-03 + relative_tolerance: 1.e-14 + hashes: ['0x3F71B8C2CC955ADC'] + - name: swh + time: 2023-01-01 06:00:00 + maximum: 6.288749015943960e+00 + relative_tolerance: 1.e-14 + hashes: ['0x401927ADD270ED0C'] + + single_precision: + + # initial analysis time + - name: swh + time: 2022-12-31 12:00:00 + average: 4.039332563619328e-01 + relative_tolerance: 1.e-14 + hashes: ['0x3FD9DA0ADF75D79E'] + + # initial forecast time + - name: swh + time: 2023-01-01 00:00:00 + average: 9.740975537893722e-01 + relative_tolerance: 1.e-14 + hashes: ['0x3FEF2BCEA2147251'] + + # 6h into forecast + - name: swh + time: 2023-01-01 06:00:00 + average: 1.116009510311353e+00 + relative_tolerance: 1.e-14 + hashes: ['0x3FF1DB2CC9CCFEEA'] + - name: swh + time: 2023-01-01 06:00:00 + minimum: 4.326592382617202e-03 + relative_tolerance: 1.e-14 + hashes: ['0x3F71B8C2CC955ADC'] + - name: swh + time: 2023-01-01 06:00:00 + maximum: 6.288749015943960e+00 + relative_tolerance: 1.e-14 + hashes: ['0x401927ADD270ED0C'] diff --git a/tests/etopo1_oper_an_fc_lam_highres.yml b/tests/etopo1_oper_an_fc_lam_highres.yml index 4debd0cd3..a618d0ad8 100644 --- a/tests/etopo1_oper_an_fc_lam_highres.yml +++ b/tests/etopo1_oper_an_fc_lam_highres.yml @@ -9,13 +9,13 @@ lsubgrid: F advection: irefra: 0 - timestep: 90 + timestep: 120 fast_waves: - timestep: 45 + timestep: 60 max_frequency: 5 physics: iphys: 1 - timestep: 180 + timestep: 240 llgcbz0: T llnormagam: T lmaskice: F @@ -74,29 +74,29 @@ validation: # initial analysis time - name: swh time: 2022-12-31 12:00:00 - average: 2.779599034388384e-01 + average: 3.188565402145367e-01 relative_tolerance: 1.e-14 - hashes: ['0x3FD1CA1855B79FCE'] + hashes: ['0x3FD46825431593C4'] # initial forecast time - name: swh time: 2023-01-01 00:00:00 - average: 2.420364921801725e-01 - hashes: ['0x3FCEFB0D412D1B77'] + average: 2.297867064718079e-01 + hashes: ['0x3FCD69A69AAD0D3D'] # 6h into forcast - name: swh time: 2023-01-01 06:00:00 - average: 2.628913168004307e-01 + average: 2.531205436037192e-01 relative_tolerance: 1.e-14 - hashes: ['0x3FD0D3361A03DABB'] + hashes: ['0x3FD03320822E515C'] - name: swh time: 2023-01-01 06:00:00 - minimum: 1.310494308392263e-02 + minimum: 1.261118225844372e-02 relative_tolerance: 1.e-14 - hashes: ['0x3F8AD6C3AFB0ECC2'] + hashes: ['0x3F89D3E43AE94A44'] - name: swh time: 2023-01-01 06:00:00 - maximum: 9.323344269830584e-01 + maximum: 9.275915911218660e-01 relative_tolerance: 1.e-14 - hashes: ['0x3FEDD5AF021A77E5'] + hashes: ['0x3FEDAED48F7D3772'] From a53a4f64c7cd22f922713e9022db1437b5ecd503 Mon Sep 17 00:00:00 2001 From: Jean Bidlot Date: Sun, 19 Jul 2026 21:26:51 +0000 Subject: [PATCH 14/14] a few more co-pilot suggestions --- share/ecwam/scripts/ecwam_run_create_bathymetry.sh | 4 +++- src/ecwam/mstart.F90 | 5 +++-- src/ecwam/outblock.F90 | 4 ++-- tests/aqua_oper_an_fc_O48.yml | 4 ++-- tests/etopo1_oper_an_fc_O1280.yml | 4 ++-- tests/etopo1_oper_an_fc_O48_iphys_0.yml | 4 ++-- tests/etopo1_oper_an_fc_O640.yml | 2 +- tests/etopo1_oper_an_fc_grib_restart_O96.yml | 1 + tests/etopo1_oper_an_fc_lam_highres.yml | 2 +- 9 files changed, 17 insertions(+), 13 deletions(-) diff --git a/share/ecwam/scripts/ecwam_run_create_bathymetry.sh b/share/ecwam/scripts/ecwam_run_create_bathymetry.sh index 944adda51..2409df4f2 100755 --- a/share/ecwam/scripts/ecwam_run_create_bathymetry.sh +++ b/share/ecwam/scripts/ecwam_run_create_bathymetry.sh @@ -256,7 +256,9 @@ EOF else for ip in 0 1 2 do - echo "llobstrout was set to false. No need for this file" > ${DATA_DIR}/data/bathymetry/${subgrid_files[$ip]} + echo "llobstrout was set to false. No need for this file" + rm -f ${DATA_DIR}/data/bathymetry/${subgrid_files[$ip]} + touch ${DATA_DIR}/data/bathymetry/${subgrid_files[$ip]} done fi diff --git a/src/ecwam/mstart.F90 b/src/ecwam/mstart.F90 index 25831c025..a7ea74ba4 100644 --- a/src/ecwam/mstart.F90 +++ b/src/ecwam/mstart.F90 @@ -30,8 +30,9 @@ SUBROUTINE MSTART (IOPTI, FETCH, FRMAX, THETAQ, & ! *CALL* *MSTART (IOPTI, FETCH, FRMAX, THETAQ, ! & FM, ALFA, ZGAMMA, SA, SB, -! & NPROMA, KIJS, KIJL, -! & FL1,WSWAVE,WDWAVE)* +! & KIJS, KIJL, FL1, +! & CICOVER, +! & WSWAVE, WDWAVE)* ! *IOPTI* INTEGER START FIELD OPTION ! = 0 FROM PARAMETERS. ! = 1 FROM WINDS CALM ENERGY=0. diff --git a/src/ecwam/outblock.F90 b/src/ecwam/outblock.F90 index 3229c3ffb..d7e5a3059 100644 --- a/src/ecwam/outblock.F90 +++ b/src/ecwam/outblock.F90 @@ -64,7 +64,7 @@ SUBROUTINE OUTBLOCK (KIJS, KIJL, MIJ, & & NIPRMOUT, ITOBOUT ,NTEWH ,IPRMINFO USE YOWCOUP , ONLY : LWNEMOCOUSTRN USE YOWFRED , ONLY : FR, TH , DFIM, DELTH, COSTH, SINTH, XKMSS_CUTOFF - USE YOWICE , ONLY : FLMIN ,LMASKICE + USE YOWICE , ONLY : FLMIN ,LICERUN ,LMASKICE USE YOWPARAM , ONLY : NANG ,NFRE USE YOWPCONS , ONLY : ZMISS ,DEG ,EPSUS ,EPSU10, G, ZPI USE YOWSTAT , ONLY : IREFRA @@ -173,7 +173,7 @@ SUBROUTINE OUTBLOCK (KIJS, KIJL, MIJ, & IF (LSECONDORDER) CALL CAL_SECOND_ORDER_SPEC(KIJS, KIJL, FL2ND, WAVNUM, DEPTH, SIG) ! Adapting the noise level structure to be more consistent in sea ice conditions - IF (.NOT. LMASKICE) THEN + IF (LICERUN .AND. .NOT. LMASKICE) THEN DO IJ=KIJS,KIJL ZTHRS(IJ) = (1._JWRB - 0.9_JWRB*MIN(CICOVER(IJ),0.99_JWRB))*FLMIN ENDDO diff --git a/tests/aqua_oper_an_fc_O48.yml b/tests/aqua_oper_an_fc_O48.yml index 0ab9ab2a7..f10828026 100644 --- a/tests/aqua_oper_an_fc_O48.yml +++ b/tests/aqua_oper_an_fc_O48.yml @@ -80,7 +80,7 @@ validation: relative_tolerance: 1.e-14 hashes: ['0x3FEDA1F11EB8D2E3'] - # 6h into forcast + # 6h into forecast - name: swh time: 2023-01-01 06:00:00 average: 1.059431637034954e+00 @@ -113,7 +113,7 @@ validation: relative_tolerance: 1.e-6 hashes: ['0x3FF6CD1040000000'] - # 6h into forcast + # 6h into forecast - name: swh time: 2023-01-01 06:00:00 average: 0.1471550345420837E+01 diff --git a/tests/etopo1_oper_an_fc_O1280.yml b/tests/etopo1_oper_an_fc_O1280.yml index 3462dc435..657a12db1 100644 --- a/tests/etopo1_oper_an_fc_O1280.yml +++ b/tests/etopo1_oper_an_fc_O1280.yml @@ -11,7 +11,7 @@ advection: irefra: 2 timestep: 450 fast_waves: - timestep: 225. + timestep: 225 max_frequency: 7 physics: iphys: 1 @@ -87,7 +87,7 @@ validation: relative_tolerance: 1.e-14 hashes: ['0x3FF0D7BE7822C29D'] - # 6h into forcast + # 6h into forecast - name: swh time: 2023-01-01 06:00:00 average: 1.213041806873566e+00 diff --git a/tests/etopo1_oper_an_fc_O48_iphys_0.yml b/tests/etopo1_oper_an_fc_O48_iphys_0.yml index bc88a4516..ec987bd2e 100644 --- a/tests/etopo1_oper_an_fc_O48_iphys_0.yml +++ b/tests/etopo1_oper_an_fc_O48_iphys_0.yml @@ -80,7 +80,7 @@ validation: relative_tolerance: 1.e-14 hashes: ['0x3FF1EDDB2476AC52'] - # 6h into forcast + # 6h into forecast - name: swh time: 2023-01-01 06:00:00 average: 1.252364915640471e+00 @@ -113,7 +113,7 @@ validation: relative_tolerance: 1.e-6 hashes: ['0x3FF7D816C0000000'] - # 6h into forcast + # 6h into forecast - name: swh time: 2023-01-01 06:00:00 average: 0.1549521923065186E+01 diff --git a/tests/etopo1_oper_an_fc_O640.yml b/tests/etopo1_oper_an_fc_O640.yml index 6796f6838..0158808d3 100644 --- a/tests/etopo1_oper_an_fc_O640.yml +++ b/tests/etopo1_oper_an_fc_O640.yml @@ -87,7 +87,7 @@ validation: relative_tolerance: 1.e-14 hashes: ['0x3FF0DEEF618A5FB6'] - # 6h into forcast + # 6h into forecast - name: swh time: 2023-01-01 06:00:00 average: 1.213609084519249e+00 diff --git a/tests/etopo1_oper_an_fc_grib_restart_O96.yml b/tests/etopo1_oper_an_fc_grib_restart_O96.yml index 5a50a22eb..dc82d1479 100644 --- a/tests/etopo1_oper_an_fc_grib_restart_O96.yml +++ b/tests/etopo1_oper_an_fc_grib_restart_O96.yml @@ -35,6 +35,7 @@ lgribin: T lgribout: T forcings: + # For testing the internal interpolation scheme in ecWAM, we do not match the wind forcing resolution with the model grid resolution file: data/forcings/oper_an_12h_fc_2023010100_36h_O48.grib at: diff --git a/tests/etopo1_oper_an_fc_lam_highres.yml b/tests/etopo1_oper_an_fc_lam_highres.yml index a618d0ad8..05d429c09 100644 --- a/tests/etopo1_oper_an_fc_lam_highres.yml +++ b/tests/etopo1_oper_an_fc_lam_highres.yml @@ -84,7 +84,7 @@ validation: average: 2.297867064718079e-01 hashes: ['0x3FCD69A69AAD0D3D'] - # 6h into forcast + # 6h into forecast - name: swh time: 2023-01-01 06:00:00 average: 2.531205436037192e-01