<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Dan,<br>
<br>
The "xdef" "increment" is in "degrees longitude" as measured on the
globe.<br>
The "ydef" "increment" is in "degrees latitude" as measured on the
globe.<br>
<br>
I think you'll have to convert your 5 km increment to "degrees"...
Note, in general, if dx = dy, the "xdef" and "ydef" increments will not
be the same (only at the Equator). <br>
<br>
Here is some code from a Unix C-Shell script that we use to convert the
WRF model constant "dx", "dy" to "degrees"...<br>
<br>
-----------------------------------------------------------------------------------------------------------------------<br>
#-----<br>
#<br>
# echo Convert Horizontal Grid Spacings from units of "m" to "degrees"<br>
#<br>
#-----<br>
<br>
set earth_radius = 6370000 # meters<br>
set pie = `(echo "scale=10; 4*a(1)" | bc -l)`<br>
#<br>
# Convert "hcoord_cen_lat" from "degrees" to "radians" for "bc"
calculator...<br>
# <br>
set hcoord_cen_lat_rad = `(echo "scale=10; $hcoord_cen_lat*$pie/180"
| bc -l)`<br>
#<br>
# "m_per_lat_deg" valid at the Equator for all longitudes, and at all
latitudes...<br>
# "m_per_lon_deg" at central latitude...<br>
#<br>
set m_per_lat_deg = `(echo "scale=10; $earth_radius*$pie/180" | bc
-l)` <br>
set m_per_lon_deg = `(echo "scale=10;
$m_per_lat_deg*c($hcoord_cen_lat_rad)" | bc -l)`<br>
#<br>
# convert "hcoord_dx", "hcoord_dy" to "hcoord_dlon", "hcoord_dlat"
(meters to degrees)<br>
# GrADS needs grid spacings in "degrees"...<br>
#<br>
set hcoord_dlon = `(echo "scale=10; $hcoord_dx/$m_per_lon_deg" | bc
-l)`<br>
set hcoord_dlat = `(echo "scale=10; $hcoord_dy/$m_per_lat_deg" | bc
-l)`<br>
<br>
-----------------------------------------------------------------------------------------------------------------------<br>
<br>
Note, the "bc" calculator is used... Here is some documentation from
the "bc" man page:<br>
<br>
MATH LIBRARY<br>
If bc is invoked with the -l option, a math library is preloaded
and the default scale is set<br>
to 20. The math functions will calculate their results to
the scale set at the time of<br>
their call. The math library defines the following functions:<br>
<br>
s (x) The sine of x, x is in radians.<br>
<br>
c (x) The cosine of x, x is in radians.<br>
<br>
a (x) The arctangent of x, arctangent returns radians.<br>
<br>
l (x) The natural logarithm of x.<br>
<br>
e (x) The exponential function of raising e to the value x.<br>
<br>
j (n,x)<br>
The bessel function of integer order n of x.<br>
<br>
EXAMPLES<br>
In /bin/sh, the following will assign the value of "pi" to the
shell variable pi.<br>
<br>
pi=$(echo "scale=10; 4*a(1)" | bc -l)<br>
-----------------------------------------------------------------------------------------------------------------------<br>
<br>
I hope this helps. Please let me know if you have any questions about
this, OK?<br>
<br>
Thanks,<br>
Chuck<br>
<br>
Dan Leins wrote:
<blockquote
cite="mid46e821750512160727t7a2b1aa7y693e0d98e41c0b5@mail.gmail.com"
type="cite">
<div>When looking at the definition of how to use the LINEAR
option...specifically the increment section...</div>
<div> </div>
<div><strong>increment</strong> -- the spacing between grid values in
the Y direction. It is assumed that the Y dimension values go from
south to north. Specified as a positive floating point value. Used only
for <b>LINEAR
</b> mapping. </div>
<div> </div>
<div>What exactly is the "spacing" measured in....kilometers?
Thinking it was measured in kilometers, and knowing that I'm mapping
5km data, I tried setting the increment to 5, however what I got was
FAR from desirable.
</div>
<div> </div>
<div>Thanks,</div>
<div>Dan</div>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
********************************************************************
Charles Seman <a class="moz-txt-link-abbreviated" href="mailto:charles.seman@noaa.gov">charles.seman@noaa.gov</a>
U.S. Department of Commerce / NOAA / OAR
Geophysical Fluid Dynamics Laboratory voice: (609) 452-6547
201 Forrestal Road fax: (609) 987-5063
Princeton, NJ 08540-6649 <a class="moz-txt-link-freetext" href="http://www.gfdl.noaa.gov/~cjs/">http://www.gfdl.noaa.gov/~cjs/</a>
********************************************************************
"The contents of this message are mine personally and do not reflect
any position of the Government or NOAA."
</pre>
</body>
</html>