Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/jasonfleming/asgs
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonfleming committed Jun 17, 2019
2 parents 7ae574a + 47bd6bd commit f127270
Show file tree
Hide file tree
Showing 5 changed files with 248 additions and 50 deletions.
25 changes: 9 additions & 16 deletions config/tests/asgs_config_nam_swan_hatteras_ec95d.sh
Expand Up @@ -28,9 +28,9 @@
# Fundamental

INSTANCENAME=dailyec95d # "name" of this ASGS process
COLDSTARTDATE=2019042000 # calendar year month day hour YYYYMMDDHH24
HOTORCOLD=coldstart # "hotstart" or "coldstart"
LASTSUBDIR=null # path to previous execution (if HOTORCOLD=hotstart)
COLDSTARTDATE=auto # calendar year month day hour YYYYMMDDHH24
HOTORCOLD=hotstart # "hotstart" or "coldstart"
LASTSUBDIR=http://adcircvis.tacc.utexas.edu:8080/thredds/fileServer/asgs/2019/nam/2019061018/ec95d/lonestar.tacc.utexas.edu/dailyec95d/namforecast/fort.68.nc # path to previous execution (if HOTORCOLD=hotstart)
HINDCASTLENGTH=14.0 # length of initial hindcast, from cold (days)
REINITIALIZESWAN=no # used to bounce the wave solution

Expand All @@ -41,7 +41,6 @@ SWANDIR=~/adcirc-cg/jasonfleming/v53release/swan # SWAN executables
SCRIPTDIR=~/asgs/jasonfleming/master # ASGS executables
INPUTDIR=$SCRIPTDIR/input/meshes/ec95d # grid and other input files
OUTPUTDIR=${SCRIPTDIR}/output # post processing scripts
PERL5LIB=${SCRIPTDIR}/PERL # DateCale.pm perl module

# Physical forcing

Expand Down Expand Up @@ -149,19 +148,13 @@ NOTIFYUSER=jason.g.fleming@gmail.com
ASGSADMIN=jason.fleming@seahorsecoastal.com

# Monitoring

RMQMessaging_Enable="off" # enables message generation ("on" | "off")
RMQMessaging_Transmit="off" # enables message transmission ("on" | "off")
RMQMessaging_Script="${SCRIPTDIR}/monitoring/asgs-msgr.py"
RMQMessaging_NcoHome="/home/jgflemin"
RMQMessaging_Python="/usr/local/packages/python/2.7.12-anaconda/bin/python"
# (use defaults from platforms.sh)

# Post processing and publication

INTENDEDAUDIENCE=general
INITPOST=null_init_post.sh
POSTPROCESS=cera_post.sh
#POSTPROCESS=null_post.sh
POSTPROCESS2=null_post.sh

# opendap
Expand All @@ -179,13 +172,13 @@ TARGET=hatteras # used in post processing to pick up HPC platform config
# OPENDAPNOTIFY is used by opendap_post.sh and could be regrouped with the
# other notification parameters above.
#OPENDAPNOTIFY="asgs.cera.lsu@gmail.com,jason.g.fleming@gmail.com"
OPENDAPNOTIFY="asgs.cera.lsu@gmail.com,jason.fleming@seahorsecoastal.com"
OPENDAPNOTIFY="asgs.cera.lsu@gmail.com,jason.g.fleming@gmail.com"

# Archiving

ARCHIVE=null_archive.sh
ARCHIVEBASE=/corral-tacc/utexas/hurricane/ASGS
ARCHIVEDIR=null
ARCHIVE=enstorm_pedir_removal.sh
ARCHIVEBASE=/corral-tacc/utexas/hurricane/ASGS/2019
ARCHIVEDIR=nam

# Forecast ensemble members

Expand All @@ -204,7 +197,7 @@ case $si in
CONTROLTEMPLATE=ec_95_nowindreduction.fort.15_template
CONTROLPROPERTIES=${CONTROLTEMPLATE}.properties
TIMESTEPSIZE=900.0 # 15 minute time steps
NCPU=47 # dramatically reduced resource requirements
NCPU=15 # dramatically reduced resource requirements
NUMWRITERS=1 # multiple writer procs might collide
WAVES=off # deactivate wave forcing
# turn off water surface elevation station output
Expand Down
13 changes: 4 additions & 9 deletions config/tests/asgs_config_nam_swan_stampede2_ec95d.sh
Expand Up @@ -153,12 +153,7 @@ NOTIFYUSER=jason.g.fleming@gmail.com
ASGSADMIN=jason.fleming@seahorsecoastal.com

