Skip to content

Commit

Permalink
Merge pull request NOAA-EMC#21 from jkhender/feature/chem
Browse files Browse the repository at this point in the history
additional changes for generating initial conditions, running regrid, and running calc increment
  • Loading branch information
jkhender committed Dec 10, 2020
2 parents 318b0b7 + ccf81b5 commit 4f5fa93
Show file tree
Hide file tree
Showing 8 changed files with 180 additions and 26 deletions.
3 changes: 2 additions & 1 deletion FV3GFSwfm/rt_ccpp-chem/config.base
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,11 @@ if [[ "$CDATE" -ge "2019092100" && "$CDATE" -le "2019110700" ]]; then
export DUMP_SUFFIX="p" # Use dumps from NCO GFS v15.3 parallel
fi
export RUNDIR="$STMP/RUNDIRS/$PSLOT"
export RUNDIR1="/scratch1/BMC/gsd-fv3/NCEPDEV/stmp3/rtfim/RUNDIRS/rt_fv3gfs_chem"
export DATAROOT="$RUNDIR/$CDATE/$CDUMP"
export ARCDIR="$NOSCRUB/archive/$PSLOT"
export ICSDIR="/scratch1/BMC/gsd-fv3/rtruns/CCPP-Chem/FV3ICS"
export ATARDIR="/BMC/$HPSS_PROJECT/2year/rt-CCPP-Chem"
export ATARDIR="/BMC/$HPSS_PROJECT/2year/rt_CCPP-Chem"

# Commonly defined parameters in JJOBS
export envir=${envir:-"prod"}
Expand Down
59 changes: 41 additions & 18 deletions FV3GFSwfm/rt_ccpp-chem/rt_ccpp-chem.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,14 @@
<!ENTITY EXPDIR "/scratch1/BMC/gsd-fv3/rtruns/CCPP-Chem/FV3GFSwfm/rt_ccpp-chem">
<!ENTITY ROTDIR "/scratch1/BMC/gsd-fv3/rtruns/CCPP-Chem/FV3GFSrun/rt_ccpp-chem">
<!ENTITY ICSDIR "/scratch1/BMC/gsd-fv3/rtruns/CCPP-Chem/FV3ICS">
<!ENTITY PUBDIR "/scratch1/BMC/public/data/grids/gfs/nemsio">
<!-- use RUNDIR1 as long as FV3-CHEM is still running in realtime -->
<!ENTITY RUNDIR1 "/scratch1/BMC/gsd-fv3/NCEPDEV/stmp3/rtfim/RUNDIRS/rt_fv3gfs_chem">
<!ENTITY PUBDIR "/scratch2/BMC/public/data/grids/gfs/nemsio">
<!ENTITY RETRODIR "/scratch1/BMC/gsd-fv3-dev/GFS_RETRO_NEMSIO/">
<!ENTITY GFSDIR "/ESRL/BMC/fdr/Permanent">
<!ENTITY EMIDIR "/scratch2/BMC/public/data/grids/sdsu/emissions">
<!ENTITY GDASDIR "/5year/NCEPDEV/emc-global/emc.glopara/WCOSS_C/Q2FY19/prfv3rt1">
<!ENTITY GDASDIR "/scratch2/BMC/public/data/grids/gdas/bufr">
<!-- <!ENTITY GDASDIR "/5year/NCEPDEV/emc-global/emc.glopara/WCOSS_C/Q2FY19/prfv3rt1"> -->
<!ENTITY RUNDIR "/scratch1/BMC/gsd-fv3/NCEPDEV/stmp3/rtfim/RUNDIRS/rt_ccpp-chem">
<!ENTITY PREDIR "/scratch2/BMC/public/data/grids/sdsu/emissions">

Expand Down Expand Up @@ -71,7 +75,7 @@

<!ENTITY QUEUE_FV3IC_GFS "&QUEUE;">
<!ENTITY WALLTIME_FV3IC_GFS "00:30:00">
<!ENTITY RESOURCES_FV3IC_GFS "<nodes>1:ppn=4:tpp=1</nodes>">
<!ENTITY RESOURCES_FV3IC_GFS "<nodes>1:ppn=24:tpp=1</nodes>">
<!ENTITY NATIVE_FV3IC_GFS "--export=NONE">

