Code Monkey home page Code Monkey logo

roms2ugrid's Introduction

ROMS2UGRID

Convert grid and history files created by the /Regional Ocean Modeling System/ (ROMS), to a UGRID compliant netCDF file. The goal is to be able to post-process ROMS outputs into a file format that can be loaded directly into QGIS as a mesh layer.

At the moment, this script only supports variables defined on the RHO-points. Vector fields are also supported (and can be read/plotted properly by QGIS), but ONLY for variables defined on the RHO-points. This means that if you want to plot, for example, ubar and vbar as a single vector field, then you need to instruct ROMS (in your ROMS input file) to process/write ubar_eastward and vbar_northward to your history/quick/average file(s).

Any depth-dependent variables that are requested, are split along their depth dimension into a sequence of β€œflat” variables. For example, for a model with N S-levels, the 3D+time salt variable would be processed down to a set of variables salt_[0-N] in the output file, each of which can then be plotted in QGIS as a normal 2D+time variable.

Usage

usage: roms2ugrid.py [-h] [-v [VARS [VARS ...]]] [-V] roms ugrid

Convert a ROMS file to a UGRID compliant netCDF

positional arguments:
  roms                  input filepath
  ugrid                 output filepath

optional arguments:
  -h, --help            show this help message and exit
  -v [VARS [VARS ...]], --vars [VARS [VARS ...]]
                        variables to process (only supports RHO vars atm)
  -V, --verbose

Requirements

  • Python 3
  • numpy
  • xarray

roms2ugrid's People

Contributors

tviti 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.