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

Karin Meier-Fleischer meier-fleischer at dkrz.de
Tue Feb 17 03:42:10 MST 2015


Hi Sakis,

you missed to assign the lat and lon data to the variable CT, hence
NCL do not know the coordinate variable lat and lon and its units
(that's what the error message is telling you).

   lat    = fspan(30,60,512)
   lon    = fspan(10,50,724)
   CT!0   = "lat"                   ;-- set name of CT dimension 0
   CT!1   = "lon"                   ;-- set name of CT dimension 1
*  CT&lat =  lat**;-- assign lat array to CT
**  CT&lon =  lon                    ;-- assign lon array to CT
*  CT&lat at units = "degrees_north"  ;-- set the units of the named 
coordinate lat
   CT&lon at units = "degrees_east"   ;-- set the units of the named 
coordinate lon


Bye,
Karin


Am 17.02.15 um 11:24 schrieb Athanasios Karagiannidis:
> 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
>
>
> _______________________________________________
> ncl-install mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-install
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-install/attachments/20150217/b0a88456/attachment-0001.html 


More information about the ncl-install mailing list