# Monitoring

RMQMessaging_Enable="off" # enables message generation ("on" | "off")
RMQMessaging_Transmit="off" # enables message transmission ("on" | "off")
RMQMessaging_Script="${SCRIPTDIR}/monitoring/asgs-msgr.py"
RMQMessaging_NcoHome="/home/jgflemin"
RMQMessaging_Python="/usr/local/packages/python/2.7.12-anaconda/bin/python"
# (use defaults from platforms.sh)

# Post processing and publication

Expand Down Expand Up @@ -187,9 +182,9 @@ OPENDAPNOTIFY="asgs.cera.lsu@gmail.com,jason.fleming@seahorsecoastal.com"

# Archiving

ARCHIVE=null_archive.sh
ARCHIVEBASE=/corral-tacc/utexas/hurricane/ASGS
ARCHIVEDIR=null
ARCHIVE=enstorm_pedir_removal.sh
ARCHIVEBASE=/corral-tacc/utexas/hurricane/ASGS/2019
ARCHIVEDIR=nam

# Forecast ensemble members

Expand Down
230 changes: 230 additions & 0 deletions config/tests/asgs_config_nam_swan_supermic_ec95d.sh
@@ -0,0 +1,230 @@
#!/bin/sh
#-------------------------------------------------------------------
# config.sh: This file is read at the beginning of the execution of the ASGS to
# set up the runs that follow. It is reread at the beginning of every cycle,
# every time it polls the datasource for a new advisory. This gives the user
# the opportunity to edit this file mid-storm to change config parameters
# (e.g., the name of the queue to submit to, the addresses on the mailing list,
# etc)
#-------------------------------------------------------------------
#
# Copyright(C) 2016--2019 Jason Fleming
#
# This file is part of the ADCIRC Surge Guidance System (ASGS).
#
# The ASGS is free software: you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later
# version.
#
# ASGS is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# the ASGS. If not, see <http://www.gnu.org/licenses/>.
#-------------------------------------------------------------------

# Fundamental

INSTANCENAME=dailyec95d # "name" of this ASGS process
COLDSTARTDATE=auto # calendar year month day hour YYYYMMDDHH24
HOTORCOLD=hotstart # "hotstart" or "coldstart"
LASTSUBDIR=http://adcircvis.tacc.utexas.edu:8080/thredds/fileServer/asgs/2019/nam/2019061018/ec95d/lonestar.tacc.utexas.edu/dailyec95d/namforecast # path to previous execution (if HOTORCOLD=hotstart)
HINDCASTLENGTH=14.0 # length of initial hindcast, from cold (days)
REINITIALIZESWAN=no # used to bounce the wave solution

# Source file paths

ADCIRCDIR=~/adcirc-cg/jasonfleming/v53release/work # ADCIRC executables
SWANDIR=~/adcirc-cg/jasonfleming/v53release/swan # SWAN executables
SCRIPTDIR=~/asgs/jasonfleming/master # ASGS executables
INPUTDIR=$SCRIPTDIR/input/meshes/ec95d # grid and other input files
OUTPUTDIR=${SCRIPTDIR}/output # post processing scripts

# Physical forcing

BACKGROUNDMET=on # NAM download/forcing
TIDEFAC=on # tide factor recalc
TROPICALCYCLONE=off # tropical cyclone forcing
WAVES=on # wave forcing
VARFLUX=off # variable river flux forcing

# Computational Resources

TIMESTEPSIZE=30 # adcirc time step size (seconds)
SWANDT=1200 # swan time step size (seconds)
HINDCASTWALLTIME="02:00:00" # hindcast wall clock time
ADCPREPWALLTIME="02:00:00" # adcprep wall clock time, including partmesh
NOWCASTWALLTIME="02:00:00" # longest nowcast wall clock time
FORECASTWALLTIME="02:00:00" # forecast wall clock time
NCPU=19 # number of compute CPUs for all simulations
NUMWRITERS=1
NCPUCAPACITY=40
CYCLETIMELIMIT="99:00:00"

# External data sources : Tropical cyclones

