Skip to content
Michael Dietze edited this page Jan 6, 2014 · 1 revision

Table of Contents

The Re-Analysis Pre-Processor (RAPP) overview

RAPP is a standard pre-processor that converts re-analysis files into an ED-2 friendly format. Currently it only converts re-analysis downloaded from the NCEP reanalysis (Kalnay et al 1996), but in the future the goal is to include other readily available meteorological forcing data from other sources.

System requirements

  • Fortran compiler (we recommend ifort or gfortran)
  • C compiler - no longer required
  • HDF5
  • NetCDF

RAPP structure

Three sub-directories are available at RAPP:

  • build: this directory contains the compilations instructions
  • src: this directory contains the RAPP source code
  • run: this directory contains the standard RAPP namelist (RAPP_IN) and a sample script to help downloading the re-analysis files.

Compiling RAPP

  • Go to .../RAPP/build/bin, and create a include.mk file or link an existing file to include.mk.
> ln -s include.mk.mysettings include.mk
There are a few examples available there (the include.mk.odyssey example utilises ifort). Make sure that the HDF5 and netCDF libraries are properly set, and that the main directory is correctly defined in the RAPP_ROOT variable (e.g. RAPP_ROOT=/home/myusername/ED-2.1/RAPP).
  • Once a file is created and set, build the executable by typing
> make
  • This will create the executable file (rapp_1.0) in your .../RAPP/build directory.
  • Go to the .../RAPP/run directory, and link the executable there:
> ln -s ../build/rapp_1.0 rapp_1.0

Downloading NCEP re-analysis data

  • Make sure to read the policy for using NCEP data downloaded from PSD/NOAA: http://www.esrl.noaa.gov/psd/data/gridded/data.ncep.reanalysis.html
  • Go to the run directory (.../RAPP/run), and open the shell script download.
  • Change the email variable (line 3), and include your e-mail there. This is used by the PSD/NOAA server.
  • Do not change the variable variables. All of them are needed by RAPP.
  • Change the variable years (lines 8-13) to include all years that you would like to use (N.B. re-analysis data after 1970 are more reliable because they also include satellite data). Notice that ED will not work if there are missing years, so the sequence should have no gaps.
  • Download the data by running the script as the following:
> cd ...../RAPP/run
> ./download.sh
Running this script may take several hours to a few days to complete, depending on the number of years and the speed of your internet connection.
  • Once the script is completed, it will have all variables needed stored in the netcdf subdirectory.

RAPP_IN settings

  • Once all data is downloaded, you must set up RAPP_IN. The table below describe the variables and usual configuration:
Name Description
NL%INTYPE Type of input data. Currently the only available option is ncep. This is a character variable, and it is case insensitive.
NL%INPATH Input data folder. In this folder you must have all variables needed by the input data, one directory per variable. Please check the DATASET_README.1ST file for specific information on which variables you must have. In case you have downloaded the data with the download.sh script in the run directory, this variable should be set to ./netcdf
NL%OUTPREF Prefix for the output files, including the full path. For example, if you set this variable to be NL%OUTPREF='/home/myname/ED-2.1/RAPP/run/mymetdata/MYMETDATA', the metorological header file will be available at the /home/myname/ED-2.1/RAPP/run/mymetdata directory, file MYMETDATA_HEADER.
NL%IYEARA The first year of input data to be converted. This is an integer, and it must be the first year where all days are avaialable (From January 1st to December 31).
NL%IYEARZ The last year of input data to be converted. This is an integer, and it must be the last year where all days are avaialable (From January 1st to December 31).
NL%INPFRQ The time resolution of the input dataset. This is a real and is given in seconds. In case you downloaded NCEP reanalysis using download.sh, this should be set to 21600.
NL%RADFRQ Frequency for radiation flux output. This is a real and is given in seconds. For reasonable results with ED, this should be 3600. or less. Interpolation considering the diurnal and seasonal cycle of the solar zenith angle will be done if needed.
NL%DTINC Time step for integration of the interpolated fluxes. This is a real and is given in seconds. Typical values range between 300 and 600 seconds (suggested value: 450.)
NL%REF_HGT Height information. This is a constant that will be assigned as the height for state variables, and it should reflect the characteristic height above ground of the provided state variables. If you have used download.sh to download the data, this value should be set to around 80 m, roughly corresponding to the NCEP/NCAR first Gaussian level.
NL%LONW Westernmost longitude to be included in the processed met driver. The actual edges will be determined by the script, but it will be the closest to the given point. Also, if the actual dataset covers a smaller area than the one defined by these variables, everything will be included.
NL%LONE Easternmost longitude to be included in the processed met driver. The actual edges will be determined by the script, but it will be the closest to the given point. Also, if the actual dataset covers a smaller area than the one defined by these variables, everything will be included.
NL%LATS Southernmost latitude to be included in the processed met driver. The actual edges will be determined by the script, but it will be the closest to the given point. Also, if the actual dataset covers a smaller area than the one defined by these variables, everything will be included.
NL%LATN Northernmost latitude to be included in the processed met driver. The actual edges will be determined by the script, but it will be the closest to the given point. Also, if the actual dataset covers a smaller area than the one defined by these variables, everything will be included.
NL%EDGEOFF Number of points in the edges not to be included in the output. This will make the output smaller than the actual domain, skipping the points in the edges. If using NCEP data, always allow at least two points in the edge outside your area of interest (recommended is 5). These data will have poorer quality because of the objective analysis procedure.
NL%GAMMA0 Parameter gamma from Koch et al. (1983) objective analysis. Acceptable values range between 0.05 and 1.0, with lower numbers giving more detailed fields. Commonly used and suggested number is 0.2
NL%MINWEIGHT Weights below this threshold will not be taken into account in the objective analysis. This is used to reduce the number of points considered in the objective analysis.
NL%NDOWNSCAL The number of precipitation downscaling realizations. This is to make precipitation rates to have a distribution that is closer to observations than the assumed constant rate during a time interval equal to the interval between two successive analysis (often 6 hours). Setting this number to zero means that no realization will be made. If this number is not zero, then the frequency will be given by RADFRQ. Important: The data will be produced, but the header will be always written with the first realization only. In case you want to use a different one, you must change the header manually.
NL%FRAC_U is a vector that must have size INPFRQ*12, and must have all the partial distribution function of precipitation for each INPFRQ block of day for every month. This must be in the following order (PDF for first INPFRQ hours of January, then second, third, ... block of hours for January, then repeat the same thing for February, March, ..., December).

Running RAPP

  • Before running, make sure that:
    • All netCDF reanalysis files are downloaded and in the expected order.
    • RAPP_IN namelist is set properly.
    • The executable is either copied or linked to the directory where the namelist is.
  • Run the executable
> ./rapp_1.0
  • The re-analysis pre-processing may take a few days to run depending on the domain size and time span to be included.

References

  1. Kalnay, E., and co-authors , 1996: The NCEP/NCAR 40-year reanalysis project. Bull. Am. Meteor. Soc., 77, 437-471.
  2. Koch, S. E., M. desJardins, and P.J. Kocin, 1983: An interactive Barnes objective analysis for use with satellite and conventional data. J. Climate and Appl. Meteor., 22, 1487-1503.