Skip to content

Commit

Permalink
add regtests
Browse files Browse the repository at this point in the history
  • Loading branch information
JessicaMeixner-NOAA committed May 9, 2024
1 parent 0385448 commit 9548975
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
11 changes: 8 additions & 3 deletions model/src/w3iopomd.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1178,6 +1178,7 @@ SUBROUTINE W3IOPON_READ(IOTST, IMOD_IN, filename, ncerr)
#endif
integer :: v_aso, v_cao, v_cdo, v_iceo
integer :: v_iceho, v_icefo, v_grdid, v_spco
integer :: v_title_len, v_version_len
CHARACTER(LEN=31) :: IDTST
CHARACTER(LEN=10) :: VERTST

Expand All @@ -1193,10 +1194,14 @@ SUBROUTINE W3IOPON_READ(IOTST, IMOD_IN, filename, ncerr)
ncerr = nf90_open(filename, NF90_NOWRITE, fh)
if (nf90_err(ncerr) .ne. 0) return

! Read and check the version:
ncerr = nf90_get_att(fh, 'title', IDTST)
! Read and check the version:
ncerr = nf90_inquire_attribute(fh, NF90_GLOBAL, 'title', len = v_title_len)
if (nf90_err(ncerr) .ne. 0) return
ncerr = nf90_put_att(fh, 'version', VERTST)
ncerr = nf90_get_att(fh, NF90_GLOBAL, 'title', IDTST)
if (nf90_err(ncerr) .ne. 0) return
ncerr = nf90_inquire_attribute(fh, NF90_GLOBAL, 'version', len = v_version_len)
if (nf90_err(ncerr) .ne. 0) return
ncerr = nf90_get_att(fh, NF90_GLOBAL, 'version', VERTST)
if (nf90_err(ncerr) .ne. 0) return

IF ( IDTST .NE. IDSTR ) THEN
Expand Down
1 change: 1 addition & 0 deletions regtests/bin/matrix.base
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@
if [ "$prop2D" = 'y' ]
then
echo ' ' >> matrix.body
echo "$rtst -s PR1_MPI_BIN2NC -w work_PR1_MPI_BIN2NC -f -p $mpi -n $np $ww3 ww3_tp2.2" >> matrix.body
echo "$rtst -s PR1_MPI -w work_PR1_MPI -f -p $mpi -n $np $ww3 ww3_tp2.1" >> matrix.body
echo "$rtst -s PR1_MPI -w work_PR1_MPI -f -p $mpi -n $np $ww3 ww3_tp2.2" >> matrix.body
echo "$rtst -s PR1_MPI -w work_PR1_MPI -f -p $mpi -n $np $ww3 ww3_tp2.3" >> matrix.body
Expand Down
1 change: 1 addition & 0 deletions regtests/ww3_tp2.2/input/switch_PR1_MPI_BIN2NC
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
NOGRB DIST MPI PR1 FLX2 LN0 ST0 NL0 BT0 DB0 TR0 BS0 IC0 IS0 REF0 WNT1 WNX1 CRT1 CRX1 O0 O1 O2 O3 O4 O5 O6 O7 O10 O11 BIN2NC
2 changes: 1 addition & 1 deletion regtests/ww3_ufs1.1/input_unstr/switch_PDLIB
Original file line number Diff line number Diff line change
@@ -1 +1 @@
PDLIB SCOTCH NOGRB DIST MPI PR3 UQ FLX0 SEED ST4 STAB0 NL1 BT1 DB1 MLIM FLD1 TR0 BS0 WNX1 WNT1 CRX1 CRT1 O0 O1 O2 O3 O4 O5 O6 O7 O14 O15 IC0 IS0 REF0
PDLIB SCOTCH NOGRB DIST MPI PR3 UQ FLX0 SEED ST4 STAB0 NL1 BT1 DB1 MLIM FLD1 TR0 BS0 WNX1 WNT1 CRX1 CRT1 O0 O1 O2 O3 O4 O5 O6 O7 O14 O15 IC0 IS0 REF0 BIN2NC

0 comments on commit 9548975

Please sign in to comment.