read TRMM version 7 Level 2 hdf file

From: yinjinfang88 <yinjinfang88_at_nyahnyahspammersnyahnyah>
Date: Sat Mar 29 2014 - 20:38:14 MDT


 Dear all£¬
       Thank you very much for your reply. I still get a wrong result following your method. There are as follows:
 $ ncl
   Copyright (C) 1995-2013 - All Rights Reserved
   University Corporation for Atmospheric Research
   NCAR Command Language Version 6.1.2
   The use of this software is governed by a License Agreement.
 See http://www.ncl.ucar.edu/ for more details.
 ncl 0> f = addfile("2A12.20100101.69095.7.HDF","r") ; Add file
 ncl 1> fzHIndex = f->freezingHeightIndex ; read freezingHeightIndex
 ncl 2> printVarSummary(fzHIndex)

 Variable: fzHIndex
 Type: byte
 Total Size: 607568 bytes
              607568 values
 Number of Dimensions: 2
 Dimensions and sizes: [nscan | 2921] x [npixel | 208]
 Coordinates:
 Number Of Attributes: 1
    hdf_name : freezingHeightIndex

 ncl 3> print("fzHIndex: min="+min(fzHIndex)+" max="+max(fzHIndex))
 (0) fzHIndex: min=0x01 max=0x9d

 ncl 4> print("fzHIndex: min="+min(toshort(fzHIndex))+" max="+max(toshort(fzHIndex)))
 (0) fzHIndex: min=1 max=157

 ncl 5> print("fzHIndex: min="+min(toshort(fzHIndex))+" max="+max(toshort(fzHIndex)))
 (0) fzHIndex: min=1 max=157

 ncl 6> print("fzHIndex: min="+toshort(min(fzHIndex))+" max="+toshort(max(zHIndex)))
 (0) fzHIndex: min=1 max=157

 ncl 8> print("fzHIndex: min="+min(toint(fzHIndex))+" max="+max(toint(fzHIndex)))
 (0) fzHIndex: min=1 max=157

 ncl 9> print("fzHIndex: min="+toint(min(fzHIndex))+" max="+toint(max(fzHIndex)))
 (0) fzHIndex: min=1 max=157

 ==============================
 The results should be "(0) fzHIndex: min=-99 max=13".
 However, NCL got strange results. I am confused whether it is related to the computer hardware. I run NCL in unix of AIX.

The returns of uname and gcc commands are shown

$uname -a
AIX cma18n01 1 7 0007471BD400

$gcc --version
gcc (GCC) 4.8.1
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.



       Thanks.

       Yin




Yin Jin-Fang

  
State Key Laboratory of Severe Weather, Chinese Academy of Meteorological Sciences, Beijing 100081, China

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Sat Mar 29 20:38:53 2014

This archive was generated by hypermail 2.1.8 : Mon Mar 31 2014 - 11:47:09 MDT