[ncl-talk] Plot station data with NCL

Stavros Dafis sdafis at cc.uoi.gr
Sun Jul 5 03:55:33 MDT 2015

```First of all, happy Independence day to all American users. Secondly, thank you

I am sorry that I did not make myself clear, I need to regrid my data and then
make a shaded contour plot. For instance, I have a txt file with lat/lon and
rain gauge values. By "decent manner" I mean that NCL triangular mesh
examples with coloured dots are not convenient when you have thousands of
stations.

These guys in Meteonetwork use natgrid in NCL to plot station data with
excellent results:
http://www.meteonetwork.it/rete/mappe.php?region=

So I decided to plot my data this way, but with no success..

begin
ascii_filename = "12h_totalrain_with_id.txt"
x = station(:,3)  ; Column 3 of file contains X values.
y = station(:,2)  ; Column 2 of file contains Y values.
z = station(:,5)  ; Column 5 of file contains Z values.
numxout = 21     ; Define output grid for call to "natgrids".
numyout = 21
xmin    = min(x)
ymin    = min(y)
xmax    = max(x)
ymax    = max(y)
xc      = (xmax-xmin)/(numxout-1)
yc      = (ymax-ymin)/(numyout-1)
xo      = xmin + ispan(0,numxout-1,1)*xc
yo      = ymin + ispan(0,numyout-1,1)*yc

zo = natgrid(x, y, z, xo, yo)  ; Interpolate.

The problem seems to be at the 5th column (rain data) according to NCL but I
can't figure it out..

Stavros

Quoting Mary Haley <haley at ucar.edu>:

> Stavros,
>
> In what manner do you need to plot the station data?  Do you mean like the
> weather plots that Dennis pointed you to, or do you actually need to regrid
> the data and then generate something like a contour plot?
>
> Here's is a "station data" examples page, but as you pointed out, some of
> these examples are rather simplistic:
>
> http://www.ncl.ucar.edu/Applications/station.shtml
>
> It would help if you could be more specific about what you need.
>
> --Mary
>
>
> On Fri, Jul 3, 2015 at 10:47 AM, Stavros Dafis <sdafis at cc.uoi.gr> wrote:
>
> > Hi everyone,
> >
> > I am Stavros from Greece, a new user of NCL and I would like to ask you if
> > you
> > have managed to plot station data via NCL in a decent manner. Meteonetwork
> > in
> > Italy uses natgrid interpolation in NCL and plots rain from station data
> > very
> > nice but I haven't managed to do so. In UCAR's page the examples are too
> > simple
> > and they are useless if you have many data. I want to plot about 4000
> > station
> > data in West Europe..
> >
> > Stavros Dafis
> > MSc student Atmospheric Sciences and Environment
> > University of Ioannina
> > _______________________________________________
> > ncl-talk mailing list
> > ncl-talk at ucar.edu
> > List instructions, subscriber options, unsubscribe:
> > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
> >
>

Stavros Dafis
MSc student Atmospheric Sciences and Environment
University of Ioannina
Tel: +30 2651008499,  Mobile: +30 6970420242
e-mails: sdafis at noa.gr or dafis91 at yahoo.gr or sdafis at cc.uoi.gr
Weather charts: http://www.metar.gr
http://www.meteovolos.gr
Photos: https://www.flickr.com/photos/22498448@N04/
```