STORM=99 # storm number, e.g. 05=ernesto in 2006
YEAR=2017 # year of the storm
TRIGGER=rssembedded # either "ftp" or "rss"
RSSSITE=filesystem
FTPSITE=filesystem
FDIR=${INPUTDIR}/sample_advisories
HDIR=${INPUTDIR}/sample_advisories
#RSSSITE=www.nhc.noaa.gov # site information for retrieving advisories
#FTPSITE=ftp.nhc.noaa.gov # hindcast/nowcast ATCF formatted files
#FDIR=/atcf/afst # forecast dir on nhc ftp site
#HDIR=/atcf/btk # hindcast dir on nhc ftp site

# External data sources : Background Meteorology

FORECASTCYCLE="00,06,12,18"
BACKSITE=ftp.ncep.noaa.gov # NAM forecast data from NCEP
BACKDIR=/pub/data/nccf/com/nam/prod # contains the nam.yyyymmdd files
FORECASTLENGTH=84 # hours of NAM forecast to run (max 84)
PTFILE=ptFile_oneEighth.txt # the lat/lons for the OWI background met
ALTNAMDIR="/projects/ncfs/data/asgs5463","/projects/ncfs/data/asgs14174"

# External data sources : River Flux

RIVERSITE=ftp.nssl.noaa.gov
RIVERDIR=/projects/ciflow/adcirc_info

# Input files and templates

GRIDFILE=ec_95d.grd # mesh (fort.14) file
GRIDNAME=ec95d
MESHPROPERTIES=${GRIDFILE}.properties
CONTROLTEMPLATE=ec_95_fort.15_template # fort.15 template
CONTROLPROPERTIES=${CONTROLTEMPLATE}.properties
ELEVSTATIONS=cera_stations.txt
VELSTATIONS=cera_stations.txt
METSTATIONS=cera_stations.txt
NAFILE=null
NAPROPERTIES=${NAFILE}.properties
SWANTEMPLATE=fort.26.nolimiter.template # only used if WAVES=on
RIVERINIT=null # this mesh has no rivers ...
RIVERFLUX=null
HINDCASTRIVERFLUX=null
PREPPEDARCHIVE=prepped_${GRIDNAME}_${INSTANCENAME}_${NCPU}.tar.gz
HINDCASTARCHIVE=prepped_${GRIDNAME}_hc_${INSTANCENAME}_${NCPU}.tar.gz

# Output files

# water surface elevation station output
FORT61="--fort61freq 900.0 --fort61netcdf"
# water current velocity station output
FORT62="--fort62freq 0"
# full domain water surface elevation output
FORT63="--fort63freq 3600.0 --fort63netcdf"
# full domain water current velocity output
FORT64="--fort64freq 3600.0 --fort64netcdf"
# met station output
FORT7172="--fort7172freq 900.0 --fort7172netcdf"
# full domain meteorological output
FORT7374="--fort7374freq 3600.0 --fort7374netcdf"
#SPARSE="--sparse-output"
SPARSE=""
NETCDF4="--netcdf4"
OUTPUTOPTIONS="${SPARSE} ${NETCDF4} ${FORT61} ${FORT62} ${FORT63} ${FORT64} ${FORT7172} ${FORT7374}"
# fulldomain or subdomain hotstart files
HOTSTARTCOMP=fulldomain
# binary or netcdf hotstart files
HOTSTARTFORMAT=netcdf
# "continuous" or "reset" for maxele.63 etc files
MINMAX=reset

# Notification

EMAILNOTIFY=yes # yes to have host HPC platform email notifications
NOTIFY_SCRIPT=ut-nam-notify.sh
ACTIVATE_LIST=null
NEW_ADVISORY_LIST=null
POST_INIT_LIST=null
POST_LIST=null
JOB_FAILED_LIST="jason.fleming@seahorsecoastal.com"
NOTIFYUSER=jason.g.fleming@gmail.com
ASGSADMIN=jason.fleming@seahorsecoastal.com

# Monitoring
# (use defaults from platforms.sh)

# Post processing and publication

INTENDEDAUDIENCE=general
INITPOST=null_init_post.sh
POSTPROCESS=cera_post.sh
#POSTPROCESS=null_post.sh
POSTPROCESS2=null_post.sh

