[ncl-talk] Convert data frame to spatial coordinates

Vanúcia Schumacher vanucia-schumacher at hotmail.com
Mon Nov 11 12:05:17 MST 2019


Hi Rick

Indeed returns an error. I wait without problems. Take your time.
If it works the "proj4 strings" will pass x/y/z arrays associated with the value of the variable at each lat-lon point? That would be exactly the idea.

Thank you so much for the support.
________________________________
De: Rick Brownrigg <brownrig at ucar.edu>
Enviado: segunda-feira, 11 de novembro de 2019 15:15
Para: Vanúcia Schumacher <vanucia-schumacher at hotmail.com>
Cc: ncl-talk at ucar.edu <ncl-talk at ucar.edu>
Assunto: Re: [ncl-talk] Convert data frame to spatial coordinates

Hi,

The attached scriptlet is a framework for what the interface looks like. However it does *not* work for me at the moment. The general idea is that you set so-called "proj4 strings" that describe the source and destination projections, and pass in x/y/z arrays. The function transform_coordinate returns the transformed coordinates back in the x/y/z arrays.

More on proj4:

    https://proj.org/usage/index.html

I don't know why this is not working -- I've done this a number of times. I will need to wrangle a debugger around the code to determine the issue, and I unfortunately do not have access to such an environment until I get home this evening.

Rick


On Mon, Nov 11, 2019 at 8:46 AM Vanúcia Schumacher <vanucia-schumacher at hotmail.com<mailto:vanucia-schumacher at hotmail.com>> wrote:
My data is in ascii format (e.g. attached). Yes, I would like to use some kind of cartographic projection, type Cylindrical equidistant or Mercator.
That would be exactly what this library does (Proj4).
The specific region of the projection would be Brazil, maybe I will use some shapefile to cut some specific region.
It would be great to have this interface. Let me know everything you need to work out.
Thanks for the support
________________________________
De: Rick Brownrigg <brownrig at ucar.edu<mailto:brownrig at ucar.edu>>
Enviado: segunda-feira, 11 de novembro de 2019 12:16
Para: Vanúcia Schumacher <vanucia-schumacher at hotmail.com<mailto:vanucia-schumacher at hotmail.com>>
Cc: ncl-talk at ucar.edu<mailto:ncl-talk at ucar.edu> <ncl-talk at ucar.edu<mailto:ncl-talk at ucar.edu>>
Assunto: Re: [ncl-talk] Convert data frame to spatial coordinates

To me, points with lat/lon are spatial data with coordinates (?)  Do you mean you want the coordinates in some kind of cartographic projection, such as Lambert Conformal, UTM, Mercator, etc?  If so, NCL has an undocumented interface to the Proj4 casrtographic projection library. I can elaborate further, but you need to know all the projection parameters involved (standard parallels, meridian,  etc.).

Rick



On Mon, Nov 11, 2019 at 8:11 AM Vanúcia Schumacher via ncl-talk <ncl-talk at ucar.edu<mailto:ncl-talk at ucar.edu>> wrote:
Hi users,

I would like to know if NCL or NCL-Phyton has any function for converting points (just lat and lon) to spatial data with coordinates?

Data frame like this:
type,year,mon,day,hr,min,seg,lat,lon,var
CGC,2015,8,29,0,0,1,-5.0811541,-52.1089013,-11538
...
...
...

Thanks for any support

_______________________________________________
ncl-talk mailing list
ncl-talk at ucar.edu<mailto: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/20191111/84bc3152/attachment.html>


More information about the ncl-talk mailing list