HWRF Online Tutorial V3.9a | Additional Exercises > Idealized Run

HWRF Idealized

The default initial ambient base state assumes an f-plane at the latitude of 12.5◦. The sea surface temperature is time-invariant and horizontally homogeneous, with the default set to 302 K. No land is used in the simulation domain.Initial conditions for the HWRF idealized Tropical Cyclone case are specified using an idealized vortex superposed on a base state quiescent sounding. The default initial vortex has an intensity of 20 m/s and a radius of maximum winds of 90 km. To initialize the idealized vortex, a nonlinear balance equation in pressure-based sigma coordinates is solved within the rotated latitude-longitude E-grid framework.

The lateral boundary conditions used in the HWRF idealized simulation are the same as used in real data cases. This inevitably leads to some reflection when gravity waves emanating from the vortex reach the outer domain lateral boundaries.

The idealized simulation uses the operational HWRF triple-nested domain configuration with grid spacing at 18/6/2 km. All the operational atmospheric physics, as well as the supported experimental physics options in HWRF, can be used in the idealized HWRF framework. The UPP (see Chapter 10 of HWRF Users Guide) can be used to postprocess the idealized HWRF simulation output.

This exercise describes the process to implement HWRF v3.9a in the idealized setting. Only the WPS and WRFV3 components are required for the idealized tropical cyclone simulations. The UPP can be used for postprocessing. The other HWRF components do not need to be compiled. Please see how to compile WPS, WRF, and, if desired, UPP. However, in the interest of time the pre-compiled codes are available on Cheyenne. Note that the executable file wrf.exe needed for the idealized simulation is not the same as the one needed for the simulation for real data. Therefore, users should follow the instructions specific for building the idealized wrf.exe.

 

Input files

Two GFS GRIB files are needed to provide a template for creating the initial and lateral boundary conditions. One of the GFS GRIB files should be the analysis valid at the same time of the desired HWRF initialization. The other GRIB file should be a forecast, with lead time equal to or greater than the desired HWRF simulation. The meteorological data in these files will not be used to initialize the simulation – these files are for template purposes only.

The GFS files required in this exercise are available on NCAR's Cheyenne (/glade/p/ral/jnt/HWRF/datasets_v3.9a/Idealized/Data).

Other input files required for an idealized run are:

  • namelist.wps Namelist file for WPS; Note that geog_data_path should be modified to point to the actual path of the geog data files (/glade/p/ral/jnt/HWRF/datasets_v3.9a/Matthew/fix/hwrf_wps_geo).
  • namelist.input Namelist file for WRF
  • input.d Vortex description file
  • sound.d Sounding data; Additional four sounding files (sound.d, sound_gfdl.d, sound_jordan.d, and sound_wet.d) are provided in WRFV3/test/nmm_tropical_cyclone, however, only the one named sound.d will be used. In order to use a different sounding, rename it to sound.d.
  • storm.center Vortex center file
  • sigma.d Sigma file
  • land.nml Namelist file containing land descriptions

Create workspace and copy source codes

Create and change into directory for running idealized.

mkdir -p /glade/scratch/${USER}/Idealized/wpsprd
mkdir -p /glade/scratch/${USER}/Idealized/wrfprd
setenv WORKDIR /glade/scratch/${USER}/Idealized

cd $WORKDIR
Untar the WRFV3 (compiled for idealized run) and WPS pre-compiled code.
tar -xzvf /glade/p/ral/jnt/HWRF/HWRF_v3.9a_tut_codes/HWRF_v3.9a_WRFV3_Idealized.tar.gz
tar -xzvf /glade/p/ral/jnt/HWRF/HWRF_v3.9a_tut_codes/HWRF_v3.9a_WPSV3.tar.gz

Run WPS to create the ICs and LBCs

Run geogrid

  • Copy the WPS namelist in the wpsprd directory.
    cd $WORKDIR/wpsprd
    cp ${WORKDIR}/WRFV3/test/nmm_tropical_cyclone/namelist.wps ./
  • Edit namelist.wps to make sure geog_data_path points to the location of the WPS geographical data files.
    geog_data_path='/glade/p/ral/jnt/HWRF/datasets_v3.9a/Matthew/fix/hwrf_wps_geo'
  • Link the geogrid table.
    ln -fs ${WORKDIR}/WPSV3/geogrid/GEOGRID.TBL.NMM ./GEOGRID.TBL
  • Run executable geogrid.exe on the command line or submit it to a compute node or batch system.
    ${WORKDIR}/WPSV3/geogrid.exe |& tee geogrid.log
  • Verify that the output files were created.
    ls -l geo_nmm_nest.l0[12].nc geo_nmm.d01.nc

Run ungrib

  • Link the ungrib table.
    ln -fs ${WORKDIR}/WPSV3/ungrib/Variable_Tables/Vtable.GFS ./Vtable
  • Link the two input GFS files.
    ln -fs /glade/p/ral/jnt/HWRF/datasets_v3.9a/Idealized/Data/gfs.t12z.pgrb2.0p25.f* ./
    ls -l gfs.t12z.pgrb2.0p25.f000 gfs.t12z.pgrb2.0p25.f120
  • Link the GFS files to the names expected by ungrib.
    ${WORKDIR}/WPSV3/link_grib.csh gfs.t12z.pgrb2.0p25.f000 gfs.t12z.pgrb2.0p25.f120
  • Run executable ungrib.exe on the command line or submitting it to a compute node or batch system.
    ${WORKDIR}/WPSV3/ungrib.exe |& tee ungrib.log
     
  • Verify that the output files were created.
    ls -l GFS:2012-10-26_12 GFS:2012-10-31_12

Run mod_levs

  • Run executable mod_levels.exe twice on the command line or submitting it to a compute node or batch system. This program will reduce the number of vertical levels in the GFS file. Only the levels listed in variable press_pa in namelist.wps will be retained.
    ${WORKDIR}/WPSV3/util/mod_levs.exe GFS:2012-10-26_12 new_GFS:2012-10-26_12
    ${WORKDIR}/WPSV3/util/mod_levs.exe GFS:2012-10-31_12 new_GFS:2012-10-31_12
  • Verify that the output files were created.
    ls -l new_GFS:2012-10-26_12 new_GFS:2012-10-31_12

Run metgrid

  • Link the metgrid table.
    ln -fs ${WORKDIR}/WPSV3/metgrid/METGRID.TBL.NMM ./METGRID.TBL
  • Run executable metgrid.exe on the command line or submitting it to a compute node or batch system.
    ${WORKDIR}/WPSV3/metgrid.exe |& tee metgrid.log
     
  • Verify that the output files were created.
    ls -l met_nmm.d01.2012-10-26_12_00_00.nc met_nmm.d01.2012-10-31_12_00_00.nc

 

Running ideal.exe and wrf.exe

The steps below outline the procedure to create initial and boundary conditions for the idealized simulation. It assumes that the run will be conducted in a working directory named $WORKDIR/wrfprd.

  • Create and change into directory for running ideal and real.
    • cd $WORKDIR/wrfprd
  • Link WRF input files.
    • ln -fs ${WORKDIR}/WRFV3/run/ETAMPNEW_DATA ./
      ln -fs ${WORKDIR}/WRFV3/run/ETAMPNEW_DATA.expanded_rain ./
      ln -fs ${WORKDIR}/WRFV3/run/GENPARM.TBL ./
      ln -fs ${WORKDIR}/WRFV3/run/LANDUSE.TBL ./
      ln -fs ${WORKDIR}/WRFV3/run/SOILPARM.TBL ./
      ln -fs ${WORKDIR}/WRFV3/run/VEGPARM.TBL ./
      ln -fs ${WORKDIR}/WRFV3/run/tr49t67 ./
      ln -fs ${WORKDIR}/WRFV3/run/tr49t85 ./
      ln -fs ${WORKDIR}/WRFV3/run/tr67t85 ./
      ln -fs ${WORKDIR}/WRFV3/run/ozone.formatted ./
      ln -fs ${WORKDIR}/WRFV3/run/ozone_lat.formatted ./
      ln -fs ${WORKDIR}/WRFV3/run/ozone_plev.formatted ./
      ln -fs ${WORKDIR}/WRFV3/run/RRTM_DATA ./
      ln -fs ${WORKDIR}/WRFV3/run/RRTMG_LW_DATA ./
      ln -fs ${WORKDIR}/WRFV3/run/RRTMG_SW_DATA ./
    •  

  • Link the WPS files.
    • ln -fs $WORKDIR/wpsprd/met_nmm* ./
      ln -fs $WORKDIR/wpsprd/geo_nmm* ./
    •  

  • Copy the idealized simulation input files.
    • cp ${WORKDIR}/WRFV3/test/nmm_tropical_cyclone/input.d ./
      cp ${WORKDIR}/WRFV3/test/nmm_tropical_cyclone/sigma.d ./
      cp ${WORKDIR}/WRFV3/test/nmm_tropical_cyclone/sound.d ./
      cp ${WORKDIR}/WRFV3/test/nmm_tropical_cyclone/storm.center ./
      cp ${WORKDIR}/WRFV3/test/nmm_tropical_cyclone/land.nml ./
    •  

  • Copy namelist input.
    • cp ${WORKDIR}/WRFV3/test/nmm_tropical_cyclone/namelist.input ./
  • Copy and edit the qsub template to the wrfprd directory.
    • cp /glade/p/ral/jnt/HWRF/HWRF_v3.9a_tut_codes/qsub_Cheyenne_wrapper.csh run.ideal.csh
    • Edit run.ideal.csh

      #PBS -N ideal
      #PBS -A NJNT0006
      #PBS -l walltime=01:20:00
      #PBS -q premium
      #PBS -l select=4:ncpus=24:mpiprocs=24
      #

      mpirun -np 96 ${WORKDIR}/WRFV3/main/ideal.exe

  • Verify that the output files were created.
    • ls -l wrfinput_d01 wrfbdy_d01 fort.65 

      In the interest of time and resources, the idealized HWRF simulation will be run for only 12 h.

      Run WRF

  • Edit namelist.input to run the forecast for 12 h.
    Change the

    • end_day = 27, 27, 27,
      end_hour= 00, 00, 00,
    •  

    accordingly.

 

  • Replace the history-output settings in namelist.input with the following:
    • history_interval = 180, 180, 180,
      auxhist1_interval = 60, 60, 60,
      auxhist2_interval = 60, 60, 60,
      auxhist3_interval = 180, 180, 180,
      history_end = 540, 540, 540,
      auxhist2_end = 540, 540, 540,
      auxhist1_outname = "wrfdiag_d",
      auxhist2_outname = "wrfout_d_",
      auxhist3_outname = "wrfout_d_",
      frames_per_outfile = 1, 1, 1,
      frames_per_auxhist1 = 999, 999, 999,
      frames_per_auxhist2 = 1, 1, 1,
      frames_per_auxhist3 = 1, 1, 1,
      history_end = 720, 720, 720,
      auxhist2_end = 720, 720, 720,
  • Copy and edit the qsub template to the wrfprd directory.
    • cp /glade/p/ral/jnt/HWRF/HWRF_v3.9a_tut_codes/qsub_Cheyenne_wrapper.csh run.wrf_ideal.csh
    • Edit run.wrf_ideal.csh
      #PBS -N wrf_ideal
      #PBS -A NJNT0006
      #PBS -l walltime=00:20:00
      #PBS -q premium
      #PBS -l select=4:ncpus=24:mpiprocs=24
      #

      mpirun -np 96 ${WORKDIR}/WRFV3/main/wrf.exe

  • Finally, submit the jobs
    • qsub run.ideal.csh

    Note that executable wrf.exe must have been created using the instructions for idealized simulations described in Chapter 2 of HWRF Users Guide. The executable created for regular HWRF simulations that ingest real data should not be used to conduct idealized simulations.

  • Verify that the output files were created.
    • ls -l wrfout_d01* wrfout_d02* wrfout_d03*

     

    Post processing and plotting of outputs

  • Create a working directory
  • mkdir -p ${WORKDIR}/postprd
    cd ${WORKDIR}/postprd
  •  

  • Copy the run_unipostandgrads script to the working directory. The exercise is designed assuming that the user had already copied the pre-compiled for the real case.
  • cp /glade/p/ral/jnt/HWRF/datasets_v3.9a/scripts/run_unipostandgrads ./
    cp ${SCRATCH/hwrfrun/sorc/UPP/scripts/cbar.gs ./
    ln -fs ${SCRATCH}/hwrfrun/parm/post/hwrf_cntrl.nonsat wrf_cntrl.parm
  •  

  • Edit the run_unipostandgrads script by making the following changes. [#] indicates the line number to modify.
    • Set environment variables and directories. Most of these are already set for the tutorial.

      [76] TOP_DIR=/glade/scratch/$USER/HWRF_v3.9a/hwrfrun/sorc/ --> Top of HWRF directory
      [77] DOMAINPATH=/glade/scratch/$USER/Idealized --> Top of Idealized directory
      [78] WRFPATH=/glade/scratch/$USER/HWRF_v3.9a/hwrfrun/sorc/WRFV3/ --> WRFV3 directory
      [79] UNIPOST_HOME=${TOP_DIR}/UPP --> UPP directory

    • Define simulation timing.

      [94] export startdate=2012102612 --> start date of simulation
      [95] export fhr=00 --> start hour of simulation
      [96] export lastfhr=12 --> end hour of simulation
      [97] export incrementhr=03 --> increment of simulation

    • Edit the line to select the dynamic core.

      [87] export dyncore="NMM" --> WRF dynamic core is NMM

    • Edit the line to select the domain to process.

      [100] export domain_list="d03" --> process d03 for this tutorial

    • Select the lat-lon option for copygb option.

      [114] export copygb_opt="lat-lon"

    • Link appropriate files.

      [242] ln -fs ${SCRATCH}/hwrfrun/parm/post/hwrf_cntrl.nonsat wrf_cntrl.parm --> Link to hwrf parm file
      [263] ln -fs ${WRFPATH}/run/ETAMPNEW_DATA.expanded_rain eta_micro_lookup.dat --> Link to mp table

    • The wrfout files from HWRF using a different naming convention. Edit the line to correct it.

      [341] wrfout_${domain}_${YY}-${MM}-${DD}_${HH}_00_00

    • Edit plotting option to display of wind contours better.

      [640] 'd ugrdprs;skip(vgrdprs,10)'

    • Finally, save and close the run_unipostandgrads script.
  • Run the script run_unipostandgrads on the command line.
    • ./run_unipostandgrads |& tee post.log
    •  
  • This script creates figures in the current directory. To display those images use display filename.gif.
    • Because of the moving nests, the accumulated precipitation plots may not be ideal.