0% found this document useful (0 votes)
189 views39 pages

Data

This document provides information about input data, external data sources, and utilities for the Weather Research and Forecasting (WRF) model. It describes the mandatory and recommended input data fields for WRF, including 3D and 2D data. It also lists several global, North American, and climate reanalysis datasets that can be used for initial and boundary conditions. Finally, it discusses utilities for working with GRIB and intermediate data formats, designing model domains, and evaluating WRF output.

Uploaded by

Dodi Ardiansyah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
189 views39 pages

Data

This document provides information about input data, external data sources, and utilities for the Weather Research and Forecasting (WRF) model. It describes the mandatory and recommended input data fields for WRF, including 3D and 2D data. It also lists several global, North American, and climate reanalysis datasets that can be used for initial and boundary conditions. Finally, it discusses utilities for working with GRIB and intermediate data formats, designing model domains, and evaluating WRF output.

Uploaded by

Dodi Ardiansyah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 39

WRF

Data and Utilities

Kelly Werner
November 2017
Input Data
Input Data: Mandatory Fields
• 3D Data (data on pressure levels, for example)
Temperature
U and V components of wind
Geopotential Height
Relative Humidity/Specific Humidity

• 2D Data
Surface pressure
Mean sea-level pressure
Skin temperature/SST
2 meter temperature and relative humidity
10 meter U and V components of wind
Soil data (temperature and moisture) and soil height

• Recommended Fields
LANDSEA mask field for input data
Water equivalent snow depth
SEAICE
External Data Sources: Global
Name Resolution Coverage Temporal Website
Availability
NCEP/NCAR Reanalysis 209 km Global Jan 1948 – present http://rda.ucar.edu/da
(R1/NNRP) 6-hourly tasets/ds090.0
NCEP/DOE Reanalysis 209 km Global Jan 1979 – present http://rda.ucar.edu/da
(R2) 6-hourly tasets/ds091.0
ERA Interim Data 1.125° - 0.703° Global Jan 1979 – present http://rda.ucar.edu/da
6-hourly tasets/ds627.0
ECMWF’s Operational Varying Jan 2011 – present http://rda.ucar.edu/da
Model Analysis tasets/ds113.0
NCEP GDAS/FNL 0.25° Global July 2015 – present http://rda.ucar.edu/da
Reanalysis 6-hourly tasets/ds083.3
GFS Real-time 1° Global ftp://ftpprd.ncep.noa
a.gov/pub/data/nccf/c
om/gfs
NCEP GFS/FNL 1° Global Aug 1999 – present http://rda.ucar.edu/da
Reanalysis 6-hourly tasets/ds083.2
GFS Gridded Model 0.5° Global Dec 2002 – present http://rda.ucar.edu/da
Data 24-hourly tasets/ds335.0
NCEP GFS 0.25° 0.25° Global Jan 2015 – present http://rda.ucar.edu/da
3-hourly & 12-hourly tasets/ds084.1
External Data Sources: North America

Name Resolution Coverage Temporal Website


Availability
NAM Real-time 32/12 km North America ftp://ftpprd.ncep.no
6-hourly aa.gov/pub/data/ncc
f/com/nam
NAM Analysis 12 km North America Jan 2012 – present http://rda.ucar.edu/
6-hourly datasets/ds609.0
GCIP NCEP Eta 40 km North America April 1995 – present http://rda.ucar.edu/
3-hourly & 6-hourly datasets/ds609.2
NCEP NARR 32 km North America Nov 1979 – present http://rda.ucar.edu/
3-hourly datasets/ds608.0
External Data Sources: Climate
Name Resolution Coverage Temporal Website
Availability
NCEP Climate 0.3° to 2.5° Global Jan 1979 – Dec 2010 http://rda.ucar.edu/
Forecast System 6-hourly datasets/ds093.0
Reanalysis (CFSR)
NCEP Climate 0.2° to 2.5° Global Jan 2011 – present http://rda.ucar.edu/
Forecast System 6-hourly datasets/ds094.0
Reanalysis II (CFSv2)
NCAR CESM CMIP5 6-hourly Global Jan 1950 – 2100 http://rda.ucar.edu/
data (netCDF format) datasets/ds316.0
NCAR CESM CMIP5 6-hourly Global Jan 1951 – 2100 http://rda.ucar.edu/
data (IM – Bias datasets/ds316.1
Corrected)

SST DATA
NCEP SST Analysis 1° - 1/12° Global http://polar.ncep.no
aa.gov/sst
NOMAD3 SST 1° - 0.25° Global Jan 1854 – present http://nomads.ncdc.
(depending which noaa.gov/data.php
product)
NCEP & NCDC 1° - 2° Global Jan 1854 – Dec 2015 http://rda.ucar.edu/
Reconstructed SST datasets/ds277.0
External Data Sources: RDA
http://rda.ucar.edu
External Data Sources: RDA

