NOAA-PMEL / LAS

Live Access Server
https://ferret.pmel.noaa.gov/LAS/
The Unlicense
13 stars 5 forks source link

scattered versus gridded anomoly product #690

Open karlmsmith opened 6 years ago

karlmsmith commented 6 years ago

Reported by steven.c.hankin on 14 Apr 2009 21:55 UTC As per email discussion that started 4/10 ("models and data, models and data, ...") this task proposes a new special product (a Ferret script). The first part of the ticket is copied from the email. The last part discusses the creation of an initial LAS product that illustrates the functioning of the script.

XY gridded-scattered difference plot

          * given a gridded dataset and a scattered dataset:
               1. sample the grid at the coordinates of the scattered points
               2. take the difference between the obs and the sampled values
               3. plot the difference values on a centered color scale using a scattered data technique

I'd like to suggest that you create such a script, Ansley (after an opportunity for group discussion). When writing the script you can define new symbols as you need them to guide Ferret in its decisions such as

* which data set is scattered / which is the gridded one?
* perform sampling at XY coordinates, only (with T, fixed from the grid)?   Or at  (X,Y,T)?  (or even (X,Y,Z,T), though that would only rarely be used) 

In addition to the development of a script this task requests also the installation of an entire demonstration LAS product. The product can have the choice of datasets (one scatteres, one gridded) preconfigured, but it should inherit all of the constraint controls (including space and time) that normally go with the scattered dataset. It should use the space-time region to decide what range of gridded data is required in order to compute the requested anomaly.

Migrated-From: http://dunkel.pmel.noaa.gov/trac/las/ticket/684

karlmsmith commented 6 years ago

Comment by @AnsleyManke on 27 Apr 2009 23:10 UTC The script can tell which variable is the scattered one, because it has associated with it the scattered locations. i.e. if we follow the setup of existing insitu products, there is a pair of symbols data_x_var and data_y_var that contain the xy locations of the scattered data. (We can add data_t_var and data_z_var to these if there are to be time and/or depth scattered locations.)

If there are scattered time points, then can the product script assume that the units and time origin of the scattered points matches the time axis definition of the gridded data? Or will the Ferret script need to be sure the conversion is correct? That is the assumption in the SAMPLEXYT function:


SAMPLEXYT(DAT_TO_SAMPLE,XPTS,YPTS,TPTS)
    Returns data sampled at a set of (X,Y,T) points, using linear interpolation
    DAT_TO_SAMPLE: variable (x,y,z,t) to sample
    XPTS: X values of sample points
    YPTS: Y values of sample points
    TPTS: T values of sample points

We have all the functionality to return the difference results at the scattered locations, using SAMPLE functions (except for a SAMPLEXYZT).

At some point we had also mentioned the possibly of gridding the scattered data onto the grid of the gridded one, and then returning the difference on that grid. We could do this though we do not currently don't have much in the way of scatter-to-grid-xyt or -xyzt functions.

karlmsmith commented 6 years ago

Comment by @AnsleyManke on 5 Jan 2010 23:07 UTC See #359 for a particular discussion: Takahashi gridded vs scattered data.

karlmsmith commented 6 years ago

Modified by @AnsleyManke on 5 Jan 2011 23:26 UTC