Skip to content

Commit

Permalink
Final updates to the v16 data pull script.
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgeGayno-NOAA committed Jul 11, 2022
1 parent ef0a1a7 commit 93fe4b1
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 9 deletions.
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
33 changes: 25 additions & 8 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,14 +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}
if [ $yy$mm$dd$hh -ge 2022062700 ]; then
file=com_gfs_v16.2_gfs.${yy}${mm}${dd}_${hh}.gfs_nca.tar
else
file=com_gfs_prod_gfs.${yy}${mm}${dd}_${hh}.gfs_nca.tar
fi
file=com_gfs_${version}_gfs.${yy}${mm}${dd}_${hh}.gfs_nca.tar
fi

rm -f ./list.hires*
Expand All @@ -61,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 @@ -92,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

0 comments on commit 93fe4b1

Please sign in to comment.