Skip to content
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
1 change: 1 addition & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[submodule "sorc/upp.fd"]
path = sorc/upp.fd
url = https://github.com/NOAA-EMC/UPP
ignore = dirty
11 changes: 3 additions & 8 deletions dev/driver/run_JWAFS_UPP
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
set -x

# specify computation resource
export threads=1
export MP_LABELIO=yes
export OMP_NUM_THREADS=$threads
export MPIRUN='mpiexec -l -n 126 -ppn 126 --cpu-bind depth --depth 1'

echo "starting time $PBS_JOBNAME"
Expand Down Expand Up @@ -63,13 +61,11 @@ export envir=prod
export NET=wafs
export RUN=wafs

export RUNupp=gfs

############################################
# user defined
############################################
#export PDY=`$NDATE -24 | cut -c 1-8`
export PDY=`cut -c 7-14 $COMROOT/date/t00z`
export PDY=$(cut -c 7-14 $COMROOT/date/t00z)
export PDY=20240617

export cyc=${cyc:-00}
Expand All @@ -83,7 +79,7 @@ export job=wafs_upp_${cyc}
export pid=${pid:-$$}
export jobid=${job}.${pid}

USER=`whoami`
USER=$(whoami)

############################################
# SENDCOM=YES--Copy output file to /com
Expand All @@ -101,7 +97,7 @@ export KEEPDATA=YES

export COMROOT=/lfs/h2/emc/ptmp/$USER/wafs_dwn/$envir/com

export COMPATH=${COMPATHgfs:-/lfs/h1/ops/prod/com/$RUNupp}
export COMPATH=${COMPATHgfs:-/lfs/h1/ops/prod/com/gfs}

DATAroot=/lfs/h2/emc/ptmp/$USER/working_wafs

Expand All @@ -112,4 +108,3 @@ export DATA=$DATAroot/upp.f$fhr.${jobid}

$HOMEwafs/jobs/JWAFS_UPP
echo $?

150 changes: 54 additions & 96 deletions jobs/JWAFS_GCIP
Original file line number Diff line number Diff line change
@@ -1,121 +1,79 @@
#!/bin/bash

############################################
########################################
# WAFS GCIP PRODUCT GENERATION
############################################
########################################

date
export PS4='$SECONDS + '
export PS4='$SECONDS + '
set -x

# keep the working directory or not
export KEEPDATA=${KEEPDATA:-NO}

############################################
# Specify it is production or developmen
############################################
export envir=${envir:-prod}
# print current environment
env

############################################
# Working Directory
############################################
####################################
# make temp directory
####################################
export DATA=${DATA:-${DATAROOT}/${jobid:?}}
mkdir -p $DATA
cd $DATA

############################################
# Output for executables
############################################
export pgmout=OUTPUT.$$

############################################
# Load the UTILITIES module
############################################
#### module load prod_util
#### module load grib_util
mkdir -p "${DATA}" && cd "${DATA}"

############################################
###########################################
# Run setpdy and initialize PDY variables
############################################
export cycle=t${cyc}z
###########################################
export cycle=${cycle:-"t${cyc}z"}
setpdy.sh
. ./PDY

############################################
# Set up the NET and RUN
############################################
####################################
# SEND to COM, DBN, etc
####################################
export SENDCOM=${SENDCOM:-"YES"}
export SENDDBN=${SENDDBN:-"YES"}

####################################
# Specify NET and RUN Name and model
####################################
export NET=${NET:-wafs}
export RUN=${RUN:-wafs}

############################################
# Specify HOME Directory
############################################
export HOMEwafs=${HOMEwafs:-${NWROOT}/wafs.${wafs_ver}}
export EXECwafs=$HOMEwafs/exec
export FIXwafs=$HOMEwafs/fix/wafs
export PARMwafs=$HOMEwafs/parm/wafs
export USHwafs=$HOMEwafs/ush
export SCRIPTSwafs=$HOMEwafs/scripts

# For BUFR dump, TMPDIR must be defined
export TMPDIR=$DATA # will be overwritten in exwafs script for parallel runs on fhr
# For BUFR dump, these two environment variables are defined by module load
# HOMEobsproc_shared_bufr_dumplist <= module load bufr_dumplist/1.5.0
# HOMEobsproc_dump <= module load dumpjb/4.0.0


################################################
# Set up the input/output directory
################################################
# model data
export COMINgfs=${COMINgfs:-$(compath.py ${envir}/gfs/${gfs_ver})/gfs.${PDY}/${cyc}/atmos}

# satellite data
#ftp://satepsanone.nesdis.noaa.gov/2day/gmosaic/
# Have to change IP address to digital ones, which BSUB can identify
#export COMINsat=${COMINsat:-ftp://140.90.213.161/2day/gmosaic}
export COMINsat=${COMINsat:-$DCOMROOT/$PDY/mcidas}

# radar data
export COMINradar=${COMINradar:-$(compath.py ${envir}/radarl2/$radarl2_ver)/radar.$PDY}

# metar/ships/lightning/pireps
# data are dumped by $USHobsproc_dump/dumpjb
#

# COMOUT
export COMOUT=${COMOUT:-$(compath.py -o $NET/$wafs_ver)/$RUN.$PDY/$cyc/gcip}

mkdir -p $COMOUT
##############################################
# Define COM directories
##############################################
export COMINgfs=${COMINgfs:-$(compath.py "${envir}/gfs/${gfs_ver}")"/gfs.${PDY}/${cyc}/atmos"}
export COMINsat=${COMINsat:-"${DCOMROOT}/${PDY}/mcidas"}
export COMINradar=${COMINradar:-$(compath.py "${envir}/radarl2/${radarl2_ver}")"/radar.${PDY}"}
export COMOUT=${COMOUT:-$(compath.py -o "${NET}/${wafs_ver}")"/${RUN}.${PDY}/${cyc}/gcip"}
mkdir -p "${COMOUT}"

