Much of the data that we want to share using LAS is available from data sources which can be read via the netCDF API. These data can be in local files stored on the same computer which will host the LAS or these data can be available via an OPeNDAP server. Sometimes the remote data sources are further organized into a THREDDS catalog. Pulling data into LAS from a THREDDS catalog is the subject of the next section.
When adding data from one or more netCDF data sources the first decision you must make is about how to organize the data into LAS data sets. For the purposes adding gridded data to LAS a data set is a collection of one or more variables (physical parameters) that are defined on the same grid (with the possible exception of the time axis). If all of the variables you'd like to include are stored in the same file or are aggregated such that they are available from the same OPeNDAP URL you can build a stub XML file for including these data with a single addXML command.
For example, if you are interested in the blended monthly Sea Surface Temperature data from the Climate Modeling Branch of the Environmental Modeling Center of the National Centers for Environmental Prediction you can find the data being served via OPeNDAP from the Data Library of the International Research Institute for Climate and Society at Columbia University. That's a mouth full, but once you know the OPeNDAP URL of the data source you're going to use (in this case it's http://iridl.ldeo.columbia.edu/SOURCES/.NOAA/.NCEP/.EMC/.CMB/.GLOBAL/.Re...) then you can create the necessary configuration for LAS the following command:
[rhs@porter ~]$ addXML.sh -n http://iridl.ldeo.columbia.edu/SOURCES/.NOAA/.NCEP/.EMC/.CMB/.GLOBAL/.Reyn_SmithOIv1/.monthly/dods
[rhs@porter ~]$ more las_from_addXML.xml
<datasets>
<id-305dd105f0 name="http://iridl.ldeo.columbia.edu/SOURCES/.NOAA/.NCEP/.EMC/.CMB/.GLOBAL/.Reyn_SmithOIv1/.monthly/dods"
url="http://iridl.ldeo.columbia.edu/SOURCES/.NOAA/.NCEP/.EMC/.CMB/.GLOBAL/.Reyn_SmithOIv1/.monthly/dods">
<variables>
<sst-id-305dd105f0 name="Sea Surface Temperature" units="Celsius_scale" url="#sst">
<link match="/lasdata/grids/grid-X-Y-T-id-305dd105f0" />
</sst-id-305dd105f0>
<ssta-id-305dd105f0 name="Sea Surface Temperature Anomaly" units="degree_Celsius" url="#ssta">
<link match="/lasdata/grids/grid-X-Y-T-id-305dd105f0" />
</ssta-id-305dd105f0>
</variables>
</id-305dd105f0>
</datasets>
<grids>
<grid-X-Y-T-id-305dd105f0>
<link match="/lasdata/axes/X-x-id-305dd105f0" />
<link match="/lasdata/axes/Y-y-id-305dd105f0" />
<link match="/lasdata/axes/T-t-id-305dd105f0" />
</grid-X-Y-T-id-305dd105f0>
</grids>
<axes>
<X-x-id-305dd105f0 type="x" units="degree_east">
<arange start="-179.5" size="360" step="1" />
</X-x-id-305dd105f0>
<Y-y-id-305dd105f0 type="y" units="degree_north">
<arange start="-89.5" size="180" step="1" />
</Y-y-id-305dd105f0>
<T-t-id-305dd105f0 type="t" units="month">
<arange start="1981-11-01" size="257" step="1" />
</T-t-id-305dd105f0>
</axes>
The -n option is used to signify that addXML will be reading from a netCDF data source. Once you have the resulting XML file you can add it to your existing las.xml configuration by following the examples in the release.
The addXML utility can make these additions automatically with the addition of a few command line options.
addXML.sh -x las.xml -n http://iridl.ldeo.columbia.edu/SOURCES/.NOAA/.NCEP/.EMC/.CMB/.GLOBAL/.Reyn_SmithOIv1/.monthly/dods ncep_oi_sst
The command above will create a file called ncep_oi_sst.xml which contains the XML "stub" that describes this data set and will integrate this "stub" into a copy of the existing las.xml file called ncep_oi_sst_las.xml.