https://rda.ucar.edu/datasets/ds083.2/
External Data Sources: RDA
http://www2.mmm.ucar.edu/wrf/users/download/free_data.html
External Data Sources: NOMADS
http://nomads.ncdc.noaa.gov

NAM
GFS
RUC
CFS
NARR
R1/R2
SST
Utilities
• Grib and Intermediate Data

• Designing a model domain

• netCDF tools

• OBSGRID

• MET
GRIB Data Handling
• Documents
– https://rda.ucar.edu/index.html#gribdoc (GRIB1 data)
– https://rda.ucar.edu/index.html#grib2doc (GRIB2 data)

• Decoders
– wgrib, wgrib2, unpackgrib2.c, grib2to1.c
http://rda.ucar.edu/#!GRIB
http://www.cpc.ncep.noaa.gov/products/wesley/wgrib.html
http://www.cpc.ncep.noaa.gov/products/wesley/wgrib2

– g1print.exe and g2print.exe


- Show data available in GRIB1 and GRIB2 files
- Available from util/ directory in WPS

• grib2ctl.pl
– Create .ctl and .idx files, so that you can plot GRIB files with GrADS
– http://www.cpc.ncep.noaa.gov/products/wesley/grib2ctl.html

• ncl_convert2nc
– Converts from grib format to netcdf format
http://www.ncl.ucar.edu/Document/Tools/ncl_convert2nc.shtml
Writing Intermediate File Format
• http://www2.ucar.edu/wrf/users/docs/user_guide_V3/users_guid
e_chap3.htm#_Writing_Meteorological_Data
• wrf_wps_write_int
FIELD = “SST”
UNITS = “K”
DESC = “Sea Surface Temperature”

opt = True
opt@map_source = “ERA-I Data”
opt@projection = 0
opt@startloc = “SWCORNER”
opt@startlon = 0.0
opt@startlat = -90.0
opt@deltalon = 1.25
opt@deltalat = 0.942408
opt@is_wind_earth_relative = False
opt@date = “2015-07-26_00:00:00”
opt@level = 200100.

wrf_wps_wrtie_int(IM_name,FIELD,UNITS,DESC,VAR(:,:),opt)
Reading Intermediate Format Files

• wrf_wps_read_int • rd_intermediate
! opens file ===========================================
istatus = wrf_wps_open_int(filename) FIELD = TT
UNITS = K DESCRIPTION = TEMPERATURE
DATE = 2000-01-24_12:00:00 FCST = 0.000000
! reads header SOURCE = unknown model from NCEP GRID 212
wrf_wps_rdhead_int(istatus,head_real,field,h LEVEL = 200100.000000
date, \ I,J DIMS = 185, 129
units,map_source,desc) IPROJ = 1
REF_X, REF_Y = 1.000000, 1.000000
REF_LAT, REF_LON = 12.190000, -133.459000
! reads slab DX, DY = 40.635250, 40.635250
Slab = wrf_wps_rddata_int(istatus,nx,ny) TRUELAT1 = 25.000002
DATA(1,1) = 295.910950
===========================================

! Loop until reaching the end of the file


Utility: plotfmt
• The plotfmt program plots the fields in the ungribbed intermediate files
ncl plotfmt.ncl ‘filename=“FNL:2007-09-15_00”’
Plotting Intermediate Files in netCDF Format
• Use the utility int2nc.exe
– Converts intermediate files created by ungrib.exe to netcdf format
– ./int2nc.exe FILE:yyyy-mm-dd_hh
• To plot: plotfmt_nc.ncl
ncl plotfmt_nc.ncl ‘inputFILE=“FNL:2007-09-15_00”’

Plot Using ncview Plot Using plotfmt_nc.ncl


Model Domain Design
mpres@mpFillColors =
(/"background","DeepSkyBlue", • plotgrids.ncl
"ForestGreen","DeepSkyBlue",
"transparent"/) - WPS/util/plotgrids.ncl
- Reads namelist information to
mpres@mpGridSpacingF = 45 generate plot
lnres@domLineColors = (/ - X11, png, pdf
"white", "Red" , "Red" , "Blue" /)

