qscat & grads

Ted Pollock edwardp at UALBERTA.CA
Tue Sep 16 23:28:22 EDT 2008


Hello,

Mohammed's program might be more relevant for you but I wrote a small
f77 program to strip the header and write out the file data in 2d
slabs, a separate file for each variable, and keeping the 1 byte
resolution. The files could then be opened using a ctl. If you're
interested in this, I'll send you the code.

I think you could also open them directly using a ctl file. You'd need
the FILEHEADER option (in user's guide) and a variables option that
tells grads to expect the array to consist of 1 byte variables. Below
is the ctl file. (I didn't need the FILEHEADER option.)

Hope it helps

Ted

PS. I tried unsuccessful to have the ctl file project the data to
polar sterographic using PDEF. Does anyone know if the 'options yrev'
works with the PDEF option? It seemed to have no effect when PDF was
in place. Below the first ctl file is a second ctl file with my
attempt at getting the projection right.


-------------------------------------------------------------------------
DSET   /site/home/epollock/Quickscat/1999%m2%d2.S5Q.QWI
options template
FILEHEADER length
UNDEF  1.e-10
TITLE Quickscatdata
*
XDEF 316 LINEAR 0.0 0.1
*
YDEF 332 LINEAR 0.0 0.1
*
ZDEF 1 LEVELS  1
*
TDEF 862 LINEAR 01AUG1999 1DY
*
VARS 1
var     1      -1,40,1   variable
ENDVARS




----------------------------------------------------------------
DSET   /site/home/epollock/Quickscat/%y4%m2%d2.N5Q.QSI
options template
options yrev
UNDEF  1.e-10
TITLE Quickscat data
PDEF 304 448 nps 155 225 316 25.0
XDEF 304 LINEAR 0 1.1842
YDEF 448 LINEAR 40.27 0.11
*
*XDEF 304 LINEAR 0 0.1
*YDEF 448 LINEAR 0 0.1
*
ZDEF 1 LEVELS  1
*
TDEF 5000 LINEAR 01AUG1999 1DY
*
VARS 1
var     1      -1,40,1   variable
ENDVARS







Quoting "Michael J Murphy" <mjm at HAWAII.EDU>:

> GRADSUSR list,
>
>    I have downloaded a QSCAT data file in  netcdf format and have
> been trying to view the data with GrADS by creating a .ddf (data
> descriptor file) along with using the xdfopen command.  I have read
> though all the GrADS documentation and have been unsuccessful in
> converting the dimensions of the data into a format that GrADS can
> read.
>
>   I have added the contents of an ncdump command I did on the file
> at the end of this email.  As you can see the only dimensions
> specified are time and cross_track cells.  I understand how the file
> is divided up into swaths with a variable for latitude and longitude
> for each swath.  What I don't understand is how to put this
> convention into a .ddf format that GrADS can read.
>
>   I emailed the people who supply the data and they said I should be
> able to open the file by using a sdfopen command.  This has not
> worked however because the .nc file does not appear to be in COARDS
> format (I get an error message about there being no discerable X
> coordinate).  Any advice someone might have with this issue will be
> greatly appreciated.
>
> Thanks,
> MJ
>
>
>
>> ncdump -c QSCAT.2006092.nc
> netcdf QSCAT.2006092 {
> dimensions:
>         time = UNLIMITED ; // (23157 currently)
>         cross_track_cells = 76 ;
>
> variables:
>         long Row_Mean_Time(time) ;
>                 Row_Mean_Time:long_name = "average time" ;
>                 Row_Mean_Time:units = "seconds from 1-1-1999 00:00:00" ;
>                 Row_Mean_Time:actual_range = 228787201, 228873597 ;
>                 Row_Mean_Time:scale_factor = 1 ;
>                 Row_Mean_Time:add_offset = 0 ;
>                 Row_Mean_Time:missing_value = 0 ;
>         short WVC_lon(time, cross_track_cells) ;
>                 WVC_lon:long_name = "longitude" ;
>                 WVC_lon:units = "degrees" ;
>                 WVC_lon:actual_range = 0.f, 359.98999f ;
>                 WVC_lon:scale_factor = 0.0099999998f ;
>                 WVC_lon:add_offset = 180.f ;
>                 WVC_lon:missing_value = 32767s ;
>         short WVC_lat(time, cross_track_cells) ;
>                 WVC_lat:long_name = "latitude" ;
>                 WVC_lat:units = "degrees" ;
>                 WVC_lat:actual_range = -73.68f, 79.919998f ;
>                 WVC_lat:scale_factor = 0.0099999998f ;
>                 WVC_lat:add_offset = 0.f ;
>                 WVC_lat:missing_value = 32767s ;
>         short Wind_Dir(time, cross_track_cells) ;
>                 Wind_Dir:long_name = "wind direction" ;
>                 Wind_Dir:units = "degrees (oceanic convention)" ;
>                 Wind_Dir:actual_range = 0.f, 360.f ;
>                 Wind_Dir:scale_factor = 0.0099999998f ;
>                 Wind_Dir:add_offset = 180.f ;
>                 Wind_Dir:missing_value = 32767s ;
>         short Wind_Speed(time, cross_track_cells) ;
>                 Wind_Speed:long_name = "wind speed" ;
>                 Wind_Speed:units = "m/s" ;
>                 Wind_Speed:actual_range = 0.f, 69.f ;
>                 Wind_Speed:scale_factor = 0.0099999998f ;
>                 Wind_Speed:add_offset = 0.f ;
>                 Wind_Speed:missing_value = 32767s ;
>         byte Rain_Flag_combination(time, cross_track_cells) ;
>                 Rain_Flag_combination:long_name = "rain flag" ;
>                 Rain_Flag_combination:units = "none" ;
>                 Rain_Flag_combination:actual_range = 0s, 1s ;
>                 Rain_Flag_combination:scale_factor = 1.f ;
>                 Rain_Flag_combination:add_offset = 0.f ;
>                 Rain_Flag_combination:missing_value = 255s ;
>                 Rain_Flag_combination:rain_threshold = 1s ;
>         byte Rain_Flag_rad(time, cross_track_cells) ;
>                 Rain_Flag_rad:long_name = "radiometer rain flag" ;
>                 Rain_Flag_rad:units = "none" ;
>                 Rain_Flag_rad:actual_range = 0s, 1s ;
>                 Rain_Flag_rad:scale_factor = 1.f ;
>                 Rain_Flag_rad:add_offset = 0.f ;
>                 Rain_Flag_rad:missing_value = 255s ;
>                 Rain_Flag_rad:rain_threshold = 1s ;
>
> // global attributes:
>                 :build_id = "2.3.2/2000-04-07" ;
>                 :Model_function = "Ku-2001" ;
>                 :sensor_name = "SeaWinds on QuikSCAT" ;
>                 :first_data_time = "02 April 2006 00:00:01" ;
>                 :last_data_time = "02 April 2006 23:59:57" ;
>                 :wind_reference_height = "10m" ;
>                 :history = "Created on 04 April 2006 by COAPS/FSU" ;
>                 :contact_info = "scat_sci at coaps.fsu.edu" ;
>
> data:
> }
>
>
>



More information about the gradsusr mailing list