Giter Site home page Giter Site logo

esgf2xarray's People

Contributors

andersy005 avatar naomi-henderson avatar rabernat avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

esgf2xarray's Issues

add functionality which flags potential issues before aggregation

The files dataframe returned by esgf_search is ideal for identifying issues which might arise during aggregation. For example, there can be both ri1p1f1 and ri1p1f2 type ensemble members which should probably not be combined. Or, if there are two versions (v20190101 and v20190202, so use the latest) of the same file or if one ensemble member covers only a subset of the time it would be good to flag these issues before aggregation.

I am keeping track of all the anomalies I see in the CMIP6 data and propose to write a new function to check files , flagging potential issues so the they can be dealt with on a case by case basis rather than silently dealing with them in combine_files.

rethink logic of decode_times in open_dataset

This how we load individual files:

def open_dataset(url, default_chunk_size='12MiB'):
# try to use smaller chunks
with dask.config.set({'array.chunk-size': '12MiB'}):
ds = xr.open_dataset(url, chunks={'time': 'auto'}, decode_times=False)
ds.attrs['history'] = f"{datetime.now()} xarray.open_dataset('{url}')"
ds = set_coords(ds)

The problem is that time_bnds can't be auto chunked if it is a cftime type. Now we are avoiding that by not decoding time at all; however, this could possibly lead to errors if different files have incompatible reference times e.g. days since 1950-01-01.

An alternative would be to eagerly load time_bnds so dask doesn't complain about its object dtype.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.