<div dir="ltr"><div><div>Hi Judy,<br><br></div>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.<br><br><br></div><div>In any case, I hope that helps...<br></div><div>Rick<br><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 7, 2015 at 4:45 PM, Rick Brownrigg <span dir="ltr"><<a href="mailto:brownrig@ucar.edu" target="_blank">brownrig@ucar.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>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. <br><br></div>FWIW...<span class="HOEnZb"><font color="#888888"><br></font></span></div><span class="HOEnZb"><font color="#888888">Rick<br><br></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 7, 2015 at 3:31 PM, Dennis Shea <span dir="ltr"><<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>To me, this looks like GIS based data.<br><br></div>An expert commented on on your request as follows:<br></div><div>===<br>I think this could be done using PROJ4, or actually we could use<br>
Mohammad's NCL interface to PROJ4. I am not totally sure there is<br>
enough info in what she had given. We would need the center of the<br>
projection -- probably 90 latitude but not so clear about longitude.<br>
Maybe the x and y metric coordinates have a 0 point that indicates the<br>
projection center. It's one we would have to play with a bit to get<br>
working.<br>====<br><br></div>Who created the data? Maybe they could create nc file containing the lat/lon arrays<span><font color="#888888"><br><br></font></span></div><span><font color="#888888">D.<br></font></span></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 7, 2015 at 8:51 AM, Tsai Judy <span dir="ltr"><<a href="mailto:judytsaibuy@gmail.com" target="_blank">judytsaibuy@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi,<br><br></div>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 ( <a href="http://land5.input.nc" target="_blank">land5.input.nc</a> ).<br><br><br>-----<br> float lat(time, y1, x1) ;<br> lat:grid_mapping = "mapping" ;<br> lat:long_name = "Latitude" ;<br> lat:standard_name = "latitude" ;<br> lat:units = "degreeN" ;<br> float lon(time, y1, x1) ;<br> lon:grid_mapping = "mapping" ;<br> lon:long_name = "Longitude" ;<br> lon:standard_name = "longitude" ;<br> lon:units = "degreeE" ;<br>-----<br><div><br></div><div>And my data set only has "projection_x_coordinate(x)" and "projection_y_coordinate(y)" information<br>----<br> float projection_x_coordinate(x) ;<br> projection_x_coordinate:units = "kilometres" ;<br> projection_x_coordinate:standard_name = "projection_x_coordinate" ;<br> projection_x_coordinate:long_name = "x coordinate of projection" ;<br> float projection_y_coordinate(y) ;<br> projection_y_coordinate:units = "kilometres" ;<br> projection_y_coordinate:standard_name = "projection_y_coordinate" ;<br> projection_y_coordinate:long_name = "y coordinate of projection" ;<br> float BedrockElevation(y, x) ;<br> BedrockElevation:units = "metres" ;<br> BedrockElevation:grid_mapping = "Polar-Stereographic" ;<br> BedrockElevation:coordinates = "projection_x_coordinate projection_y_coordinate" ;<br> BedrockElevation:missing_value = " -9999." ;<br> BedrockElevation:standard_name = "BedrockElevation" ;<br> 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." ;<br>----<br><br><div><div class="gmail_extra">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?<br><br></div><div class="gmail_extra">Thank you<br></div><div class="gmail_extra"><br><br><br><div class="gmail_quote">2015-04-06 19:22 GMT-04:00 Dennis Shea <span dir="ltr"><<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</a>></span>:<div><div><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div><div><div>Not sure if the following are related to: <br> "... Greenland bed elevation data set ..."<br></div><div><br>See: <a href="http://www.ncl.ucar.edu/Applications/ESMF.shtml" target="_blank">http://www.ncl.ucar.edu/Applications/ESMF.shtml</a><br></div><div> Example 33<br><br></div>See: <a href="http://www.ncl.ucar.edu/Applications/ice.shtml" target="_blank">http://www.ncl.ucar.edu/Applications/ice.shtml</a><br></div> gland section<br><br></div>The <a href="http://land5.input.nc" target="_blank">land5.input.nc</a> file is at<br><br></div><a href="http://www.cgd.ucar.edu/~shea/gland5.input.nc" target="_blank">www.cgd.ucar.edu/~shea/gland5.input.nc</a><br><br></div>HTH<br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Mon, Apr 6, 2015 at 3:11 PM, Tsai Judy <span dir="ltr"><<a href="mailto:judytsaibuy@gmail.com" target="_blank">judytsaibuy@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div><div dir="ltr"><div><div>Hi,<br><br></div>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? <br><br></div>Thanks</div>
<br></div></div>_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>
</blockquote></div></div></div><br></div></div></div></div>
</blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>
</div></div></blockquote></div><br></div>