creating a new file
Diane Stokes
Diane.Stokes at NOAA.GOV
Thu Nov 30 12:01:18 EST 2006
If you are reading the data on the same platform on which it was written
(or a platform with the same byte order), the "byteswapped" in your
descriptor file would be a problem.
It's generally safer to explicitly specify the byte order with:
options big_endian
or
options little_endian
(depending on how the data was written). That makes the data and
descriptor file machine independent.
Diane
Wajeeha Shafeeq wrote:
> Hi,
>
> I am using MM5 output data. I have to write a file on some particular
> lat/lon. For this I am using the following script.
>
> #####################################################
>
> 'open mmoutjan05-3-01.ctl'
>
> 'set lon 70 80'
>
> 'set lat 32 38'
>
> 'set gxout fwrite'
>
> 'set fwrite humidity.dat'
>
> t=1
>
> while(t<=40)
>
> 'set t 't
>
> 'd const(t,-9999,-u)'
>
> t=t+1
>
> endwhile
>
> 'disable fwrite'
>
> reinit
>
> ####################################################
>
> The ctl is as follows:
>
> #####################################################
>
> dset ^humidity.dat
>
> byteswapped
>
> title MM5 data
>
> undef -9999.
>
> pdef 102 102 lcc 26.83 66.62 1.00 1.00 30.00 60.00 73.00 12000. 12000.
>
> xdef 163 linear 70 0.0541
>
> ydef 105 linear 32 0.0541
>
> zdef 23 levels
>
> 0.99500
>
> 0.98500
>
> 0.97000
>
> 0.94500
>
> 0.91000
>
> 0.87000
>
> 0.82500
>
> 0.77500
>
> 0.72500
>
> 0.67500
>
> 0.62500
>
> 0.57500
>
> 0.52500
>
> 0.47500
>
> 0.42500
>
> 0.37500
>
> 0.32500
>
> 0.27500
>
> 0.22500
>
> 0.17500
>
> 0.12500
>
> 0.07500
>
> 0.02500
>
> tdef 40 linear 06:00Z01JAN2005 360MN
>
> vars 1
>
> rh 23 99 rel humidity (%)
>
> endvars
>
> ###########################################################
>
> The problem is when I open the new file and displays its variable it
> give the following error
>
> "Contouring: nan to nan interval inf"
>
> I have made this ctl file by changing the xdef and ydef values of the
> original MM5 ctl file.
>
> Regards,
>
> Wajeeha Shafeeq
>
--
Diane Stokes
Environmental Modeling Center
National Weather Service/NOAA
More information about the gradsusr
mailing list