Re: [thredds] OpenDAP constraint expression


On May 26, 2016 at 07:06:38, ashwinD12 . (winash12@xxxxxxxxx) wrote:

Hello,
           I am not sure whether I will get any help for asking such a basic 
question on OpenDAP constraint expression but if this is not the forum for 
getting clarifications on OpenDAP constraint expression please let me know the 
appropriate forum.


I I have this URL - 
http://www.esrl.noaa.gov/psd/thredds/dodsC/Datasets/ncep.reanalysis2/pressure/air.2014.nc.ascii?air[408:603][2][20:34][26:40]'



This is the output of a program that fetches data from a THREDDS server. I am 
wanting to replicate the functionality by coming up with that URL myself.

Can somebody explain to me what the values in parenthesis are ?

This is the input I give

variable='air',level=850,
months.minmax=c(5,5), years.minmax=c(2014,2014),
lat.southnorth=c(5, 40), lon.westeast=c(65, 100),

I am wanting data for month of May 2014, latitude between 5 N and 40 N and 
longitude 65 E and 100 E for the pressure level 850 hPa.

How does that input get translated to the above URL ?
Here’s how the URL breaks down: air.2014.nc .ascii ? air [408:603 ] [2] [20:34] 
[26:40]

The dataset (which is a file in this case) is ‘air.2014.nc’. You’re asking the 
server to subset that dataset and return just the variable ‘air’ and to 
translate the result into ASCII (text). When the variable ‘air’ is extracted 
from the data set its a four-dimensional array and you’re asking to have those 
dimensions ‘sliced’ (or subset) so that, for the first dimension, you see only 
elements 408 to 603, for the second dim only element 2, for the third elements 
20 to 34 and elements 26 to 40 for the fourth.

You can look at the dataset to see how your request (level=850, …) translated 
into those array indices by looking at the datasets’s metadata. To do that, 
removed the .ascii and replace it with .dds, .das and/or .info and don’t 
include the query string (the part after the ‘?’). Like this:

http://www.esrl.noaa.gov/psd/thredds/dodsC/Datasets/ncep.reanalysis2/pressure/air.2014.nc.dds

Dataset {
    Float32 level[level = 17];
    Float32 lat[lat = 73];
    Float32 lon[lon = 144];
    Float64 time[time = 1460];
    Grid {
     ARRAY:
        Int16 air[time = 1460][level = 17][lat = 73][lon = 144];
     MAPS:
        Float64 time[time = 1460];
        Float32 level[level = 17];
        Float32 lat[lat = 73];
        Float32 lon[lon = 144];
    } air;
} Datasets/ncep.reanalysis2/pressure/air.2014.nc;
One thing you’ll see is that ‘air’ is a Grid - so it’s not really a simple 
array, but rather a collection of arrays: air, time, level, lat and lon. The 
‘air’ array holds the data while the other four hold what could be described as 
the independent variables (or dimensions). 

You can see more information about the variables by looking at ‘semantic 
metadata’ like this:

http://www.esrl.noaa.gov/psd/thredds/dodsC/Datasets/ncep.reanalysis2/pressure/air.2014.nc.das

Attributes {
    level {
        String units "millibar";
        Float32 actual_range 1000.0, 10.0;
        String long_name "Level";
        String positive "down";
…

Hope this helps,
James




Regards,
Ashwin.
_______________________________________________ 
NOTE: All exchanges posted to Unidata maintained email lists are 
recorded in the Unidata inquiry tracking system and made publicly 
available through the web. Users who post to any of the lists we 
maintain are reminded to remove any personal information that they 
do not want to be made public. 


thredds mailing list 
thredds@xxxxxxxxxxxxxxxx 
For list information or to unsubscribe, visit: 
http://www.unidata.ucar.edu/mailing_lists/ ;

-- 
James Gallagher
jgallagher@xxxxxxxxxxx

Attachment: signature.asc
Description: Message signed with OpenPGP using AMPGpg

  • 2016 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the thredds archives: