binary raster files in GrADS

M.Mahakur mmahakur at TROPMET.RES.IN
Fri Jul 27 03:29:15 EDT 2007


Dear Dr. Dan,

I have not changed the units to inch it is the same "kg per sqr meter".
The problem is with 'undef' in the ctl file. As per the data distributer
documentation undef is  the highest value (counts) i.e. 65535 (=2^16
-1). But, if you will see the data through 'set gxout stat' the max.
value is 55537. Again the counts need to be scaled with 0.1. As per the
instructions in the header file the max valid data value is 581 kg per
sqr meter (=counts x 0.1).

Please see the ctl whether it is "unpack 1.0 0.0" or "unpack 0.1 0.0".
If it is the second one no need to multiply the counts (snow) with 0.1.
And if you write the "undef 55537" you will not get shading outside the
valied data areas. Earlier I had used undef as 65535 (as per their docs)
and I had maskout values > 581. See the attached ctl and gs scripts used
to produced the image ' snow.jpeg' (sending you in a separate e-mail off
the list due to bigger size).


Thanking you.

With Best Regards,

M. Mahakur
----------------------------------------------------------
M. Mahakur
FORECASTING RESEARCH DIVISION
INDIAN INSTITUTE OF TROPICAL METEOROLOGY
(Min. of Earth Sciences, Govt. of India)
DR. HOMI BHABHA ROAD
NCL POST, PASHAN
PUNE - 411 008
INDIA.
-----------------------------------------------------------


Dan Leins wrote:

> Mahakur,
>
> Thank you for your help.  I do have a question for you though.
>
> I downloaded the same file and tried to display the same data using
> the provided control file.  However my image looks nothing like yours.
> Did you just open the control file and
>
> 'd snow' ?
>
> Or did you multiply it by 0.039etc...... to convert it to inches?
> Even when I do that, I get an image with a small contour over the
> central part of the US, but nothing representative.  What commands did
> you use when you opened the control file?
>
> Thanks,
> Dan
>
> On 7/24/07, M.Mahakur <mmahakur at tropmet.res.in
> <mailto:mmahakur at tropmet.res.in>> wrote:
>
>     Dear Dr. Dan,
>
>     I tried to pull the following small  tarball and since it is a
>     ONLY ONE band BIL I feel it could be display using GrADS.
>
>     ftp://sidads.colorado.edu/DATASETS/NOAA/G02158/SNODAS_20070722.tar
>
>     Looking at the Header I tried.  Please see the attached ctl and
>     image file. It is a 16 bit raster image but I feel the valid data
>     is max 581 (within 10 bits) kg per sqr m. I did not understand
>     what is meant ny axis offset, so just ignored!
>
>     Regards,
>
>     Mahakur
>
>
>     Dan Leins wrote:
>
>>     All,
>>
>>     I am trying to download and view a gridded dataset of 24hr
>>     snowfall from NOAA/NOHRSC using GrADS. So far, I've downloaded
>>     the dataset in question, un-tarred it and briefly read through
>>     some information about the data type.  It would appear to contain
>>     2 files, one a text header and the other a binary raster file.
>>     Does anyone know if GrADS will accept this as a data type, and if
>>     not, how to convert it to something a little more
>>     "GrADS-friendly"?  I've worked with binary files in the past so
>>     I'm aware that GrADS can use binary files so long as there is a
>>     control file specified, however I wouldn't even know where to
>>     begin looking for or creating a control file from scratch.
>>
>>     The data in question can be accessed here...
>>     http://www.nohrsc.noaa.gov/archived_data/instructions.html
>>
>>     Thanks,
>>     Dan
>
>
>
>
>     dset us_ssmv01025SlL00T0024TTNATS2007072205DP001.dat
>     title test
>     UNPACK 1.0 0.0
>     options yrev
>     #undef -9999.0
>     undef 65535
>     xdef 6935 linear -124.729583333333 0.00833333333333333
>     ydef 3351 linear  24.9495833333324  0.00833333333333333
>     zdef 1 levels 1000
>     tdef 1 linear 22jul2007 1dy
>     vars 1
>     snow 0 -1,40,2 (0.1 kilometer per square meter)
>     endvars
>
>
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20070727/446a2515/attachment.html 


More information about the gradsusr mailing list