Re: [thredds] [support] Data Request

  • To: "Tolley, Stuart" <st514@xxxxxxxxxxxx>
  • Subject: Re: [thredds] [support] Data Request
  • From: Nathan Potter <ndp@xxxxxxxxxxx>
  • Date: Fri, 26 Jan 2018 05:53:19 -0800
Hi Stuart,

I do not have access to ESGF data which limits my ability to provide specific 
detailed instructions. 

To simplify your challenge I suggest you try using a client program that 
understands the data access protocol.

I believe Ferret can work, as can Panoply and Matlab. Panoply is free and might 
just make it very easy.

    https://www.giss.nasa.gov/tools/panoply/

And I think (depending on how ESGF implement their OpenID portal) that Panoply 
will be able to navigate the authentication transaction.

If you try Panoply simply dismiss the file chooser that launches at start up. 
Go to the “File" menu and select “Open Remote Dataset…” and enter the URL:

    
http://esgf-data1.ceda.ac.uk/thredds/dodsC/cmip5.output1.MOHC.HadGEM2-ES.rcp45.mon.ocnBgchem.Omon.r4i1p1.ph.20120110.aggregation.1

And see what happens - with luck, after you authenticate, you should be able to 
select variables from within the dataset and do things like plot, subset, etc.

More comments below...



> On Jan 26, 2018, at 2:48 AM, Tolley, Stuart <st514@xxxxxxxxxxxx> wrote:
> 
> Hi Nathan, 
> 
> Unfortunately I'm still pretty confused with the strides and the arrays etc. 
> I'm an undergraduate student and it's all a bit baffling.
> 
> This is the data I wish to download:
> 
> <pastedImage.png>
> 
> When I click OpenDAP download it just attempts to download something which 
> cannot be supported by my computer. When I click a link for THREDDS Catalog I 
> can gain access to the OpenDAP data access form. So if I want to find out the 
> pH in 2100 for an area of ocean between latitudes: 51-52 and longitudes: 
> 1.7-2.55 how should it look? should it be 51:1:52?

Without data access (because I do not have authentication credentials in ESGF) 
I do not have access t the data and so I cannot verify that you subset is 
correct. But from look at you question I think you’re not understanding the 
difference between index based subsetting and values based subsetting. These 
servers support index based subsetting. So, I am going to paste in a previous 
response I made for a different user that outlines how to figure out your 
subset values by hand. The URLs and data are different, but the concepts are 
the same. So for YOUR example the base URL should be, I believe, 

  
http://esgf-data1.ceda.ac.uk/thredds/dodsC/cmip5.output1.MOHC.HadGEM2-ES.rcp45.mon.ocnBgchem.Omon.r4i1p1.ph.20120110.aggregation.1


You can get a quick sense of the structure by looking at the DDS:

  
https://podaac-opendap.jpl.nasa.gov/opendap/allData/merged_alt/L4/cdr_grid/ssh_grids_v1609_2005082012.nc.dds
  ( 
http://esgf-data1.ceda.ac.uk/thredds/dodsC/cmip5.output1.MOHC.HadGEM2-ES.rcp45.mon.ocnBgchem.Omon.r4i1p1.ph.20120110.aggregation.1.dds
 )

(NB: from here forward the example uses the example URL and not the one you 
supplied, you will be seeing different data structures and most likely 
different variable names, you will have to adjust accordingly)

Which shows you how it’s represented:

Dataset {
   Float32 Longitude[Longitude = 2160];
   Float32 Lon_bounds[Longitude = 2160][nv = 2];
   Float32 Latitude[Latitude = 960];
   Float32 Lat_bounds[Latitude = 960][nv = 2];
   Float32 Time_bounds[Time = 1][nv = 2];
   Float32 Time[Time = 1];
   Grid {
     Array:
       Float32 SLA_ERR[Time = 1][Longitude = 2160][Latitude = 960];
     Maps:
       Float32 Time[Time = 1];
       Float32 Longitude[Longitude = 2160];
       Float32 Latitude[Latitude = 960];
   } SLA_ERR;
   Grid {
     Array:
       Float32 SLA[Time = 1][Longitude = 2160][Latitude = 960];
     Maps:
       Float32 Time[Time = 1];
       Float32 Longitude[Longitude = 2160];
       Float32 Latitude[Latitude = 960];
   } SLA;
} ssh_grids_v1609_2005082012.nc;


