[ncl-talk] Problems with reading and re-gridding polar stereographic grid data

Rick Brownrigg brownrig at ucar.edu
Tue May 12 00:07:46 MDT 2015


Hi Judy,

Attached is a script that converts the projection coordinates into lat/lon,
using our interface to the PROJ4 cartographic library.  As previously
noted, that interface is currently undocumented and only available in
>6.2.x versions of NCL. However, it was extremely useful and effective for
the task at hand, and as you can see, straightforward to code; perhaps we
should consider making it more broadly available.


In any case, I hope that helps...
Rick


On Tue, Apr 7, 2015 at 4:45 PM, Rick Brownrigg <brownrig at ucar.edu> wrote:

> I found that file online, and it does indeed have metadata about the
> projection parameters.  I'm not totally sure how some of them map onto
> PROJ4 parameters, but I will experiment with it and see if I can get a
> reasonable result.
>
> FWIW...
> Rick
>
>
> On Tue, Apr 7, 2015 at 3:31 PM, Dennis Shea <shea at ucar.edu> wrote:
>
>> To me, this looks like GIS based data.
>>
>> An expert commented on on your request as follows:
>> ===
>> I think this could be done using PROJ4, or actually we could use
>> Mohammad's NCL interface to PROJ4. I am not totally sure there is
>> enough info in what she had given. We would need the center of the
>> projection -- probably 90 latitude but not so clear about longitude.
>> Maybe the x and y metric coordinates have a 0 point that indicates the
>> projection center. It's one we would have to play with a bit to get
>> working.
>> ====
>>
>> Who created the data? Maybe they could create nc file containing the
>> lat/lon arrays
>>
>> D.
>>
>> On Tue, Apr 7, 2015 at 8:51 AM, Tsai Judy <judytsaibuy at gmail.com> wrote:
>>
>>> Hi,
>>>
>>> I think the problem I have is that my Greenland bed elevation data
>>> doesn't have any lat lon information just like the data set you suggest (
>>> land5.input.nc ).
>>>
>>>
>>> -----
>>>     float lat(time, y1, x1) ;
>>>         lat:grid_mapping = "mapping" ;
>>>         lat:long_name = "Latitude" ;
>>>         lat:standard_name = "latitude" ;
>>>         lat:units = "degreeN" ;
>>>     float lon(time, y1, x1) ;
>>>         lon:grid_mapping = "mapping" ;
>>>         lon:long_name = "Longitude" ;
>>>         lon:standard_name = "longitude" ;
>>>         lon:units = "degreeE" ;
>>> -----
>>>
>>> And my data set only has "projection_x_coordinate(x)" and
>>> "projection_y_coordinate(y)" information
>>> ----
>>>     float projection_x_coordinate(x) ;
>>>         projection_x_coordinate:units = "kilometres" ;
>>>         projection_x_coordinate:standard_name =
>>> "projection_x_coordinate" ;
>>>         projection_x_coordinate:long_name = "x coordinate of projection"
>>> ;
>>>     float projection_y_coordinate(y) ;
>>>         projection_y_coordinate:units = "kilometres" ;
>>>         projection_y_coordinate:standard_name =
>>> "projection_y_coordinate" ;
>>>         projection_y_coordinate:long_name = "y coordinate of projection"
>>> ;
>>>     float BedrockElevation(y, x) ;
>>>         BedrockElevation:units = "metres" ;
>>>         BedrockElevation:grid_mapping = "Polar-Stereographic" ;
>>>         BedrockElevation:coordinates = "projection_x_coordinate
>>> projection_y_coordinate" ;
>>>         BedrockElevation:missing_value = " -9999." ;
>>>         BedrockElevation:standard_name = "BedrockElevation" ;
>>>         BedrockElevation:long_name = "Bedrock elevation with respect to
>>> the EIGEN-GL04C geoid for Greenland. Please discuss correct acknowledgement
>>> and referencing with J. Bamber before publishing any results using these
>>> data." ;
>>> ----
>>>
>>> So my question is that is there anyway I can obtain real lat/lon
>>> information from "projection_x_coordinate(x)" and
>>> "projection_y_coordinate(y)" with NCL in order to regird that into T31 grid?
>>>
>>> Thank you
>>>
>>>
>>>
>>> 2015-04-06 19:22 GMT-04:00 Dennis Shea <shea at ucar.edu>:
>>>
>>> Not sure if the following are related to:
>>>>       "... Greenland bed elevation data set ..."
>>>>
>>>> See: http://www.ncl.ucar.edu/Applications/ESMF.shtml
>>>>         Example 33
>>>>
>>>> See: http://www.ncl.ucar.edu/Applications/ice.shtml
>>>>         gland section
>>>>
>>>> The land5.input.nc file is at
>>>>
>>>> www.cgd.ucar.edu/~shea/gland5.input.nc
>>>>
>>>> HTH
>>>>
>>>> On Mon, Apr 6, 2015 at 3:11 PM, Tsai Judy <judytsaibuy at gmail.com>
>>>> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I have a Greenland bed elevation data set (.nc file) with polar
>>>>> stereographic grid and I want to re-grid that into CCSM T31 grid in order
>>>>> to calculate the difference between them. However, my Greenland bed
>>>>> elevation data set doesn't have the associated longitude and latitude
>>>>> information (i.e lon2d and lat2d) within the nc file. It just has "
>>>>> projection_x_coordinate (x)" and " projection_y_coordinate (y)." Can anyone
>>>>> suggest that is there any way (or function) available in NCL that I can use
>>>>> to deal with this issue?
>>>>>
>>>>> Thanks
>>>>>
>>>>> _______________________________________________
>>>>> 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
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150512/4a32d154/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: proj4.ncl
Type: application/octet-stream
Size: 1642 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150512/4a32d154/attachment.obj 


More information about the ncl-talk mailing list