[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDFJava #TQD-749737]: remove coordinateAxis "altitude"



Hi Valentijn,

Can you try it with only the remove element in the NcML? I'm guessing the
coordinateAxis elements are getting in the way of the remove element. Here's
the entire NcML file that I used:

<?xml version="1.0" encoding="UTF-8"?>
<netcdf xmlns="http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2";
        location="sst1985.nc">
  <remove type="variable" name="altitude" />
</netcdf>

If that works, start adding back in only the pieces of NcML that modify the
underlying netCDF file. We recommend against duplicating information in the
NcML that is already in the underlying files.

By the way, where did your NcML come from? The coordinateAxis elements are not
part of the core NcML but are a coordinate system extension. I would suggest
sticking with core NcML when using it to modify a netCDF dataset (in which case
it would be "variable" instead of "coordinateAxis").

Also, what version of IDV and/or netCDF-java/ToolsUI are you using?

Ethan

> I've done what you suggested:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <netcdf xmlns="http://www.ucar.edu/schemas/netcdf";
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> xsi:schemaLocation="http://www.ucar.edu/schemas/netcdf
> http://www.unidata.ucar.edu/schemas/netcdf-cs.xsd";
> uri="/home/venus/Desktop/IDV/Data/Muhammed/SST/sst1985.nc">
> <dimension name="time" length="11" />
> <dimension name="altitude" length="1" />
> <dimension name="lat" length="911" />
> <dimension name="lon" length="1593" />
> <remove type="dimension" name="altitude"/>
[snip]
> <coordinateAxisRef ref="lon" />
> </coordinateSystem>
> </netcdf>
>
>
> And this is what IDV says:
>
> netcdf file:/home/venus/Desktop/IDV/Data/Muhammed/SST/sst1985.ncml {
[snip]
> double altitude(altitude=1);
> :actual_range = 0.0, 0.0; // double
> :fraction_digits = 0; // int
> :long_name = "Altitude";
> :positive = "up";
> :standard_name = "altitude";
> :units = "m";
> :axis = "Z";
> :_CoordinateAxisType = "Height";
> :_CoordinateZisPositive = "up";

[snip]
> }
>
>
> Seems the altitude is still there?
>
> Tyn


Ticket Details
===================
Ticket ID: TQD-749737
Department: Support netCDF Java
Priority: Normal
Status: Open