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

Move remaining global post scripts over from UPP #771

Merged
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
53 changes: 42 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,47 @@ fix/wafs
parm/config/config.base
parm/gldas
parm/mon
parm/post
parm/post/AEROSOL_LUTS.datoptics_luts_DUST.dat
parm/post/gtg.config.gfs
parm/post/gtg_imprintings.txt
parm/post/optics_luts_SALT.dat
parm/post/optics_luts_SOOT.dat
parm/post/optics_luts_SUSO.dat
parm/post/optics_luts_WASO.dat
parm/post/params_grib2_tbl_new
parm/post/post_tag_gfs128
parm/post/post_tag_gfs65
parm/post/postcntrl_gefs.xml
parm/post/postcntrl_gefs_aerosol.xml
parm/post/postcntrl_gefs_anl.xml
parm/post/postcntrl_gefs_chem.xml
parm/post/postcntrl_gefs_f00.xml
parm/post/postcntrl_gfs.xml
parm/post/postcntrl_gfs_anl.xml
parm/post/postcntrl_gfs_f00.xml
parm/post/postcntrl_gfs_f00_two.xml
parm/post/postcntrl_gfs_flux.xml
parm/post/postcntrl_gfs_flux_f00.xml
parm/post/postcntrl_gfs_goes.xml
parm/post/postcntrl_gfs_goes.xml-new
parm/post/postcntrl_gfs_two.xml
parm/post/postcntrl_gfs_wafs.xml
parm/post/postcntrl_gfs_wafs_anl.xml
parm/post/postxconfig-NT-GEFS-ANL.txt
parm/post/postxconfig-NT-GEFS-F00.txt
parm/post/postxconfig-NT-GEFS.txt
parm/post/postxconfig-NT-GFS-ANL.txt
parm/post/postxconfig-NT-GFS-F00-TWO.txt
parm/post/postxconfig-NT-GFS-F00.txt
parm/post/postxconfig-NT-GFS-FLUX-F00.txt
parm/post/postxconfig-NT-GFS-FLUX.txt
parm/post/postxconfig-NT-GFS-GOES.txt
parm/post/postxconfig-NT-GFS-TWO.txt
parm/post/postxconfig-NT-GFS-WAFS-ANL.txt
parm/post/postxconfig-NT-GFS-WAFS.txt
parm/post/postxconfig-NT-GFS.txt
parm/post/postxconfig-NT-gefs-aerosol.txt
parm/post/postxconfig-NT-gefs-chem.txt
parm/wafs

# Ignore sorc and logs folders from externals
Expand Down Expand Up @@ -73,6 +113,7 @@ sorc/radmon_bcoef.fd
sorc/radmon_bcor.fd
sorc/radmon_time.fd
sorc/recentersigp.fd
sorc/upp.fd
sorc/wafs_awc_wafavn.fd
sorc/wafs_blending.fd
sorc/wafs_blending_0p25.fd
Expand Down Expand Up @@ -107,13 +148,10 @@ jobs/JGFS_ATMOS_WAFS_GRIB2
jobs/JGFS_ATMOS_WAFS_GRIB2_0P25
jobs/JGLOBAL_ATMOS_ANALYSIS
jobs/JGLOBAL_ATMOS_ANALYSIS_CALC
jobs/JGLOBAL_ATMOS_NCEPPOST
jobs/JGLOBAL_ATMOS_POST_MANAGER
# scripts symlinks
scripts/exemcsfc_global_sfc_prep.sh
scripts/exgdas_atmos_chgres_forenkf.sh
scripts/exgdas_atmos_gldas.sh
scripts/exgdas_atmos_nceppost.sh
scripts/exgdas_atmos_verfozn.sh
scripts/exgdas_atmos_verfrad.sh
scripts/exgdas_atmos_vminmon.sh
Expand All @@ -132,7 +170,6 @@ scripts/exgfs_atmos_wafs_grib2.sh
scripts/exgfs_atmos_wafs_grib2_0p25.sh
scripts/exglobal_atmos_analysis.sh
scripts/exglobal_atmos_analysis_calc.sh
scripts/exglobal_atmos_pmgr.sh
scripts/exglobal_diag.sh
# ush symlinks
ush/calcanl_gfs.py
Expand All @@ -142,13 +179,10 @@ ush/emcsfc_ice_blend.sh
ush/emcsfc_snow.sh
ush/fix_precip.sh
ush/fv3gfs_driver_grid.sh
ush/fv3gfs_dwn_nems.sh
ush/fv3gfs_filter_topo.sh
ush/fv3gfs_make_grid.sh
ush/fv3gfs_make_orog.sh
ush/getncdimlen
ush/gfs_nceppost.sh
ush/gfs_transfer.sh
ush/gldas_archive.sh
ush/gldas_forcing.sh
ush/gldas_get_data.sh
Expand All @@ -160,20 +194,17 @@ ush/global_chgres_driver.sh
ush/global_cycle.sh
ush/global_cycle_driver.sh
ush/gsi_utils.py
ush/link_crtm_fix.sh
ush/minmon_xtrct_costs.pl
ush/minmon_xtrct_gnorms.pl
ush/minmon_xtrct_reduct.pl
ush/mkwfsgbl.sh
ush/mod_icec.sh
ush/ozn_xtrct.sh
ush/radmon_ck_stdout.sh
ush/radmon_err_rpt.sh
ush/radmon_verf_angle.sh
ush/radmon_verf_bcoef.sh
ush/radmon_verf_bcor.sh
ush/radmon_verf_time.sh
ush/trim_rh.sh
ush/wafs_blending.sh
ush/wafs_grib2.regrid.sh
ush/wafs_intdsk.sh
153 changes: 153 additions & 0 deletions jobs/JGLOBAL_ATMOS_NCEPPOST
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
#!/bin/ksh
set -x