####################################
# Determine Job Output Name on System
####################################
export pgmout="OUTPUT.$$"

####################################
# Specify Execution Areas
####################################
export EXECwafs="${HOMEwafs}/exec"
export PARMwafs="${HOMEwafs}/parm"
export FIXwafs="${HOMEwafs}/fix"

#########################################################
# print current environment
#########################################################
env

############################################
# Execute the script, parallel run for 000 003
# Execute the script.
############################################
${SCRIPTSwafs}/exwafs_gcip.sh $fhr
"${HOMEwafs}/scripts/exwafs_gcip.sh"
export err=$?
err_chk

if [ $err -eq 0 ] ; then
echo "JOB $job HAS COMPLETED NORMALLY!"
elif [ $err -eq 1 ] ; then
echo "WARNING!!! JOB $job incomplete. Missing satellite data."
else
echo "JOB $job FAILED!!!!"
fi

############################################
# print exec output
############################################
if [ -e "$pgmout" ] ; then
cat $pgmout
if [[ -e "${pgmout}" ]]; then
cat "${pgmout}"
fi

############################################
# remove temporary working directory
############################################
if [ $KEEPDATA != YES ] ; then
rm -rf $DATA
##############################
# Remove the Temporary working directory
##############################
if [[ "${KEEPDATA^^}" != "YES" ]]; then
rm -rf "${DATA}"
fi

date
118 changes: 49 additions & 69 deletions jobs/JWAFS_GRIB
Original file line number Diff line number Diff line change
@@ -1,97 +1,77 @@
#!/bin/bash

########################################
# WAFS GRIB AWIPS PRODUCT GENERATION
# WAFS GRIB AWIPS PRODUCT GENERATION
########################################

date
export PS4='$SECONDS + '
export PS4='$SECONDS + '
set -x

export KEEPDATA=${KEEPDATA:-NO}

############################################
# Specify it is production or developmen
############################################
export envir=${envir:-prod}
# print current environment
env

############################################
# Working Directory
############################################
####################################
# make temp directory
####################################
export DATA=${DATA:-${DATAROOT}/${jobid:?}}
mkdir -p $DATA
cd $DATA

############################################
# Output for executables
############################################
export pgmout=OUTPUT.$$

############################################
# Load the UTILITIES module
############################################
#### module load prod_util
#### module load grib_util
mkdir -p "${DATA}" && cd "${DATA}"

###########################################
# Run setpdy and initialize PDY variables
###########################################
export cycle=t${cyc}z
export cycle=${cycle:-"t${cyc}z"}
setpdy.sh
. ./PDY

export RERUN=${RERUN:-NO}
####################################
# SEND to COM, DBN, etc
####################################
export SENDCOM=${SENDCOM:-"YES"}
export SENDDBN=${SENDDBN:-"YES"}

############################################
# Set up the NET and RUN
############################################
####################################
# Specify NET and RUN Name and model
####################################
export NET=${NET:-wafs}
export RUN=${RUN:-wafs}

############################################
# Specify HOME Directory
############################################
export HOMEwafs=${HOMEwafs:-${NWROOT}/wafs.${wafs_ver}}
export EXECwafs=$HOMEwafs/exec
export FIXwafs=$HOMEwafs/fix/wafs
export PARMwafs=$HOMEwafs/parm/wafs
export USHwafs=$HOMEwafs/ush
export SCRIPTSwafs=$HOMEwafs/scripts

################################################
# Set up the input/output directory
################################################
export COMOUT=${COMOUT:-$(compath.py -o $NET/$wafs_ver)/$RUN.$PDY/$cyc/grib}
export PCOM=${PCOM:-$COMOUT/wmo}

export COMINgfs=${COMINgfs:-$(compath.py ${envir}/gfs/${gfs_ver})/gfs.${PDY}/${cyc}/atmos}

if [ $SENDCOM = YES ] ; then
mkdir -p $COMOUT $PCOM
fi
##############################################
# Define COM directories
##############################################
export COMINgfs=${COMINgfs:-$(compath.py "${envir}/gfs/${gfs_ver}")"/gfs.${PDY}/${cyc}/atmos"}
export COMOUT=${COMOUT:-$(compath.py -o "${NET}/${wafs_ver}")"/${RUN}.${PDY}/${cyc}/grib"}
export COMOUTwmo=${COMOUTwmo:-"${COMOUT}/wmo"}
mkdir -p "${COMOUT}" "${COMOUTwmo}"

####################################
# Determine Job Output Name on System
####################################
export pgmout="OUTPUT.$$"

####################################
# Specify Execution Areas
####################################
export EXECwafs="${HOMEwafs}/exec"
export USHwafs="${HOMEwafs}/ush"

#########################################################
# print current environment
#########################################################
env

############################################
# Execute the script.
############################################
${SCRIPTSwafs}/exwafs_grib.sh $fhr

export err=$?; err_chk

echo "JOB $job HAS COMPLETED NORMALLY!"
"${HOMEwafs}/scripts/exwafs_grib.sh"
export err=$?
err_chk

############################################
# print exec output
############################################
if [ -e "$pgmout" ] ; then
cat $pgmout
if [[ -e "${pgmout}" ]]; then
cat "${pgmout}"
fi

############################################
# remove temporary working directory
############################################
if [ $KEEPDATA != YES ] ; then
rm -rf $DATA
##############################
# Remove the Temporary working directory
##############################
if [[ "${KEEPDATA^^}" != "YES" ]]; then
rm -rf "${DATA}"
fi

date
Loading