From 882000bcedc2cef893a046d3c10e42c6847c7995 Mon Sep 17 00:00:00 2001 From: ma05cde Date: Fri, 8 Sep 2023 13:33:03 +0000 Subject: [PATCH 1/4] correct issue for RESTART2 in ww3_multi when using namelist --- model/src/wminitmd.F90 | 157 +++++++++++++++++------------------------ 1 file changed, 66 insertions(+), 91 deletions(-) diff --git a/model/src/wminitmd.F90 b/model/src/wminitmd.F90 index 293b74848..ac9d0036f 100644 --- a/model/src/wminitmd.F90 +++ b/model/src/wminitmd.F90 @@ -3499,6 +3499,7 @@ SUBROUTINE WMINITNML ( IDSI, IDSO, IDSS, IDST, IDSE, IFNAME, & !/ Add ESMF override for STIME & ETIME ( version 6.02 ) !/ (T. J. Campbell, NRL) !/ 15-May-2018 : Update namelist ( version 6.05 ) + !/ 28-Oct-2020 : Add SMCTYPE for SMC sub-grid. JGLi ( version 7.13 ) !/ 22-Mar-2021 : Add momentum and air density input ( version 7.13 ) !/ ! 1. Purpose : @@ -3518,8 +3519,8 @@ SUBROUTINE WMINITNML ( IDSI, IDSO, IDSS, IDST, IDSE, IFNAME, & ! IDST Int. I Unit number for test output. ! IDSE Int. I Unit number for error output. ! IFNAME Char I File name for input file. - ! MPI_COMM Int. I MPI communicator to be used. - ! PREAMB Char I File name preamble (optiona). + ! MPI_COMM Int. I MPI communicator to be used. + ! PREAMB Char I File name preamble (optional). ! ---------------------------------------------------------------- ! ! 4. Subroutines used : @@ -3726,11 +3727,11 @@ SUBROUTINE WMINITNML ( IDSI, IDSO, IDSS, IDST, IDSE, IFNAME, & #endif USE W3WDATMD, ONLY: TIME USE W3ADATMD, ONLY: WADATS - USE W3IDATMD, ONLY: INFLAGS1, INPUTS, IINIT, & - JFIRST, INFLAGS2 + USE W3IDATMD, ONLY: INFLAGS1, INFLAGS2, INPUTS, IINIT, & + JFIRST USE W3ODATMD, ONLY: NOGRP, NGRPP, FLOUT, TONEXT, FLBPI, & FLBPO, NFBPO, NBI, NDS, IAPROC, & - NAPFLD, NAPPNT, NAPTRK, NAPBPT, & + NAPFLD, NAPPNT, NAPTRK, NAPBPT, & NAPPRT, NAPROC, FNMPRE, OUTPTS, NDST, NDSE, & NOPTS, IOSTYP, UNIPTS, UPPROC, DTOUT, & TOLAST, NOTYPE @@ -4099,12 +4100,13 @@ SUBROUTINE WMINITNML ( IDSI, IDSO, IDSS, IDST, IDSE, IFNAME, & FLGRD(NOGRP,NGRPP,NRGRD), OT2(0:NRGRD), FLGD(NOGRP,NRGRD), & MDSF(-NRINP:NRGRD,JFIRST:9), IPRT(6,NRGRD), LPRT(NRGRD), & FLGR2(NOGRP,NGRPP,NRGRD),FLG2D(NOGRP,NGRPP), FLG1D(NOGRP), & - FLG2(NOGRP,NRGRD) & - ,OUTFF(7,0:NRGRD)) + FLG2(NOGRP,NRGRD),OUTFF(7,0:NRGRD)) ! MDS = -1 MDSF = -1 FLGR2 = .FALSE. + FLG2 = .FALSE. + LPRT = .FALSE. IPRT = 0 ! ! ... Fixed and recycleable unit numbers. @@ -4148,9 +4150,9 @@ SUBROUTINE WMINITNML ( IDSI, IDSO, IDSS, IDST, IDSE, IFNAME, & ! sources, and from communication rather than ! files. ! - ALLOCATE ( INAMES(2*NRGRD,-7:9), MNAMES(-NRINP:2*NRGRD), & - TMPRNK(2*NRGRD), TMPGRP(2*NRGRD), NINGRP(2*NRGRD), & - RP1(2*NRGRD), RPN(2*NRGRD), BCDTMP(NRGRD+1:2*NRGRD)) + ALLOCATE ( INAMES(2*NRGRD,-7:9), MNAMES(-NRINP:2*NRGRD), & + TMPRNK(2*NRGRD), TMPGRP(2*NRGRD), NINGRP(2*NRGRD), & + RP1(2*NRGRD), RPN(2*NRGRD), BCDTMP(NRGRD+1:2*NRGRD) ) ALLOCATE ( GRANK(NRGRD), GRGRP(NRGRD), USEINP(NRINP) ) ALLOCATE ( CPLINP(NRINP) ) GRANK = -1 @@ -4615,31 +4617,39 @@ SUBROUTINE WMINITNML ( IDSI, IDSO, IDSS, IDST, IDSE, IFNAME, & ! DO I=1, NRGRD IF ( MDSS.NE.MDSO .AND. NMPSCR.EQ.IMPROC ) WRITE (MDSS,950) TRIM(MNAMES(NRGRD+I)) - NOTYPE = 6 - + NOTYPE = 8 + ! OTYPE 1 READ(NML_OUTPUT_DATE(I)%FIELD%START, *) ODAT(1,I), ODAT(2,I) READ(NML_OUTPUT_DATE(I)%FIELD%STRIDE, *) ODAT(3,I) READ(NML_OUTPUT_DATE(I)%FIELD%STOP, *) ODAT(4,I), ODAT(5,I) READ(NML_OUTPUT_DATE(I)%FIELD%OUTFFILE, *) OUTFF(1,I) + ! OTYPE 2 READ(NML_OUTPUT_DATE(I)%POINT%START, *) ODAT(6,I), ODAT(7,I) READ(NML_OUTPUT_DATE(I)%POINT%STRIDE, *) ODAT(8,I) READ(NML_OUTPUT_DATE(I)%POINT%STOP, *) ODAT(9,I), ODAT(10,I) READ(NML_OUTPUT_DATE(I)%POINT%OUTFFILE, *) OUTFF(2,I) + ! OTYPE 3 READ(NML_OUTPUT_DATE(I)%TRACK%START, *) ODAT(11,I), ODAT(12,I) READ(NML_OUTPUT_DATE(I)%TRACK%STRIDE, *) ODAT(13,I) READ(NML_OUTPUT_DATE(I)%TRACK%STOP, *) ODAT(14,I), ODAT(15,I) + ! OTYPE 4 READ(NML_OUTPUT_DATE(I)%RESTART%START, *) ODAT(16,I), ODAT(17,I) READ(NML_OUTPUT_DATE(I)%RESTART%STRIDE, *) ODAT(18,I) READ(NML_OUTPUT_DATE(I)%RESTART%STOP, *) ODAT(19,I), ODAT(20,I) - READ(NML_OUTPUT_DATE(I)%RESTART2%START, *) ODAT(36,I), ODAT(37,I) - READ(NML_OUTPUT_DATE(I)%RESTART2%STRIDE, *) ODAT(38,I) - READ(NML_OUTPUT_DATE(I)%RESTART2%STOP, *) ODAT(39,I), ODAT(40,I) + !OTYPE 5 READ(NML_OUTPUT_DATE(I)%BOUNDARY%START, *) ODAT(21,I), ODAT(22,I) READ(NML_OUTPUT_DATE(I)%BOUNDARY%STRIDE, *) ODAT(23,I) READ(NML_OUTPUT_DATE(I)%BOUNDARY%STOP, *) ODAT(24,I), ODAT(25,I) + !OTYPE 6 READ(NML_OUTPUT_DATE(I)%PARTITION%START, *) ODAT(26,I), ODAT(27,I) READ(NML_OUTPUT_DATE(I)%PARTITION%STRIDE, *) ODAT(28,I) READ(NML_OUTPUT_DATE(I)%PARTITION%STOP, *) ODAT(29,I), ODAT(30,I) + !OTYPE 7 + ! for coupling but not implemented yet + !OTYPE 8 + READ(NML_OUTPUT_DATE(I)%RESTART2%START, *) ODAT(36,I), ODAT(37,I) + READ(NML_OUTPUT_DATE(I)%RESTART2%STRIDE, *) ODAT(38,I) + READ(NML_OUTPUT_DATE(I)%RESTART2%STOP, *) ODAT(39,I), ODAT(40,I) ! set the time stride at 0 or more ODAT(3,I) = MAX ( 0 , ODAT(3,I) ) @@ -4852,6 +4862,10 @@ SUBROUTINE WMINITNML ( IDSI, IDSO, IDSS, IDST, IDSE, IFNAME, & ! ! ... End of output type selecttion ELSE IF ! + ELSE IF ( J .EQ. 8 ) THEN + ! + ! 5.i Type 8: checkpoint files (no additional data) + ! END IF ! ! ... End of IF in 5.b @@ -4861,45 +4875,6 @@ SUBROUTINE WMINITNML ( IDSI, IDSO, IDSS, IDST, IDSE, IFNAME, & ! ... End of loop J on NOTYPE in 5.a ! END DO - !xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx - ! Checkpoint - J=8 - !OUTPTS(I)%FLOUT(8)=.FALSE. - IF ( ODAT(5*(J-1)+3,I) .NE. 0 ) THEN - !OUTPTS(I)%FLOUT(8)=.TRUE. - IF ( MDSS.NE.MDSO .AND. NMPSCR.EQ.IMPROC ) & - WRITE (MDSS,951) J, IDOTYP(J) - TTIME(1) = ODAT(5*(J-1)+1,I) - TTIME(2) = ODAT(5*(J-1)+2,I) - CALL STME21 ( TTIME , DTME21 ) - IF ( MDSS.NE.MDSO .AND. NMPSCR.EQ.IMPROC ) & - WRITE (MDSS,952) DTME21 - TTIME(1) = ODAT(5*(J-1)+4,I) - TTIME(2) = ODAT(5*(J-1)+5,I) - CALL STME21 ( TTIME , DTME21 ) - IF ( MDSS.NE.MDSO .AND. NMPSCR.EQ.IMPROC ) & - WRITE (MDSS,953) DTME21 - TTIME(1) = 0 - TTIME(2) = 0 - DTTST = REAL ( ODAT(5*(J-1)+3,I) ) - CALL TICK21 ( TTIME , DTTST ) - CALL STME21 ( TTIME , DTME21 ) - IF ( ( ODAT(5*(J-1)+1,I) .NE. ODAT(5*(J-1)+4,I) .OR. & - ODAT(5*(J-1)+2,I) .NE. ODAT(5*(J-1)+5,I) ) .AND. & - MDSS.NE.MDSO .AND. NMPSCR.EQ.IMPROC ) THEN - DO II=1, 18 - IF ( DTME21(II:II).NE.'0' .AND. & - DTME21(II:II).NE.'/' .AND. & - DTME21(II:II).NE.' ' .AND. & - DTME21(II:II).NE.':' ) EXIT - DTME21(II:II) = ' ' - END DO - WRITE (MDSS,954) DTME21(1:19) - END IF - !ELSE - !OUTPTS(I)%FLOUT(8) = .FALSE. - END IF - !xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ! ! ... End of loop I on NRGRD in 5.a ! @@ -5015,16 +4990,17 @@ SUBROUTINE WMINITNML ( IDSI, IDSO, IDSS, IDST, IDSE, IFNAME, & ! IF ( IOSTYP .GT. 1 ) THEN DO I=1, NRGRD + ! FIELD IF ( ODAT( 3,I) .GT. 0 ) NDPOUT(I) = NDPOUT(I) + 1 + ! TRACK IF ( ODAT(13,I) .GT. 0 ) NDPOUT(I) = NDPOUT(I) + 1 + ! PARTITION IF ( ODAT(28,I) .GT. 0 ) NDPOUT(I) = NDPOUT(I) + 1 - !xxx - ! Checkpoint - IF ( ODAT(38,I) .GT. 0 ) NDPOUT(I) = NDPOUT(I) + 1 - !xxx + ! POINT .OR. RESTART .OR. BOUNDARY IF ( ODAT( 8,I) .GT. 0 .OR. ODAT(18,I) .GT. 0 .OR. & - ODAT(23,I) .GT. 0 ) & - NDPOUT(I) = NDPOUT(I) + 1 + ODAT(23,I) .GT. 0 ) NDPOUT(I) = NDPOUT(I) + 1 + ! RESTART2 + IF ( ODAT(38,I) .GT. 0 ) NDPOUT(I) = NDPOUT(I) + 1 IF ( IOSTYP .EQ. 2 ) NDPOUT(I) = MIN ( 1 , NDPOUT(I) ) END DO END IF @@ -5437,11 +5413,12 @@ SUBROUTINE WMINITNML ( IDSI, IDSO, IDSS, IDST, IDSE, IFNAME, & ! ..... Model initialization ! IF ( MDSS.NE.MDSO .AND. NMPSC2.EQ.IMPROC ) WRITE (MDSS,982) - ! - CALL W3INIT ( I, .TRUE., MNAMES(I), MDS(:,I), NTRACE(:,I), ODAT(:,I), & + + CALL W3INIT ( I, .TRUE., MNAMES(I), MDS(:,I), NTRACE(:,I), & + ODAT(:,I), & FLGRD(:,:,I),FLGR2(:,:,I),FLGD(:,I),FLG2(:,I), & OT2(I)%NPTS, OT2(I)%X, OT2(I)%Y, OT2(I)%PNAMES, & - IPRT(:,I), LPRT(I), MPI_COMM_LOC ) + IPRT(:,I), LPRT(I), MPI_COMM_LOC) ! ! ..... Finalize I/O file hook up ! @@ -5533,6 +5510,9 @@ SUBROUTINE WMINITNML ( IDSI, IDSO, IDSS, IDST, IDSE, IFNAME, & IF ( MDSS.NE.MDSO .AND. NMPSC2.EQ.IMPROC ) WRITE (MDSS,983) CALL W3SETI ( I, MDSE, MDST ) ! + !!Li Stop modifying GTYPE from input forcing file. JGLi08Apr2021. + JJJ = GTYPE + ! ! ..... regular input files ! DO J=JFIRST, 6 @@ -5540,9 +5520,16 @@ SUBROUTINE WMINITNML ( IDSI, IDSO, IDSS, IDST, IDSE, IFNAME, & IDINP(I,J) = IDSTR(J) IF ( INPMAP(I,J) .LT. 0 ) CYCLE CALL W3FLDO ('READ', IDINP(I,J), MDSF(I,J), MDST, MDSE2,& - NX, NY, GTYPE, IERR, MNAMES(I), & + !!Li NX, NY, GTYPE, IERR, MNAMES(I), & + NX, NY, JJJ, IERR, MNAMES(I), & TRIM(FNMPRE) ) IF ( IERR .NE. 0 ) GOTO 2080 + ! + !!Li Print a warning message when GTYPE not matching forcing field one. + IF ( (JJJ .NE. GTYPE) .AND. (IMPROC .EQ. NMPSC2) ) & + WRITE (MDSE, *) ' *** Warning: grid', I, ' GTYPE=', & + GTYPE, ' not matching field', J, ' grid type', JJJ + ! IF ( MDSS.NE.MDSO .AND. NMPSC2.EQ.IMPROC ) & WRITE (MDSS,985) IDFLDS(J) ELSE @@ -5606,8 +5593,8 @@ SUBROUTINE WMINITNML ( IDSI, IDSO, IDSS, IDST, IDSE, IFNAME, & IF ( J.EQ.6 ) ALLOCATE ( WADATS(I)%RA0(NSEA) , & WADATS(I)%RAI(NSEA) ) ! - END IF - END DO + END IF ! IF ( INPMAP(I,J) .NE. 0 ) THEN + END DO ! DO J=JFIRST, 9 ! INFLAGS1 = TFLAGS CALL W3SETI ( I, MDSE, MDST ) @@ -5626,34 +5613,20 @@ SUBROUTINE WMINITNML ( IDSI, IDSO, IDSS, IDST, IDSE, IFNAME, & END IF END DO ! - ! Checkpoint - J=8 - OUTPTS(I)%FLOUT(8)=.FALSE. - IF ( ODAT(5*(J-1)+3,I) .NE. 0 ) THEN - OUTPTS(I)%FLOUT(8)=.TRUE. - ELSE - OUTPTS(I)%FLOUT(8)=.FALSE. - ENDIF - - IF ( FLOUT(J) ) THEN - IF ( TOUTP(1,I) .EQ. -1 ) THEN - TOUTP(:,I) = TONEXT(:,J) - ELSE - DTTST = DSEC21 ( TOUTP(:,I), TONEXT(:,J) ) - IF ( DTTST .LT. 0. ) TOUTP(:,I) = TONEXT(:,J) - ENDIF - END IF - ! - ! GRSTAT(I) = 0 TSYNC(:,I) = TIME(:) ! +#ifdef W3_SMC + ! Check GTYPE values after initialization + IF ( IMPROC .EQ. NMPERR ) WRITE(MDSE,*) "GRID IMPROC GTYPE", & + I, IMPROC, GRIDS(I)%GTYPE +#endif + ! #ifdef W3_T WRITE (MDST,9082) GRSTAT(I), TOUTP(:,I), TSYNC(:,I) #endif ! - END DO ! DO I=1, NRGRD - + END DO !! 8.a I-NRGRD loop ! #ifdef W3_MPI CALL MPI_BARRIER (MPI_COMM_MWAVE,IERR_MPI) @@ -5725,7 +5698,7 @@ SUBROUTINE WMINITNML ( IDSI, IDSO, IDSS, IDST, IDSE, IFNAME, & MPI_COMM_BCT, IERR_MPI ) IF ( MPI_COMM_GRD .EQ. MPI_COMM_NULL ) & GSU = W3GSUC( .FALSE., FLAGLL, ICLOSE, & - XGRD, YGRD) + XGRD, YGRD ) CALL MPI_BCAST ( DXDP, NX*NY, MPI_REAL, 0, & MPI_COMM_BCT, IERR_MPI ) CALL MPI_BCAST ( DXDQ, NX*NY, MPI_REAL, 0, & @@ -5854,7 +5827,8 @@ SUBROUTINE WMINITNML ( IDSI, IDSO, IDSS, IDST, IDSE, IFNAME, & ! DO I=1, NRGRD DO J=JFIRST, 9 - IF ( INPMAP(I,J) .LT. 0 ) IDINP(I,J) = IDINP( INPMAP(I,J),J) + IF ( INPMAP(I,J).LT.0 .AND. INPMAP(I,J).NE.-999) IDINP(I,J) = IDINP( INPMAP(I,J),J) + !IF ( INPMAP(I,J) .LT. 0 ) IDINP(I,J) = IDINP( INPMAP(I,J),J) IF ( INPMAP(I,J) .GT. 0 ) IDINP(I,J) = IDINP(-INPMAP(I,J),J) END DO END DO @@ -5983,7 +5957,7 @@ SUBROUTINE WMINITNML ( IDSI, IDSO, IDSS, IDST, IDSE, IFNAME, & ! 8.c.3 Relation to same ranked grids ! #ifdef W3_SMC - !! Check whether there is a SMC grid group. JGLi12Apr2021 + !! Check whether there is a SMC grid group. JGLi12Apr2021 NGRPSMC = 0 DO JJ=1, NRGRP J = 0 @@ -6173,7 +6147,8 @@ SUBROUTINE WMINITNML ( IDSI, IDSO, IDSS, IDST, IDSE, IFNAME, & IF ( TSTOUT ) CALL WMUDMP ( MDST, 0 ) ! DEALLOCATE ( MDS, NTRACE, ODAT, FLGRD, FLGR2, FLGD, FLG2, INAMES,& - MNAMES ) + MNAMES & + ,OUTFF ) ! #ifdef W3_MPI CALL MPI_BARRIER ( MPI_COMM_MWAVE, IERR_MPI ) From ca346a4cf3e41e0c2ae268061b727509acd6e18b Mon Sep 17 00:00:00 2001 From: ma05cde Date: Fri, 8 Sep 2023 13:54:54 +0000 Subject: [PATCH 2/4] -add scotch lib in matrix_cmake_datarmor -force CFX, CFD, CFK to be outputted as REAL if NCVARTYPE is set at 2 (=depends) --- model/src/ww3_ounf.F90 | 3 +++ regtests/bin/matrix_cmake_datarmor | 1 + 2 files changed, 4 insertions(+) diff --git a/model/src/ww3_ounf.F90 b/model/src/ww3_ounf.F90 index b77f9a9f9..73a460233 100644 --- a/model/src/ww3_ounf.F90 +++ b/model/src/ww3_ounf.F90 @@ -1973,14 +1973,17 @@ SUBROUTINE W3EXNC ( NX, NY, IX1, IXN, IY1, IYN, NSEA, & ! ! Maximum CFL for spatial advection ELSE IF ( IFI .EQ. 9 .AND. IFJ .EQ. 3 ) THEN + IF (NCVARTYPEI.EQ.3) NCVARTYPE=4 CALL S2GRID(CFLXYMAX, X1) ! ! Maximum CFL for direction advection ELSE IF ( IFI .EQ. 9 .AND. IFJ .EQ. 4 ) THEN + IF (NCVARTYPEI.EQ.3) NCVARTYPE=4 CALL S2GRID(CFLTHMAX, X1) ! ! Maximum CFL for frequency advection ELSE IF ( IFI .EQ. 9 .AND. IFJ .EQ. 5 ) THEN + IF (NCVARTYPEI.EQ.3) NCVARTYPE=4 CALL S2GRID(CFLKMAX, X1) ! ! User defined... diff --git a/regtests/bin/matrix_cmake_datarmor b/regtests/bin/matrix_cmake_datarmor index f8ffaaa63..4e635f3c2 100755 --- a/regtests/bin/matrix_cmake_datarmor +++ b/regtests/bin/matrix_cmake_datarmor @@ -112,6 +112,7 @@ main_dir="`cd $main_dir 1>/dev/null 2>&1 && pwd`" echo " export NETCDF_CONFIG=/home/datawork-wave/NETCDF2019/${COMP}/bin/nc-config" >> matrix.head echo " export NetCDF_ROOT=/home/datawork-wave/NETCDF2019/${COMP}" >> matrix.head echo " export METIS_PATH=/home/datawork-wave/PARMETIS2019/${COMP}" >> matrix.head + echo " export SCOTCH_PATH=/home/datawork-wave/LIB/SCOTCH/v7.0.3/${COMP}" >> matrix.head echo " export WW3_PARCOMPN=4" >> matrix.head echo " export G2_LIB4=/home/datawork-wave/NCEPLIBS/${COMP}/g2-3.4.5/lib64/libg2_4.a" >> matrix.head echo " export BACIO_LIB4=/home/datawork-wave/NCEPLIBS/${COMP}/bacio-2.4.1/lib/libbacio_4.a" >> matrix.head From e8e6c8bb025b50fc3409c3f7f31e3ee00f83a1cf Mon Sep 17 00:00:00 2001 From: ma05cde Date: Fri, 8 Sep 2023 13:59:16 +0000 Subject: [PATCH 3/4] - add test on ufs switch to enable corresponding regtests --- regtests/bin/matrix.base | 2 ++ 1 file changed, 2 insertions(+) diff --git a/regtests/bin/matrix.base b/regtests/bin/matrix.base index a273372a9..88e7ee835 100755 --- a/regtests/bin/matrix.base +++ b/regtests/bin/matrix.base @@ -2152,11 +2152,13 @@ # Global unstr case # Domain Decomposition Explicit fi + if [ "$ufs" = 'y' ] && [ "$pdlib" = 'y' ] && [ "$dist" = 'y' ]; then echo "$rtst -s MPI -s PDLIB -i input_unstr -w work_unstr_a -g a -f -p $mpi -n $np $ww3 ww3_ufs1.1" >> matrix.body # Domain Decomposition Block Explicit echo "$rtst -s MPI -s PDLIB -i input_unstr -w work_unstr_b -g b -f -p $mpi -n $np $ww3 ww3_ufs1.1" >> matrix.body # Domain Decomposition Implicit echo "$rtst -s MPI -s PDLIB -i input_unstr -w work_unstr_c -g c -f -p $mpi -n $np $ww3 ww3_ufs1.1" >> matrix.body + fi #Test of UFS applications with ww3_multi_esmf and grib2 output if [ "$ufs" = 'y' ] && [ "$esmf" = 'y' ] && [ "$grib" = 'y' ] From 0de4df5531baabb951a1a14a1bc912d3d10309fa Mon Sep 17 00:00:00 2001 From: ma05cde Date: Mon, 11 Sep 2023 10:28:30 +0000 Subject: [PATCH 4/4] -correct typo in ww3_ufs1.1/namelist*.nml -correct namelist in ww3_tp2.3 to enable TH1M and STH1M outputs -replace 'echo' by 'basename' in matrix_cmake_datarmor to restrict the search of keyword in the filename itself --- regtests/bin/run_cmake_test | 26 +++++++++---------- regtests/ww3_tp2.3/input/namelists_GARDEN.nml | 2 +- regtests/ww3_tp2.3/input/ww3_grid.inp | 2 +- .../ww3_ufs1.1/input_unstr/namelists_a.nml | 2 +- .../ww3_ufs1.1/input_unstr/namelists_b.nml | 2 +- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/regtests/bin/run_cmake_test b/regtests/bin/run_cmake_test index ec1503c55..a349240d8 100755 --- a/regtests/bin/run_cmake_test +++ b/regtests/bin/run_cmake_test @@ -628,7 +628,7 @@ then fi # link conf file - if [ $nml_input ] && [ ! -z "`echo ${ifile} | grep -o nml`" ] + if [ $nml_input ] && [ ! -z "`basename ${ifile} | grep -o nml`" ] then \rm -f $prog.nml \ln -s $ifile $prog.nml @@ -654,7 +654,7 @@ then if [ $multi -eq 2 ] then mv mod_def.ww3 mod_def.$g - if [ $nml_input ] && [ ! -z "`echo ${ifile} | grep -o nml`" ] + if [ $nml_input ] && [ ! -z "`basename ${ifile} | grep -o nml`" ] then mv $prog.nml.log ${prog}_$g.nml.log fi @@ -752,7 +752,7 @@ then then mv restart.ww3 restart.$g \rm -f mod_def.ww3 - if [ $nml_input ] && [ ! -z "`echo ${ifile} | grep -o nml`" ] + if [ $nml_input ] && [ ! -z "`basename ${ifile} | grep -o nml`" ] then mv $prog.nml.log ${prog}_$g.nml.log fi @@ -851,7 +851,7 @@ then then mv nest.ww3 nest.$g \rm -f mod_def.ww3 - if [ $nml_input ] && [ ! -z "`echo ${ifile} | grep -o nml`" ] + if [ $nml_input ] && [ ! -z "`basename ${ifile} | grep -o nml`" ] then mv $prog.nml.log ${prog}_$g.nml.log fi @@ -950,7 +950,7 @@ then then mv nest.ww3 nest.$g \rm -f mod_def.ww3 - if [ $nml_input ] && [ ! -z "`echo ${ifile} | grep -o nml`" ] + if [ $nml_input ] && [ ! -z "`basename ${ifile} | grep -o nml`" ] then mv $prog.nml.log ${prog}_$g.nml.log fi @@ -1054,7 +1054,7 @@ then then \rm -f mod_def.ww3 mv $otype.ww3 $otype.$g - if [ $nml_input ] && [ ! -z "`echo ${ifile} | grep -o nml`" ] + if [ $nml_input ] && [ ! -z "`basename ${ifile} | grep -o nml`" ] then mv $prog.nml.log ${prog}_$g.nml.log fi @@ -1178,7 +1178,7 @@ then then \rm -f mod_def.ww3 mv $otype.ww3 $otype.$g - if [ $nml_input ] && [ ! -z "`echo ${ifile} | grep -o nml`" ] + if [ $nml_input ] && [ ! -z "`basename ${ifile} | grep -o nml`" ] then mv $prog.nml.log ${prog}_$g.nml.log fi @@ -1301,7 +1301,7 @@ then then \rm -f mod_def.ww3 mv $otype.ww3 $otype.$g - if [ $nml_input ] && [ ! -z "`echo ${ifile} | grep -o nml`" ] + if [ $nml_input ] && [ ! -z "`basename ${ifile} | grep -o nml`" ] then mv $prog.nml.log ${prog}_$g.nml.log fi @@ -1445,7 +1445,7 @@ then \rm -f PET*.ESMF_LogFile \rm -f ww3_esmf.rc \cp -f ${path_i}/ww3_esmf.rc ww3_esmf.rc - if [ ! -z "`echo ${ifile} | grep -o nml`" ] + if [ ! -z "`basename ${ifile} | grep -o nml`" ] then echo "WAV_input_file_name: $prog.nml" >> ww3_esmf.rc fi @@ -1754,7 +1754,7 @@ do then \rm -f mod_def.ww3 \rm -f out_grd.ww3 - if [ $nml_input ] && [ ! -z "`echo ${ifile} | grep -o nml`" ] + if [ $nml_input ] && [ ! -z "`basename ${ifile} | grep -o nml`" ] then mv $prog.nml.log ${prog}_$g.nml.log fi @@ -1821,7 +1821,7 @@ do then \rm -f mod_def.ww3 \rm -f out_grd.ww3 - if [ $nml_input ] && [ ! -z "`echo ${ifile} | grep -o nml`" ] + if [ $nml_input ] && [ ! -z "`basename ${ifile} | grep -o nml`" ] then mv $prog.nml.log ${prog}_$g.nml.log fi @@ -1989,7 +1989,7 @@ do then \rm -f mod_def.ww3 \rm -f out_pnt.ww3 - if [ $nml_input ] && [ ! -z "`echo ${ifile} | grep -o nml`" ] + if [ $nml_input ] && [ ! -z "`basename ${ifile} | grep -o nml`" ] then mv $prog.nml.log ${prog}_$g.nml.log fi @@ -2125,7 +2125,7 @@ do if [ $multi -eq 2 ] then \rm -f track_o.ww3 - if [ $nml_input ] && [ ! -z "`echo ${ifile} | grep -o nml`" ] + if [ $nml_input ] && [ ! -z "`basename ${ifile} | grep -o nml`" ] then mv $prog.nml.log ${prog}_$g.nml.log fi diff --git a/regtests/ww3_tp2.3/input/namelists_GARDEN.nml b/regtests/ww3_tp2.3/input/namelists_GARDEN.nml index 04b929ca1..b8533ddda 100644 --- a/regtests/ww3_tp2.3/input/namelists_GARDEN.nml +++ b/regtests/ww3_tp2.3/input/namelists_GARDEN.nml @@ -1,4 +1,4 @@ -&OUTS E3D=1 / +&OUTS E3D=1, TH1MF=1, STH1MF=1 / &PRO2 DTIME=345600. / &PRO3 WDTHTH=1.50, WDTHCG=1.50 / END OF NAMELISTS diff --git a/regtests/ww3_tp2.3/input/ww3_grid.inp b/regtests/ww3_tp2.3/input/ww3_grid.inp index 9be443dbb..3a4271307 100644 --- a/regtests/ww3_tp2.3/input/ww3_grid.inp +++ b/regtests/ww3_tp2.3/input/ww3_grid.inp @@ -16,7 +16,7 @@ $ $ $ Activated up to one line per namelist !! $ - &OUTS E3D=1 / + &OUTS E3D=1, TH1MF=1, STH1MF=1 / $ &PRO2 DTIME= 0. / $ &PRO2 DTIME=172800. / &PRO2 DTIME=345600. / diff --git a/regtests/ww3_ufs1.1/input_unstr/namelists_a.nml b/regtests/ww3_ufs1.1/input_unstr/namelists_a.nml index 584405f2f..e28a03245 100644 --- a/regtests/ww3_ufs1.1/input_unstr/namelists_a.nml +++ b/regtests/ww3_ufs1.1/input_unstr/namelists_a.nml @@ -31,7 +31,7 @@ SDSHCK = 1.50, SDSBR = 0.9000E-03, SDSSTRAIN = 0.000, SDSP = 2.00, SDSISO = 2, SDSCOS =2.0, SDSDTH = 80.0, SDSBRF1 = 0.50, SDSBRFDF = 0, SDSBM0 = 1.00, SDSBM1 = 0.00, SDSBM2 = 0.00, SDSBM3 = 0.00, SDSBM4 = 0.00, -, WHITECAPWIDTH = 0.30/ +WHITECAPWIDTH = 0.30/ &SBT1 GAMMA = -0.6700E-01 / &SDB1 BJALFA = 1.000, BJGAM = 0.730, BJFLAG = .TRUE. / &PRO3 CFLTM = 0.70, WDTHCG = 1.50, WDTHTH = 1.50 / diff --git a/regtests/ww3_ufs1.1/input_unstr/namelists_b.nml b/regtests/ww3_ufs1.1/input_unstr/namelists_b.nml index 292ffc5f7..8d1c72eda 100644 --- a/regtests/ww3_ufs1.1/input_unstr/namelists_b.nml +++ b/regtests/ww3_ufs1.1/input_unstr/namelists_b.nml @@ -51,7 +51,7 @@ SDSHCK = 1.50, SDSBR = 0.9000E-03, SDSSTRAIN = 0.000, SDSP = 2.00, SDSISO = 2, SDSCOS =2.0, SDSDTH = 80.0, SDSBRF1 = 0.50, SDSBRFDF = 0, SDSBM0 = 1.00, SDSBM1 = 0.00, SDSBM2 = 0.00, SDSBM3 = 0.00, SDSBM4 = 0.00, -, WHITECAPWIDTH = 0.30/ +WHITECAPWIDTH = 0.30/ &SBT1 GAMMA = -0.6700E-01 / &SDB1 BJALFA = 1.000, BJGAM = 0.730, BJFLAG = .TRUE. / &PRO3 CFLTM = 0.70, WDTHCG = 1.50, WDTHTH = 1.50 /