export RUN_ENVIR=${RUN_ENVIR:-"nco"}
export PS4='$SECONDS + '
date


#############################
# Source relevant config files
#############################
configs="base post"
export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config}
config_path=${EXPDIR:-$NWROOT/gfs.${gfs_ver}/parm/config}
for config in $configs; do
. $config_path/config.$config
status=$?
[[ $status -ne 0 ]] && exit $status
done


##########################################
# Source machine runtime environment
##########################################
. $HOMEgfs/env/${machine}.env post
status=$?
[[ $status -ne 0 ]] && exit $status


##############################################
# Obtain unique process id (pid) and make temp directory
##############################################
export pid=${pid:-$$}
export outid=${outid:-"LL$job"}
export DATA=${DATA:-${DATAROOT}/${jobid:?}}
mkdir -p $DATA
cd $DATA


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


##############################################
# Determine Job Output Name on System
##############################################
export pgmout="OUTPUT.${pid}"
export pgmerr=errfile

####################################
# Specify version numbers
####################################
export crtm_ver=${post_crtm_ver:-v2.2.6}
export gfs_ver=${gfs_ver:-v15.0.0}
export hwrf_ver=${hwrf_ver:-v11.0.5}
export g2tmpl_ver=${g2tmpl_ver:-v1.5.0}

##############################################
# Set variables used in the exglobal script
##############################################
export CDATE=${CDATE:-${PDY}${cyc}}
export CDUMP=${CDUMP:-${RUN:-"gfs"}}
export COMPONENT=${COMPONENT:-atmos}


##############################################
# Begin JOB SPECIFIC work
##############################################
export APRUNP=${APRUN:-$APRUN_NP}
export RERUN=${RERUN:-NO}
export HOMECRTM=${HOMECRTM:-${NWROOT}/lib/crtm/${crtm_ver}}
export FIXCRTM=${CRTM_FIX:-${HOMECRTM}/fix}
export PARMpost=${PARMpost:-$HOMEgfs/parm/post}
export INLINE_POST=${WRITE_DOPOST:-".false."}

export COMIN=${COMIN:-$ROTDIR/$RUN.$PDY/$cyc/$COMPONENT}
export COMOUT=${COMOUT:-$ROTDIR/$RUN.$PDY/$cyc/$COMPONENT}

[[ ! -d $COMOUT ]] && mkdir -m 775 -p $COMOUT

if [ $RUN = gfs ];then
export FHOUT_PGB=${FHOUT_GFS:-3} #Output frequency of gfs pgb file at 1.0 and 0.5 deg.
fi
if [ $RUN = gdas ]; then
export IGEN_GFS="gfs_avn"
export IGEN_ANL="anal_gfs"
export IGEN_FCST="gfs_avn"
export IGEN_GDAS_ANL="anal_gdas"
export FHOUT_PGB=${FHOUT:-1} #Output frequency of gfs pgb file at 1.0 and 0.5 deg.
fi