mpres@mpOutlineBoundarySets
“NoBoundaries” ; “Geophysical”
“National” ; “USStates”
“GeophysicalAndUSStates”
“AllBoundaries”
pares = True
pmres@gsMarkerColor = "White”
pmres@gsMarkerIndex = 16
pmres@gsMarkerSizeF = 0.01
gsn_polymarker(wks,mp,-
77.26,38.56,
pmres)
Model Domain Design
DOMS = 1 Suggested namelist options
DX = 36. parent_id = 0,
MAP = "mercator" parent_grid_ratio = 1,
LAT1 = (/ -35.0, -45., -27. /) i_parent_start = 1,
LAT2 = (/ 0., -20., -23. /) j_parent_start = 1,
LON1 = (/ 131., 121., 125./) e_we = 123,
LON2 = (/ 171., 159., 131./) e_sn = 107,
parent_id = (/ 0, 1, 2 /) dx = 36000,
parent_grid_ratio = (/ 1, 3, 3 /) dy = 36000,
map_proj = 'mercator',
ref_lat = -17.50,
ref_lon = 151.00,
truelat1 = -17.00,
design_grids.ncl truelat2 = 0.00,
stand_lon = 151.00,

18
netCDF Tools
NCO Tools
http://nco.sourceforge.net
• netCDF Operators are command-line programs that take netCDF (HDF and/or
DAP) files as input, then operate (e.g., derive new data, compute stats, print,
manipulate metadata) and output to the screen or files in various formats
(text, binary, netCDF, etc.)

• ncdiff
– Shows the differences between 2 files
ncdiff input1.nc input2.nc diff.nc

• ncrcat (nc cat)


– Writes specified variables/times to a new file, or concatenates files
ncrcat –d file1.nc file2.nc combined.nc
ncrcat –d Time,0,231 –v RAINNC wrfout* RAINNC.nc

• ncra (nc average)


– Averages variables in files and writes to a new file
ncra –v T2 file1.nc file2.nc -o T2.nc
ncra –v T2 wrfout* -o T2.nc
NCO Tools (continued)
http://nco.sourceforge.net

• ncrename
– Renames variables, dimensions, attributes
ncrename –v LANDUSE,LAND –a missing_value,_FillValue
file.nc

• ncks (nc kitchen sink)


– Combination of several NCO tools to allow
cutting/pasting subsets of data into a new file
• Extracting a specific variable
ncks –v RAINNC wrfout_d01_2015-06-01_00:00:00 RAINNC.nc
• Splitting files
ncks –d Time,1,1 wrfout –o wrfout1.nc
NCO Tools: Other Available Operators
• ncap2: arithmetic processor
• ncatted: ATTribute editor
• ncbo: binary operator (includes ncadd, ncsubtract,
ncmultiply, ncdivide)
• ncea: ensemble averager
• ncecat: ensemble conCATenator
• ncflint: FiLe INTerpolator
• ncpdq: permute dimensions quickly, pack data
quietly
• ncrename: RENAME-er
• ncwa: weighted averager
ncview
http://meteora.ucsd.edu/~pierce/ncview_home_page.html

• A graphical interface that


allow quick viewing of netCDF
files
– All variables found in file
– Detect where things go wrong

• Other options
– Time series
– Vertical Cross Section

• WRF/WPS files
– Any netCDF format file
• geo_em.d0*, met_em.d0*,
wrfinput_d0*, wrfout.d0*, wrfrst.d0*
ncview

- Beginning V3.7

- Works with wrfout* files

- Must have 1 time period per file


ncBrowse
http://www.epic.noaa.gov/java/ncBrowse/
ncdump
• Reads a netCDF dataset and prints information from
that dataset

• ncdump –h file
– Prints header (inclusive list of variables in the file)

• ncdump –v VAR file


– Prints specific data for the variable ‘VAR’

• ncdump –v Times file


– Prints the times that are included in the file
ncdump –v Times
netcdf wrfout_d01_2000-01-24_12:00:00 {
dimensions:
Time = UNLIMITED ; // (3 currently)
DateStrLen = 19 ;
west_east = 73 ;
south_north = 60 ;
west_east_stag = 74 ;
bottom_top = 27 ;
south_north_stag = 61 ;
bottom_top_stag = 28 ;
variables:
char Times(Time, DateStrLen) ;
float LU_INDEX(Time, south_north, west_east) ;
LU_INDEX:FieldType = 104 ;
LU_INDEX:MemoryOrder = "XY " ;
LU_INDEX:description = "LAND USE CATEGORY" ;
LU_INDEX:units = "" ;
LU_INDEX:stagger = "" ;
………
………

global attributes:
:TITLE = " OUTPUT FROM WRF V3.4.1 MODEL";
:START_DATE = "2000-01-24_12:00:00" ;
:WEST-EAST_GRID_DIMENSION = 74 ;
:SOUTH-NORTH_GRID_DIMENSION = 61 ;
:BOTTOM-TOP_GRID_DIMENSION = 28 ;
:DX = 30000.f ;
:DY = 30000.f ;
………
………

data:
Times =
"2000-01-24_12:00:00",
"2000-01-24_18:00:00",
"2000-01-25_00:00:00"
Other Utilities
• Additional utilities
– read_wrf_nc: reads WRF netCDF file, outputs various data
– iowrf: extracts a box from WRF netCDF files, thin or destagger data
– wrf_interp: interpolates WRF output files to pressure, height-agl,
height-msl, potential temp, and equivalent potential temp, and can
perform underground extrapolation
– p_interp: converts wrfout data to pressure levels
– v_interp: adds vertical levels in WRF input and boundary files
– diffwrf: performs several functions, including making comparisons of
two WRF files
– For more details on the above utilities, see:
http://www2.mmm.ucar.edu/wrf/users/utilities/util.htm

• To download utilities:
http://www2.mmm.ucar.edu/wrf/users/download/get_sources.html
ImageMagick
http://www.imagemagick.org
• Converts graphical files from one format to another
convert file.pdf file.png
convert file.png file.bmp

• Many options available


– Rotate frames, trim white space, etc.
– 2 ways to use
1) display plot.png
2) Convert –trim +repage –background white –flatten plot.pdf plot.png