# opendap
TDS=(renci_tds)
# FIXME: TARGET should be automatic
TARGET=supermic # used in post processing to pick up HPC platform config
# You must first have your ssh public key in ~/.ssh/authorized_keys2 file
# on the opendap server machine in order to scp files there via
# opendap_post.sh. OPENDAPHOST is set to each value in the TDS array specified
# above and used by your post processing script to successively trigger
# configuration via platforms.sh. The OPENDAPUSER parameter needs to be set
# here, rather than in platforms.sh or your post processing script,
# because multiple Operators may be posting to a particular opendap server
# using different usernames.
# OPENDAPNOTIFY is used by opendap_post.sh and could be regrouped with the
# other notification parameters above.
#OPENDAPNOTIFY="asgs.cera.lsu@gmail.com,jason.g.fleming@gmail.com"
OPENDAPNOTIFY="asgs.cera.lsu@gmail.com,jason.g.fleming@gmail.com"

# Archiving

ARCHIVE=enstorm_pedir_removal.sh
ARCHIVEBASE=/work/$USER
ARCHIVEDIR=null

# Forecast ensemble members

RMAX=default
PERCENT=default
ENSEMBLESIZE=2 # number of storms in the ensemble
case $si in
-1)
# do nothing ... this is not a forecast
;;

