Subversion Repositories lagranto.wrf

Rev

Rev 2 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

.TH wrfmap
.SH NAME 
.B wrfmap - 
transform between geographical and WRF coordinates
.SH SYNOPSIS 
.B wrfmap
.I -create filename anglemode | -ll2xy coords | -xy2ll coords | -p2z coords | -z2p coords
.SH DESCRIPTION
Create a mapping netCDF file 
.I wrfmap.nc
which contains the forward and the backward coordinate transformation. The
forward transformation is from WRF grid indices (x/y) to geographical 
longitude/latitude, the backward transformation the other way round. 
If the mapping file  
.I wrfmap.nc 
exists, the tool allows to transform between the two coordinates. 
.SH PARAMETERS
.TP 15
.I -create filename [greenwich|dateline]
create the mapping file wrfmap.nc based on the WRF output file 
.I filename.
The WRF output file must contain the fields XLAT and XLONG which give for
each grid point of the WRF domain the corresponding longitude and latitude. This forward transfoation fields are written as LON and LAT to wrfmap.nc. For the
reverse transformation, two additional fields X and Y arxe calculated and written, which give for each possible longitude/latitude the corresponding grid point (x/y) in the WRF domain. The optional second argument specifies whether the longitudes are given as -180...+180 (dateline, default) or as 0...360 (greenwich). The selection of the anglemode allows to handle regions which cover the either the Greenwich meridian or the dateline meridian. 
.TP 15
.I -ll2xy [ lon lat | inpfile outfile ]
write the x/y coordinates for either the single position lon/lat to screen, or for all coordinates on the input file 'inpfile' to 'outfile'. The input and output file can be trajectory files, in which case the column headers are accordingly adapted to x/y or lon/lat.
.TP 15
.I -xy2ll [ x y | inpfile outfile ]
write the lon/lat coordinates for either the single position x/y to screen, or for all coordinates on the input file 'inpfile' to 'outfile'. The input and output file can be trajectory files, in which case the column headers are accordingly adapted to x/y or lon/lat.
.TP 15
.I -p2z [ x y p | inpfile outfile ]
convert from pressure (p) to geopotential height (z). If a single coordinate tupel (x,y,p) is given, the corresponding (x,y,z) tupel is written to screen; otherwise all coordinates in the input file (inpfile) will be converted and written to the output file (outfile). Note, the horizontal coordinates must be provided as grid indices (see option -ll2xy).
.TP 15
.I -z2p [ x y z | inpfile outfile ]
convert from geopotential height (z) to pressure (p). If a single coordinate tupel (x,y,z) is given, the corresponding (x,y,p) tupel is written to screen; otherwise all coordinates in the input file (inpfile) will be converted and written to the output file (outfile). Note, the horizontal coordinates must be provided as grid indices (see option -ll2xy).
.SH EXAMPLES
.TP 5
.B [1] wrfmap -create wrfout_d01_2011-08-26_12:00:00
Take the netCDF file 'wrfout_d01_2011-08-26_12:00:00' from WRF and write the forward and backward mapping fields to netCDF file 'wrfmap.nc'
.TP 5
.B [2] wrfmap -ll2xy -70 56
Get the grid indices for (lon=-70/lat=56) and write them to screen.
.TP 5
.B [3] wrfmap -xy2ll traj.1 traj.1
Take the trajectory file 'traj.1' and convert all grid coordinates x/y into lon/lat coordinates. The output will overwrite the input file.
.SH AUTHOR
Written by Michael Sprenger and Heini Wernli (January 2013)