<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi, Roz -- <div>Before you define your variable tsfc, 'set x 1 720' -- that should solve the problem. </div><div>--Jennifer</div><div><br></div><div><br><div><div>On Feb 5, 2013, at 1:07 PM, Rosalyn F Maccracken wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>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 'q dims', 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 <tsfc_file>.nc4<br>sdfwrite tsfc<br><br>I get metadata that has the wrong lon<br>dimension:<br>netcdf tsfc_3hr_Aug1995 {<br>dimensions:<br><span class="Apple-tab-span" style="white-space:pre">        </span>lon = 722 ;<br><span class="Apple-tab-span" style="white-space:pre">        </span>lat = 360 ;<br><span class="Apple-tab-span" style="white-space:pre">        </span>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>gradsusr@gradsusr.org<br>http://gradsusr.org/mailman/listinfo/gradsusr<br></div></blockquote></div><br><div apple-content-edited="true">
<span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div>--</div><div>Jennifer M. Adams</div><div>IGES/COLA</div><div>4041 Powder Mill Road, Suite 302</div><div>Calverton, MD 20705</div><div><a href="mailto:jma@cola.iges.org">jma@cola.iges.org</a></div><div><br class="khtml-block-placeholder"></div><br class="Apple-interchange-newline"></span></span></span>
</div>
<br></div></body></html>