• Can make movies


– Can create individual frames for each image

• Maintains high resolution – great for publishing!

• Cannot deal with .ncgm files


Special WRF Output Variables
• The WRF model outputs the state variables defined in the Registry file,
and these state variables are used in the model’s prognostic equations.
Some of these variables are perturbation fields and therefore, the
following definitions for reconstructing meteorological variables are
necessary:
Total geopotential PH + PHB
Total geopotential height in m (PH + PHB) / 9.81
Total potential temp in K T + 300
Total pressure in mb (P + PB) * 0.01
Wind components, grid relative U, V
Surface pressure in Pa Psfc
Surface winds, grid relative U10, V10 (valid at mass points)
Surface temp and mixing ratio T2, Q2

See WRFV3/Registry/Registry.EM_COMMON for description of variables


OBSGRID
OBSGRID
• To improve a first-guess gridded analysis by
incorporating additional observational
information
– Traditionally first-guess analysis came from low-resolution
global analysis and forecast grids
– These days, higher-resolution, regional scale analyses are
more readily available

• When is this method useful?


– When using very coarse resolution first-guess input data
– If you conducted a field campaign and have acquired very
high-resolution station data (for example)
OBSGRID: Basic Concept
OBSGRID: How to Run
• Get the source code
http://www2.mmm.ucar.edu/wrf/users/downloads.html
• Compile
• Prepare observation files
• Edit the namelist.oa
• Link in met_em* files from WPS
• Run the program
– ./obsgrid.exe
See the WRF Users’ Guide for detailed
• Check your output information
http://www2.mmm.ucar.edu/wrf/users/docs
/user_guide_V3.8/users_guide_chap7.htm
OBSGRID: How to Use to Run WRF
• Link the ‘metoa_em*’ files to WRF running
directory
ln –sf ../../../OBSGRID/metoa_em.d01.* .

• Add the following to the &time_control section of the


namelist
auxinput1_inname = “metoa_em.d<domain>.<date>”

• Run real.exe

• Run wrf.exe
OBSGRID - Grid Nudging - Surface
• If you are interested in doing surface analysis nudging

• OBSGRID creates a file called wrfsfdda_d0*

• How to use this:


– In &fdda, set grid_fdda = 1 and grid_sfdda = 1
– Run real.exe and get a file called wrffdda_d01, and use with
wrfsfdda_d01, wrfinput_d01, and wrfbdy_d01
– Run wrf.exe

• For more information, refer to Jimy Dudhia’s ARW Nudging talk


OBSGRID – Observation Nudging
• Allows for input observation data & quality control

• Used if you have a large number of extra observations, and a single


case study (not recommended for climate studies)

• Can get obs data from CISL (little R format)

• How to use this


– OBSGRID creates a files called OBSDOMAIN_XXX (can concatenate files into 1:
OBSDOMAIN_101)
– In &fdda, add obs_nudge_opt = 1
– In &time_control, add auxinput11_interval_s = 180, auxinput11_end_h = 24
– Will need OBSDOMAIN_101, wrfinput_d01 and wrfbdy_d01 files
– Run real.exe and wrf.exe as usual

• For more information, see


http://www2.mmm.ucar.edu/wrf/users/wrfv3.1/How_to_run_obs_fd
da.html and Jimy Dudhia’s ARW Nudging talk
MET Verification Software
• Model Evaluation Tools (MET)

• Provides all the basics (e.g., RMSE, bias, skill scores)

• Provides
– Advanced spatial methods (wavelets, objects)
– Confidence intervals

• Download it
http://www.dtcenter.org/met/users/downloads/

• Support
[email protected]

• Documentation
http://www.dtcenter.org/met/users/docs/overview.php
Questions?

You might also like