<!ENTITY QUEUE_REGRID "&QUEUE;">
Expand Down Expand Up @@ -140,10 +144,14 @@
<envar><name>CDUMP</name><value>&CDUMP;</value></envar>
<envar><name>ICSDIR</name><value>&ICSDIR;</value></envar>
<envar><name>PUBDIR</name><value>&PUBDIR;</value></envar>
<envar><name>RETRODIR</name><value>&RETRODIR;</value></envar>
<envar><name>GDASDIR</name><value>&GDASDIR;</value></envar>
<envar><name>ROTDIR</name><value>&ROTDIR;</value></envar>
<dependency>
<timedep><cyclestr offset="09:15:00">@Y@m@d@H@M00</cyclestr></timedep>
<or>
<timedep><cyclestr offset="23:50:00">@Y@m@d@H@M00</cyclestr></timedep>
<datadep><cyclestr>&GDASDIR;/@y@j0000.gdas.t00z.atmanl.nemsio</cyclestr></datadep>
</or>
</dependency>
</task>
Expand Down Expand Up @@ -173,11 +181,19 @@
<envar><name>ROTDIR</name><value>&ROTDIR;</value></envar>
<dependency>
<and>
<datadep><cyclestr>&PUBDIR;/@y@j@H00.&CDUMP;.t@Hz.atmanl.nemsio</cyclestr></datadep>
<datadep><cyclestr>&PUBDIR;/@y@j@H00.&CDUMP;.t@Hz.sfcanl.nemsio</cyclestr></datadep>
<datadep><cyclestr>&ICSDIR;/@Y@m@d@H/&CDUMP;/gdas_available</cyclestr></datadep>
</and>
<and>
<or>
<and>
<datadep><cyclestr>&PUBDIR;/@y@j@H00.gfs.t@Hz.atmanl.nemsio</cyclestr></datadep>
<datadep><cyclestr>&PUBDIR;/@y@j@H00.gfs.t@Hz.sfcanl.nemsio</cyclestr></datadep>
</and>
<and>
<datadep><cyclestr>&RETRODIR;/@y@j@H00.gfs.t@Hz.atmanl.nemsio</cyclestr></datadep>
<datadep><cyclestr>&RETRODIR;/@y@j@H00.gfs.t@Hz.sfcanl.nemsio</cyclestr></datadep>
</and>
</or>
<datadep><cyclestr>&ICSDIR;/@Y@m@d@H/&CDUMP;/&CDUMP;.@Y@m@d/@H/gdas_available</cyclestr></datadep>
</and>
</dependency>
</task>
Expand Down Expand Up @@ -207,10 +223,16 @@
<dependency>
<and>
<and>
<datadep><cyclestr>&ICSDIR;/@Y@m@d@H/&CDUMP;/&CASE;/INPUT/gfs_data.tile6.nc</cyclestr></datadep>
<datadep><cyclestr>&ICSDIR;/@Y@m@d@H/&CDUMP;/&CASE;/INPUT/sfc_data.tile6.nc</cyclestr></datadep>
</and>
<or>
<and>
<datadep><cyclestr>&ICSDIR;/@Y@m@d@H/&CDUMP;/&CDUMP;.@Y@m@d/@H/&CDUMP;.t@Hz.atmanl.nemsio</cyclestr></datadep>
<datadep><cyclestr>&ICSDIR;/@Y@m@d@H/&CDUMP;/&CDUMP;.@Y@m@d/@H/&CDUMP;.t@Hz.sfcanl.nemsio</cyclestr></datadep>
</and>
<and>
<datadep><cyclestr>&ICSDIR;/@Y@m@d@H/&CDUMP;/&CDUMP;.@Y@m@d/@H/siganl.&CDUMP;.@Y@m@d@H</cyclestr></datadep>
<datadep><cyclestr>&ICSDIR;/@Y@m@d@H/&CDUMP;/&CDUMP;.@Y@m@d/@H/sfcanl.&CDUMP;.@Y@m@d@H</cyclestr></datadep>
</and>
</or>
<not>
<and>
<datadep><cyclestr>&ICSDIR;/@Y@m@d@H/&CDUMP;/&CASE;/INPUT/gfs_data.tile6.nc</cyclestr></datadep>
Expand Down Expand Up @@ -250,13 +272,13 @@
<dependency>
<or>
<and>
<datadep><cyclestr>&ICSDIR;/@Y@m@d@H/&CDUMP;/gdas.t@Hz.atmanl.nemsio</cyclestr></datadep>
<datadep><cyclestr>&ICSDIR;/@Y@m@d@H/&CDUMP;/&CDUMP;.@Y@m@d/@H/gdas.t@Hz.atmanl.nemsio</cyclestr></datadep>
<datadep><cyclestr offset="-24:00:00">&ROTDIR;/&CDUMP;.@Y@m@d/@H/&CDUMP;.t@Hz.atmf000.nemsio</cyclestr></datadep>
</and>
<and>
<datadep><cyclestr>&ICSDIR;/@Y@m@d@H/&CDUMP;/gdas.t@Hz.atmanl.nemsio</cyclestr></datadep>
<datadep><cyclestr>&ICSDIR;/@Y@m@d@H/&CDUMP;/siganl.&CDUMP;.@Y@m@d@H</cyclestr></datadep>
<datadep><cyclestr>&ICSDIR;/@Y@m@d@H/&CDUMP;/sfcanl.&CDUMP;.@Y@m@d@H</cyclestr></datadep>
<datadep><cyclestr>&ICSDIR;/@Y@m@d@H/&CDUMP;/&CDUMP;.@Y@m@d/@H/gdas.t@Hz.atmanl.nemsio</cyclestr></datadep>
<datadep><cyclestr>&ICSDIR;/@Y@m@d@H/&CDUMP;/&CDUMP;.@Y@m@d/@H/siganl.&CDUMP;.@Y@m@d@H</cyclestr></datadep>
<datadep><cyclestr>&ICSDIR;/@Y@m@d@H/&CDUMP;/&CDUMP;.@Y@m@d/@H/sfcanl.&CDUMP;.@Y@m@d@H</cyclestr></datadep>
<datadep><cyclestr offset="-24:00:00">&ROTDIR;/&CDUMP;.@Y@m@d/@H/&CDUMP;.t@Hz.atmf000.nemsio</cyclestr></datadep>
</and>
</or>
Expand Down Expand Up @@ -287,7 +309,8 @@
<envar><name>cyc</name><value><cyclestr>@H</cyclestr></value></envar>
<dependency>
<and>
<datadep><cyclestr>&RUNDIR;/@Y@m@d@H/&CDUMP;/regrid/atmanl.@Y@m@d@H</cyclestr></datadep>
<!--<datadep><cyclestr>&RUNDIR;/@Y@m@d@H/&CDUMP;/regrid/atmanl.@Y@m@d@H</cyclestr></datadep> -->
<datadep><cyclestr>&RUNDIR1;/@Y@m@d@H/&CDUMP;/regrid/atmanl.@Y@m@d@H</cyclestr></datadep>
<datadep><cyclestr offset="-24:00:00">&ROTDIR;/&CDUMP;.@Y@m@d/@H/&CDUMP;.t@Hz.atmf024.nemsio</cyclestr></datadep>
</and>
</dependency>
Expand Down
3 changes: 0 additions & 3 deletions jobs/rocoto/calcinc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ export DATA="$RUNDIR/$CDATE/$CDUMP"
[[ ! -d $DATA ]] && mkdir -p $DATA

