Hi Matt,
I was able to check your sample.
It seems like a problem on your dataset OR on the underlying UCAR NetCDF java lib.
Let me try to explain that in order to figure out the real issue.
When GeoTools/GeoServer accesses a NetCDF file, it delegates the UCAR NetCDF lib (currently, 4.6.0 version) to open a NetCDF dataset. Due to the wide amount of conventions, types, structures existing in the NetCDF world, the UCAR lib tries to individuate the convention used by the specific sample, by parsing some attributes, datatypes or elements.
For your case, the lib thinks that your data is part of the M3IOConvention.
https://github.com/Unidata/thredds/blob/master/cdm/src/main/java/ucar/nc2/dataset/conv/M3IOConvention.java#L72
since during the preliminar scan it finds the set of attributes required by that convention.
// global attributes:
:NCOLS = 921; // int
:NROWS = 301; // int
:XORIG = -144.5; // double
:YORIG = 40.0; // double
:XCELL = 0.10000000149011612; // double
:YCELL = 0.10000000149011612; // double
Afterwards, it tries to setup the coordinates based on that convention:
https://github.com/Unidata/thredds/blob/master/cdm/src/main/java/ucar/nc2/dataset/conv/M3IOConvention.java#L98
And here is where it throws a NPE exception since the expected field doesn’t actually exists.
At this point, I have a set of questions for you.
How did you create this file? Can you share some more information about that? Is it somehow related with the M3IOConvention?
I’m asking this so you can fix your sample data in case it isn’t well formed OR we can keep in touch with the UCAR team to improve their library to support this sample in case it is a properly formed dataset.
Please, let me know.
Best Regards,
Daniele
···
On Fri, Jan 8, 2016 at 5:40 PM, brownbagel <fungyuensang_mf@anonymised.com> wrote:
Hello,
After browsing around this forum, seems like this is a common issue, but I
still do not seem to find a solution.
I am attempting to upload NetCDF files onto geoserver via netCDF extension.
Using sample .nc from the web, this extension works.
However, when I attempt to upload my own files, I encounter the error “Could
not find layer”.
I understand that geoserver requires CF/COARDS convention, I have attempted
to rename my dimensions to be in accordance to this. Are there still other
aspects of the .nc that I have to alter? Are there alternative methods (ie,
converting to other file formats?) I’ve tried converting to geoTiff and .shp
via GDAL but have no success in that.
Attached: my .nc file (dispersion2.nc), geoserver log
https://www.dropbox.com/sh/m5gebm21z73ng1y/AADky3C3q2mga0WqsyJ57Pbka?dl=0
Thanks & Bless,
Matt
–
View this message in context: http://osgeo-org.1560.x6.nabble.com/Geoserver-Store-NetCDF-issue-Could-not-find-layers-tp5244318.html
Sent from the GeoServer - User mailing list archive at Nabble.com.
Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
–
==
GeoServer Professional Services from the experts! Visit
http://goo.gl/it488V for more information.
Ing. Daniele Romagnoli
Senior Software Engineer
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
AVVERTENZE AI SENSI DEL D.Lgs. 196/2003
Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.
The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.