0)
ENSTORM=namforecastWind10m
ADCPREPWALLTIME="00:20:00" # adcprep wall clock time, including partmesh
FORECASTWALLTIME="00:20:00" # forecast wall clock time
CONTROLTEMPLATE=ec_95_nowindreduction.fort.15_template
CONTROLPROPERTIES=${CONTROLTEMPLATE}.properties
TIMESTEPSIZE=900.0 # 15 minute time steps
NCPU=19 # dramatically reduced resource requirements
NUMWRITERS=1 # multiple writer procs might collide
WAVES=off # deactivate wave forcing
# turn off water surface elevation station output
FORT61="--fort61freq 0"
# turn off water current velocity station output
FORT62="--fort62freq 0"
# turn off full domain water surface elevation output
FORT63="--fort63freq 0"
# turn off full domain water current velocity output
FORT64="--fort64freq 0"
# met station output
FORT7172="--fort7172freq 900.0 --fort7172netcdf"
# full domain meteorological output
FORT7374="--fort7374freq 3600.0 --fort7374netcdf"
#SPARSE="--sparse-output"
SPARSE=""
NETCDF4="--netcdf4"
OUTPUTOPTIONS="${SPARSE} ${NETCDF4} ${FORT61} ${FORT62} ${FORT63} ${FORT64} ${FORT7172} ${FORT7374}"
# prevent collisions in prepped archives
PREPPEDARCHIVE=prepped_${GRIDNAME}_${INSTANCENAME}_${NCPU}.tar.gz
POSTPROCESS=null_post.sh
;;
1)
ENSTORM=namforecast
;;
*)
echo "CONFIGRATION ERROR: Unknown ensemble member number: '$si'."
;;
esac
28 changes: 4 additions & 24 deletions output/opendap_post.sh
Expand Up @@ -36,7 +36,7 @@ FILES=("$9") # array of files to post to opendap
THIS="opendap_post.sh-->$SERVER"
declare -A properties
# get loadProperties function
SCRIPTDIR=`sed -n 's/[ ^]*$//;s/config.path.scriptdir\s*:\s*//p' run.properties 2>>$SYSLOG`
SCRIPTDIR=`sed -n 's/[ ^]*$//;s/path.scriptdir\s*:\s*//p' run.properties 2>>$SYSLOG`
source $SCRIPTDIR/properties.sh
# load run.properties file into associative array
loadProperties
Expand All @@ -54,7 +54,7 @@ ASGSADMIN=`grep "notification.email.asgsadmin" ${STORMDIR}/run.properties | sed
## grab all config info
. ${CONFIG}
# Bring in logging functions
. ${SCRIPTDIR}/monitoring/monitoring/logging.sh
. ${SCRIPTDIR}/monitoring/logging.sh
# Bring in platform-specific configuration
. ${SCRIPTDIR}/platforms.sh
# dispatch environment (using the functions in platforms.sh)
Expand Down Expand Up @@ -165,6 +165,7 @@ case $OPENDAPPOSTMETHOD in
serverAliveInterval=10
timeoutRetryLimit=3
sshOptions="$OPENDAPHOST -l $OPENDAPUSER -p $SSHPORT -o ServerAliveInterval=$serverAliveInterval -o StrictHostKeyChecking=no -o ConnectTimeout=60"
scpOptions="-P $SSHPORT -o ServerAliveInterval=$serverAliveInterval -o StrictHostKeyChecking=no -o ConnectTimeout=60"
logMessage "$ENSTORM: $THIS: Transferring files to $OPENDAPDIR on $OPENDAPHOST as user $OPENDAPUSER."
retry=0
while [[ $retry -lt $timeoutRetryLimit ]]; do
Expand All @@ -185,27 +186,6 @@ case $OPENDAPPOSTMETHOD in
done
# add code to create write permissions on directories so that other
# Operators can post results to the same directories
<<<<<<< HEAD
#ssh $OPENDAPHOST -l $OPENDAPUSER -p $SSHPORT "chmod a+w $OPENDAPBASEDIR" 2>> $SYSLOG
#ssh $OPENDAPHOST -l $OPENDAPUSER -p $SSHPORT "chmod a+w $OPENDAPBASEDIR/$STORMNAMEPATH" 2>> $SYSLOG
ssh $OPENDAPHOST -l $OPENDAPUSER -p $SSHPORT "chmod -R a+x $OPENDAPBASEDIR/$STORMNAMEPATH" 2>> $SYSLOG
ssh $OPENDAPHOST -l $OPENDAPUSER -p $SSHPORT "chmod -R a+w $OPENDAPBASEDIR/$STORMNAMEPATH" 2>> $SYSLOG
if [[ $? != 0 ]]; then
warn "$ENSTORM: $THIS: Failed to change permissions on the directory $OPENDAPBASEDIR/$STORMNAMEPATH on the remote machine ${OPENDAPHOST}."
threddsPostStatus=fail
fi
#
# add a symbolic link for the storm name if this is tropicalcyclone forcing
if [[ $TOPICALCYCLONE != off ]]; then
ssh $OPENDAPHOST -l $OPENDAPUSER -p $SSHPORT "ln -s $OPENDAPBASEDIR/$STORMNAMEPATH $OPENDAPBASEDIR/$ALTSTORMNAMEPATH" 2>> $SYSLOG
if [[ $? != 0 ]]; then
warn "$ENSTORM: $THIS: Failed to create symbolic link for the storm name."
threddsPostStatus=fail
fi
fi
#
# now scp the files
=======
retry=0
while [[ $retry -lt $timeoutRetryLimit ]]; do
ssh $sshOptions "chmod -R a+w $OPENDAPBASEDIR/$STORMNAMEPATH/$ADVISORY" 2>> $SYSLOG
Expand Down Expand Up @@ -257,7 +237,7 @@ case $OPENDAPPOSTMETHOD in
logMessage "$ENSTORM: $THIS: Transferring $file to ${OPENDAPHOST}."
retry=0
while [[ $retry -lt $timeoutRetryLimit ]]; do
scp -P $SSHPORT -o ServerAliveInterval=$serverAliveInterval -o StrictHostKeyChecking=no -o ConnectTimeout=60 $file ${OPENDAPUSER}@${OPENDAPHOST}:${OPENDAPDIR} 2>> $SYSLOG 2>&1
scp $scpOptions $file ${OPENDAPUSER}@${OPENDAPHOST}:${OPENDAPDIR} 2>> $SYSLOG 2>&1
if [[ $? != 0 ]]; then
threddsPostStatus=fail
warn "$ENSTORM: $THIS: Failed to transfer the file $file to ${OPENDAPHOST}:${OPENDAPDIR}."
Expand Down
2 changes: 1 addition & 1 deletion platforms.sh
Expand Up @@ -146,7 +146,7 @@ init_supermic()
RMQMessaging_Enable="on" # "on"|"off"
RMQMessaging_Transmit="on" # enables message transmission ("on" | "off")
RMQMessaging_NcoHome="$HOME/local"
RMQMessaging_Python=/usr/local/packages/python/2.7.12-anaconda/bin/python
RMQMessaging_Python=/usr/local/packages/python/2.7.13-anaconda/bin/python
JOBLAUNCHER='mpirun -np %totalcpu% -machinefile $PBS_NODEFILE'
ACCOUNT=null
PLATFORMMODULES='module load intel/14.0.2 hdf5/1.8.12/INTEL-140-MVAPICH2-2.0 netcdf/4.2.1.1/INTEL-140-MVAPICH2-2.0 netcdf_fortran/4.2/INTEL-140-MVAPICH2-2.0'
Expand Down

0 comments on commit f127270

Please sign in to comment.