Re: [thredds] WMS and F-TDS virtual datasets [was: Re: aggregation / arithmetic between variables]

Hi,

Well now, see there, it's my fault after all. It's my IOSP that is returning null from getFileTypeId. :-)

Specifics below...

On 04/15/2011 11:56 AM, Ethan Davis wrote:
Hi Roland,

On 4/15/2011 10:14 AM, Roland Schweitzer wrote:
On 04/15/2011 11:10 AM, Ethan Davis wrote:
Hi Roland, all,

The CdmUtils.getOptimumDataReadingStrategy() method uses the
NetcdfDataset.getFileTypeId() method to decide on the data reading
strategy. However, it doesn't check if the resulting String is null or
not before checking the value.

Unless Jon knows of other hurdles after this one, I will make a TDS
snapshot available for testing on Monday. Jon, any thoughts?
Is there some bit of configuration I could add to the datasetScan for
this directory in the catalog that would make the FileTypeId not be null?
I'm not seeing any way to do that. It looks like the value here either
comes from a particular IOSP implementation or from the Aggregation
class. Though it looks like the only way to get a null value here is if
the underlying IOSP returned a null.

The F-TDS implements a DatasetSource to create virtual datasets, right?
Is there an IOSP underlying the resulting NetcdfDataset?

I hacked my IOSP to return these values:

    public String getFileTypeDescription() {
        return "NetCDF classic format";
    }

    public String getFileTypeId() {
        return "netCDF";
    }

    public String getFileTypeVersion() {
        return "3.x";
    }

And the WMS service is now working (at least to the first order of returning the GetCapabilities).

What should these values be, Ethan? Is there an official enumeration I can reference for know values for these? I just grabbed them off the Web page: http://www.unidata.ucar.edu/software/netcdf-java/formats/FileTypes.html.

It makes sense to me to use netCDF since it is the intent of the IOSP to act like netCDF OPeNDAP in every case.

Roland

Ethan

Roland

Ethan

On 4/15/2011 9:30 AM, Roland Schweitzer wrote:
Hi,

I'd like to take up this conversation again and really this is a
question for Jon Blower and the ncWMS folks.

Benno reported privately that the previous example had a few problems
with just the raw data, so I've put up what I hope is a very simple
example we can use to work through the issues.

The data URL is:
http://cirrus.handwx.com:8080/thredds/dodsC/examples/average.jnl
which consists of a monthly climatology and one transformed variable
(sst_average) a dynamically generated average of all 12 months of the
sst variable.

We can plot the sst_average with our standard tools (Ferret, toolsUI,
etc), but the WMS request for GetCapabilities fails (just following the
link in the browser) with the following error.

Jon, any suggestions for how to track down this error?

Roland

2011-04-15T15:15:20.028 +0000 [     14083][      19] INFO  -
thredds.server.wms.ThreddsWmsController - Remote host: 74.192.0.105 -
Request: "GET /thredds/wms
/examples/average.jnl?service=WMS&version=1.3.0&request=GetCapabilities
HTTP/1.1"
2011-04-15T15:15:20.939 +0000 [     14994][      19] ERROR -
thredds.server.wms.ThreddsWmsController - dispatchWmsRequest():
Exception:
java.lang.NullPointerException
      at 
uk.ac.rdg.resc.ncwms.cdm.CdmUtils.getOptimumDataReadingStrategy(CdmUtils.java:221)
      at thredds.server.wms.ThreddsDataset.<init>(ThreddsDataset.java:102)
      at 
thredds.server.wms.ThreddsWmsController.dispatchWmsRequest(ThreddsWmsController.java:164)
      at 
uk.ac.rdg.resc.ncwms.controller.AbstractWmsController.handleRequestInternal(AbstractWmsController.java:195)
      ...
_______________________________________________
thredds mailing list
thredds@xxxxxxxxxxxxxxxx
For list information or to unsubscribe,  visit: 
http://www.unidata.ucar.edu/mailing_lists/