#PBS -N hwrf%STORMNUM%_init_gdas_6_%CYC%
#PBS -j oe
#PBS -S /bin/bash
#PBS -q %QUEUE%
#PBS -A %PROJ%-%PROJENVIR%
#PBS -l walltime=00:25:00
#PBS -l Rselect=1:ncpus=96:mpiprocs=96

export NODES=1
export TOTAL_TASKS=96

%include <head.h>
module purge
module load ecflow
%include <envir-xc40.h>

export cyc="%CYC%"
export storm_num="%STORMNUM%"

# versions file for hwrf sets $model_ver and $code_ver
model=hwrf
%include <model_ver.h>

source ${HOMEhwrf}/versions/run.ver
module use ${HOMEhwrf}/modulefiles/
module load HWRF/run
module list

export INIT_MODEL=GDAS1 INIT_FHR="6" INIT_PARTS=3DVAR
${HOMEhwrf}/jobs/JHWRF_INIT

%include <tail.h>

%manual

TASK init_gdas_6

PURPOSE: Reads GDAS 6 hour forecast files from the previous GDAS
cycle and prepares it for use by the HWRF relocate_gdas_6 job.
This job is only needed when GSI is enabled by the launch job.

PROBLEM: Cannot find GDAS data?

There are two points in the job where it will wait for GDAS data.  The
status bar will say one of these two things:

  [ungrib] process parent GRIB
  [prep] process parent spectral

Those messages are expected to stay up for ~2-4 minutes each while the
processing happens, but if they stay significantly longer than that,
then the job cannot see the GDAS data.

MANUAL BYPASS OPTION:

It is possible to manually bypass failures of this job by editing the
$COMOUT/storm$num.conf, and setting run_gsi=no.  Then clear the Gsi
event in the launch job.  The forecast should start without data
assimilation.
%end