#PBS -N hwrf%STORMNUM%_wrf_%CYC%
#PBS -j oe
#PBS -S /bin/bash
#PBS -q %QUEUE%
#PBS -A %PROJ%-%PROJENVIR%
#PBS -l walltime=02:20:00
#PBS -l select=16:mpiprocs=60:ompthreads=2:ncpus=120+1:mpiprocs=12:ompthreads=2:ncpus=24
#PBS -l debug=true

export NODES=17
export TOTAL_TASKS=972
export OMP_NUM_THREADS=2
export ATM_THREADS=2

model=hwrf
%include <head.h>
%include <envir-p1.h>
export FORECAST_CONF_OVERRIDE=" %FORECAST_CONF_OVERRIDE%"

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

# versions file for hwrf sets $model_ver and $code_ver

module load envvar/${envvar_ver}
module load PrgEnv-intel/${PrgEnv_intel_ver}
module load craype/${craype_ver}
module load intel/${intel_ver}
module load cray-mpich/${cray_mpich_ver}
module load cray-pals/${cray_pals_ver}
module load libjpeg/${libjpeg_ver}
module load grib_util/${grib_util_ver}
module load wgrib2/${wgrib2_ver}
module load bufr/${bufr_ver}
module load hdf5/${hdf5_ver}
module load netcdf/${netcdf_ver}
module load pnetcdf/${pnetcdf_ver}
module load nco/${nco_ver}
module load python/${python_ver}
module list

${HOMEhwrf}/jobs/JHWRF_FORECAST

%include <tail.h>

%manual

TASK wrf

PURPOSE: Runs the atmosphere-only forecast job.  

This job is typically run only in basins that are not the National
Weather Service Area of Responsibility for tropical cyclone
forecasting.  That includes the southern hemisphere, the Indian Ocean
and the North West Pacific.  However, this job can also be run if the
ocean initialization fails.

TROUBLESHOOTING

WARNING: MAKE SURE THE POST FAMILY IS REQUEUED when resubmitting a
  forecast job.  This ensures the post-processing proceeds in the
  correct order.

CAUTION: Submitting this job, in and of itself, is not enough to cause
  an atmosphere-only forecast if the ocean_init succeeded.  If the
  ocean_init or wave_init succeeded, it is likely the system will fail
  if you force this job to submit.  Follow this procedure to force an
  atmosphere-only forecast:

1. Edit the relevant storm*.conf for this storm in the COM directory.
   In the [config] section of the file, you must set run_wave=no and
   run_ocean=no like so:

   [config]
   run_ocean=no   ;; Disable ocean coupling
   run_wave=no    ;; Disable wave coupling

2. Manually clear the Pom and Wave flags in the init/ocean_init and
   init/wave_init jobs.

3. Make sure no jobs in the forecast family are running.

4. Resubmit the entire forecast family.

%end