Giter Site home page Giter Site logo

ocean-regrid's Introduction

ocean-regrid

Regrid global ocean data in 3d. Suppurts GODAS, ORAS4 reanalysis grids and MOM, NEMO model grids. Handles missing data and grids with mismatched domains.

Build status

Build Status

Install

Python dependencies

  1. Download and install Anaconda for your platform.
  2. Install the git revision control system if you don't already have it.
  3. Download ocean-regrid:
$ git clone --recursive https://github.com/COSIMA/ocean-regrid.git
$ cd ocean-regrid
  1. Setup the Anaconda environment. This will download all the necessary Python packages.
$ conda env create -f regrid.yml
$ source activate regrid

ESMF dependencies

Install ESMF_RegridWeightGen. ESMF releases can be found here.

There is a bash script contrib/build_esmf.sh which the testing system uses to build ESMF. This may be useful in addition to the ESMF installation docs.

Example Use

Regrid ORAS4 reanalysis to MOM 0.25 degree tripolar grid:

$ cd test
$ wget http://s3-ap-southeast-2.amazonaws.com/dp-drop/ocean-regrid/test/test_data.tar.gz
$ tar zxvf test_data.tar.gz
$ cd test_data/input
$ ../../../regrid.py ORAS4 coords_T.nc coords_T.nc thetao_oras4_1m_2014_grid_T.nc thetao \
    MOM ocean_hgrid.nc ocean_vgrid.nc mom_oras4_temp.nc temp --dest_mask ocean_mask.nc
$ ncview mom_oras4_temp.nc

OR:

$ python -m pytest
$ ncview test/test_data/output/mom_oras4_temp.nc

How it works

  1. The source dataset is regridded in the vertical to have the same depth and levels as the destination grid. Linear interpolation is used for this. If the destination is deeper than the source then the deepest value is extended.

  2. If the source dataset is limited latitudinally it is extended to cover the whole globe. This is done based on nearest neighbours.

  3. The source dataset is then regridded using weights calculated with ESMF_RegridWeightGen. Various regridding schemes are supported includeing distance weighted nearest neighbour, bilinear and conservative.

  4. The destination land sea mask is applied.

ocean-regrid's People

Contributors

aekiss avatar aidanheerdegen avatar nichannah avatar

Watchers

 avatar

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.