[ncl-install] FW: h5 file with no lat-lon info

Athanasios Karagiannidis thankar at live.com
Tue Feb 17 03:29:56 MST 2015


Obviously the message was for ncl-tak. I'm really sorry.

Please ignore it!

Athanasios F. Karagiannidis
Physicist, PhD Meteorology and Climatology
E-mail: thankar at live.com

From: thankar at live.com
To: ncl-install at ucar.edu
Subject: h5 file with no lat-lon info
Date: Tue, 17 Feb 2015 10:24:50 +0000




Hello to all.

I'm quite new to ncl, so I'm really sorry if i bother you with something trivial, but i can not find a way to solve my problem.

I'm trying to visualize the vars of an h5 file representing for example cloud top heigh over an area.

The print VarSummary yields the following.

ncl 3> printVarSummary(CT)             

Variable: CT
Type: ubyte
Total Size: 370688 bytes
            370688 values
Number of Dimensions: 2
Dimensions and sizes:    [DIM_000 | 512] x [DIM_001 | 724]
Coordinates: 
Number Of Attributes: 11
  CLASS :    IMAGE_INDEXED
  ID :    CTTH_HEIGHTED
  IMAGE_COLORMODEL :    RGBH_HEIGHTED
  IMAGE_SUBCLASS :    IMAGE_INDEXED
  IMAGE_VERSION :    1.0GE_INDEXED
  N_COLS :    724
  N_LINES :    512
  OFFSET :    -2000
  PALETTE :    ��8�3
  PRODUCT :    CTTHE_INDEXED
  SCALING_FACTOR :    200

It is clear that there is no lat-lon info.

The script I'm trying to use is 

begin
cdf_file = addfile("SAFNWC_MSG2_CTTH_200812121100_Greece______.h5","r")
CT = cdf_file->CTTH_HEIGHT(:,:)

  res                             = True



lat = fspan(30, 60, 512)
lon = fspan(10, 50, 724)
    CT!0="lat"
    CT!1="lon"
    CT&lat at units="degrees_north"
    CT&lon at units="degrees_east"


  res at tiMainString         = "Default Color"    ; main title
  res at cnFillOn             = True               ; turn on color fill


xwks = gsn_open_wks("pdf","CloudTops")
plot = gsn_csm_contour_map(xwks,CT,res)
end

When i execute i get 

fatal:No coordinate variable exists for dimension (lat) in variable (CT)
fatal:(lat) is not coordinate variable in variable(CT).
fatal:["Execute.c":8578]:Execute: Error occurred at or near line 13 in file TestScript_2.ncl

Can someone help me with this? I also tried 
CT!DIM_000="lat"
CT!DIM_001="lon"
It did not work either!


Sakis

Athanasios F. Karagiannidis
Physicist, PhD Meteorology and Climatology
E-mail: thankar at live.com 		 	   		   		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-install/attachments/20150217/87090c9d/attachment.html 


More information about the ncl-install mailing list