bird-house / flyingpigeon

WPS processes for climate model data, indices and extreme events
http://flyingpigeon.readthedocs.io/en/latest/
Apache License 2.0
19 stars 15 forks source link

weatherregimes_projection process fails #184

Closed cehbrecht closed 5 years ago

cehbrecht commented 7 years ago

... run with input from weatherregimes_model (cmip5 psl historic 1970-2010), raises error:

wps_weatherregimes_projection.py._handler Line 271 failed to build the R command local variable 'model_season' referenced before assignment 

looks like netcdf input file is not valid:

STDERR:cdo remapbil (Abort): Variable psl has an unsupported projection grid!

see logfile:

INFO:PYWPS:Execute ocgis module call function
INFO:PYWPS:OcgOperations set
INFO:PYWPS:ocgis module call as ops.execute()
Error in calling operator remapbil with:
>>> cdo -O remapbil,2da769da-6c8c-11e7-a7d1-109836a7cf3a.nc /opt/birdhouse/var/lib/twitcher/twitcher_NtZWg2/c7ac76d8-6c8c-11e7-bdc4-109836a7cf3a.nc c84aabbe-6c8c-11e7-bdc4-109836a7cf3a.nc<<<
STDOUT:

STDERR:cdo remapbil (Abort): Variable psl has an unsupported projection grid!

ERROR:PYWPS:failed to make a data subset 
Traceback (most recent call last):
  File "/opt/birdhouse/src/flyingpigeon/flyingpigeon/processes/wps_weatherregimes_projection.py", line 200, in _handler
    regrid_destination=ref_file, regrid_options='bil')
  File "/opt/birdhouse/src/flyingpigeon/flyingpigeon/ocgis_module.py", line 257, in call
    exec cmd
  File "<string>", line 1, in <module>
  File "/opt/anaconda/envs/flyingpigeon/lib/python2.7/site-packages/cdo.py", line 223, in get
    raise CDOException(**retvals)
CDOException: (returncode:1) cdo remapbil (Abort): Variable psl has an unsupported projection grid!

ERROR:PYWPS:failed to compute anualcycle or seasons
Traceback (most recent call last):
  File "/opt/birdhouse/src/flyingpigeon/flyingpigeon/processes/wps_weatherregimes_projection.py", line 218, in _handler
    model_anomal = wr.get_anomalies(model_subset, reference=reference)
UnboundLocalError: local variable 'model_subset' referenced before assignment
ERROR:PYWPS:failed to build the R command local variable 'model_season' referenced before assignment
Traceback (most recent call last):
  File "/opt/anaconda/envs/flyingpigeon/lib/python2.7/site-packages/pywps/app/Process.py", line 234, in _run_process
    wps_response = self.handler(wps_request, wps_response)
  File "/opt/birdhouse/src/flyingpigeon/flyingpigeon/processes/wps_weatherregimes_projection.py", line 271, in _handler
    raise Exception(msg)
Exception: failed to build the R command local variable 'model_season' referenced before assignment
ERROR:PYWPS:Process error: wps_weatherregimes_projection.py._handler Line 271 failed to build the R command local variable 'model_season' referenced before assignment
nilshempelmann commented 7 years ago

@bekozi remaping is perfomed with cdo within the ocgis_module. Could be harmonized using ocgis only.

bekozi commented 7 years ago

@nilshempelmann, have you tested using ocgis-esmpy regridding? I know the memory requirements can get high depending on the grids. Subsets are applied first, so that may help in some cases.

nilshempelmann commented 5 years ago

weatherregimes processes are migrated to blackbird