Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pull from NOAA-EMC master #1

Merged
merged 4 commits into from
Mar 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion model/aux/bash/ww3_ounf_inp2nml.sh
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ cat >> $nmlfile << EOF
! FIELD%TIMESTRIDE = '0' ! Time stride for the output field
! FIELD%TIMESTOP = '29001231 000000' ! Stop date for the output field
! FIELD%TIMECOUNT = '1000000000' ! Number of time steps
! FIELD%TIMESPLIT = 6 ! [4(yearly),6(monthly),8(daily),10(hourly)]
! FIELD%TIMESPLIT = 6 ! [0(nodate),4(yearly),6(monthly),8(daily),10(hourly)]
! FIELD%LIST = 'unset' ! List of output fields
! FIELD%PARTITION = '0 1 2 3' ! List of wave partitions ['0 1 2 3 4 5']
! FIELD%SAMEFILE = T ! All the variables in the same file [T|F]
Expand Down
7 changes: 6 additions & 1 deletion model/bin/make_makefile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
shared mpp mpiexp thread GSE prop \
stress s_ln source stab s_nl snls s_bot s_db miche s_tr s_bs \
dstress s_ice s_is reflection s_xx \
wind windx rwind curr currx mgwind mgprop mggse \
wind windx wcor rwind curr currx mgwind mgprop mggse \
subsec tdyn dss0 pdif tide refrx ig rotag arctic nnt mprf \
cou oasis agcm ogcm igcm trknc setup pdlib memck uost
do
Expand Down Expand Up @@ -247,6 +247,11 @@
windx ) TY='one'
ID='wind interpolation in space'
OK='WNX0 WNX1 WNX2' ;;
#sort:wcor:
wcor ) TY='upto1'
ID='wind speed correction'
TS='WCOR'
OK='WCOR' ;;
#sort:rwind:
rwind ) TY='upto1'
ID='wind vs. current definition'
Expand Down
5 changes: 4 additions & 1 deletion model/ftn/w3triamd.ftn
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,10 @@ CONTAINS
DO IBC = 1, N_OUTSIDE_BOUNDARY
IX = OUTSIDE_BOUNDARY(IBC)
!write(*,*) 'TEST1', IX, TMPSTA(1,IX), CCON(IX), COUNTCON(IX), ZBIN(1,IX), ZLIM
IF (IX.NE.0) THEN ! There was a bug in the mesh conversion, OUTSIDE_BOUNDARY(IBC) should not be zero

! OUTSIDE_BOUNDARY(IBC) is defined over the full nodes NODES indexes
! whereas TMPSTA and ZBIN are defined over the clean up list of nodes NX
IF ((IX.NE.0).AND.(IX.LE.NX)) THEN
IF ((TMPSTA(1,IX).EQ.1).AND.(STATUS(IX).EQ.0) &
.AND.(ZBIN(1,IX).LT.ZLIM)) TMPSTA(1,IX)=2
END IF
Expand Down
19 changes: 10 additions & 9 deletions model/ftn/ww3_ounf.ftn
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,9 @@
IOUT, S3, IRET, HASNC4, &
NBIPART, CNTIPART, NCVARTYPE, IPART, &
RTDNX, RTDNY
INTEGER :: TOUT(2), TDUM(2), &
NCIDS(NOGRP,NGRPP,6), STOPDATE(8)
INTEGER :: TOUT(2), TDUM(2), STOPDATE(8)
!
INTEGER, ALLOCATABLE :: TABIPART(:)
INTEGER, ALLOCATABLE :: TABIPART(:), NCIDS(:,:,:)
!
!/S INTEGER, SAVE :: IENT = 0
!
Expand Down Expand Up @@ -383,6 +382,7 @@
! Alternative processing of TABIPART to capture requests
! greater than NOSWLL (C.Bunney):
ALLOCATE(TABIPART(NOSWLL + 1))
ALLOCATE(NCIDS(NOGRP,NGRPP,NOSWLL + 1))
NBIPART=0
DO I=1,30
IF(STRINGIPART(I:I) .EQ. ' ') CYCLE
Expand Down Expand Up @@ -874,17 +874,21 @@

