Skip to content
/ RRTM.jl Public

The radiative transfer code RRTM implemented in Julia

License

Notifications You must be signed in to change notification settings

jsbj/RRTM.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

The radiative transfer code RRTM implemented in Julia

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages