NCAR Graphics' NCL scripts

Purpose:

  • Ready made scripts are provided to create meta files for both real and ideal datasets


Necessary software to run script:

  • Obtain the WRF_NCL TAR file from the WRF Download page
  • NCL libraries
Hardware:
The code has been ported to the following machines
  • DEC Alpha
  • Linux
  • Sun
  • IBM
Steps:
  1. Untar WRF_NCL TAR file - you will have the following files:
     

     
    README_FIRST
    README_NCL
    gsn_code.ncl
    make_ncl_fortran
    make_ncl_fortran.alpha
    make_ncl_fortran.linux
    make_ncl_fortran.sun

    skewt_func.ncl
    wrf_em_b_wave.ncl
    wrf_em_hill2d.ncl
    wrf_em_grav2d.ncl
    wrf_em_qc.ncl

    wrf_em_qss.ncl
    wrf_em_qv.ncl
    wrf_em_real.ncl
    wrf_em_real_input.ncl
    wrf_em_sfc.ncl
    wrf_em_slp.ncl
    wrf_em_squall_2d_x.ncl
    wrf_em_squall_2d_y.ncl
    wrf_em_the.ncl

    wrf_plot.ncl
    wrf_user_fortran_util_0.f
    wrf_user_mass.ncl

      Are needed to build the external function
      Are NCL script to create meta code for real/ideal data
      Are NCL functions

     
     
  2. Build the external function to link you into NCL:
     
    1. NCL links in fortran shareable object files for computing some diagnostic quantities and for performing interpolations. 
    2. Presently, only one fortran object needs to be built - wrf_user_fortran_util_0.
    3. To build the fortran object, try running one of the make_ncl_fortran csh scripts that will build the shared-object library
    1.     make_ncl_fortran wrf_user_fortran_util_0

      If successful, you will see these files created in your directory:

      so_locations
      wrf_user_fortran_util_0.o
      wrf_user_fortran_util_0.so
      wrf_user_fortran_util_0_W.c

      "wrf_user_fortran_util_0.so", is the file that will be used later.
       

  1. Edit the script you want to run:
    1. Mostly it is only necessary to change the location and name of the file:
      a = addfile("../../WRFV2/test/em_real/wrfout_d01_000000.nc","r")
    2. Do not remove the ".nc" after the file name - the script needs it


  2. Run script:
     

        ncl < wrf_em_real.ncl

    This will create a meta code file : wrf_mass_plots

    The name of this file is controlled by the line:
          wks = wrf_open_ncgm("wrf_mass_plots")     inside the NCL script

  3. To view the meta file, type:

          idt  wrf_mass_plots
     

    Examples of idealized plots:
    wrf_em_b_wave.ncl
    wrf_em_grav2d.ncl
    wrf_em_hill2d.ncl
    wrf_em_qss.ncl
    wrf_em_squall_2d_x.ncl
    wrf_em_squall_2d_y.ncl


    Examples of real plots:
    wrf_em_real.ncl
    wrf_em_real_input.ncl


    Miscellanous:
    To convert NCGM files to GIF images, a very handy tool is the ncgm2gif script

    ncgm2gif -res 500x500 -nomerge test.cgm

    Will convert all images in test.cgm to testxxx.gif