problem to open TRMM 3B42RT 3hr binary files
Michael G Bosilovich
michael.bosilovich at GMAIL.COM
Fri Oct 19 10:41:24 EDT 2007
I had similar problems. I got the CTL for the original binaries to
work on an SGI, but not on a Linux PC. I ended up converting the data
to real*4 in fortran, also. (I wanted to work on the Linux machine).
Likewise, I realized this is not a long term option.
I moved to the TRMM 3b42 Version 6. The RT is real time. I notice that
you are looking at 2002 data. If you are looking at retrospective case
studies or long timeseries, then the 3b42v6 might be more what you
want. At least check it out:
http://daac.gsfc.nasa.gov/precipitation/TRMM_README/TRMM_3B42_readme.shtml
These data are in HDF. Below is a sample definition file for these.
Use "open" to open the hdfsds format data with this file.
Mike
dset 3B42/data/3B42.01%m2%d2.%h1.6.HDF
dtype hdfsds
options template
undef -9999.9
xdef 1440 linear 180 0.25
ydef 400 linear -50 0.25
zdef 1 levels 1
tdef 248 linear 00Z01jul2001 3hr
vars 2
precipitation=>p 0 t,x,y precipitation
relativeError=>re 0 t,x,y relative error
endvars
On 10/19/07, Henrique Barbosa <hmjbarbosa at gmail.com> wrote:
> Dear All,
>
> I am trying to open the TRMM 3B42RT 3hr binary
> files available from:
>
> ftp://trmmopen.gsfc.nasa.gov/pub/merged/mergeIRMicro
>
> Its a plain binary file, but it has a 2880 bytes header
> and precipitation, error and source number are
> packed as 2byte-integer, 2byte-integer and 1byte-integer
> respectivelly (see file header below).
>
> I wrote the ctl below but it is not working. Only 0 and -1
> are unpacked correctly... All other values are wrong.
> For instance, 76 (0.76mm/hr) is unpacked by grads
> as 19456 and 162 (1.62mm/hr) is unpacked as -24064.
>
> I can read the data correctly if I open it from a fortran
> program thou. If I use it to write a new binary file
> containing only the rescaled precipitation as real*4,
> than I can access the data correctly from grads.
>
> I would prefer to open the original data instead.
> Any ideas how to fix the ctl?
>
> thanks,
> Henrique
>
> =======GRADS unpacking x F90================
> nx | ny | Grads | F90
> 1261 | 40 | -1 | -1
> 1261 | 41 | 0 | 0
> 1261 | 60 | 6656 | 26
> 1261 | 61 | 1264 | 44
> 1261 | 403 | -24064 | 162
> 1261 | 404 | 19456 | 76
>
> ==========GRADS VERSION==================
> Config: v1.9b4 32-bit little-endian readline lats printim
> Running on P4 with opensuse 10.1
>
> ===========CTL===========================
> DSET ^mergeIRMicro/2002/3B42RT.2002090100.bin
> UNDEF -31999
> OPTIONS YREV BIG_ENDIAN
> fileheader 2880
> TITLE trmm data
> XDEF 1440 LINEAR 0.125 0.25
> YDEF 480 LINEAR -59.875 0.25
> ZDEF 1 LEVELS 1 1
> TDEF 1 LINEAR 00Z01SEP2002 3HR
> VARS 3
> prec 0 -1,40,2,-1 prec (mm/hr)
> error 0 -1,40,2,-1 error (mm/hr)
> source 0 -1,40,1 source
> ENDVARS
>
> ===========FILE HEADER====================
> algorithm_ID=3B42RT algorithm_version=01.00
> granule_ID=3B41RT.2002090100.bin header_byte_length=2880
> file_byte_length=(char2880)_header+(int2)x1440x720x2_data+(int1)x1440x720_data
> nominal_YYYYMMDD=20020901 nominal_HHMMSS=000000
> begin_YYYYMMDD=20020831 begin_HHMMSS=223000 end_YYYYMMDD=20020901
> end_HHMMSS=013000 creation_date=20020901 west_boundary=0E
> east_boundary=360E north_boundary=60N south_boundary=60S
> origin=northwest number_of_latitude_bins=480
> number_of_longitude_bins=1440 grid=0.25x0.25_deg_lat/lon
> first_box_center=59.875N,0.125E second_box_center=59.875N,0.375E
> last_box_center=59.875S,359.875E number_of_variables=3
> variable_name=precipitation,precipitation_error,source
> variable_units=mm/hr,mm/hr,source_number variable_scale=100,100,1
> variable_type=signed_integer2,signed_integer2,signed_integer1
> byte_order=big_endian flag_value=-31999
> flag_name=insufficient_observations contact_name=TSDIS_Helpdesk
> contact_address=NASA/GSFC_Code_902_Greenbelt_MD_20771_USA
> contact_telephone=301-614-5184 contact_facsimile=301-614-5575
> contact_email=helpdesk at tsdis.gsfc.nasa.gov
>
> --
> This message has been scanned for viruses and dangerous
> content by GMAO's MailScanner, and is believed to be clean.
>
>
More information about the gradsusr
mailing list