if [ $GRIBVERSION = grib2 ]; then
export IGEN_ANL="anal_gfs"
export IGEN_FCST="gfs_avn"
export IGEN_GFS="gfs_avn"
fi

#######################################
# Specify Restart File Name to Key Off
#######################################
export restart_file=$COMIN/${RUN}.t${cyc}z.logf

####################################
# Specify Timeout Behavior of Post
#
# SLEEP_TIME - Amount of time to wait for
# a restart file before exiting
# SLEEP_INT - Amount of time to wait between
# checking for restart files
####################################
export SLEEP_TIME=900
export SLEEP_INT=5


###############################################################
# Run relevant exglobal script
env
msg="HAS BEGUN on $(hostname)"
postmsg "$msg"
$LOGSCRIPT


$SCRgfs/ex${RUN}_atmos_nceppost.sh
status=$?
[[ $status -ne 0 ]] && exit $status

##############################################
# End JOB SPECIFIC work
##############################################

##############################################
# Final processing
##############################################
if [ -e "$pgmout" ]; then
cat $pgmout
fi

msg="ENDED NORMALLY."
postmsg "$msg"


##########################################
# Remove the Temporary working directory
##########################################
cd $DATAROOT
[[ $KEEPDATA = "NO" ]] && rm -rf $DATA

date
exit 0
104 changes: 104 additions & 0 deletions jobs/JGLOBAL_ATMOS_POST_MANAGER
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
#!/bin/sh

########################################
# GFS post manager
########################################

export RUN_ENVIR=${RUN_ENVIR:-"nco"}
export PS4='$SECONDS + '
date

#############################
# Source relevant config files
#############################
set -x
configs="base post"
export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config}
config_path=${EXPDIR:-$NWROOT/gfs.${gfs_ver}/parm/config}
for config in $configs; do
. $config_path/config.$config
status=$?
[[ $status -ne 0 ]] && exit $status
done


##########################################
# Source machine runtime environment
##########################################
. $HOMEgfs/env/${machine}.env post
status=$?
[[ $status -ne 0 ]] && exit $status

set -xue
# #### 07/30/1999 ###################
# SET SHELL PROCESSING VARIABLES
# ###################################
export PS4='$SECONDS + '
date

####################################
# Specify NET and RUN Name and model
####################################
export NET=${NET:-gfs}
export RUN=${RUN:-gfs}
export COMPONENT=${COMPONENT:-atmos}

####################################
# obtain unique process id (pid) and make temp directories
####################################
export pid=${pid:-$$}
export DATA=${DATA:-${DATAROOT}/${jobid:?}}
mkdir $DATA
cd $DATA

####################################
# Determine Job Output Name on System
####################################
export outid="LL$job"
export jobid="${outid}.o${pid}"
export pgmout="OUTPUT.${pid}"

####################################
# Specify version numbers
####################################
export gfs_ver=${gfs_ver:-v15.0.0}

####################################
# Specify Execution Areas
####################################
export HOMEgfs=${HOMEgfs:-${NWROOT}/gfs.${gfs_ver}}
export EXECgfs=${HOMEgfs:-$HOMEgfs/exec}
export FIXgfs=${HOMEgfs:-$HOMEgfs/fix}
export PARMgfs=${HOMEgfs:-$HOMEgfs/parm}
export USHgfs=${HOMEgfs:-$HOMEgfs/ush}

###########################
# Set up EXT variable
###########################
export EXT_FCST=NO

###################################
# Set up the UTILITIES
###################################
# export HOMEutil=${HOMEutil:-/nw${envir}/util.${util_ver}}
# export utilscript=${utilscript:-$HOMEutil/ush}
# export utilexec=${utilexec:-$HOMEutil/exec}

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

export ROTDIR=${ROTDIR:-${COMROOT:?}/$NET/$envir}
export COMIN=${COMIN:-$ROTDIR/$RUN.$PDY/$cyc/$COMPONENT}
export COMOUT=${COMOUT:-$ROTDIR/$RUN.$PDY/$cyc/$COMPONENT}


########################################################
# Execute the script.
$HOMEgfs/scripts/exglobal_atmos_pmgr.sh
########################################################

date
Loading