! 1.2 Sets the date as ISO8601 convention
! S3 defines the number of characters in the date for the filename
! S3=4-> YYYY, S3=6 -> YYYYMM, S3=10 -> YYYYMMDDHH
! S3=0 -> field, S3=4-> YYYY, S3=6 -> YYYYMM, S3=10 -> YYYYMMDDHH
! Setups min and max date format
IF (S3.LT.4) S3=4
IF (S3.GT.0 .AND. S3.LT.4) S3=4
IF (S3.GT.10) S3=10
!
! Defines the format of FILETIME
S5=S3-8
S4=S3
OLDTIMEID=TIMEID
! if S3=>nodate then filetime='field'
IF (S3.EQ.0) THEN
S4=5
TIMEID="field"
! if S3=>YYYYMMDDHH then filetime='YYYYMMDDTHHZ'
IF (S3.EQ.10) THEN
ELSE IF (S3.EQ.10) THEN
S4=S4+2 ! add chars for ISO8601 : day T hours Z
WRITE(FORMAT1,'(A,I1,A,I1,A)') '(I8.8,A1,I',S5,'.',S5,',A1)'
WRITE (TIMEID,FORMAT1) TIME(1), 'T', &
Expand Down Expand Up @@ -3398,9 +3402,6 @@
FNAMENC(S1+S2+1:S1+S2+3) = '.nc'
FNAMENC(S1+S2+4:S1+S2+6) = ' '

!/NCO ! For NCEP application, requires fixed netcdf file name
!/NCO FNAMENC='ww3.gridded.nc'

! If the flag frequency is .TRUE., defines the fourth dimension
IF (FLFRQ) THEN
UNITVAR(:)=UNITS
Expand Down
1 change: 0 additions & 1 deletion model/ftn/ww3_shel.ftn
Original file line number Diff line number Diff line change
Expand Up @@ -1297,7 +1297,6 @@
ELSE IF ( J .EQ. 6 ) THEN
! IPRT: IX0, IXN, IXS, IY0, IYN, IYS
CALL NEXTLN ( COMSTR , NDSI , NDSEN )
READ (NDSI,*,END=2001,ERR=2002) IPRT, PRTFRM
!/DEBUGINIT write(740+IAPROC,*), 'Before reading IPRT'
!/DEBUGINIT write(740+IAPROC,*), 'Before read 2002, case 10'
READ (NDSI,*) IPRT, PRTFRM
Expand Down
2 changes: 1 addition & 1 deletion model/inp/ww3_ounf.inp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ $
$
$ -------------------------------------------------------------------- $
$ File prefix
$ number of characters in date [4(yearly),6(monthly),8(daily),10(hourly)]
$ number of characters in date [0(nodate),4(yearly),6(monthly),8(daily),10(hourly)]
$ IX and IY ranges [regular:IX NX IY NY, unstructured:IP NP 1 1]
$
ww3.
Expand Down
2 changes: 1 addition & 1 deletion model/nml/ww3_ounf.nml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
! FIELD%TIMESTART = '19000101 000000' ! Stop date for the output field
! FIELD%TIMESTRIDE = '0' ! Time stride for the output field
! FIELD%TIMECOUNT = '1000000000' ! Number of time steps
! FIELD%TIMESPLIT = 6 ! [4(yearly),6(monthly),8(daily),10(hourly)]
! FIELD%TIMESPLIT = 6 ! [0(nodate),4(yearly),6(monthly),8(daily),10(hourly)]
! FIELD%LIST = 'unset' ! List of output fields
! FIELD%PARTITION = '0 1 2 3' ! List of wave partitions ['0 1 2 3 4 5']
! FIELD%SAMEFILE = T ! All the variables in the same file
Expand Down
6 changes: 3 additions & 3 deletions regtests/bin/matrix.base
Original file line number Diff line number Diff line change
Expand Up @@ -1965,9 +1965,9 @@
echo ' ' >> matrix.body
if [ "$dist" = 'y' ]
then
echo "$rtst -s MPI -w work_rg_shel_MPI -i input_rg_shel $ww3 ww3_ts4" >> matrix.body
echo "$rtst -s MPI -w work_rg_multi_MPI -i input_rg_multi -m grdset $ww3 ww3_ts4" >> matrix.body
echo "$rtst -s MPI -w work_ug_MPI -i input_ug $ww3 ww3_ts4" >> matrix.body
echo "$rtst -s MPI -w work_rg_shel_MPI -i input_rg_shel -f -p $mpi -n $np $ww3 ww3_ts4" >> matrix.body
echo "$rtst -s MPI -w work_rg_multi_MPI -i input_rg_multi -m grdset -f -p $mpi -n $np $ww3 ww3_ts4" >> matrix.body
echo "$rtst -s MPI -w work_ug_MPI -i input_ug -f -p $mpi -n $np $ww3 ww3_ts4" >> matrix.body
else
echo "$rtst -w work_rg_shel -i input_rg_shel $ww3 ww3_ts4" >> matrix.body
echo "$rtst -w work_rg_multi -i input_rg_multi -m grdset $ww3 ww3_ts4" >> matrix.body
Expand Down
30 changes: 18 additions & 12 deletions regtests/bin/matrix.comp
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,21 @@
# 1. Set up
# 1.a Computer/ user dependent set up

