[ncl-talk] Visualization of SAF NWC products

Wei Huang huangwei at ucar.edu
Wed Feb 18 13:26:21 MST 2015


Sakis,

You may take a look of the attached script and pdf file to see if these are
what you wanted.

Thanks,

Wei



================================================
1850 Table Mesa Dr.
Boulder, CO 80307
Phone: 303-497-8924

On Wed, Feb 18, 2015 at 1:38 AM, Athanasios Karagiannidis <thankar at live.com>
wrote:

> Dear sirs/madams
>
> I want to visualize SAF NWC output data using ncl. They are included in an
> h5 file.
> These data are not in a simple lat-lon grid.
> After an earlier contact with you i managed to visualize them by creating
> such a grid, but i feel that the image is not accurate.
> What i want to help me with, is to tell me weather there is a standard way
> or an already existing script to visualize correctly that kind of data.
> To help you I provide the following:
>
> 1. A sample datafile.
> 2. The printVarSummary output
> 3. A screenshot of the HDFView visualization of the variable where the
> Variable info are shown (more or less the same info with printVarSummary).
> 4. The script i used (although, i do not think that you need that!). The
> lat/lon limits that i have n my script are not acurate. I used them to make
> the visualization.
>
>
> ---------- printVarSummary------------------------------
>
> ncl 2> 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
>
>
> ---------------------------------------------------------------------------------
>
> ---------------- My Script
> ---------------------------------------------------
>
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
>
> begin
> cdf_file = addfile("SAFNWC_MSG2_CTTH_200812121100_Greece______.h5","r")
> CT = cdf_file->CTTH_HEIGHT(:,:)
>
>   res                             = True
>
>    lat    = fspan(50,20,512) ; A.K. -- reverse the matrix
>    lon    = fspan(10,30,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
>
> res at gsnAddCyclic = False
> res at tiMainString         = "Default Color"    ; main title
> res at cnFillOn             = True               ; turn on color fill
>  res at mpMaxLatF                   = 50           ; choose
> subregion
>  res at mpMinLatF                   = 20
>  res at mpMaxLonF                   = 30
>  res at mpMinLonF                   = 10
>
> xwks = gsn_open_wks("pdf","CloudTops")
> plot = gsn_csm_contour_map(xwks,CT,res)
> end
>
>
> --------------------------------------------------------------------------------
>
> Thank you in advance.
>
>
> Sakis
>
>
>
>
> Athanasios F. Karagiannidis
> Physicist, PhD Meteorology and Climatology
> E-mail: thankar at live.com
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150218/e210b28b/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: saf.ncl
Type: application/octet-stream
Size: 3964 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150218/e210b28b/attachment.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CloudTops.png
Type: image/png
Size: 179499 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150218/e210b28b/attachment.png 


More information about the ncl-talk mailing list