cd $DATA

#ln -sf /scratch1/BMC/gsd-fv3/NCEPDEV/stmp3/rtfim/RUNDIRS/rt_fv3gfs_chem/$CDATE/$CDUMP/regrid regrid #lzhang
ln -sf $RUNDIR1/$CDATE/$CDUMP/regrid regrid #lzhang
mkdir -p calcinc
cd calcinc

Expand Down
1 change: 0 additions & 1 deletion jobs/rocoto/calcinc.sh-org → jobs/rocoto/calcinc.sh_rt
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ export DATA="$RUNDIR/$CDATE/$CDUMP"

cd $DATA

#ln -sf /scratch1/BMC/gsd-fv3/NCEPDEV/stmp3/rtfim/RUNDIRS/rt_fv3gfs_chem/$CDATE/$CDUMP/regrid regrid #lzhang
ln -sf $RUNDIR1/$CDATE/$CDUMP/regrid regrid #lzhang
mkdir -p calcinc
cd calcinc
Expand Down
110 changes: 110 additions & 0 deletions jobs/rocoto/checkgdas.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
#!/bin/bash

## this script checks to see if GDAS atmanal file exists on $GDASDIR
## [/scratch2/BMC/public/data/grids/gdas/bufr]
## and creates gdas_available file under $ICSDIR/${CDATE}/${CDUMP}/$CDUMP.$yyyymmdd/$hh
##
## if file is missing from $GDASDIR, pulls file from mass store
##

