Monday, April 28, 2014

Using input datasets in real WRF runs

 Here is a summary of the run process for five different easily available datasets one can use to run WRF. There are, of course, others, like the Japanese reanalysis and forecasts from the NAM model. However, these are the datasets I've used. Running MERRA requires some extra programs. In my experience, I haven't found it to produce particularly great output with WRF, but if you want to give it a shot, let me know and I can give you further instruction.

1) NCAR Climate Forecast System (v2)
    Download location:    CISL RDA
        NCEP Climate Forecast System Reanalysis (CFSR)
        ds093.0 (pre-2011); ds094.0 (post-2010)
        Data available every six hours (21600 seconds)
    Choose Subsetting
        Download files for desired range using two parameter presets:
            a) WRF Model Input: Vtable.CFSR - Pressure levels
            b) WRF Model Input: Vtable.CFSR - Surface
    WPS Processing
        Use ungrib to unpack the two input file types (requires two runs of ungrib)
            For the pressure level input, use Vtable.CFSR_press_pgbh06
            For surface fields, use Vtable.CFSR_sfc_flxf06
        Run metgrid with both ungrib output file types listed under fg_name in namelist
    Run WRF with the following settings
        p_top_requested            = 1000
        num_metgrid_levels        = 38
        num_metgrid_soil_levels    = 4
       
2) ERA-Interim Reanalysis
    Download location:    CISL RDA
        ECMWF Interim Reanalysis
        ds627.0
        Data available every six hours (21600 seconds)
    Choose ERA-Interim Project
        Download files from two categories for desired range (Complete File List)
            a) ERA Interim atmospheric model analysis interpolated to pressure levels
                  (uv and sc files)
            b) ERA Interim atmospheric model analysis for surface (sc files)
    WPS Processing
        Use ungrib with Vtable.ERA-interim.pl (requires one run; link all files at once)
        Run metgrid
    Run WRF with the following settings
        p_top_requested            = 1000
        num_metgrid_levels        = 38
        num_metgrid_soil_levels    = 4
       
3) GFS Final Analysis
    Download location:    CISL RDA
        NCEP Operational Data (WRF Inputs): 1-degree FNLs
        ds083.2
        Data available every six hours (21600 seconds)
    Choose 6 HOURLY FILES for period
        Use complete file list (now GRIB2 interestingly)
    WPS Processing
        Use ungrib w/GRIB2 build to unpack the input with Vtable.GFS
        Run metgrid
    Run WRF with the following settings
        p_top_requested            = 1000
        num_metgrid_levels        = 27
        num_metgrid_soil_levels    = 4
       
4) North American Regional Reanalysis
    Download location:    CISL RDA
        NCEP North American Regional Reanalysis
        ds608.0
        Data available every three hours (10800 seconds)
    Choose regrouped 3-hourly files for period
        Need three types of files
            a) 3D files
            b) flx files
            c) sfc files
        Also need the fixed fields file (Constant fields of NARR) rr-fixed.grb
    WPS Processing
        Use ungrib with Vtable.NARR
            Only need to do fixed-fields once
                Link to rr-fixed.grb
                start_date = '1979-11-08_00:00:00',
                end_date = '1979-11-08_00:00:00',
                Run ungrib
            Then link to all running data types (3d,flx,sfc) and run ungrib with different prefix
        Run metgrid with fixed file listed as constants in namelist.wps
            constants_name = './FF_NAME'
            Running data listed under fg_name as usual
    Run WRF with the following settings
        p_top_requested            = 10000
        num_metgrid_levels        = 30
        num_metgrid_soil_levels    = 4
       
5) NASA MERRA Reanalysis
    Download location:    NASA MDISC Data Subsetter/Mirador
        MERRA Data Subset
        Data available every six hours (21600 seconds)
    Need to download two types of data (MERRA, and GLDAS for land)
        Download using command 'wget --content-disposition -i [filename]'
        Need two types of MERRA data
            a) 3D files     - inst6_3d_ana_Np
            b) SFC files    - tavg1_2d_slv_Nx
            Note: don't do a spatial subset, and download all variables; download NetCDF format
            Also need the constant fields file for surface data - const_2d_asm_Nx
                Note: constants file is only available in HDF format, which converter program will 
                not accept. Use program to convert to netCDF (e.g. ncl_convert2nc)
        Need GLDAS land data
            Download files from GLDAS_NOAH025SUBP_3H set
            Note: download grib format
    Pre-processing
        a) Fix the GLDAS data (remove missing values under terrain)
            Run the program readgldas_025 for each data file (I use a script)
            Specify input file name and output file name
        b) Ungrib the GLDAS data using ungrib and provided Vtable.GLDAS
        c) Move GLDAS_CONSTANTS_INTERMEDIATE file to WPS folder
            Add file to metgrid namelist section as a constants_name entry
        d) Compile MERRA_SFC.f90 program with location of SFC data set (and constants file)
            Run MERRA_SFC to convert surface data to WPS intermediate format
            Note: careful; input file name sizes hardcoded... need to set to appropriate value!
            Note: for some reason, variable names may not be capitalized in MERRA subset 
            data. Need to change variable names for fortran program to work. Variables are
            still capitalized in constants file!
        e) Compile MERRA_UPP.f90 program with location of 3D data set
            Run MERRA_UPP to convert surface data to WPS intermediate format
            Note: same caveats apply as with MERRA_SFC program
        f) Move both intermediate file types to WPS folder
        g) Replace the gribmap.txt and METGRID.TBL files in the metgrid folder with new
            versions. Be sure to backup originals!
        h) Run metgrid to compile GLDAS and MERRA data into met_em files for real.exe
            List all three sources (GLDAS from ungrib and MERRA SFC and UPP intermediate 
            files) as input data to metgrid
    Run WRF with the following settings
        p_top_requested            = 5000
        num_metgrid_levels        = 32
        num_metgrid_soil_levels    = 4