[ncl-talk] trouble with 3A12 dataset

Dennis Shea shea at ucar.edu
Mon Apr 18 08:49:42 MDT 2016


[1]
 PLEASE ... only send a minimal script. ncl-talk does not want to hack thru
many commented out lines. *Our time is valuable too!"

[2]
Look at the dimensionality of the array

    surf_pptn      = f->surfacePrecipitation        ; (:,:) => (nlon,nlat)
==> (720,160)
    printVarSummary(surf_pptn)

Incidently, it is more efficient to *not* use the (:,:) when reading an
array.

[3]
NCL's high level graphics routines *require* (lat,lon) ordering. Hence, you
must reorder. From your code (I do not have nor do I want sent a 3A12 file)

[4]
    Y_axis         = fspan(-40,40,nlat)
    X_axis         = fspan(-180.0,180.0,nlon)
    Y_axis at units   = "degrees-north"
    X_axis at units   = "degrees-east"
    Y_axis!0       = "latitude"
    X_axis!0       = "longitude"

    surf_pptn      = f->surfacePrecipitation        ; (:,:) => (nlon,nlat)
    printVarSummary(surf_pptn)
    printMinMax(surf_pptn,True)

    surf_pptn at _FillValue  = -9999.9
    surf_pptn!0          = "longitude" ;Name the DIMS
    surf_pptn!1          = "latitude"       ;"latitude"
    surf_pptn&latitude   = Y_axis
    surf_pptn&longitude  = X_axis
    printVarSummary(surf_pptn)
    printMinMax(surf_pptn,True)
 ;;;asciiwrite("surf.dat",surf_pptn)

; NCL high-level graphics *require* (lat,lon) order

    work = surf_pptn
    surf_pptn := work(latitude|:,longitude|:)
    printVarSummary(surf_pptn)

[5]
I have no idea what you are trying to do with your graphics.

Good luck



On Mon, Apr 18, 2016 at 7:07 AM, Geeta Geeta <geetag54 at yahoo.com> wrote:

> Hi all.
>
> I have to plot the TRMM 3A12 data which is gridded. I am getting following
> error even after defining the units of the
> cordinate variables.
>
> Variable: surf_pptn
> Type: float
> Total Size: 460800 bytes
>             115200 values
> Number of Dimensions: 2
> Dimensions and sizes: [longitude | 720] x [latitude | 160]
> Coordinates:
>             longitude: [-180..180]
>             latitude: [-40..40]
> Number Of Attributes: 5
>   longitude : degrees_east
>   latitude : degrees_north
>   _FillValue : -9999.9
>   units : mm/hr
>   hdf_name : surfacePrecipitation
> (0)
> (0) min=0   max=2.99362
> (0) check_for_y_lat_coord: Warning: Data either does not contain a valid
> latitude coordinate array or doesn't contain one at all.
> (0) A valid latitude coordinate array should have a 'units' attribute
> equal to one of the following values:
> (0)    'degrees_north' 'degrees-north' 'degree_north' 'degrees north'
> 'degrees_N' 'Degrees_north' 'degree_N' 'degreeN' 'degreesN' 'deg north'
> (0) check_for_lon_coord: Warning: Data either does not contain a valid
> longitude coordinate array or doesn't contain one at all.
> (0) A valid longitude coordinate array should have a 'units' attribute
> equal to one of the following values:(0)    'degrees_east' 'degrees-east'
> 'degree_east' 'degrees east' 'degrees_E' 'Degrees_east' 'degree_E'
> 'degreeE' 'degreesE' 'deg east'
>
> I am attaching the figure which is distorted.
>
> Secondly the documentation says that the range of the data is from
>  SurfaceRain Float SDS 4 nlat*nlon -­‐  0 – 3000 mm/hr
> http://pps.gsfc.nasa.gov/Documents/filespec.TRMM.V7.pdf) Page 203.
> when I plot the MinMAx values of this variable,
> hdf_name : surfacePrecipitation
> (0)
> (0) min=0   max=2.99362
>
> Geeta.
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> 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/20160418/a38bf96d/attachment.html 


More information about the ncl-talk mailing list