There are two circumstances where LAS depends on the capabilities of the F-TDS that is installed along with the LAS; when a user defines a new variable and when LAS needs to compare two gridded variables that are defined on two different grids.
User Define Variables
In the first circumstance, the user takes an action to define a new variable. In this case, the user will select one or more axes upon which to transform the data, the range over which to perform the transformation and a transformation operation. For example, the user might choose to define a new variable that was the sum of all the layers from the surface to 100 meters depth (from 5 to 95 actually in this case). If such a transformation was requested for the NOAA/NCEP Pacific Ocean Analysis ocean temperature data (which part of the default data set collection in LAS) the request to plot this new variable would look like this:
<?xml version="1.0" encoding="UTF-8"?>
<lasRequest
href="file:las.xml"
package="">
<link
match="/lasdata/operations/operation[@ID='Plot_2D_XY']"/>
<properties>
<ferret>
<view>xy
</view>
<format>shade
</format>
<contour_levels/>
<contour_style>default
</contour_style>
<deg_min_sec>default
</deg_min_sec>
<expression/>
<fill_levels/>
<image_format>default
</image_format>
<interpolate_data>false
</interpolate_data>
<land_type>default
</land_type>
<margins>default
</margins>
<mark_grid>no
</mark_grid>
<palette>default
</palette>
<set_aspect>default
</set_aspect>
<size>0.5
</size>
<use_graticules>default
</use_graticules>
<use_ref_map>default
</use_ref_map>
</ferret>
</properties>
<args>
<link
match="/lasdata/datasets/NOAA_NCEP_EMC_CMB_Ocean_Analysis_ml/variables/IRI-otemp2027">
<analysis
label="Ocean Temperature monthly mean_1">
<axis
hi="95.00"
lo="5.00"
op="ave"
type="z"/>
</analysis>
</link>
<region>
<range
high="288.75"
low="122.25"
type="x"/>
<range
high="45.0"
low="-35.0"
type="y"/>
<point
type="t"
v="15-Jan-1982 00:00:00"/>
</region>
</args>
</lasRequest>
This transformation as described the the <analysis> element in the data variable section of the request gets translated into an F-TDS URL that looks like this:
http://porter.pmel.noaa.gov:8920/thredds/dodsC/las/NOAA_NCEP_EMC_CMB_Ocean_Analysis_ml/data__iridl.ldeo.columbia.edu_SOURCES_.NOAA_.NCEP_.EMC_.CMB_.Pacific_.monthly_dods.jnl_expr_{}{let temp_1_regrid=temp[d=1,z=5.00:95.00@ave]}
http://porter.pmel.noaa.gov:8920/thredds/dodsC/las/NOAA_NCEP_EMC_CMB_Oce... The beginning of the URL is simply a reference to the automatically constructed F-TDS data set that is built for every gridded data set in LAS.
The rest of the URL, _expr_{}{let temp_1_regrid=temp[d=1,z=5.00:95.00@ave]},
is special F-TDS syntax that tells the server to average the Z-axis from 5 to 95 before returning the data grid.
Automatically Interpolated Grids
When LAS is asked to create a product that compares a variable from one data set to a variable in a different data set, it is possible that the two variables are defined on different grids. And because the underlying grids are different it's not possible to make a meaningful comparison without first interpolating one of the grids. The decision to interpolate between grids is made behind the scenes in LAS and F-TDS is used to perform the work of the interpolation.
For example, to subtract the Sea Surface Temperature in the COADS climatology which is on a 2x2 degree grid from the monthly Ocean Temperature from the NCEP Pacific Ocean Analysis which is on a 1x1 degree grid requires that one of the grids be interpolated to match the other.
To accomplish this LAS automatically sets up an F-TDS URL that defined the grid interpolation of the second variable onto the grid of the first and feeds that new data variable to the backend service that creates the product. In our example, the second variable is represented by this URL:
http://porter.pmel.noaa.gov:8920/thredds/dodsC/las/NOAA_NCEP_EMC_CMB_Ocean_Analysis_ml/data__iridl.ldeo.columbia.edu_SOURCES_.NOAA_.NCEP_.EMC_.CMB_.Pacific_.monthly_dods.jnl_expr_{http://porter.pmel.noaa.gov:8920/thredds/dodsC/las/coads_climatology_cdf/data_coads_climatology.jnl}{let sst_2_regrid=sst[d=2,gxy=temp[d=1]]}
In this case, the URL references the NCEP Ocean Analysis in the section before _expr_ string, and in the first set of expressions after the _expr_ it references the COADS data since both data sets must be referenced in the operation to interpolate the grids. Finally, the expression in the second curly braces is the command syntax that requests a new variable be defined from the existing SST variable interpolated in x and y to the same grid as the TEMP variable from the NCEP Ocean Analysis.
Nesting of Server-side operations
Of course, it is possible to compare user defined variables in which case an expression to perform the analysis along one or more axes and the expression to interpolate between grids are chained together.
In the future more types of analysis will be performed by setting up F-TDS URLs. For example, it's quite reasonable to setup an F-TDS expression that not only sets up the grid interpolation, but also performs the subtraction. Once F-TDS is being used to that extent, a difference plot product will use the same plotting scripts and option as a regular plot since the grid interpolation and subtraction will be handled behind the scenes by F-TDS.