Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with DataPostProc addfeatures #165

Open
kktuax opened this issue Jun 8, 2021 · 0 comments
Open

Problem with DataPostProc addfeatures #165

kktuax opened this issue Jun 8, 2021 · 0 comments

Comments

@kktuax
Copy link

kktuax commented Jun 8, 2021

We are trying to plot a timeSeries NetCDF using geometries from an external GeoJSON as described in the documentation.

We have several layers in the NetCDF

netcdf spain-static_values-transposed {
dimensions:
	station = 8235 ;
	time = 1 ;
variables:
	string station(station) ;
		station:long_name = "station_name" ;
		station:cf_role = "timeseries_id" ;
	double lat(station, time) ;
		lat:_FillValue = NaN ;
		lat:units = "degrees_north" ;
		lat:long_name = "Latitude" ;
		lat:standard_name = "latitude" ;
	double lon(station, time) ;
		lon:_FillValue = NaN ;
		lon:units = "degrees_east" ;
		lon:long_name = "Longitude" ;
		lon:standard_name = "longitude" ;
	double fp_fd(station, time) ;
		fp_fd:units = "Number of days since year began" ;
		fp_fd:standard_name = "fp_fd" ;
		fp_fd:long_name = "Fisrt day of summer in first period" ;
		fp_fd:grid_mapping = "projection" ;
	int64 time(time) ;
		time:standard_name = "time" ;
		time:units = "days since 2021-06-07 00:00:00" ;
		time:calendar = "proleptic_gregorian" ;
	string projection ;
		projection:proj4 = "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs" ;

// global attributes:
		:featureType = "timeSeries" ;
		:Conventions = "CF-1.5" ;

We are able to plot the NetCDF with points and the Geometries independently, but once we combine them using the DataPostProc we get an error:

adagucserverEC/CAutoResource.cpp, 81 in CAutoResource] 2021-06-08T07:32:30Z Found dataset /tmp/adagucMgrCfg/summer-length-zoom-3.xml
adagucserverEC/CRequest.cpp, 822 in CRequest] 2021-06-08T07:32:30Z WMS GETMAP (0) first-period-last-day
adagucserverEC/CRequest.cpp, 1457 in CRequest] 2021-06-08T07:32:30Z Using maxquerylimit 365
adagucserverEC/CDataReader.cpp, 765 in CDataReader] 2021-06-08T07:32:30Z Working on [/data/summer-length/spain-static_values-transposed.nc]
adagucserverEC/CConvertADAGUCPoint.cpp, 113 in CConvertADAGUCPoint] 2021-06-08T07:32:30Z Using CConvertADAGUCPoint.h
adagucserverEC/CDataReader.cpp, 582 in CDataReader] 2021-06-08T07:32:30Z Assuming that for variable fp_ld the x dim equals x and the y dim equals y based on their position and name.
adagucserverEC/CDataReader.cpp, 609 in CDataReader] 2021-06-08T07:32:30Z Using variable x as X variable and variable y as Y variable.
adagucserverEC/CDataReader.cpp, 618 in CDataReader] 2021-06-08T07:32:30Z In level 2 compatibility mode, using a default stride of 1, not considering RenderSettings.
adagucserverEC/CDataPostProcessor.cpp, 1170 in CDPPAddFeatures] 2021-06-08T07:32:30Z CDATAPOSTPROCESSOR_RUNBEFOREREADING::Adding features from GEOJson
adagucserverEC/CDataPostProcessor.cpp, 1208 in CDPPAddFeatures] 2021-06-08T07:32:30Z Opening /data/summer-length/new-spain-zoom-3.geojson
adagucserverEC/CDataReader.cpp, 765 in CDataReader] 2021-06-08T07:32:30Z Working on [/data/summer-length/new-spain-zoom-3.geojson]
CCDFDataModel/CCDFGeoJSONIO.cpp, 36 in GeoJSONReader] 2021-06-08T07:32:30Z New CDFGeoJSONReader
adagucserverEC/CConvertGeoJSON.cpp, 520 in CConvertGeoJSON] 2021-06-08T07:32:30Z convertGeoJSONHeader
adagucserverEC/CConvertGeoJSON.cpp, 551 in CConvertGeoJSON] 2021-06-08T07:32:30Z addCDFInfo
adagucserverEC/CDataSource.h, 384 in CDataSource] 2021-06-08T07:32:30Z attachCDFObject: variable "fp_sl" does not exist
adagucserverEC/CDataReader.cpp, 790 in CDataReader] 2021-06-08T07:32:30Z Unable to attach CDFObject
adagucserverEC/CDataPostProcessor.cpp, 1214 in CDPPAddFeatures] 2021-06-08T07:32:30Z Can't open file /data/summer-length/new-spain-zoom-3.geojson
adagucserverEC/CDataPostProcessor.cpp, 782 in CDPPExecutor] 2021-06-08T07:32:30Z Processor addfeatures failed RUNAFTERREADING, statuscode 1
adagucserverEC/CImageDataWriter.cpp, 3375 in CImageDataWriter] 2021-06-08T07:32:30Z Error occured during image data writing
adagucserverEC/CRequest.cpp, 2215 in CRequest] 2021-06-08T07:32:30Z Returning from line 2078
adagucserverEC/CRequest.cpp, 3174 in CRequest] 2021-06-08T07:32:30Z WMS GetMap Request failed
<?xml version='1.0' encoding="ISO-8859-1" standalone="no" ?>
<!DOCTYPE ServiceExceptionReport SYSTEM "https://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd">
<ServiceExceptionReport version="1.1.1">
  <ServiceException>
    attachCDFObject: variable "fp_sl" does not exist;
    Unable to attach CDFObject;
    Processor addfeatures failed RUNAFTERREADING, statuscode 1;
    Error occured during image data writing;
    Returning from line 2078;
    WMS GetMap Request failed;
  </ServiceException>
