[4728] | 1 | # ECRAD - ECMWF atmospheric radiation scheme |
---|
| 2 | |
---|
| 3 | This document last updated 9 June 2022 |
---|
| 4 | |
---|
| 5 | Robin Hogan <r.j.hogan@ecmwf.int> |
---|
| 6 | |
---|
| 7 | For more complete information about compilation and usage of ecRad, |
---|
| 8 | please see the documentation on the |
---|
| 9 | [ecRad web site](https://confluence.ecmwf.int/display/ECRAD). |
---|
| 10 | |
---|
| 11 | |
---|
| 12 | ## INTRODUCTION |
---|
| 13 | |
---|
| 14 | This package contains the offline version of a radiation scheme |
---|
| 15 | suitable for use in atmospheric weather and climate models. The code |
---|
| 16 | is designed to be extensible and flexible. For example, the gas |
---|
| 17 | optics, cloud optics and solver are completely separated (see |
---|
| 18 | `radiation/radiation_interface.F90` where they are called in sequence), |
---|
| 19 | thereby facilitating future changes where different gas models or |
---|
| 20 | solvers may be switched in and out independently. The offline code is |
---|
| 21 | parallelized using OpenMP. |
---|
| 22 | |
---|
| 23 | Five solvers are currently available: |
---|
| 24 | |
---|
| 25 | 1. The Monte Carlo Independent Column Approximation (McICA) of Pincus |
---|
| 26 | et al. (2003). This is is a now widely used method for treating cloud |
---|
| 27 | structure efficiently. The implementation in this package is more |
---|
| 28 | efficient than the one currently operational in the ECMWF model, and |
---|
| 29 | produces less noise in partially cloudy situations. Note that since |
---|
| 30 | McICA is stocastic, individual flux profiles using McICA may differ |
---|
| 31 | simply due to random variations in the sampling of the cloud field. |
---|
| 32 | |
---|
| 33 | 2. The Tripleclouds scheme of Shonk and Hogan (2008). This represents |
---|
| 34 | cloud structure by dividing each layer into three regions, one clear |
---|
| 35 | and two cloudy with different optical depth. It is somewhat slower |
---|
| 36 | than McICA but does not generate noise. |
---|
| 37 | |
---|
| 38 | 3. The Speedy Algorithm for Radiative Transfer through Cloud Sides |
---|
| 39 | (SPARTACUS) of Hogan et al. (JGR 2016). This is a method for |
---|
| 40 | efficiently treating 3D radiative effects associated with clouds. It |
---|
| 41 | uses the same differential equations proposed by Hogan and Shonk (JAS |
---|
| 42 | 2013), but solves them using a matrix exponential method that is much |
---|
| 43 | more elegant than their method, and is also here extended to the |
---|
| 44 | longwave (see Schaefer et al., JGR 2016). It also incorporates the |
---|
| 45 | Tripleclouds methodology of Shonk and Hogan (2008) to represent cloud |
---|
| 46 | inhomogeneity. |
---|
| 47 | |
---|
| 48 | 4. A homogeneous (plane parallel) solver in which clouds are assumed |
---|
| 49 | to fill the gridbox horizontally. This is useful for computing |
---|
| 50 | Independent Column Approximation benchmarks. |
---|
| 51 | |
---|
| 52 | 5. A "cloudless" solver if your focus is on clear skies. |
---|
| 53 | |
---|
| 54 | Two gas optics models are available: |
---|
| 55 | |
---|
| 56 | 1. The Rapid Radiative Transfer Model for GCMs (RRTMG), the |
---|
| 57 | implementation being that from the ECMWF Integrated Forecasting System |
---|
| 58 | (IFS). |
---|
| 59 | |
---|
| 60 | 2. The ECMWF Correlated k-Distribution (ecCKD) scheme (since ecRad |
---|
| 61 | 1.5), which uses a flexible discretization of the spectrum that is |
---|
| 62 | read from a file at run-time. |
---|
| 63 | |
---|
| 64 | |
---|
| 65 | ## PACKAGE OVERVIEW |
---|
| 66 | |
---|
| 67 | The subdirectories are as follows: |
---|
| 68 | |
---|
| 69 | - `radiation` - the ecRad souce code |
---|
| 70 | |
---|
| 71 | - `ifsaux` - source code providing a (sometimes dummy) IFS environment |
---|
| 72 | |
---|
| 73 | - `ifsrrtm` - the IFS implementation of the RRTMG gas optics scheme |
---|
| 74 | |
---|
| 75 | - `utilities` - source code for useful utilities, such as reading netCDF |
---|
| 76 | files |
---|
| 77 | |
---|
| 78 | - `drhook` - dummy version of the Dr Hook profiling system |
---|
| 79 | |
---|
| 80 | - `driver` - the source code for the offline driver program |
---|
| 81 | |
---|
| 82 | - `ifs` - slightly modified source files from the IFS that are used to provide inputs to |
---|
| 83 | ecRad, but not used in this offline version except if you compile the ecrad_ifs_driver executable |
---|
| 84 | |
---|
| 85 | - `mod` - where Fortran module files are written |
---|
| 86 | |
---|
| 87 | - `lib` - where the static libraries are written |
---|
| 88 | |
---|
| 89 | - `bin` - where the executable ecrad is written |
---|
| 90 | |
---|
| 91 | - `data` - contains configuration data read at run-time |
---|
| 92 | |
---|
| 93 | - `test` - test cases including Matlab code to plot the outputs |
---|
| 94 | |
---|
| 95 | - `include` - automatically generated interface blocks for non-module routines |
---|
| 96 | |
---|
| 97 | - `practical` - exercises to get started with ecRad |
---|
| 98 | |
---|
| 99 | |
---|
| 100 | ## TO COMPILE |
---|
| 101 | |
---|
| 102 | 1. Ensure you have a reasonably recent Fortran compiler - it needs to |
---|
| 103 | support modules with `contains` and `procedure` statements for |
---|
| 104 | example. Ensure you have the Fortran netCDF library installed |
---|
| 105 | (versions 3 or 4) and that the module file is compatible with your |
---|
| 106 | Fortran compiler. |
---|
| 107 | |
---|
| 108 | 2. You can compile the code using |
---|
| 109 | |
---|
| 110 | make PROFILE=<prof> |
---|
| 111 | |
---|
| 112 | where `<prof>` is one of `gfortran`, `pgi`, `cray` or `intel`. |
---|
| 113 | This will read the system-specific configurations from the file |
---|
| 114 | `Makefile_include.<prof>`. If you omit the `PROFILE=` option then |
---|
| 115 | `gfortran` will be assumed. If you have a compiler other than these |
---|
| 116 | then create such a file for your compiler following the example in |
---|
| 117 | `Makefile_include.gfortran`. Two additional profiles are provided, |
---|
| 118 | `ecmwf` which builds on the `gfortran` profile and `uor` |
---|
| 119 | (University of Reading) which is built on the `pgi` profile. |
---|
| 120 | |
---|
| 121 | If the compile is successful then static libraries should appear in |
---|
| 122 | the `lib` directory, and then the executable `bin/ecrad`. |
---|
| 123 | |
---|
| 124 | 3. To clean-up, type `make clean`. To build an unoptimized version |
---|
| 125 | for debugging, you can do |
---|
| 126 | |
---|
| 127 | make PROFILE=<prof> DEBUG=1 |
---|
| 128 | |
---|
| 129 | or you can specifically override the variables in `Makefile_include.<prof>` |
---|
| 130 | using, for example |
---|
| 131 | |
---|
| 132 | make PROFILE=<prof> OPTFLAGS=-O0 DEBUGFLAGS="-g -pg" |
---|
| 133 | |
---|
| 134 | To compile in single precision add `SINGLE_PRECISION=1` to the |
---|
| 135 | `make` command line. To compile with the Dr Hook profiling system, |
---|
| 136 | first install ECMWF's [fiat library]([ecRad web |
---|
| 137 | site](https://github.com/ecmwf-ifs/fiat), then add |
---|
| 138 | `FIATDIR=/path/to/fiat` to the `make` command line, such that the |
---|
| 139 | files `$FIATDIR/lib/libfiat.so` and |
---|
| 140 | `$FIATDIR/module/fiat/yomhook.mod` can be found at build time. |
---|
| 141 | |
---|
| 142 | |
---|
| 143 | ## TO TEST |
---|
| 144 | |
---|
| 145 | The offline driver is run via |
---|
| 146 | |
---|
| 147 | ecrad <namelist.nam> <input_file.nc> <output_file.nc> |
---|
| 148 | |
---|
| 149 | where the radiation scheme is configured using the Fortran namelist |
---|
| 150 | file `<namelist.nam>`, and the inputs and outputs are in netCDF |
---|
| 151 | format. |
---|
| 152 | |
---|
| 153 | The `practical` directory contains a set of practical exercises to |
---|
| 154 | help new users become familiar with the capabilities of ecRad. Start |
---|
| 155 | by reading the instructions in `practical/ecrad_practical.pdf`. |
---|
| 156 | |
---|
| 157 | The `test/ifs` directory contains a pole-to-pole slice of |
---|
| 158 | low-resolution IFS model data in a form to use as input to the offline |
---|
| 159 | version of ecRad. It includes aerosols extracted from the CAMS |
---|
| 160 | climatology used operationally since IFS Cycle 43R3. Typing `make |
---|
| 161 | test` in this directory runs a number of configurations of ecRad |
---|
| 162 | described in the Makefile. The Matlab script `plot_ifs.m` can be used |
---|
| 163 | to visualize the results. The file |
---|
| 164 | `ecrad_meridian_default_out_REFERENCE.nc` contains a reference version |
---|
| 165 | of the output file `ecrad_meridian_default_out.nc` (case "a"), which |
---|
| 166 | you can compare to be sure your compilation is working as |
---|
| 167 | expected. This case has essentially been superceded by the slice in the |
---|
| 168 | `practical` directory. |
---|
| 169 | |
---|
| 170 | The `test/i3rc` directory contains the 1D profile of the I3RC cumulus |
---|
| 171 | test case used by Hogan et al. (2016). Typing `make test` in this |
---|
| 172 | directory runs the various 1D and 3D configurations of ecRad. The |
---|
| 173 | Matlab script `plot_i3rc.m` can then be used to visualize the results, |
---|
| 174 | reproducing three of the figures from Hogan et al. (2016). Note that |
---|
| 175 | you will need to ensure that a reasonably up-to-date version of the |
---|
| 176 | `nco` tools are available and in your path. This test involves |
---|
| 177 | running the duplicate_profiles.sh script, which duplicates the single |
---|
| 178 | profile in `i3rc_mls_cumulus.nc`, each with a different solar zenith |
---|
| 179 | angle. |
---|
| 180 | |
---|
| 181 | The `test/surface` directory contains tests of the surface tile types, |
---|
| 182 | although this is under development and so nothing here is guaranteed |
---|
| 183 | to work. |
---|
| 184 | |
---|
| 185 | Alternatively, type `make test` in the top-level directory to run all |
---|
| 186 | cases. |
---|
| 187 | |
---|
| 188 | In addition to writing the output file, a file containing the |
---|
| 189 | intermediate radiative properties of the atmosphere for each g-point |
---|
| 190 | can be stored in `radiative_properties.nc` (edit the config namelist to |
---|
| 191 | enable this), but note that the g-points have been reordered in |
---|
| 192 | approximate order of optical depth if the SPARTACUS solver is chosen. |
---|
| 193 | |
---|
| 194 | |
---|
| 195 | ## LICENCE |
---|
| 196 | |
---|
| 197 | (C) Copyright 2014- ECMWF. |
---|
| 198 | |
---|
| 199 | This software is licensed under the terms of the Apache Licence Version 2.0 |
---|
| 200 | which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. |
---|
| 201 | |
---|
| 202 | In applying this licence, ECMWF does not waive the privileges and immunities |
---|
| 203 | granted to it by virtue of its status as an intergovernmental organisation |
---|
| 204 | nor does it submit to any jurisdiction. |
---|
| 205 | Copyright statements are given in the file NOTICE. |
---|
| 206 | |
---|
| 207 | The ifsrrtm directory of this package includes a modified version of |
---|
| 208 | the gas optics part of the Rapid Radiative Transfer Model for GCMS |
---|
| 209 | (RRTMG). RRTMG was developed at Atmospheric & Environmental Research |
---|
| 210 | (AER), Inc., Lexington, Massachusetts and is available under the |
---|
| 211 | "3-clause BSD" license; for details, see ifsrrtm/AER-BSD3-LICENSE. |
---|
| 212 | |
---|
| 213 | |
---|
| 214 | ## PUBLICATIONS |
---|
| 215 | |
---|
| 216 | The ecRad radiation scheme itself is described here: |
---|
| 217 | |
---|
| 218 | - Hogan, R. J., and A. Bozzo, 2018: A flexible and efficient radiation |
---|
| 219 | scheme for the ECMWF model. J. Adv. Modeling Earth Syst., 10, 1990-2008, |
---|
| 220 | doi:10.1029/2018MS001364. |
---|
| 221 | |
---|
| 222 | - Hogan, R. J., and A. Bozzo, 2016: ECRAD: A new radiation scheme for |
---|
| 223 | the IFS. ECMWF Technical Memorandum number 787, 35pp: |
---|
| 224 | http://www.ecmwf.int/en/elibrary/16901-ecrad-new-radiation-scheme-ifs |
---|
| 225 | |
---|
| 226 | A two-part paper is published in Journal of Geophysics Research |
---|
| 227 | describing the SPARTACUS technique: |
---|
| 228 | |
---|
| 229 | - Schäfer, S. A. K., R. J. Hogan, C. Klinger, J.-C. Chiu and B. Mayer, |
---|
| 230 | 2016: Representing 3D cloud-radiation effects in two-stream schemes: 1. Longwave considerations and effective cloud edge length. |
---|
| 231 | J. Geophys. Res., 121, 8567-8582. |
---|
| 232 | http://www.met.reading.ac.uk/~swrhgnrj/publications/spartacus_part1.pdf |
---|
| 233 | |
---|
| 234 | - Hogan, R. J., S. A. K. Schäfer, C. Klinger, J.-C. Chiu and B. Mayer, |
---|
| 235 | 2016: Representing 3D cloud-radiation effects in two-stream schemes: 2. Matrix formulation and broadband evaluation. J. Geophys. Res., 121, |
---|
| 236 | 8583-8599. |
---|
| 237 | http://www.met.reading.ac.uk/~swrhgnrj/publications/spartacus_part2.pdf |
---|
| 238 | |
---|
| 239 | More recent developments on the shortwave SPARTACUS solver, available |
---|
| 240 | since ecRad 1.1.10, are described here: |
---|
| 241 | |
---|
| 242 | - Hogan, R. J., M. D. Fielding, H. W. Barker, N. Villefranque and |
---|
| 243 | S. A. K. Schäfer, 2019: Entrapment: An important mechanism to explain |
---|
| 244 | the shortwave 3D radiative effect of clouds. J. Atmos. Sci., 76, |
---|
| 245 | 2123–2141. |
---|
| 246 | |
---|
| 247 | The ecCKD gas optics scheme is described here: |
---|
| 248 | |
---|
| 249 | - Hogan, R. J., and M. Matricardi, 2022: a tool for generating fast |
---|
| 250 | k-distribution gas-optics models for weather and climate |
---|
| 251 | applications. J. Adv. Modeling Earth Sys., in review. |
---|
| 252 | |
---|
| 253 | |
---|
| 254 | ## CONTACT |
---|
| 255 | |
---|
| 256 | Please email Robin Hogan <r.j.hogan@ecmwf.int> with any queries or bug |
---|
| 257 | fixes, but note that ECMWF does not commit to providing support to |
---|
| 258 | users of this software. |
---|