[gradsusr] binary to netCDF conversion problems
Jeff Duda
jeffduda319 at gmail.com
Tue Feb 5 16:04:58 EST 2013
>From your 'q dims' result:
X is varying Lon = 0 to 360 X = 360.5 to 1080.5
I'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 ('set x
361 1080'). Either that, or adjust the XDEF entry in your control file to
match what you're setting in your dimension environment.
Jeff Duda
On Tue, Feb 5, 2013 at 12:07 PM, Rosalyn F Maccracken <rmaccrac at gmu.edu>wrote:
> Dear Users,
>
> I am trying to convert a binary file to a netCDF4
> file using sdfwrite. I have a control file
> which looks like:
>
> DSET tsfc_3hr_%y4%m2.dat
> OPTIONS TEMPLATE
> UNDEF -1000.
> XDEF 720 LINEAR -179.75 0.50
> YDEF 360 LINEAR -89.75 0.50
> ZDEF 1 LEVELS 1000.
> TDEF 8768 LINEAR 00z01Jan2007 3hr
> VARS 1
> tsfc 0 99
> ENDVARS
>
> When I do 'q dims', I get:
> Default file number is: 1
> X is varying Lon = 0 to 360 X = 360.5 to 1080.5
> Y is varying Lat = -89.75 to 89.75 Y = 1 to 360
> Z is fixed Lev = 1000 Z = 1
> T is fixed Time = 00Z01JAN2007 T = 1
> E is fixed Ens = 1 E = 1
>
> So, lon should have 720 points, lat should
> have 180 points, and for a 30 day month, there
> should be 248 time steps.
>
> However, when I use the sdfwrite command:
>
> open tsfc_3hr.ctl
> set time 00Z01Jan2007 21Z30Jan2007
> define tsfc = tsfc
> set sdfwrite -flt -nc4 <tsfc_file>.nc4
> sdfwrite tsfc
>
> I get metadata that has the wrong lon
> dimension:
> netcdf tsfc_3hr_Aug1995 {
> dimensions:
> lon = 722 ;
> lat = 360 ;
> time = 248 ;
> (etc)
>
> So, my questions are, why is the lon dimension
> wrong and how do I fix this?
>
> Thanks,
> Roz
>
> ********************************
> Rosalyn F. MacCracken, Ph.D.
> Postdoctoral Research Fellow
> Department of Geography and Geoinformation Science
> George Mason University
> Fairfax, VA
> (301) 335-1222
> rmaccrac at gmu.edu
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
--
Jeff Duda
Graduate research assistant
University of Oklahoma School of Meteorology
Center for Analysis and Prediction of Storms
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20130205/08b6f718/attachment-0003.html
More information about the gradsusr
mailing list