Coder Social home page Coder Social logo

mom6-tools's People

Contributors

aldepp avatar alperaltuntas avatar andersy005 avatar dcherian avatar fobryan3 avatar gustavo-marques avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

mom6-tools's Issues

field section preprocess function

Just putting this here so I remember to send a PR:

def preprocess_mom6_sections(ds):
    """
    Preprocess function for reading MOM6 field section output.
    
    Gets rid of dummy dimensions ("xh_sub01") and renames them to
    standard names ("xh")
    
    Intended use is the ``preprocess`` kwarg of xarray's ``open_mfdataset``.
    """

    # "standard" dimension names
    dims = ["xh", "xq", "yh", "yq"]

    for dim in dims:
        matches = [dsdim for dsdim in ds.dims if dim in dsdim]
        if not matches:
            continue
        if len(matches) > 1:
            [
                np.testing.assert_equal(
                    ds.coords[matches[0]].values, ds.coords[other].values
                )
                for other in matches[1:]
            ]

        ds = ds.rename({matches[0]: dim})
        for match in matches[1:]:
            ds = ds.drop_vars(match).rename({match: dim})

    return ds

Fix ReadtheDocs Documentation builds

I noticed that the documentation builds on RTD have been failing for the last few months due to the Command killed due to excessive memory consumption error. This is due to the fact that conda consumes a lot of memory, and Readthedocs sets a limit to how much memory can be use. One can request memory increase for a project by contacting the RTD (Readthedocs) via https://github.com/readthedocs/readthedocs.org/issues

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.