Re: How can use A NASA HDF file that have latitude and longitude in 2 dimention

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Sat, 28 Feb 2009 09:09:31 -0700

There are numerous examples on the Applications web site.
If you are using HDF, the following examples are most appropriate

http://www.ncl.ucar.edu/Applications/eosdis.shtmlSee Example 4

NCL has 2 reserved attribute names: lat2d and lon2d
You can assign the 2D lat/lon arrays with the variable
to be plotted.
            x(..., ...)
            la = f->la
            la_at_units = "degrees_north" ; recognized units
            lo = f->lo
            lo_at_units = "degrees_east"
                         ; associate lat/lon coords with variabple
            x_at_lat2d = la
            x_at_lon2d = lo

http://www.ncl.ucar.edu/Applications/Scripts/eosdis_4.ncl

Good luck
Ehsan Khorsandi wrote:
> Dear All,
>
> I have a HDF file that have latitude and longitude in 2 dimention
> and file is contains scan lines.
>
> I made a new array and draw it with NCL bout it seems it is rotated and I
> need to make lat and lon coordinates from source file to make it correct
> bout I don't know how can I use 2d dimension lat for the 1 dimantoin that
> NCL need.
>
> please see the attributes for source file for Chlorophyll ,lat and lon :
>
> Variable: s
> Type: float
> Total Size: 10994480 bytes
> 2748620 values
> Number of Dimensions: 2
> Dimensions and sizes: [Number_of_Scan_Lines | 2030] x [Pixels_per_Scan_Line | 1354]
> Coordinates:
> Number Of Attributes: 5
> long_name : Chlorophyll Concentration, OC3 Algorithm
> slope : 1
> intercept : 0
> units : mg m^-3
> hdf_name : chlor_a
>
>
> Variable: la
> Type: float
> Total Size: 1380400 bytes
> 345100 values
> Number of Dimensions: 2
> Dimensions and sizes: [Number_of_Scan_Lines | 2030] x [Number_of_Pixel_Control_Points | 170]
> Coordinates:
> Number Of Attributes: 4
> long_name : Latitudes at control points
> valid_range : ( -90, 90 )
> units : degrees
> hdf_name : latitude
>
>
> Variable: lo
> Type: float
> Total Size: 1380400 bytes
> 345100 values
> Number of Dimensions: 2
> Dimensions and sizes: [Number_of_Scan_Lines | 2030] x [Number_of_Pixel_Control_Points | 170]
> Coordinates:
> Number Of Attributes: 4
> long_name : Longitudes at control points
> valid_range : ( -180, 180 )
> units : degrees
> hdf_name : longitude
>
> How can I do that?
>
> Thanks,
> Ehsan
>
>
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Sat Feb 28 2009 - 09:09:31 MST

This archive was generated by hypermail 2.2.0 : Mon Mar 02 2009 - 16:45:42 MST