Coder Social home page Coder Social logo

manny1185 / tmm Goto Github PK

View Code? Open in Web Editor NEW

This project forked from samarkhatiwala/tmm

0.0 0.0 0.0 893 KB

TMM package for offline ocean biogeochemical simulations

License: MIT License

C 50.57% MATLAB 15.67% Fortran 31.14% Shell 0.37% Makefile 2.24%

tmm's Introduction

This is the Transport Matrix Method (TMM) code repository. It includes both 
the core TMM time-stepping driver code (under driver/), as well as various 
biogeochemical models (under models/) adapted to the TMM framework. The driver 
code and interface to models are written using the PETSc framework 
(http://www.mcs.anl.gov/petsc/) but you don't need this code to use the TMM. 
Simply skip to step (3) below. Otherwise keep reading and if you have any 
questions feel free to email: Samar Khatiwala <[email protected]>

If you use the TMM, please cite Khatiwala et al. (2005; https://doi.org/10.1016/j.ocemod.2004.04.002) 
and Khatiwala (2007; https://doi.org/10.1029/2007GB002923). Furthermore, if you use this code 
please also cite Khatiwala (2018; https://doi.org/10.5281/zenodo.1246300). Thank you!

For a quick overview of the TMM and the PETSc driver also have a look at this excellent 
presentation by Iris Kriest: https://ftp.geomar.de/users/ikriest/TMM/MOPS-TMM-2016-June.pdf

Quick-start instructions:

1) Install PETSc (http://www.mcs.anl.gov/petsc/) and set the PETSC_DIR and PETSC_ARCH 
environment variables. The TMM driver code is compatible with PETSc version 3.13 
(this is the latest version as of June 12, 2020). For the older version of the TMM 
code compatible with PETSc 3.6.x, you can checkout branch petsc3.6.

2) Download Matlab scripts and add to your Matlab path:
http://kelvin.earth.ox.ac.uk/spk/Research/TMM/tmm_matlab_code.tar.gz

3) Download transport matrices and related data for the ocean model of your 
choice: http://kelvin.earth.ox.ac.uk/spk/Research/TMM/TransportMatrixConfigs/
Currently, there are 3 configurations of MITgcm available online (and several 
others based on the UVic Earth System Model that I am happy to make available). 
For each, download the TMs and other associated data (e.g., MITgcm_ECCO.tar). 
Unpack. Make a note of the path to this directory (e.g., /mydisk/somewhere/MITgcm_ECCO). 
We will need it later. For some experiments you may also find it useful to download 
some miscellaneous data here (and adjust paths accordingly in the provided Matlab scripts): 
http://kelvin.earth.ox.ac.uk/spk/Research/TMM/MiscData/

4) Make a local directory and checkout the TMM driver and model codes:
cd $HOME
mkdir TMM
cd TMM/
git clone https://github.com/samarkhatiwala/tmm.git

Set the environment variable TMMROOT to point to the top level of the TMM directory.

5) For each model, e.g., $TMMROOT/models/current/mops2.0/ there is model-specific code (in src/); 
Matlab script(s) in matlab/ to generate input data (e.g., make_input_files_for_mops_model.m) and 
read model output (e.g., load_output.m); and run scripts and other runtime data such as 
namelists in runscripts/. 

To try out one of these models, make a directory, e.g., Test/, and copy the following to it:

cp -p $TMMROOT/models/current/mops2.0/src/Makefile .

(If there is a file *_TMM_OPTIONS.h in src/ copy that as well, e.g.,
cp -p $TMMROOT/models/current/mobi2.0/src/MOBI_TMM_OPTIONS.h .
Edit this file to set compile-time C/Fortran preprocessor options.)

Compile the code:
(For some models you may have to first set additional environment variables as described 
in the corresponding Makefile.)

make mops

Copy the matlab and run scripts:

cp -p -R $TMMROOT/models/current/mops2.0/matlab/* .
cp -p $TMMROOT/models/current/mops2.0/runscripts/* .

Change the variable base_path at the very top of the make_input*.m and load_output*.m scripts 
to point to the top level of any of the transport matrix configurations you downloaded in #3 
above. Execute the make_input* script (e.g., make_input_files_for_mops_model.m). It should 
generate all necessary input data. With luck! (If there is missing data email me for it.)

Execute model using the example run scripts.

Load output using the example load_output.m script.

tmm's People

Contributors

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