Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

Commit

Permalink
#478 missing/wrong coord names
Browse files Browse the repository at this point in the history
  • Loading branch information
Krzysztof (Chris) Bernat authored and kbernat committed Dec 21, 2017
1 parent 6f90d57 commit c902806
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion cate/ds/esa_cci_odp.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
from cate.core.types import PolygonLike, TimeLike, TimeRange, TimeRangeLike, VarNamesLike, VarNames
from cate.ds.local import add_to_data_store_registry, LocalDataSource, LocalDataStore
from cate.util.monitor import Cancellation, Monitor
from cate.util.opimpl import subset_spatial_impl
from cate.util.opimpl import subset_spatial_impl, normalize_impl

ESA_CCI_ODP_DATA_STORE_ID = 'esa_cci_odp'

Expand Down Expand Up @@ -633,6 +633,7 @@ def open_dataset(self,
try:
ds = open_xarray_dataset(files)
if region:
ds = normalize_impl(ds)
ds = subset_spatial_impl(ds, region)
if var_names:
ds = ds.drop([var_name for var_name in ds.data_vars.keys() if var_name not in var_names])
Expand Down Expand Up @@ -733,6 +734,7 @@ def _make_local(self,
if var_name not in var_names])

if region:
remote_dataset = normalize_impl(remote_dataset)
remote_dataset = subset_spatial_impl(remote_dataset, region)
geo_lon_min, geo_lat_min, geo_lon_max, geo_lat_max = region.bounds

Expand Down
4 changes: 3 additions & 1 deletion cate/ds/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
open_xarray_dataset
from cate.core.types import Polygon, PolygonLike, TimeRange, TimeRangeLike, VarNames, VarNamesLike
from cate.util.monitor import Monitor
from cate.util.opimpl import subset_spatial_impl
from cate.util.opimpl import subset_spatial_impl, normalize_impl

__author__ = "Norman Fomferra (Brockmann Consult GmbH), " \
"Marco Zühlke (Brockmann Consult GmbH), " \
Expand Down Expand Up @@ -168,6 +168,7 @@ def open_dataset(self,
try:
ds = open_xarray_dataset(paths)
if region:
ds = normalize_impl(ds)
ds = subset_spatial_impl(ds, region)
if var_names:
ds = ds.drop([var_name for var_name in ds.data_vars.keys() if var_name not in var_names])
Expand Down Expand Up @@ -250,6 +251,7 @@ def _make_local(self,
if var_name not in var_names])

if region:
remote_dataset = normalize_impl(remote_dataset)
remote_dataset = subset_spatial_impl(remote_dataset, region)
geo_lon_min, geo_lat_min, geo_lon_max, geo_lat_max = region.bounds

Expand Down

0 comments on commit c902806

Please sign in to comment.