if [ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ]
then
printf "\n ERROR ABORTING \n"
printf "\n matrix.comp requires 3 arguments: "
printf " 1: test type (eg, all or test-name), 2: base directory and 3: reference directory. \n"
printf "\n Usage:"
printf " ./bin/matrix.comp all basedir compdir \n\n"
exit
fi

ctest=$1
base_dir=$2
comp_dir=$3
home_dir=`pwd`
base_dir='.'
comp_dir='../../EMC_ww3_master/regtests'

rm -rf $home_dir/output
rm -f $home_dir/matrixDiff.out

Expand Down Expand Up @@ -58,18 +70,12 @@
echo '**********************************************************************' >> $home_dir/fulldiff.tmp


if [ "$#" != '1' ] ; then
echo "usage: matrix.comp test"
echo " test can be 'all'" ; exit 1 ; fi

test=$1

if [ "$test" = 'all' ] ; then
test=`ls -d ww3_tp1.? ww3_tp2.? ww3_ts? ww3_tbt1.? ww3_tbt2.? ww3_tic1.? ww3_tic2.? ww3_tig1.? ww3_tp2.1? mww3_test_0?` ; fi
if [ "$ctest" = 'all' ] ; then
ctest=`ls -d ww3_tp1.? ww3_tp2.? ww3_ts? ww3_tbt1.? ww3_tbt2.? ww3_tic1.? ww3_tic2.? ww3_tig1.? ww3_tp2.1? mww3_test_0?` ; fi
echo "base directory : $base_dir" >> $home_dir/header.tmp
echo "comp directory : $comp_dir" >> $home_dir/header.tmp
echo "test(s) : " >> $home_dir/header.tmp
echo $test >> $home_dir/header.tmp
echo $ctest >> $home_dir/header.tmp
echo " " >> $home_dir/header.tmp

cat $home_dir/header.tmp
Expand All @@ -84,7 +90,7 @@
# 2. Looping over tests #
# --------------------------------------------------------------------------- #

for tst in $test
for tst in $ctest
do
cd $home_dir ; cd $base_dir
if [ ! -d $tst ]
Expand Down
157 changes: 157 additions & 0 deletions regtests/bin/matrix_ncep
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
#!/bin/bash
# --------------------------------------------------------------------------- #
# matrix.go: Run matrix of regression tests on target machine. #
# #
# Remarks: #
# - This version is set up for automatic w3_setenv script and for the #
# NOAA RDHPC 'zeus' system. When using this for your own setup and #
# computer, please copy rather than modify. #
# #
# Hendrik L. Tolman #
# August 2013 #
# December 2013 #
# April 2018 #
# #
# Copyright 2013 National Weather Service (NWS), #
# National Oceanic and Atmospheric Administration. All rights #
# reserved. WAVEWATCH III is a trademark of the NWS. #
# No unauthorized use without permission. #
# #
# --------------------------------------------------------------------------- #
# 0. Environment file

source $(dirname $0)/../../model/bin/w3_setenv
main_dir=$WWATCH3_DIR
temp_dir=$WWATCH3_TMP
source=$WWATCH3_SOURCE
list=$WWATCH3_LIST

echo "Main directory : $main_dir"
echo "Scratch directory : $temp_dir"
echo "Save source codes : $source"
echo "Save listings : $list"

# Set batchq queue to define headers etc (default to original version if empty)
batchq="slurm"

# 1. Set up
# 1.a Computer/ user dependent set up

echo '#!/bin/sh --login' > matrix.head
echo ' ' >> matrix.head
if [ $batchq = "slurm" ]
then
echo '#SBATCH -n 24' >> matrix.head
echo '#SBATCH -q batch' >> matrix.head
echo '#SBATCH -t 08:00:00' >> matrix.head
echo '#SBATCH -A marine-cpu' >> matrix.head
echo '#SBATCH -J ww3_regtest' >> matrix.head
echo '#SBATCH -o matrix.out' >> matrix.head
else
echo '#PBS -l procs=24' >> matrix.head
echo '#PBS -q batch' >> matrix.head
echo '#PBS -l walltime=08:00:00' >> matrix.head
echo '#PBS -A marine-cpu' >> matrix.head
echo '#PBS -N ww3_regtest' >> matrix.head
echo '#PBS -j oe' >> matrix.head
echo '#PBS -o matrix.out' >> matrix.head
echo ' ' >> matrix.head
fi
echo " cd $(dirname $main_dir)/regtests" >> matrix.head
echo ' ' >> matrix.head

# Netcdf and Parmetis modules & variables

istheia=`hostname | grep tfe`
if [ $istheia ]
then
modcomp='intel/14.0.2'
modmpi='impi/5.1.2.150'
modnetcdf='netcdf/4.3.0'
fi

echo " module load $modcomp $modmpi $modnetcdf" >> matrix.head
echo " export WWATCH3_NETCDF=NC4" >> matrix.head
echo " export NETCDF_CONFIG=`which nc-config`" >> matrix.head
echo " export METIS_PATH=/scratch3/NCEPDEV/stmp2/Jessica.Meixner/parmetis-4.0.3" >> matrix.head
echo " export WW3_PARCOMPN=4" >> matrix.head
echo ' '

# Compiler option. Choose appropriate compiler and set cmplOption to
# y if using for the first time or using a different compiler

cmplr=Intel
export cmplOption='y'

if [ "$batchq" = 'slurm' ]
then
export mpi='srun'
else
export mpi='mpirun'
fi
export np='24'
export nr='4'
export nth='6'
# Compile option
if [ "$cmplOption" = 'y' ]
then
opt="-c $cmplr -S -T"
else
opt="-S"
fi
# Batch queue option
if [ "$batchq" = 'slurm' ]
then
opt="-b $batchq $opt"
fi

# Base run_test command line
export rtst="./bin/run_test $opt"

export ww3='../model'

# 1.b Flags to do course selection - - - - - - - - - - - - - - - - - - - - - -
# Addition selection by commenting out lines as below

export shrd='y' # Do shared architecture tests
export dist='y' # Do distributed architecture (MPI) tests
export omp='y' # Threaded (OpenMP) tests
export hybd='n' # Hybrid options

export prop1D='y' # 1-D propagation tests (ww3_tp1.X)
export prop2D='y' # 2-D propagation tests (ww3_tp2.X)
export time='y' # time linmited growth
export fetch='y' # fetch linmited growth
export hur1mg='y' # Hurricane with one moving grid
export shwtr='y' # shallow water tests
export unstr='y' # unstructured grid tests
export pdlib='y' # unstr with pdlib for domain decomposition and implicit solver
export smcgr='y' # SMC/Rotated grid test
export mudice='y' # Mud/Ice and wave interaction tests
export infgrv='y' # Second harmonic generation tests
export uost='y' # ww3_ts4 Unresolved Obstacles Source Term (UOST)
export assim='y' # Restart spectra update

export multi01='y' # mww3_test_01 (wetting and drying)
export multi02='y' # mww3_test_02 (basic two-way nesting test))
export multi03='y' # mww3_test_03 (three high and three low res grids).
export multi04='y' # mww3_test_04 (swell on sea mount and/or current)
export multi05='y' # mww3_test_05 (three-grid moving hurricane)
export multi06='y' # mww3_test_06 (curvilinear grid tests)
export multi07='y' # mww3_test_07 (unstructured grid tests)
export multi08='y' # mww3_test_08 (wind and ice tests)

# export filter='PR3 ST2 UQ'
# The filter does a set of consecutinve greps on the
# command lines generated by filter.base with the above
# selected options.

# --------------------------------------------------------------------------- #
# 2. Execute matrix.base ... #
# --------------------------------------------------------------------------- #

$main_dir/../regtests/bin/matrix.base

# --------------------------------------------------------------------------- #
# End to the matrix #
# --------------------------------------------------------------------------- #
Loading