[gradsusr] binary to netCDF conversion problems
Jennifer Adams
jma at cola.iges.org
Thu Feb 7 11:01:27 EST 2013
Hi, Roz --
Before you define your variable tsfc, 'set x 1 720' -- that should solve the problem.
--Jennifer
On Feb 5, 2013, at 1:07 PM, Rosalyn F Maccracken 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
--
Jennifer M. Adams
IGES/COLA
4041 Powder Mill Road, Suite 302
Calverton, MD 20705
jma at cola.iges.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20130207/153633f9/attachment-0003.html
More information about the gradsusr
mailing list