</ServiceExceptionReport>

We get always errors related to fp_sl layer even though we have requested other layers from the file. This is a snippet of our configuration:

<Configuration>
	<Legend name="summer-length-days" type="interval">
		<palette index="0" color="##ffffcc" />
		<palette index="30" color="#ffeda0" />
		<palette index="60" color="#fed976" />
		<palette index="90" color="#feb24c" />
		<palette index="120" color="#fd8d3c" />
		<palette index="150" color="#fc4e2a" />
		<palette index="180" color="#e31a1c" />
		<palette index="210" color="#bd0026" />
		<palette index="240" color="#800026" />
	</Legend>
	<Style name="summer-length">
		<Legend fixed="true" tickinterval="10">summer-length-days</Legend>
		<Min>30</Min>
		<Max>120</Max>
		<RenderMethod>nearest</RenderMethod>
		<NameMapping name="nearest" />
	</Style>
	<Style name="summer-length-last-day">
		<Legend fixed="true" tickinterval="10">summer-length-days</Legend>
		<Min>200</Min>
		<Max>300</Max>
		<RenderMethod>nearest</RenderMethod>
		<NameMapping name="nearest" />
	</Style>	
	<Layer type="database">
		<Name>first-period-summer-length</Name>
		<FilePath>/data/summer-length/spain-static_values-transposed.nc</FilePath>
		<DataPostProc algorithm="addfeatures" a="/data/summer-length/new-spain-zoom-3.geojson" />
		<Variable>fp_sl</Variable>
		<Styles>summer-length</Styles>
	</Layer>
	<Layer type="database">
		<Name>last-period-last-day</Name>
		<FilePath>/data/summer-length/spain-static_values-transposed.nc</FilePath>
		<DataPostProc algorithm="addfeatures" a="/data/summer-length/new-spain-zoom-3.geojson" />
		<Variable>lp_ld</Variable>
		<Styles>summer-length-last-day</Styles>
	</Layer>
</Configuration>

And the data files: summer-length.zip

Can you please advise? Many thanks in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant