Re: [netcdf-java] runtime aggregation

  • To: Sean Arms <sarms@xxxxxxxx>
  • Subject: Re: [netcdf-java] runtime aggregation
  • From: Niels Charlier <niels@xxxxxxxxx>
  • Date: Fri, 30 Sep 2016 12:04:58 +0200
Hi Sean,

No worries about the delay, thank you so much for helping out!

The .nc files contain some sensitive information. I am currently investigating if we can somehow provide you with a stripped version.

In the meantime, I am now mostly interested in your comments on the issue below in the email. You can have a look at the ncml file attached to this email. What are your thoughts on the inclusion of the "time" variable in the aggregation and my findings during debugging netcdf-java you can read below? Should/could an axis be included as an aggregation variable (I am not entirely clear on what really would make the difference whether you include it or not) and is netcdf behaviour as I described normal/buggy according to you?

Kind Regards
Niels

---------------

        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_t000.nc"/>
                <netcdf location="hycom_glb_regp01_old_t003.nc"/>
            </aggregation>
        </netcdf>
        <netcdf coordValue="24">
            <aggregation type="joinExisting" dimName="time">
                <netcdf location="hycom_glb_regp01_t000.nc"/>
                <netcdf location="hycom_glb_regp01_t003.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>
  • 2016 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdf-java archives: