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

crs=ocgis.crs.Spherical() required to subset with RequestDataset #492

Closed
rokuingh opened this issue Jan 25, 2019 · 1 comment
Closed

crs=ocgis.crs.Spherical() required to subset with RequestDataset #492

rokuingh opened this issue Jan 25, 2019 · 1 comment
Milestone

Comments

@rokuingh
Copy link
Contributor

When subsetting a file with no data variables with RequestDataset, the following traceback will occur if crs=ocgis.crs.Spherical() is not set:

Traceback (most recent call last):
File "test_subset.py", line 12, in
res = oo.execute()
File "/Users/ryan/miniconda3/envs/ocgis/lib/python3.6/site-packages/ocgis/ops/core.py", line 313, in execute
return interp.execute()
File "/Users/ryan/miniconda3/envs/ocgis/lib/python3.6/site-packages/ocgis/ops/interpreter.py", line 135, in execute
ret = conv.write()
File "/Users/ryan/miniconda3/envs/ocgis/lib/python3.6/site-packages/ocgis/conv/base.py", line 171, in write
for i, coll in enumerate(self):
File "/Users/ryan/miniconda3/envs/ocgis/lib/python3.6/site-packages/ocgis/conv/base.py", line 120, in iter
for coll in self.colls:
File "/Users/ryan/miniconda3/envs/ocgis/lib/python3.6/site-packages/ocgis/ops/engine.py", line 59, in iter
for coll in self.iter_collections():
File "/Users/ryan/miniconda3/envs/ocgis/lib/python3.6/site-packages/ocgis/ops/engine.py", line 125, in iter_collections
for coll in self.process_subsettables(rds):
File "/Users/ryan/miniconda3/envs/ocgis/lib/python3.6/site-packages/ocgis/ops/engine.py", line 278, in process_subsettables
for coll in self.process_geometries(itr, field, alias):
File "/Users/ryan/miniconda3/envs/ocgis/lib/python3.6/site-packages/ocgis/ops/engine.py", line 339, in process_geometries
subset_field.update_crs(field.crs)
File "/Users/ryan/miniconda3/envs/ocgis/lib/python3.6/site-packages/ocgis/collection/field.py", line 976, in update_crs
self.geom.update_crs(to_crs)
File "/Users/ryan/miniconda3/envs/ocgis/lib/python3.6/site-packages/ocgis/variable/geom.py", line 1062, in update_crs
super(GeometryVariable, self).update_crs(to_crs)
File "/Users/ryan/miniconda3/envs/ocgis/lib/python3.6/site-packages/ocgis/spatial/base.py", line 160, in update_crs
raise ValueError(msg)
ValueError: The destination CRS may not be None. Has the coordinate system been assigned appropriately?

@bekozi bekozi added this to the v2.2.0 milestone Nov 18, 2019
@bekozi
Copy link
Contributor

bekozi commented Nov 18, 2019

Added default coordinate system for the ESMF Unstructured format: 93bd2a7

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

No branches or pull requests

2 participants