Hi,
Can anyone on here please advise whether they think the issue below is a
fault in the .ncml, in geotools or a fault in netcdf-java?
I can see exactly what is going wrong in the debugger, but I am not sure
where the fault lies.
Really need some help on this one.
Kind Regards
Niels
On 08-09-16 14:51, Niels Charlier wrote:
removal of the "time" variable in the aggregation (see commented line
in attached .ncml file)
This issue is related to the previous one, it is again about
/makeCoordinateSystemsImplicit/ versus /makeCoordinateSystemsMaximal/.
* If the "time" variable is included as aggregation variable, it
also gets the "runtime" dimension added to its dimensions.
* As a consequence, netcdf-java does not recognise it as an AXIS.
* As a consequence, /makeCoordinateSystemsImplicit /fails to
include it in the CRS's for the actual variables (water_u, salinity,
etc...).
* As a consequence, /makeCoordinateSystemsMaximal /creates a CRS
for these variables. However, it puts the dimensions in the order of
the /dimension variable/ list
(rather than the variable's own dimensions), which is
completely arbitrary as far as I can see.
* "runtime" ends up as the last axis instead of the first. This is
inconsistent with the order of dimensions in the variable. Geotools
fails on this inconsistency.
I am not sure whether the fault here lies with the .ncml file,
geotools or netcdf-java.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<netcdf xmlns="http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2">
<attribute name="Conventions" type="String" value="CF-1.6" />
<variable name="runtime" type="double">
<attribute type="string" name="_CoordinateAxisType" value="RunTime"/>
<attribute type="string" name="units" value="hours since 2014-07-07
00:00:00 UTC"/>
<attribute type="string" name="time_origin" value="2014-07-07
00:00:00"/>
<values>0 24</values>
</variable>
<aggregation type="joinNew" dimName="runtime">
<netcdf coordValue="0">
<aggregation type="joinExisting" dimName="time">
<netcdf location="hycom_glb_regp01_old_t003.nc"/>
<netcdf location="hycom_glb_regp01_old_t000.nc"/>
</aggregation>
</netcdf>
<netcdf coordValue="24">
<aggregation type="joinExisting" dimName="time">
<netcdf location="hycom_glb_regp01_t003.nc"/>
<netcdf location="hycom_glb_regp01_t000.nc"/>
</aggregation>
</netcdf>
<variableAgg name="water_u"/>
<variableAgg name="salinity"/>
<variableAgg name="water_v"/>
<variableAgg name="water_temp"/>
<variableAgg name="tau"/>
<variableAgg name="surf_el"/>
<!-- <variableAgg name="time"/> -->
</aggregation>
</netcdf>