###############################################################
## Abstract:
## Get GFS intitial conditions
## RUN_ENVIR : runtime environment (emc | nco)
## HOMEgfs : /full/path/to/workflow
## EXPDIR : /full/path/to/config/files
## CDATE : current date (YYYYMMDDHH)
## CDUMP : cycle name (gdas / gfs)
## PDY : current date (YYYYMMDD)
## cyc : current cycle (HH)
###############################################################

###############################################################
# Source FV3GFS workflow modules
. $HOMEgfs/ush/load_fv3gfs_modules.sh
status=$?
[[ $status -ne 0 ]] && exit $status

###############################################################
# Source relevant configs
configs="base"
for config in $configs; do
. $EXPDIR/config.${config}
status=$?
[[ $status -ne 0 ]] && exit $status
done


###############################################################
# Set script and dependency variablesyyyymmdd=`echo $CDATE | cut -c1-8`
yyyymmdd=$(echo $CDATE | cut -c1-8)
hh=$(echo $CDATE | cut -c9-10)
yyyy=$(echo $CDATE | cut -c1-4)
mm=$(echo $CDATE | cut -c5-6)
dd=$(echo $CDATE | cut -c7-8)
yyddd=$(date +%y%j -u -d $yyyymmdd)


echo
echo "CDATE = $CDATE"
echo "CDUMP = $CDUMP"
echo "ICSDIR = $ICSDIR"
echo "PUBDIR = $PUBDIR"
echo "RETROGDAS = $RETROGDAS"
echo "GDASDIR = $GDASDIR"
echo "ROTDIR = $ROTDIR"
echo "PSLOT = $PSLOT"
echo

## initialize
fv3ic_dir=$ICSDIR/${CDATE}/${CDUMP}/$CDUMP.$yyyymmdd/$hh

mkdir -p $fv3ic_dir
cd $fv3ic_dir

echo "YYYYMMDDHH: ${yyyymmdd}${hh}"

gdasfile=$GDASDIR/${yyddd}${hh}00.gdas.t${hh}z.atmanl.nemsio
ls $gdasfile #ESRL
status=$?
if [[ $status -ne 0 ]]; then
echo "missing $gdasfile on /public; check in $RETROGDAS..."
ls $gdasfile #ESRL
status=$?
elif [[ $status -ne 0 ]]; then

echo "missing $gdasfile in $RETROGDAS; check on mass store..."

# Operational archive
# /NCEPPROD/hpssprod/runhistory/rh${yyyy}/${yyyy}${mm}/${yyyy}${mm}${dd}/
# {$nameprefix}_gfs_prod_gdas.${yyyy}${mm}${dd}_${hh}.gdas_nemsio.tar
#
# where nameprefix=com 00Z 02/26/2020
# gpfs_dell1_nco_ios_com 12Z 06/12/2019
#

