>From your &#39;q dims&#39; result:<br>
X is varying   Lon = 0 to 360   X = 360.5 to 1080.5<br><br>I&#39;d be willing to bet my grad student stipend Grads is using the points x = 360 through x = 1081 (inclusive) to write out the data.  You should set your dimension to something else to avoid having half-index values or decrease your x-dimension environment boundaries by 1.0 points each (&#39;set x 361 1080&#39;).  Either that, or adjust the XDEF entry in your control file to match what you&#39;re setting in your dimension environment.<br>
<br>Jeff Duda<br><br><div class="gmail_quote">On Tue, Feb 5, 2013 at 12:07 PM, Rosalyn F Maccracken <span dir="ltr">&lt;<a href="mailto:rmaccrac@gmu.edu" target="_blank">rmaccrac@gmu.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Dear Users,<br>
<br>
I am trying to convert a binary file to a netCDF4<br>
file using sdfwrite.  I have a control file<br>
which looks like:<br>
<br>
DSET tsfc_3hr_%y4%m2.dat<br>
OPTIONS TEMPLATE<br>
UNDEF -1000.<br>
XDEF 720 LINEAR  -179.75 0.50<br>
YDEF 360 LINEAR   -89.75 0.50<br>
ZDEF    1 LEVELS 1000.<br>
TDEF 8768 LINEAR 00z01Jan2007 3hr<br>
VARS 1<br>
tsfc  0   99<br>
ENDVARS<br>
<br>
When I do &#39;q dims&#39;, I get:<br>
Default file number is: 1<br>
X is varying   Lon = 0 to 360   X = 360.5 to 1080.5<br>
Y is varying   Lat = -89.75 to 89.75   Y = 1 to 360<br>
Z is fixed     Lev = 1000  Z = 1<br>
T is fixed     Time = 00Z01JAN2007  T = 1<br>
E is fixed     Ens = 1  E = 1<br>
<br>
So, lon should have 720 points, lat should<br>
have 180 points, and for a 30 day month, there<br>
should be 248 time steps.<br>
<br>
However, when I use the sdfwrite command:<br>
<br>
open tsfc_3hr.ctl<br>
set time 00Z01Jan2007 21Z30Jan2007<br>
define tsfc = tsfc<br>
set sdfwrite -flt -nc4 &lt;tsfc_file&gt;.nc4<br>
sdfwrite tsfc<br>
<br>
I get metadata that has the wrong lon<br>
dimension:<br>
netcdf tsfc_3hr_Aug1995 {<br>
dimensions:<br>
        lon = 722 ;<br>
        lat = 360 ;<br>
        time = 248 ;<br>
(etc)<br>
<br>
So, my questions are, why is the lon dimension<br>
wrong and how do I fix this?<br>
<br>
Thanks,<br>
Roz<br>
<br>
********************************<br>
Rosalyn F. MacCracken, Ph.D.<br>
Postdoctoral Research Fellow<br>
Department of Geography and Geoinformation Science<br>
George Mason University<br>
Fairfax, VA<br>
(301) 335-1222<br>
<a href="mailto:rmaccrac@gmu.edu">rmaccrac@gmu.edu</a><br>
<br>
_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Jeff Duda<br>Graduate research assistant<br>University of Oklahoma School of Meteorology<br>Center for Analysis and Prediction of Storms<br>