Guidance for WRF users for new NCEP GFS and FNL GRIB2 files ----------------------------------------------------------- *********** updated May 19, 2015 with info about WRF 3.7 ****************** ----------------------------------------------------------- rdahelp@ucar.edu has fielded many requests for assistance from WRF users attempting to use the new NCEP GFS (and FNL) files after the GFS major upgrade of Jan 14, 2015. The best source of WRF information is http://www2.mmm.ucar.edu/wrf/users/docs/user_guide_V3/contents.html but here is a short cheat-sheet for the impatient. These instructions are based upon the most recent WRF release, WRF V3.7, released April 20, 2015. You can download the latest releases from http://www2.mmm.ucar.edu/wrf/users/download/ Globally-gridded data is ingested in the ungrib portion of WPS (WRF Preprocessing System). If you have not already compiled WPS to work with both GRIB1 and GRIB2 data formats, upgrade to WPS release 3.7. http://www2.mmm.ucar.edu/wrf/users/wpsv3.7/updates-3.7.html If you have already compiled WPS for both GRIB1 and GRIB2, skip to the VTable discussion. ****** Libraries needed for WPS including JasPer ************** If you are already running WPS with GRIB1 input then, you already have all of the libraries you need to run WPS with GRIB2 input .except. for the JasPer libarary. GRIB2 support in ungrib.exe uses JPEG compression algorithms found in the JasPer libraries. You need to install them first and then set the environment variables for $JASPERLIB or $JASPERINC to point to where you installed them. For full details about external libraries, read the file WPS/ungrib/README_LIBS (found in the WPS tar package) and http://www2.mmm.ucar.edu/wrf/users/docs/user_guide_V3/users_guide_chap3.htm#_How_to_Install The #_How_to_Install notes point to the official JasPer library repository: http://www.ece.uvic.ca/~mdadams/jasper/ HOWEVER, many users may find it easier to FIRST install wgrib2, an extremely useful utility program for working with GRIB2 files. The wgrib2 install package painlessly installs the JasPer libraries. Then set the environment variables for $JASPERLIB or $JASPERINC to point to where wgrib2 installed them and WPS should install smoothly. Follow the directions in http://rda.ucar.edu/datasets/ds083.2/software/wgrib2_install+.txt -- Learn about wgrib2: http://www.cpc.ncep.noaa.gov/products/wesley/wgrib2/ -- Download from here: ftp://ftp.cpc.ncep.noaa.gov/wd51we/wgrib2/wgrib2.tgz -- Compiling directions for linux/unix here: http://www.cpc.ncep.noaa.gov/products/wesley/wgrib2/compile_questions.html ********************* Compile Hints for WPS ***************************** To compile WPS to use GRIB1 AND GRIB2 data, type ./configure in the top-level WPS directory. You should see many options: ----------------------------------------------------------- Please select from among the following supported platforms. 1. Darwin Intel PGI compiler (serial) 2. Darwin Intel PGI compiler (serial_NO_GRIB2) 3. Darwin Intel PGI compiler (dmpar) 4. Darwin Intel PGI compiler (dmpar_NO_GRIB2) 5. Darwin Intel Intel compiler (serial) 6. Darwin Intel Intel compiler (serial_NO_GRIB2) 7. Darwin Intel Intel compiler (dmpar) 8. Darwin Intel Intel compiler (dmpar_NO_GRIB2) 9. Darwin Intel g95 compiler (serial) 10. Darwin Intel g95 compiler (serial_NO_GRIB2) 11. Darwin Intel g95 compiler (dmpar) 12. Darwin Intel g95 compiler (dmpar_NO_GRIB2) 13. Darwin Intel gfortran (serial) 14. Darwin Intel gfortran (serial_NO_GRIB2) 15. Darwin Intel gfortran (dmpar) 16. Darwin Intel gfortran (dmpar_NO_GRIB2) 17. Darwin PPC xlf (serial) 18. Darwin PPC xlf (serial_NO_GRIB2) 19. Darwin PPC xlf gcc3.3 SystemStubs (serial) 20. Darwin PPC xlf gcc3.3 SystemStubs (serial_NO_GRIB2) 21. Darwin PPC g95 (serial) 22. Darwin PPC g95 (serial_NO_GRIB2) 23. Darwin PPC g95 (dmpar) 24. Darwin PPC g95 (dmpar_NO_GRIB2) Enter selection [1-24] : ----------------------------------------------------------- Enter the appropriate option for your compiler. DO NOT select the even-numbered _NO_GRIB2 options. Select one of the odd-numbered options. After you make your selection, you are ready to compile: Enter selection [1-24] : 21 ------------------------------------------------------------------------ Configuration successful. To build the WPS, type: compile ------------------------------------------------------------------------ ******************** Vtable Discussion ************************* Vtables are a Rosetta stone that tells ungrib how to interpret the variables in a GRIB file. For each type of GRIB file, you need to supply the appropriate Vtable. Your choice of Vtable depends upon the original source of the data, not where you got it from. For instance, ds083.2 (FNL) comes from NCEP's GFS model, so use that Vtable. As explained in the notice to FNL users in Oct 2014, ds083.2 has been stripped of the nonsensical forecast variables. FNL 00 forecast hour (initialization) files taken directly from the NCEP site will still contain the nonsensical forecast variables Both files use the same Vtable. The WPS 3.7 tar package supplies many of the commonly-used Vtables. > ls WPS/ungrib/Variable_Tables/ README Vtable.GODAS Vtable.AFWAICE Vtable.GSM Vtable.AGRMETSNOW Vtable.JMAGSM Vtable.AGRMETSOIL Vtable.NAM Vtable.AGRMETSOIL2 Vtable.NARR Vtable.AGRWRF Vtable.NCEP2 Vtable.ARW.UPP Vtable.NNRP Vtable.ARWp.UPP Vtable.NOGAPS Vtable.AVN0P5WRF Vtable.NOGAPS_needs_GFS_soil Vtable.AWIP Vtable.NavySST Vtable.CFSR2_web Vtable.RAP.hybrid.ncep Vtable.CFSR_mean Vtable.RAP.pressure.ncep Vtable.CFSR_press_pgbh06 Vtable.RAP.sigma.gsd Vtable.CFSR_sfc_flxf06 Vtable.RUCb Vtable.ECMWF Vtable.RUCp Vtable.ECMWF_sigma Vtable.SST Vtable.ERA-interim.ml Vtable.TCRP Vtable.ERA-interim.pl Vtable.UKMO_ENDGame Vtable.GFDL Vtable.UKMO_LANDSEA Vtable.GFS Vtable.UKMO_no_heights Vtable.GFSENS You need to download Vtable.GFS_new from http://www2.mmm.ucar.edu/wrf/src/Vtable.GFS_new and move it into the WPS/ungrib/Variable_Tables directory along with the others. Link the appropriate Vtable thusly: ln -sf ungrib/Variable_tables/Vtable.YourVersion Vtable For instance, to use GFS or FNL data before the big GFS update on Jan 14, 2015, use: ln -sf ungrib/Variable_tables/Vtable.GFS Vtable For files Jan 14, 2015 12UTC and later, use: ln -sf ungrib/Variable_tables/Vtable.GFS_new Vtable For details about how to run WPS, particularly ungrib.exe, read: http://www2.mmm.ucar.edu/wrf/users/docs/user_guide_V3/users_guide_chap3.htm#_How_to_Run paying special attention to Step 2: Extracting meteorological fields from GRIB files with ungrib *********************** Closing ******************************* Now you are ready to use either GRIB1 or GRIB2 files in WRF and you know how to switch between different input data files.