[ncl-talk] sum of values with close coordinates

Dennis Shea shea at ucar.edu
Mon Jan 27 21:01:41 MST 2020


The following is incorrect:
        lat2!0         = "lat"
        *lat2&lat *      =  lat2
A netCDF coordinate variable requires
(a) 1d
(b) variable name and dimension name *must be the same.* It should be
        *lat2!0         = "lat" *
        *lat2&lat2*    =  lat2
        printVarSummary(lat2)

===
Also, you must make sure that the raw data locations is supported by the
grid resolution.

Play with the attached. Think about what is happening.
If the specified grid is too fine, a grid point with non-missing values may
be surrounded by grid points with missing values.
There will be no contours. Using raster may help.

Good luck





On Mon, Jan 27, 2020 at 10:16 AM Vanúcia Schumacher via ncl-talk <
ncl-talk at ucar.edu> wrote:

> Hi users,
>
> I am noticing a problem when I try to extract non-missing data.
> Values where the latitude and longitude are very close, the sum of these
> values is occurring, reducing the number of non-missing values.
>
> For example:
> ...
> new_data  [10]
> ...
> data1d := ndtooned(new_data)
> ivalid    := ind(.not.ismissing(data1d))
> xvalid   := data1d(ivalid)
>
> print(xvalid)
>
> xvalid [8]
> -10912.00
> -66941.00
> -13331.00
> -32386.00
> -48914.00    ===> this value does not exist in imput data!
> -19282.00
> -17815.00
> -19579.00
>
> As I understand it is the sum of two values that have very close lat and
> lon coordinates from input file:
> lat                  , lon            , value
> ,-10.6018882,-51.385531,-14530
> ,-10.6061222,-51.3855321,-34384
>
> I attached my script and data if anyone can help me find how to fix this,
>
> Thanks for any help
>
>
> _______________________________________________
> ncl-talk mailing list
> 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/20200127/cb970701/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.vanucia.ncl
Type: application/octet-stream
Size: 3713 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20200127/cb970701/attachment.obj>


More information about the ncl-talk mailing list