HPSSDIR="/NCEPPROD/hpssprod/runhistory/rh${yyyy}/${yyyy}${mm}/${yyyy}${mm}${dd}"
gdasfile="${HPSSDIR}/com_gfs_prod_gdas.${yyyy}${mm}${dd}_${hh}.gdas_nemsio.tar"
hsi -q list $gdasfile
status=$?
if [[ $status -ne 0 ]]; then
### 12Z 12Jun2019 -- FV3GFS operational
echo "missing $gdasfile on mass store...; try gpfs_dell1 filename!"
gdasfile=${HPSSDIR}/gpfs_dell1_nco_ops_com_gfs_prod_gdas.${yyyy}${mm}${dd}_${hh}.gdas_nemsio.tar
hsi -q list $gdasfile
status=$?
if [[ $status -ne 0 ]]; then
echo "missing $gfsfile on mass store..."
exit 1
fi
else
cd $fv3ic_dir
htar xvf ${gdasfile} ./gdas.${yyyymmdd}/${hh}/gdas.t${hh}z.atmanl.nemsio
mv gdas.${yyyymmdd}/${hh}/gdas.t${hh}z.atmanl.nemsio ./
echo removing gdas.${yyyymmdd}/${hh}....
rmdir gdas.${yyyymmdd}/${hh} gdas.${yyyymmdd}
touch gdas_available
fi
else
touch gdas_available
fi
14 changes: 13 additions & 1 deletion jobs/rocoto/getic_gsd_fv3gfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ echo "CDUMP = $CDUMP"
echo "ICSDIR = $ICSDIR"
echo "PUBDIR = $PUBDIR"
echo "RETRODIR = $RETRODIR"
echo "GDASDIR = $GDASDIR"
echo "ROTDIR = $ROTDIR"
echo "PSLOT = $PSLOT"
echo
Expand All @@ -25,7 +26,7 @@ echo
yyyymmdd=`echo $CDATE | cut -c1-8`
hh=`echo $CDATE | cut -c9-10`
yyddd=`date +%y%j -u -d $yyyymmdd`
fv3ic_dir=$ICSDIR/${CDATE}/${CDUMP}
fv3ic_dir=$ICSDIR/${CDATE}/${CDUMP}/$CDUMP.$yyyymmdd/$hh

## EMC archive on disk
## /scratch1/NCEPDEV/rstprod/com/gfs/prod
Expand Down Expand Up @@ -63,3 +64,14 @@ else
echo "missing input files!"
exit 1
fi

echo "YYYYMMDDHH: ${yyyymmdd}${hh}"
gdasfile=$GDASDIR/${yyddd}${hh}00.gdas.t${hh}z.atmanl.nemsio

if [[ -f $gdasfile ]]
then
ln -fs $gdasfile gdas.t${hh}z.atmanl.nemsio
fi

echo $GDASDIR
echo $gdasfile
14 changes: 13 additions & 1 deletion jobs/rocoto/getic_gsd_gfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ echo "CDUMP = $CDUMP"
echo "ICSDIR = $ICSDIR"
echo "PUBDIR = $PUBDIR"
echo "RETRODIR = $RETRODIR"
echo "GDASDIR = $GDASDIR"
echo "ROTDIR = $ROTDIR"
echo "PSLOT = $PSLOT"
echo
Expand All @@ -21,7 +22,7 @@ echo
yyyymmdd=`echo $CDATE | cut -c1-8`
hh=`echo $CDATE | cut -c9-10`
yyddd=`date +%y%j -u -d $yyyymmdd`
fv3ic_dir=$ICSDIR/${CDATE}/${CDUMP}
fv3ic_dir=$ICSDIR/${CDATE}/${CDUMP}/$CDUMP.$yyyymmdd/$hh

## create links in FV3ICS directory
mkdir -p $fv3ic_dir
Expand All @@ -46,3 +47,14 @@ else
fi
fi
fi

echo "YYYYMMDDHH: ${yyyymmdd}${hh}"
gdasfile=$GDASDIR/${yyddd}${hh}00.gdas.t${hh}z.atmanl.nemsio

if [[ -f $gdasfile ]]
then
ln -fs $gdasfile gdas.t${hh}z.atmanl.nemsio
fi

echo $GDASDIR
echo $gdasfile
2 changes: 1 addition & 1 deletion parm/config/config.base.emc.dyn
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export NCP="/bin/cp -p"
export NMV="/bin/mv"
export NLN="/bin/ln -sf"
export VERBOSE="YES"
export KEEPDATA="NO"
export KEEPDATA="YES"
export CHGRP_CMD="chgrp rstprod"
export NEMSIOGET="$HOMEgfs/exec/nemsio_get"
export NCDUMP="$NETCDF/bin/ncdump"
Expand Down

0 comments on commit 4f5fa93

Please sign in to comment.