CCI-Tools / cate

ESA CCI Toolbox (Cate)
MIT License
50 stars 15 forks source link

Sinusoidal dataset are not supported #528

Open papesci opened 6 years ago

papesci commented 6 years ago

Expected behavior

Load Dataset from Ocean Color, plot values and map variables as the other supported dataset

Actual behavior

Same Datasets from Ocean Color cannot be used because their structure adopt a Sinusoidal projection instead of the Plate Carree.

The Datasets can be copied locally but not loaded as resources due an exception. set_workspace_resource() call raised an exception "None"

what differ from the Datasets that are working is the mapping model used and the data structure which is defined according to the model.

The xArray build from the supported Dataset has indeed a structure like this:

Dimensions: (lat:4320, lon: 8640, time:1)
Coordinates:
* lat   (lat) float32 ....
* lon  (lon) float32 ...
* time  (time) datetime64[ns] ....
Data variables:
  MERIS_nobs_sum  (time,lat,lon) float64 ...
  and so on 

lat, lon and time are dimension as well as coordinates.
While the sinusoidal Dataset has a different structure

Dimensions: (bin_index: 23761676, time: 1)
Coordinates:
 lat     (bin_index) float32 ...
 lon    (bin_index) float32
* time (time) datetime64[ns] ..
Dimension without coordinates: bin_index
Data variables:
 MERIS_nobs_sum  (time, bin_index) float64

lat and lon are not present in the dimensions so the system raise an exception because it expect to find them in the dimension dictionary.

Steps to reproduce the problem

  1. open a new workspace cate ws new -d ~/test
  2. Copy an OC Sinusoidal dataset cate ds copy -t 2000-01-01,2000-01-10 -n SIN_K490 esacci.OC.5-days.L3S.K_490.multi-sensor.multi-platform.MERGED.2-0.r2
  3. Create a new resource loading the local dataset SIN_K490 cate res open dsK490 local.SIN_K490

Specifications

Linux Ubuntu 4.4.0 Cate 1.0.0 Cate-Desktop 1.0.0

forman commented 6 years ago

Yes, unfortunately, we do not (yet) support the OC datasets that use a sinusoidal grid. Please use the ones with the equi-rectangular grid.