Recipe: README

Revision as of 12:23, 6 March 2017 by Weiyuan.jiang (talk | contribs) (Created page with "This directory will use IDL to convert native cubed-sphere into lat-lon. This README file will apply to both the 12KM and 6KM directories. One just needs to change the "12" t...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This directory will use IDL to convert native cubed-sphere into lat-lon. This README file will apply to both the 12KM and 6KM directories. One just needs to change the "12" to a "6" in the scriptnames below. Also, the data directories are different.

SETUP

Run the idlstart2 script to set up your environment. This will not work on the dali nodes, since they are still SLES SP1. Need to run this on discover login nodes or batch nodes.

% source ./idlstart

RUNNING THE SCRIPT

This code will allow the user to run just a single file when issued from the command line on a Discover node. It looks for the existence of a PBS_NODEFILE. If that file does NOT exist, it only runs single file:

% ./Ops12KM_R_to_latlon.j

If this job is submitted to the batch queue, it will run through all the files in the data directory. A set of IDL scripts will be run in parallel equal to the number of hostnames in the PBS_NODEFILE.

% sbatch ./Ops12KM_R_to_latlon.j

CONFIGURE THE RUN

There are currently two types of converstions from the native CS to the Lat-Lon.

This file will convert a single variable:

cube_to_latlon.pro

This file will convert U and V to winds:

winds_cube_to_latlon.pro

In the Ops12KM_R_to_latlon.j file, choose either of the following to convert a single variable or winds:

  1. Choose which plot routine to use
  2. cube_to_latlon -> general for any variable
  3. winds_cube_to_latlong -> specific to compute wind speed at 10m
  4. set PLOT = "cube_to_latlon"

set PLOT = "winds_cube_to_latlon"

Next, set the variable name. Some examples are included. For the winds, the variable name does not matter (those variable are hard coded into the winds IDL script).

  1. Set the variable:
  2. TBISCCP -> IR
  3. T2M -> Temperature at 2m
  4. PRECTOT -> Total precipitation
  5. DBZ_MAX -> Simulated radar
  6. U10M -> Eastward wind at 10m
  7. V10M -> Westward wind at 10m
  8. winds -> windspeed at 10m; only use with winds_cube_to_latlon

set myvar = "winds" set varname = $myvar

Finally, set the data directory:

  1. Set the data directory; could find a way of getting the latest directory
  2. set dataDir = "/discover/nobackup/projects/gmao/osse2/Ops6KM_R/forecast2-11218526-e20160929_21z"

set dataDir = "/discover/nobackup/projects/gmao/osse2/Ops12KM_R/forecasts_1M/20161006_00z"

cube_to_latlon.pro

This is the IDL script that will convert from native cubed-sphere to lat-lon. In this script, you need to set the following.

Set the resolution - use 90 (1 degree) for quick debugging cResolution=90 100km (1 degree) cResolution=180 50km (1/2 degree) cResolution=360 25km (1/4 degree) cResolution=720 12km (1/8 degree) cResolution=1440 6km (1/16 degree) cResolution=1440

Next, set the variable name in the following lines. This example has "radar" as the variable name.

read_and_interpolate_cub, myfile, myvar, radar, pngImgIdim, pngImgJdim, LonBeg, LonEnd, LatBeg, LatEnd, undef, /regridCubeToLatlon, /CONSERV, regridResolution=cResolution varid = NCDF_VARDEF(id, 'radar', [xid,yid], /FLOAT) NCDF_VARPUT, id, varid, radar

No other changes are needed in this script.

winds_cube_to_latlon.pro

This is the IDL script that will extract U and V from the native cubed-sphere, compute the magnitude of U^2+V^2 to compute the winds, and the convert to lat-lon. In this script, you need to set the following.

Set the resolution - use 90 (1 degree) for quick debugging cResolution=90 100km (1 degree) cResolution=180 50km (1/2 degree) cResolution=360 25km (1/4 degree) cResolution=720 12km (1/8 degree) cResolution=1440 6km (1/16 degree)

If the user wants to change the height of the variable, then the U and V variables at the desired height or pressure level should be included.

No other changes are needed in this script.

DATA DIRECTORIES

These are the directories of where to find the different data sets:

12 KM replay forecast using the one-moment microphysics:

/discover/nobackup/projects/gmao/osse2/Ops12KM_R/forecasts_1M/

6 KM research forecast:

/discover/nobackup/projects/gmao/osse2/Ops6KM_R/