Skip to content

Commit

Permalink
use nctoolkit to decode times when xarray fails
Browse files Browse the repository at this point in the history
  • Loading branch information
robertjwilson committed Aug 24, 2023
1 parent 7c7b67c commit 12467bd
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions ncplot/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import xarray as xr
import copy
import numpy as np
import os

from ncplot.utils import get_dims, check_lon, check_lat

Expand Down Expand Up @@ -298,19 +299,6 @@ def view(x, vars=None, autoscale=True, out=None, **kwargs):
if "pole" in ds[lon_name].long_name:
coastline = False

#print(ds.data_vars)
#if lon_name is not None:
# for vv in ds.data_vars:
# if lon_name not in list(ds[vv].dims):
# if lat_name not in list(ds[vv].dims):
# [x for x in list(ds[vv].dims] if "time" in x'
# if "time" not in list(ds[vv].dims):
# bad += [vv]
#
# if len(bad) > 0:
# ds = ds.drop(bad)
#print(ds.data_vars)

if len([x for x in ds.coords if "lon" in x]) > len(
[x for x in ds.dims if "lon" in x]
):
Expand Down

0 comments on commit 12467bd

Please sign in to comment.