CoastWatch Utilities: Exercise 4 - Working with non-CoastWatch NetCDF data
Sometimes, it is possible, on rare occasions, that CoastWatch doesn’t provide the data you want and not all datasets are provided in a structure that is similar to the way CoastWatch data are stored.
For example, data from Sentinel-3 OLCI are stored in the SAFE format which is an archive containing individual NetCDF files for each band, parameter, and geolocation. NetCDF Markup Language (NCML) can help in these situations.
Using NetCDF, a virtual dataset can be created that aggregates the individual NetCDF files to appear as one. The NCML file is referenced by the CoastWatch software which then follows the directives within the NCML file.
For example, the following NCML file with the contents below can be placed in the directory of a Sentinel-3 OLCI dataset (after extraction):
olci.ncml:
<netcdf xmlns="http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2">
<attribute name="institution" value="Copernicus"/>
<attribute name="source" value="S-3A_OLCI"/>
<variable name="time_stamp">
<attribute name="units" type="String" value="milliseconds since 2000-01-01 00:00:00"/>
<attribute name="scale_factor" type="double" value="1e-3"/>
</variable>
<aggregation type="union">
<scan location="." suffix=".nc" subdirs="false"/>
</aggregation>
</netcdf>
When using the CoastWatch Software, place the NCML file in the SEN3 data directory and use olci.ncml as the target:
Similarly, NCML can be used to read multiple GOES data files (after using cwimport to convert to HDF):
<netcdf xmlns="http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2">
<aggregation type="union">
<netcdf location="OR_ABI-L1b-RadF-M6C01_G17_s20220150440320_e20220150449387_c20220150449429_reg.hdf">
<variable name="Rad_C01" orgName="Rad"/>
</netcdf>
<netcdf location="OR_ABI-L1b-RadF-M6C02_G17_s20220150440320_e20220150449387_c20220150449416_reg.hdf">
<variable name="Rad_C02" orgName="Rad"/>
</netcdf>
<netcdf location="OR_ABI-L1b-RadF-M6C03_G17_s20220150440320_e20220150449387_c20220150449434_reg.hdf">
<variable name="Rad_C03" orgName="Rad"/>
</netcdf>
</aggregation>
</netcdf>