[Geoserver-users] NetCDF plugin failing when the nc file has more than one variable

I have successfully used the following NetCDF plugin to publish a simple
netcdf file with just one variable.
https://github.com/OpenCOP/geoserver/tree/master/src/community/geonetcdf

I've another netcdf file with two variables that should get loaded to two
dimensions in the published raster. But this is not happening and I get only
one dimension values in the published raster. (I converted the netcdf to
geotiff and published and got the two dimensions as follows)
...
<coverageDimension>
<name>GRAY_INDEX</name>
<description>GridSampleDimension[-Infinity,Infinity]</description>
</coverageDimension>
<coverageDimension>
<name>Band2</name>
<description>GridSampleDimension[-Infinity,Infinity]</description>
</coverageDimension>
...

But the same is not happening with the netcdf. Here is my netcdf:

uvgrd_20130620.nc
  dimensions:
    latitude = 361;
    longitude = 720;
    time = UNLIMITED; // (1 currently
  variables:
    float UGRD_10maboveground(time=1, latitude=361, longitude=720);
      :_FillValue = 9.999E20f; // float
      :short_name = "UGRD_10maboveground";
      :long_name = "U-Component of Wind";
      :level = "10 m above ground";
      :units = "m/s";

    float VGRD_10maboveground(time=1, latitude=361, longitude=720);
      :_FillValue = 9.999E20f; // float
      :short_name = "VGRD_10maboveground";
      :long_name = "V-Component of Wind";
      :level = "10 m above ground";
      :units = "m/s";

    double latitude(latitude=361);
      :units = "degrees_north";
     ...

    double longitude(longitude=720);
      :units = "degrees_east";
     ...

    double time(time=1);
      :_FillValue = 9.999E20; // double
      ...
      :_CoordinateAxisType = "Time";

  // global attributes:
  :Conventions = "COARDS";
  ...

So what I want is that the UGRD_10maboveground variable should go to one
dimension (like GRAY_INDEX) and VGRD_10maboveground variable to other
dimension (like Band2), but in the layer preview I get only one dimension's
values.

Looking at the plugin's source, it is not clear where the part to select
variables to read is controlled. Anyone has any experience with this netcdf
plugin so that I can modify it suitably or even any other netcdf plugin that
achieves this.

Thanks and Regards
Ameet

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/NetCDF-plugin-failing-when-the-nc-file-has-more-than-one-variable-tp5062865.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

On Fri, Jun 28, 2013 at 4:53 PM, Ameet <ameet_ch@anonymised.com> wrote:

I have successfully used the following NetCDF plugin to publish a simple
netcdf file with just one variable.
https://github.com/OpenCOP/geoserver/tree/master/src/community/geonetcdf

I cannot help with this plug (GeoCent, you there?), but during the next two
weeks we are going to add to GeoTools a new NetCDF plugin that has been
tested with NetCDF with many variables, and works as expected (and we
also added support for GeoServer to publish more than one coverage out
of a single raster source).

The overall work will be part of GeoServer 2.4.0 (due for release around
the end of September),
but if you want to try out nightly builds with some NetCDF support should
be out in the next two weeks

Cheers
Andrea

--

Our support, Your Success! Visit http://opensdi.geo-solutions.it for more
information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

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

Thanks Andrea,

That's good news. I'll keep checking in.

For this project though, I am afraid we can't wait till September end since
we have to go live in August.
The challenge for me to make the desired changes to the plugin's source is
that I cannot spend more than 2-3 days on it as per our drawn up schedule.

Also, as you said, the feature to publish more than one coverage out of a
single raster source will be very useful. In our case, the two variables in
netcdf should go to two bands of a single published coverage, just as it
will happen if you convert it to geotiff and publish from it. If we see the
coverage's xml, we see two bands. Can this also be included as an option in
the plugin that you guys are working on (that is, option to choose to either
publish separate coverage for each variable or to upload them as separate
dimensions of the same coverage) ?

Thanks in advance

Ameet
Sr. Systems Analyst/Project Lead
kCube, India

geowolf wrote

On Fri, Jun 28, 2013 at 4:53 PM, Ameet &lt;

ameet_ch@

&gt; wrote:

I have successfully used the following NetCDF plugin to publish a simple
netcdf file with just one variable.
https://github.com/OpenCOP/geoserver/tree/master/src/community/geonetcdf

I cannot help with this plug (GeoCent, you there?), but during the next
two
weeks we are going to add to GeoTools a new NetCDF plugin that has been
tested with NetCDF with many variables, and works as expected (and we
also added support for GeoServer to publish more than one coverage out
of a single raster source).

The overall work will be part of GeoServer 2.4.0 (due for release around
the end of September),
but if you want to try out nightly builds with some NetCDF support should
be out in the next two weeks

Cheers
Andrea

--

Our support, Your Success! Visit http://opensdi.geo-solutions.it for more
information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

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

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Geoserver-users mailing list

Geoserver-users@anonymised.com

https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/NetCDF-plugin-failing-when-the-nc-file-has-more-than-one-variable-tp5062865p5063159.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

On Mon, Jul 1, 2013 at 7:41 AM, Ameet <ameet_ch@anonymised.com> wrote:

Thanks Andrea,

That's good news. I'll keep checking in.

For this project though, I am afraid we can't wait till September end since
we have to go live in August.
The challenge for me to make the desired changes to the plugin's source is
that I cannot spend more than 2-3 days on it as per our drawn up schedule.

I see, that's probably challenging.

Also, as you said, the feature to publish more than one coverage out of a
single raster source will be very useful. In our case, the two variables in
netcdf should go to two bands of a single published coverage, just as it
will happen if you convert it to geotiff and publish from it. If we see
the
coverage's xml, we see two bands. Can this also be included as an option in
the plugin that you guys are working on (that is, option to choose to
either
publish separate coverage for each variable or to upload them as separate
dimensions of the same coverage) ?

The plugin we are working on publishes them as separate coverages, there
is no option to expose them as two bands (while probably feasible to add
such option, it would require quite some work). Besides, our plugin cannot
work on the stable series, it needs the new coverage reader interfaces
added to the development series.

I guess your best option, if you're in a hurry, is to setup some process
that converts the netcdf
to geotiff as you publish it in GeoServer

Cheers
Andrea

--

Our support, Your Success! Visit http://opensdi.geo-solutions.it for more
information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

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