[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[THREDDS #MHJ-779129]: Fw: [support] NCEP/NCAR
- Subject: [THREDDS #MHJ-779129]: Fw: [support] NCEP/NCAR
- Date: Thu, 28 Jan 2016 15:15:18 -0700
Hi Muhammad,
A critical thing to understand about the OPeNDAP Dataset Access Form is that it
gives you direct access to the underlying data arrays of each variable. Each
array has a set of dimensions which determines its shape. For example the
'level' variable has one dimension--also named 'level'--with length 17. You can
find that info at the bottom of the page:
Float32 level[level = 17];
'air', on the other hand, has four dimensions of varying length. Its
declaration is:
Float32 air[time = 816][level = 17][lat = 73][lon = 144];
To request a subset of a variable's data, you need to specify a range of
indices for each of its dimensions. Let's walk through an example of subsetting
'lon' where the study area has a longitude range of 60-78 degrees_east.
1. Click on the check box next to 'lon'. The text field below will be filled
with '0:1:143'. That string is a section specification--our notation for
specifying a subset of an array. We've borrowed it from Fortran 90 [1]. The
default section spec selects all values in the entire array.
2. Click the 'Get ASCII' button at the top of the page. We get all 144
longitude values back. However, we only want latitudes between 60 and 78. We
need to figure out the indices that correspond to that range.
3. Indexing in OPeNDAP begins at zero. Looking at all of the longitudes that
were returned (or doing a little math based on the 2.5 delta between values) we
can determine that longitude value '60' is at index 24 and value '67.5' is at
index 27.
4. Go back to the form on the previous page. This time, change the section spec
from '0:1:143' to '24:1:27'. Click 'Get ASCII'. Now only longitudes in our
study are are returned!
You should be able to follow that procedure to find the proper ranges of
indices for the 'level', 'time', and 'lat' dimensions as well. When you have
them, enter them in the appropriate text fields below 'air' and you'll have
your subsetted data.
Cheers,
Christian
[1]
http://h21007.www2.hp.com/portal/download/files/unprot/fortran/docs/lrm/lrm0055.htm#subs_trips
Ticket Details
===================
Ticket ID: MHJ-779129
Department: Support THREDDS
Priority: High
Status: Closed