I worked the issue using the “manual” method, tedious but doable. It’s far 
preferable to write a small shell script or python program to do the following 
for you.

To find the extents you’ll have to inspect the Latitude and Longitude arrays to 
determine the indices of your bounding values. You wanted:

> 284.167 to 255.167 for longitude and 34.1667 to 12.1667 for latitude

It’s simple to get the server to return data as ascii values. This is done by 
modifying the URL, and then, since the data are large, restricting the request 
to return just the Longitude values (Note how I modified the dataset URL with 
the suffix “.ascii” and then added a “?" followed by the name of the longitude 
array “Longitude"

 
https://podaac-opendap.jpl.nasa.gov/opendap/allData/merged_alt/L4/cdr_grid/ssh_grids_v1609_2005082012.nc.ascii?Longitude

But thats a bunch of points so we can look at a smaller ranges:

 
https://podaac-opendap.jpl.nasa.gov/opendap/allData/merged_alt/L4/cdr_grid/ssh_grids_v1609_2005082012.nc.ascii?Longitude[1520:1:1540]
 
https://podaac-opendap.jpl.nasa.gov/opendap/allData/merged_alt/L4/cdr_grid/ssh_grids_v1609_2005082012.nc.ascii?Longitude[1720:1:1730]

Which I determined by estimation.

 
https://podaac-opendap.jpl.nasa.gov/opendap/allData/merged_alt/L4/cdr_grid/ssh_grids_v1609_2005082012.nc.ascii?Longitude[1530]
 
https://podaac-opendap.jpl.nasa.gov/opendap/allData/merged_alt/L4/cdr_grid/ssh_grids_v1609_2005082012.nc.ascii?Longitude[1729]

The closest longitude indices that include your desired interval are 1530 and 
1729

So the longitude subset is:

 
https://podaac-opendap.jpl.nasa.gov/opendap/allData/merged_alt/L4/cdr_grid/ssh_grids_v1609_2005082012.nc.ascii?Longitude[1530:1:1729]


Similarly we can determine the latitude bounds:

 
https://podaac-opendap.jpl.nasa.gov/opendap/allData/merged_alt/L4/cdr_grid/ssh_grids_v1609_2005082012.nc.ascii?Latitude

Similarly, I poked at it until I got:

 
https://podaac-opendap.jpl.nasa.gov/opendap/allData/merged_alt/L4/cdr_grid/ssh_grids_v1609_2005082012.nc.ascii?Latitude[552]
 
https://podaac-opendap.jpl.nasa.gov/opendap/allData/merged_alt/L4/cdr_grid/ssh_grids_v1609_2005082012.nc.ascii?Latitude[685]


So the latitude subset is:

 
https://podaac-opendap.jpl.nasa.gov/opendap/allData/merged_alt/L4/cdr_grid/ssh_grids_v1609_2005082012.nc.ascii?Latitude[552:1:685]

Now we can make the data request. You can use the data request form here:

https://podaac-opendap.jpl.nasa.gov/opendap/allData/merged_alt/L4/cdr_grid/ssh_grids_v1609_2005082012.nc.html

and select the SLA grid at the bottom and then insert the Longitude subset 
expression 1530:1:1729 and the Latitude subset expression 552:1:685 into the 
form and then use the buttons at the top to make the request.

Alternately you can do it by building the data request URLs as follows:

ASCII    
https://podaac-opendap.jpl.nasa.gov/opendap/allData/merged_alt/L4/cdr_grid/ssh_grids_v1609_2005082012.nc.ascii?SLA[0:1:0][1530:1:1729][552:1:685]
NetCDF-3 
https://podaac-opendap.jpl.nasa.gov/opendap/allData/merged_alt/L4/cdr_grid/ssh_grids_v1609_2005082012.nc.nc?SLA[0:1:0][1530:1:1729][552:1:685]
NetCDF-4 
https://podaac-opendap.jpl.nasa.gov/opendap/allData/merged_alt/L4/cdr_grid/ssh_grids_v1609_2005082012.nc.nc4?SLA[0:1:0][1530:1:1729][552:1:685]

And use those with a browser or the “curl” program from the command line.

If you have a large number of these to do I think you will be best served 
writing a small shell script or python program to do this for you!

I hope that helps…


Sincerely,

Nathan





> please explain this to me as simply as you can I have not had much experience 
> with this sort of thing.  
> 
> Additionally, is Ferret via Oracle VirtualBox the best way to open this data?
> 
> Thanks,
> 
> Stuart
> From: Nathan Potter <ndp@xxxxxxxxxxx>
> Sent: Thursday, January 25, 2018 2:54:35 PM
> To: Tolley, Stuart; THREDDS community
> Cc: Nathan Potter
> Subject: Re: [support] Data Request
>  
> Hi Stuart,
> 
> Unfortunately I do not have access credentials for any of the OpenID 
> providers listed at that site and thus am unable to view that dataset. 
> However from the URL I can see that the software that is providing access is 
> not Hyrax, but rather the THREDDS Data Server (TDS), the form interface is 
> roughly the same as the one the we provide with Hyrax so the documentation 
> link I sent is relevant.
> 
> The form utilizes array index based subsetting, not value based subsetting. 
> For your request you would need to examine the longitude and latitude arrays 
> to determine the indices of the bounding box you wish to subset. This can be 
> done quickly by selecting one the coordinate variables (pick for example the 
> variable for latitude) by selecting just that in the form and then clicking 
> on the “Get ASCII” button. (You may need to do a bit of scripting to find the 
> indices of the bounds) Repeat for longitude. Once you can express them as 
> start:stride:stop you can select the variable you wish to retrieve (pH for 
> example) and plug those index values into the appropriate part of the form. 
> Using the form you can then retrieve the results as either an ASCII download 
> or as a DAP2 binary object.
> 
> The TDS provides several other (possibly more intuitive) ways to request 
> data, but I am not entirely familiar with them so I am including the TDS 
> support list so that they can chime in and assist you.
> 
> Cheers,
> 
> Nathan 
> 
> 
> > On Jan 25, 2018, at 6:35 AM, Tolley, Stuart <st514@xxxxxxxxxxxx> wrote:
> > 
> > Hi Nathan,
> > 
> > This is the URL I am hoping to use: 
> > http://esgf-data1.ceda.ac.uk/thredds/dodsC/cmip5.output1.MOHC.HadGEM2-ES.rcp45.mon.ocnBgchem.Omon.r4i1p1.ph.20120110.aggregation.1
> > 
> > Thank you in advance for any assistance you can provide.
> > 
> > Regards,
> > 
> > Stuart
> > From: Nathan Potter <ndp@xxxxxxxxxxx>
> > Sent: Thursday, January 25, 2018 1:57:48 PM
> > To: Tolley, Stuart
> > Cc: Nathan Potter; support@xxxxxxxxxxx
> > Subject: Re: [support] Data Request
> >  
> > Hi Stuart,
> > 
> > You can find more about how to use the form here: 
> > https://opendap.github.io/documentation/QuickStart.html#_an_easy_way_using_the_browser_based_opendap_server_dataset_access_form
> > 
> > I can provide more specific help if you send me the URL of the form page. 
> > We provide the software (Hyrax) but many institutions around the world 
> > deploy it and I can’t know which dataset you are attempting to access 
> > without the URL.
> > 
> > Sincerely,
> > 
> > Nathan Potter
> > 
> > 
> > > On Jan 25, 2018, at 3:51 AM, Tolley, Stuart <st514@xxxxxxxxxxxx> wrote:
> > > 
> > > Dear Sir/Madame,
> > > 
> > > I am currently trying to download data using your dataset access form, 
> > > however I am finding it very difficult to understand. The data I am 
> > > trying to access is:
> > > 
> > > Project= CMIP5
> > > model=HadGEM2-es
> > > experiment=RCP4.5 
> > > The main variable I'm looking for is pH.
> > > The specific area I need it in is a region of sea off the British 
> > > Coastline:
> > > Latitude= 51-52
> > > Longitude= 1.7-2.55.
> > > The time I require if for the year 2050 and 2100.
> > > 
> > > Could you please help me download this data!
> > > 
> > > Regards, 
> > > 
> > > Stuart Tolley
> > 
> > = = =
> > Nathan Potter                        ndp at opendap.org
> > OPeNDAP, Inc.                        +1.541.231.3317
> 
> = = =
> Nathan Potter                        ndp at opendap.org
> OPeNDAP, Inc.                        +1.541.231.3317

= = =
Nathan Potter                        ndp at opendap.org
OPeNDAP, Inc.                        +1.541.231.3317



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