Code Monkey home page Code Monkey logo

rrtm.jl's Introduction

RRTM.jl

Build Status

Coverage Status

codecov.io

This is an implementation of the widely used Fortran radiative transfer code RRTM in Julia. Specifically, this is the version of RRTM used in MPI's general circulation model ECHAM version 6.1. Radiative transfer codes calculate how "shortave" light (sunlight) and "longwave" light (infrared light given off by the Earth and its atmosphere) are absorbed, emitted, reflected, and transmitted by the atmosphere.

Getting started

Prerequisites

You will need a working copy of Julia (this was developed for Julia 0.6), and a few other libraries. Most of the dependencies will be handled by Julia's package manager, but you will first need to download and install the Python module for handling NetCDFs, xarray.

Installing

Assuming you have Julia and xarray installed, simply use Julia's package manager:

Pkg.add("RRTM")

That should do it.

Using RRTM.jl

RRTM.jl was developed to run offline radiative code on output from ECHAM 6.1. It takes as its input a NetCDF file with the following variables defined: mlev, ilev, time, ktype, pp_fl, pp_hl, pp_sfc, tk_fl, tk_hl, tk_sfc, q_vap, q_liq, q_ice, cdnc, cld_frc, m_o3, m_ch4, m_n2o, psctm, cos_mu0, cos_mu0m, alb, hyai, hybi

Then you can run:

radiation(input_fn,time_i)

where input_fn is your netcdf file, and time_i is the time index you want calculated (it is strongly advised that if you calculate multiple time steps in parallel).

This assumes a T63 grid, and uses ECHAM's standard Earth mask. If you have a different resolution/mask file, you will have to provide that mask file directly as follows:

radiation(input_fn,time_i,mark_fn)

Authors

  • Jonah Bloch-Johnson - Initial work - jsbj

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

Thanks to:

  • Stephan Hoyer and all the people who make xarray awesome
  • Hossein Pourreza and everyone at the UChicago Research Computing Center
  • Thorsten Mauritsen at MPI for answering annoying questions about ECHAM arcana

rrtm.jl's People

Contributors

jsbj avatar

Stargazers

Joshua Parsons avatar Leif Denby avatar Alexey Shiklomanov avatar Nathanael Wong avatar Henri Drake avatar Daniel Koll avatar  avatar Charles Kawczynski avatar

Watchers

James Cloos 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.