Can NcML be used to aggregate 3D and 4D grids? I wasn't sure since they differ in the number of dimensions. e.g. sea surface height (ssh) and water temperature, where ssh has three dimensions [time, lat, lon] and temp has four dimensions [time, depth, lat, lon]? My tests have been unsuccessful so my hunch is that I must break the 3D and 4D variables into separate catalogs. But I'm hoping others might have alternative suggestions?
While I tried using a "union" aggregation with the snippet below, the time dimension did not get mapped appropriately because the 3D variables begin 2008-12-28 and the 4D variables begin 2008-05-08:
<?xml version="1.0" encoding="UTF-8"?>
<netcdf xmlns="http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2">
<attribute name="title" value="HYCOM test aggregation #1"/>
<aggregation type="union">
<!-- These are the 3D variables: -->
<netcdf location="dods://apdrc.soest.hawaii.edu:80/dods/public_data/Model_output/HYCOM/global/hycom2d"/>
<!-- These are the 4D variables: -->
<netcdf location="dods://apdrc.soest.hawaii.edu:80/dods/public_data/Model_output/HYCOM/global/hycomT"/>
<netcdf location="dods://apdrc.soest.hawaii.edu:80/dods/public_data/Model_output/HYCOM/global/hycomS"/>
<netcdf location="dods://apdrc.soest.hawaii.edu:80/dods/public_data/Model_output/HYCOM/global/hycomU"/>
<netcdf location="dods://apdrc.soest.hawaii.edu:80/dods/public_data/Model_output/HYCOM/global/hycomV"/>
</aggregation>
</netcdf>
I then tried a "joinExisting" aggregation on the "time" dimension, but this only works if the datasets each contain the same variables (which they don't). Depending on which dataset I list first in my aggregation, either the 3D or 4D variables get excluded in the following example:
<?xml version="1.0" encoding="UTF-8"?>
<netcdf xmlns="http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2">
<attribute name="title" value="HYCOM test aggregation #2"/>
<aggregation dimName="time" type="joinExisting">
<!-- These are the 3D variables: -->
<netcdf location="dods://apdrc.soest.hawaii.edu:80/dods/public_data/Model_output/HYCOM/global/hycom2d"/>
<!-- These are the 4D variables: -->
<aggregation type="union">
<netcdf location="dods://apdrc.soest.hawaii.edu:80/dods/public_data/Model_output/HYCOM/global/hycomT"/>
<netcdf location="dods://apdrc.soest.hawaii.edu:80/dods/public_data/Model_output/HYCOM/global/hycomS"/>
<netcdf location="dods://apdrc.soest.hawaii.edu:80/dods/public_data/Model_output/HYCOM/global/hycomU"/>
<netcdf location="dods://apdrc.soest.hawaii.edu:80/dods/public_data/Model_output/HYCOM/global/hycomV"/>
</aggregation>
</aggregation>
</netcdf>
So, is there no way to aggregate these datasets? Must I keep the 3D and 4D variables separate?
Thanks!, John Maurer Pacific Islands Ocean Observing System (PacIOOS) University of Hawaii at Manoa