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

Update GDAS Initialization utility for recent HPSS tarball name change #666

Merged
Merged
Show file tree
Hide file tree
Changes from 2 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 util/gdas_init/config
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ mm=03
dd=21
hh=06

use_v16retro=yes
use_v16retro=no

LEVS=65

Expand Down
29 changes: 25 additions & 4 deletions util/gdas_init/get_v16.data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
# Retrieve gfs v16 data. v16 was officially implemented on 12 UTC
# March 22, 2021. However, the way the switch over was done,
# the 'prod' v16 tarballs started March 21, 2021 06Z.
#
# Starting at June 27, 2022 00z, the tarball names were changed.
# Older files had 'prod' in their name. Newer files has 'v16.2'
# in their name.
#----------------------------------------------------------------------

bundle=$1
Expand All @@ -20,6 +24,23 @@ mm_m6=$(echo $date10_m6 | cut -c5-6)
dd_m6=$(echo $date10_m6 | cut -c7-8)
hh_m6=$(echo $date10_m6 | cut -c9-10)

if [ $yy$mm$dd$hh -ge 2022062700 ]; then
version="v16.2"
else
version="prod"
fi

#----------------------------------------------------------------------
# Account for tarball file name changes starting at
# June 27, 2022 at 00z.
#----------------------------------------------------------------------

if [ ${yy_m6}${mm_m6}${dd_m6}${hh_m6} -ge 2022062700 ]; then
version_enkf="v16.2"
else
version_enkf="prod"
fi

#----------------------------------------------------------------------
# Get the atm and sfc 'anl' netcdf files from the gfs or gdas
# tarball.
Expand All @@ -29,10 +50,10 @@ if [ "$bundle" = "gdas" ] || [ "$bundle" = "gfs" ]; then

if [ "$bundle" = "gdas" ] ; then
directory=/NCEPPROD/hpssprod/runhistory/rh${yy}/${yy}${mm}/${yy}${mm}${dd}
file=com_gfs_prod_gdas.${yy}${mm}${dd}_${hh}.gdas_nc.tar
file=com_gfs_${version}_gdas.${yy}${mm}${dd}_${hh}.gdas_nc.tar
else
directory=/NCEPPROD/hpssprod/runhistory/rh${yy}/${yy}${mm}/${yy}${mm}${dd}
file=com_gfs_prod_gfs.${yy}${mm}${dd}_${hh}.gfs_nca.tar
file=com_gfs_${version}_gfs.${yy}${mm}${dd}_${hh}.gfs_nca.tar
fi

rm -f ./list.hires*
Expand All @@ -57,7 +78,7 @@ if [ "$bundle" = "gdas" ] || [ "$bundle" = "gfs" ]; then
if [ "$bundle" = "gdas" ] ; then

directory=/NCEPPROD/hpssprod/runhistory/rh${yy}/${yy}${mm}/${yy}${mm}${dd}
file=com_gfs_prod_gdas.${yy}${mm}${dd}_${hh}.gdas_restart.tar
file=com_gfs_${version}_gdas.${yy}${mm}${dd}_${hh}.gdas_restart.tar

htar -xvf $directory/$file ./gdas.${yy}${mm}${dd}/${hh}/atmos/gdas.t${hh}z.abias
rc=$?
Expand Down Expand Up @@ -88,7 +109,7 @@ else
group=$bundle

directory=/NCEPPROD/hpssprod/runhistory/5year/rh${yy_m6}/${yy_m6}${mm_m6}/${yy_m6}${mm_m6}${dd_m6}
file=com_gfs_prod_enkfgdas.${yy_m6}${mm_m6}${dd_m6}_${hh_m6}.enkfgdas_${group}.tar
file=com_gfs_${version_enkf}_enkfgdas.${yy_m6}${mm_m6}${dd_m6}_${hh_m6}.enkfgdas_${group}.tar

rm -f ./list*.${group}
htar -tvf $directory/$file > ./list1.${group}
Expand Down