Code Monkey home page Code Monkey logo

pyrunstat's Introduction

pyRunStat

.. image:: https://img.shields.io/github/workflow/status/jdha/pyRunStat/CI?logo=github :target: https://github.com/jdha/pyRunStat/actions :alt: GitHub Workflow CI Status

.. image:: https://codecov.io/gh/jdha/pyRunStat/branch/main/graph/badge.svg?token= :target: https://codecov.io/gh/jdha/pyRunStat :alt: Code Coverage

.. image:: https://readthedocs.org/projects/pyrunstat/badge/?version=latest :target: https://pyrunstat.readthedocs.io/en/latest/?badge=latest :alt: Documentation Status

pre-commit.ci status

Read in and plot run.stat data from a NEMO simulation.

Quick Start

  • Clone pyRunStat repository:

    export PYRS_DIR=$PWD/pyRunStat
    git clone https://github.com/jdha/pyRunStat.git
    
  • Creating a specific conda virtual environment is highly recommended (click here for more about virtual enviroments). Use the latest version of anaconda (to be added in your .bashrc or load the module in the command line, e.g module load anaconda).

    cd $PYRS_DIR
    conda env create -n pyrunstat -f environment.yml python=3.11
    
  • Activate the new virtual environment:

    conda activate pyrunstat
    
  • To deactivate (not now!):

    conda deactivate
    
  • Install pyRunStat:

    pip install -e .
    

This should result in pyRunStat being installed in the virtual environment, and can be checked by entering:

pyrunstat -v

Usage:

import pyrunstat as rs

file_path = './run.stat'

# Extract the 'ssh_max'
da_ssh_max = rs.extract.read_text(file_path, 'ssh_max')

# Plot ssh_max timeseries
rs.plot.time_series(da_ssh_max, labels=['SSH maximum'])

pyrunstat.plot.time_series can accept a list of DataArrays to allow the plotting of multiple timeseries from different simulations.

Example: plotting up the output from a run.stat or run.stat.nc file

see: notebook

pyrunstat's People

Contributors

jdha avatar

Watchers

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