source: LMDZ6/branches/contrails/libf/phylmd/ecrad/practical/radiation_practical.ipynb @ 5445

Last change on this file since 5445 was 4773, checked in by idelkadi, 12 months ago
  • Update of Ecrad in LMDZ The same organization of the Ecrad offline version is retained in order to facilitate the updating of Ecrad in LMDZ and the comparison between online and offline results. version 1.6.1 of Ecrad (https://github.com/lguez/ecrad.git)
  • Implementation of the double call of Ecrad in LMDZ


File size: 25.8 KB
Line 
1{
2 "cells": [
3  {
4   "cell_type": "markdown",
5   "metadata": {},
6   "source": [
7    "# Modelling atmospheric radiative transfer\n",
8    "\n",
9    "<span style=\"color:darkgray\">**Robin J Hogan and Shannon L Mason**</span>\n",
10    "\n",
11    "## 1. Introduction\n",
12    "\n",
13    "In this practical, the offline version of ECMWF’s atmospheric radiation scheme *ecRad* [(Hogan and Bozzo, 2018)](https://agupubs.onlinelibrary.wiley.com/doi/pdfdirect/10.1029/2018MS001364)\n",
14    "will be used to gain an understanding of how radiative transfer is modelled, and how both radiative fluxes and atmospheric heating rates are sensitive to gas concentrations, clouds and aerosols. \n",
15    "\n",
16    "The input data consist of a slice through the atmosphere from the North Pole to the South Pole at a longitude of 5$^{\\circ}$E at 12 UTC on 11 July 2019, as represented by ECMWF’s ERA5 reanalysis system. \n",
17    "The data are stored at 137 levels from the surface to the middle mesosphere (a pressure of 1 Pa), and have been extracted at every 0.5$^{\\circ}$ interval in latitude. \n",
18    "This slice includes a range of atmospheric and surface conditions, from marine stratocumulus to deep convection, sea ice to a hot desert surface, and pristine marine air over the Southern Ocean to the dust-laden Saharan boundary layer.\n",
19    "\n",
20    "<span style=\"color:red\">**Visualise the input data along the slice by running the `plot_input` script.**</span>\n",
21    "\n",
22    "***Note: we run the plotting scripts as Python modules, but they can also be run in the command-line if you wish.***"
23   ]
24  },
25  {
26   "cell_type": "code",
27   "execution_count": null,
28   "metadata": {},
29   "outputs": [],
30   "source": [
31    "#First we import all of our plotting scripts\n",
32    "import plot_input, plot_input_profile, plot_output, plot_output_profile, plot_output_scalar, compare_output, compare_output_profile, compare_output_scalar"
33   ]
34  },
35  {
36   "cell_type": "code",
37   "execution_count": null,
38   "metadata": {},
39   "outputs": [],
40   "source": [
41    "plot_input.main(\"era5slice.nc\")"
42   ]
43  },
44  {
45   "cell_type": "markdown",
46   "metadata": {},
47   "source": [
48    "Profiles of input data at a given latitude can be plotted using \n",
49    "\n",
50    "    plot_input_profile.main(10, \"era5slice.nc\")\n",
51    "\n",
52    "<span style=\"color:red\">**Try plotting profiles of the input data at a few different latitudes by copying and changing the lines below:**</span>"
53   ]
54  },
55  {
56   "cell_type": "code",
57   "execution_count": null,
58   "metadata": {},
59   "outputs": [],
60   "source": []
61  },
62  {
63   "cell_type": "markdown",
64   "metadata": {},
65   "source": [
66    "## 2. The Control experiment\n",
67    "\n",
68    "The contents of this directory will include the following files:\n",
69    "\n",
70    "- **`radiation_practical.ipynb`** \n",
71    "This notebook.\n",
72    "\n",
73    "- **`ecrad_1.3.1/`**\n",
74    "The ecrad source code.\n",
75    "\n",
76    "- **`ecrad`** \n",
77    "A symbolic link to the *ecRad* executable.\n",
78    "\n",
79    "- **`data/`** \n",
80    "A symbolic link to the *ecRad* data directory.\n",
81    "\n",
82    "- **`config.nam`** \n",
83    "A Fortran namelist file for configuring *ecRad* in its control configuration.\n",
84    "\n",
85    "- **`era5slice.nc`** \n",
86    "A netCDF file containing the input data; some of its contents are shown in Section 1 above.\n",
87    "\n",
88    "- **`*.py`** \n",
89    "Python scripts for plotting the data; see Section 6 for a description of all the scripts.\n",
90    "\n",
91    "- **`ecradplot/`** \n",
92    "A directory containing the Python library for plotting *ecRad* data.\n",
93    "\n",
94    "- **`clean.sh`**\n",
95    "A little script for cleaning up changes to the working directory, including reverting this Notebook back to a clean state (any changes you've made in the Notebook be coped with a timestamp)."
96   ]
97  },
98  {
99   "cell_type": "markdown",
100   "metadata": {},
101   "source": [
102    "### 2.1 Running *ecRad*\n",
103    "\n",
104    "Now the following runs *ecRad* on the input data using the configuration specified in `config.nam`, and writes the output to a NetCDF file `control.nc`:\n",
105    "\n",
106    "    ./ecrad config.nam era5slice.nc control.nc\n",
107    "    \n",
108    "***NOTE: This can be run from a terminal within Jupyter Lab (select \"terminal\" from the \"new launcher\" button), or within a cell in this Notebook by putting the \"!\" character at the front of the line.***"
109   ]
110  },
111  {
112   "cell_type": "code",
113   "execution_count": null,
114   "metadata": {
115    "scrolled": true
116   },
117   "outputs": [],
118   "source": []
119  },
120  {
121   "cell_type": "markdown",
122   "metadata": {},
123   "source": [
124    "### 2.2 Visualising *ecRad* outputs\n",
125    "\n",
126    "#### 2.2.1 Plotting 2D fields\n",
127    "\n",
128    "<span style=\"color:red\">**To visualise some key fields from the output file `control.nc`, run the `plot_output.py` script with:**</span>\n",
129    "     \n",
130    "    plot_output.main(\"era5slice.nc\", \"control.nc\")"
131   ]
132  },
133  {
134   "cell_type": "code",
135   "execution_count": null,
136   "metadata": {},
137   "outputs": [],
138   "source": []
139  },
140  {
141   "cell_type": "markdown",
142   "metadata": {},
143   "source": [
144    "#### 2.2.2 Plotting profiles\n",
145    "\n",
146    "<span style=\"color:red\">**Plot profiles of *ecRad* output at a specific latitude (e.g. 10N) by running `plot_output_profile.py`**</span>\n",
147    "\n",
148    "    plot_output_profile.main(10, \"era5slice.nc\", [\"control.nc\"])\n",
149    "\n",
150    "where `latitude` is a number in the range [-90,90]; e.g. 10, producing a file `era5slice_control_profile_10N.png`. "
151   ]
152  },
153  {
154   "cell_type": "code",
155   "execution_count": null,
156   "metadata": {},
157   "outputs": [],
158   "source": []
159  },
160  {
161   "cell_type": "markdown",
162   "metadata": {},
163   "source": [
164    "<span style=\"color:red\">**Try plotting a few different radiation profiles at the same locations you looked at above.**</span>"
165   ]
166  },
167  {
168   "cell_type": "code",
169   "execution_count": null,
170   "metadata": {},
171   "outputs": [],
172   "source": []
173  },
174  {
175   "cell_type": "markdown",
176   "metadata": {},
177   "source": [
178    "#### 2.2.3 Plotting 1D fields\n",
179    "\n",
180    "<span style=\"color:red\">**Run `plot_output_scalar` to plots the surface and top-of-atmosphere fluxes along the slice:**</span>\n",
181    "\n",
182    "    plot_output_scalar.main(\"era5slice.nc\", [\"control.nc\"])\n",
183    "\n",
184    "producing the file `era5slice_control_surface_and_TOA.png`"
185   ]
186  },
187  {
188   "cell_type": "code",
189   "execution_count": null,
190   "metadata": {},
191   "outputs": [],
192   "source": []
193  },
194  {
195   "cell_type": "markdown",
196   "metadata": {},
197   "source": [
198    "***NOTE: if additional ecRad output files from other experiments (see later sections) are provided as arguments to `plot_output_scalar`, they will be overplotted in different colours.***"
199   ]
200  },
201  {
202   "cell_type": "markdown",
203   "metadata": {},
204   "source": [
205    "Have a look at the figures that have been created. There are three types of variable:\n",
206    "\n",
207    "- Upwelling and downwelling shortwave (solar) and longwave (thermal-infrared) irradiances, i.e. the radiativepower passing through a horizontal surface at a particular height in the atmosphere, with units of W m$^{−2}$. \n",
208    "The labels of the plots use the more common term \"flux\" instead of irradiance, and we will use the same for the remainder of this document. \n",
209    "The net flux is defined as the downwelling minus the upwelling flux.\n",
210    "\n",
211    "- Shortwave and longwave atmospheric heating rates (HR) computed from the vertical divergence of the netflux in pressure coordinates: $$\\mathrm{HR} = −\\dfrac{g_0}{C_p} \\dfrac{\\mathrm{d} F_n}{\\mathrm{d}p},$$ where $F_n$ is the net flux (shortwave or longwave), $p$ is pressure, $g_0$ is the acceleration due to gravity (standard gravity) and $C_p$ is the specific heat of dry air. \n",
212    "The plots use units of Kelvin per day (K d$^{−1}$).\n",
213    "\n",
214    "- Cloud radiative effect, which is a flux minus the equivalent flux computed without clouds present in the profile, and is commonly used to quantify the warming or cooling effect of clouds on the climate system. *ecRad* output files contain both all-sky and clear-sky fluxes."
215   ]
216  },
217  {
218   "cell_type": "markdown",
219   "metadata": {},
220   "source": [
221    "### <span style=\"color:red\">2.3 Questions</span>\n",
222    "\n",
223    "#### <span style=\"color:red\">1. As anyone who has flown in an aeroplane knows, clouds (especially low-level clouds) are turbulent. Explain why, with reference to the radiation fields. Thick low-level clouds are present at 71$^\\circ$N and 15$^\\circ$S.</span>"
224   ]
225  },
226  {
227   "cell_type": "code",
228   "execution_count": null,
229   "metadata": {},
230   "outputs": [],
231   "source": []
232  },
233  {
234   "cell_type": "markdown",
235   "metadata": {},
236   "source": [
237    "#### <span style=\"color:red\">2. The net (shortwave plus longwave) heating rate at the stratopause (around 1 hPa) in the Tropics is around +10 K d$^{−1}$. Explain why you would not expect the temperature here a week later to be much warmer.</span>"
238   ]
239  },
240  {
241   "cell_type": "code",
242   "execution_count": null,
243   "metadata": {},
244   "outputs": [],
245   "source": []
246  },
247  {
248   "cell_type": "markdown",
249   "metadata": {},
250   "source": [
251    "#### <span style=\"color:red\">3. Explain why the shortwave cloud radiative effect drops sharply polewards of around 80$^\\circ$N, yet optically thick clouds are present all the way to the North Pole.</span>"
252   ]
253  },
254  {
255   "cell_type": "code",
256   "execution_count": null,
257   "metadata": {},
258   "outputs": [],
259   "source": []
260  },
261  {
262   "cell_type": "markdown",
263   "metadata": {},
264   "source": [
265    "## 3. Greenhouse gases\n",
266    "\n",
267    "The remainder of the practical consists of running *ecRad* with different configurations, plotting the change to fluxes and heating rates, and trying to understand the differences. This section is concerned with investigating the effect of changing the concentration of absorbing gases, but the general procedure for performing an experiment is the same in the following two sections which concern perturbing clouds and aerosols.\n",
268    "\n",
269    "### 3.1 Doubled-CO2 experiment\n",
270    "\n",
271    "Let’s investigate the radiative impact of doubling the concentration of carbon dioxide. Usually in the context of climate change research, a doubled-CO2 experiment is with respect to preindustrial concentrations (surface volume mixing ratio of around 280 ppmv), but since our control experiment is from 2019 (surface volume mixing ratio ofaround 412 ppmv) we will double the 2019 value. \n",
272    "\n",
273    "<span style=\"color:red\">**Make a new copy of the configuration file with for this experiment (`config_co2x2.name`) using the Jupyter file browser, or in the command-line, e.g.**</span>\n",
274    "\n",
275    "``cp config.nam config_co2x2.nam``\n",
276    "\n",
277    "<span style=\"color:red\">**and edit the new configuration file with the Jupyter editor to change these lines:**</span>\n",
278    "\n",
279    "    !co2_scaling = 1.0,\n",
280    "    experiment_name = \"Control\",\n",
281    "\n",
282    "<span style=\"color:red\">**to these:**</span>\n",
283    "\n",
284    "    co2_scaling = 2.0,\n",
285    "    experiment_name = \"2x CO2\",\n",
286    "\n",
287    "<span style=\"color:red\">**Then run *ecRad* on it, giving `co2x2.nc` as the filename for the output:**</span>\n",
288    "\n",
289    "``./ecrad config_co2x2.nam era5slice.nc co2x2.nc``"
290   ]
291  },
292  {
293   "cell_type": "code",
294   "execution_count": null,
295   "metadata": {},
296   "outputs": [],
297   "source": []
298  },
299  {
300   "cell_type": "markdown",
301   "metadata": {},
302   "source": [
303    "For a full list of available namelist parameters, see the User Guide at the [*ecRad* web site](https://confluence.ecmwf.int/display/ECRAD). \n",
304    "In the namelist, lines starting with the `!` character are ignored.\n",
305    "\n",
306    "You can compare this experiment with the control as follows:\n",
307    "\n",
308    "    compare_output.main(\"era5slice.nc\", \"control.nc\", \"co2x2.nc\")"
309   ]
310  },
311  {
312   "cell_type": "code",
313   "execution_count": null,
314   "metadata": {},
315   "outputs": [],
316   "source": []
317  },
318  {
319   "cell_type": "markdown",
320   "metadata": {},
321   "source": [
322    "and plot selected profiles at a latitude of 17$^{\\circ}$S with\n",
323    "\n",
324    "    compare_output_profile.main(-17, \"era5slice.nc\", \"control.nc\", [\"co2x2.nc\"])\n",
325    "\n",
326    "***Note that if multiple output files are provided as arguments then they will be overplotted, each using the same control.*** "
327   ]
328  },
329  {
330   "cell_type": "code",
331   "execution_count": null,
332   "metadata": {},
333   "outputs": [],
334   "source": []
335  },
336  {
337   "cell_type": "markdown",
338   "metadata": {},
339   "source": [
340    "To compare the fluxes and cloud radiative effect at the surface and top-of-atmosphere at all latitudes, use\n",
341    "\n",
342    "    compare_output_scalar.main(\"era5slice.nc\", \"control.nc\", [\"co2x2.nc\"])\n",
343    "\n",
344    "where multiple output files can be provided as arguments."
345   ]
346  },
347  {
348   "cell_type": "code",
349   "execution_count": null,
350   "metadata": {},
351   "outputs": [],
352   "source": []
353  },
354  {
355   "cell_type": "markdown",
356   "metadata": {},
357   "source": [
358    "### <span style=\"color:red\">3.2 Questions and exercises </span>\n",
359    "\n",
360    "#### <span style=\"color:red\">1.  Will the stratosphere warm or cool in response to increasing CO2 and why?</span>"
361   ]
362  },
363  {
364   "cell_type": "code",
365   "execution_count": null,
366   "metadata": {},
367   "outputs": [],
368   "source": []
369  },
370  {
371   "cell_type": "markdown",
372   "metadata": {},
373   "source": [
374    "#### <span style=\"color:red\">2.  By  perturbing  ozone  concentrations  (e.g.  setting  the  namelist  variable `o3_scaling` to `0.7`),  explain  the mechanisms by which stratospheric ozone depletion leads to a cooling of the Earth system in the shortwave and the longwave.</span>"
375   ]
376  },
377  {
378   "cell_type": "code",
379   "execution_count": null,
380   "metadata": {},
381   "outputs": [],
382   "source": []
383  },
384  {
385   "cell_type": "markdown",
386   "metadata": {},
387   "source": [
388    "#### <span style=\"color:red\">3. By perturbing methane concentrations (e.g. setting the namelist variable `ch4_scaling` to `2.0`), estimate how many times stronger a greenhouse gas methane is than carbon dioxide, per molecule, in terms of instantaneous longwave radiative forcing at top-of-atmosphere. You need to know that the 2019 concentration of methane is around 1.905 ppmv, and that the number of molecules of an ideal gas is proportional its volume mixing ratio with no dependence on the molecular mass.  The 5th IPCC report stated that methane has a global warming potential 28 times that of carbon dioxide over a 100-year time period.  Why might this be different from your number?</span>"
389   ]
390  },
391  {
392   "cell_type": "code",
393   "execution_count": null,
394   "metadata": {},
395   "outputs": [],
396   "source": []
397  },
398  {
399   "cell_type": "markdown",
400   "metadata": {},
401   "source": [
402    "## 4. Clouds \n",
403    "\n",
404    "Some  of  the  following  involve  changing  the  algorithm  used  to  perform  the  radiative  transfer.  The  impact  on computational cost (important for the configuration of a radiation scheme in a weather or climate model) can be estimated by prefixing the ``./ecrad`` command with `time` and looking at the `user` time reported after *ecRad* has finished."
405   ]
406  },
407  {
408   "cell_type": "markdown",
409   "metadata": {},
410   "source": [
411    "### <span style=\"color:red\">4.1 Questions and exercises</span>\n",
412    "    \n",
413    "#### <span style=\"color:red\">1.  Many   models   neglect   scattering   of   longwave   radiation   by   clouds   for   computational   expediency.  What  is  the  change  to  longwave  cloud  radiative  effect  when  longwave  scattering  is  turned  off  (set `do_lw_cloud_scattering` to `false`)?  Why is it of this sign?</span>"
414   ]
415  },
416  {
417   "cell_type": "code",
418   "execution_count": null,
419   "metadata": {},
420   "outputs": [],
421   "source": []
422  },
423  {
424   "cell_type": "markdown",
425   "metadata": {},
426   "source": [
427    "#### <span style=\"color:red\">2.  The control simulation assumes sub-grid fluctuations in cloud water content such that the fractional standard deviation (the standard deviation divided by the mean) is one. What is the impact on shortwave and longwave cloud radiative effect when clouds are homogeneous (set `fractional_std` to `0.0`) and why?</span>"
428   ]
429  },
430  {
431   "cell_type": "code",
432   "execution_count": null,
433   "metadata": {},
434   "outputs": [],
435   "source": []
436  },
437  {
438   "cell_type": "markdown",
439   "metadata": {},
440   "source": [
441    "#### <span style=\"color:red\">3.  The  control  simulation  makes  the  assumption  of exponential-random vertical  overlap  of  clouds,  which means  that  vertically  separated  clouds  are  randomly  overlapped  with  respect  to  each  other,  while  vertically  contiguous  cloud  layers  decorrelate  with  separation  distance  according  to  an  overlap  decorrelation length that varies with latitude. What is the impact of making the clouds in all layers overlap randomly (set `overlap_decorr_length_scaling` to `0.0`) and why?</span>"
442   ]
443  },
444  {
445   "cell_type": "code",
446   "execution_count": null,
447   "metadata": {},
448   "outputs": [],
449   "source": []
450  },
451  {
452   "cell_type": "markdown",
453   "metadata": {},
454   "source": [
455    "#### <span style=\"color:red\">4.  The  control  simulation  uses  the *Tripleclouds* solver  [(Shonk  and  Hogan,  2008)](https://git.ecmwf.int/projects/ECRAD/repos/ecrad/raw/practical/ecrad_practical.pdf?at=refs%2Fheads%2Fgithub#cite.Shonk+2008)  for  performing  radiative  transfer  calculations  in  the  presence  of  clouds,  including  the  effect  of  sub-grid  fluctuations  incloud  water  content. The  operational  ECMWF  model  uses  the *McICA* solver  [(Pincus  et  al.,  2003)](https://git.ecmwf.int/projects/ECRAD/repos/ecrad/raw/practical/ecrad_practical.pdf?t=refs%2Fheads%2Fgithub#cite.Pincus+2003), which uses a stochastic model to generate sub-grid cloud distributions and can be selected by changing `sw_solver_name` and `lw_solver_name` both to `McICA`.  Looking at the atmospheric heating rates (e.g.using `plot_output_profile` at 7$^{\\circ}$N), and the overall computational cost, explain the pros and cons of using *McICA* versus *Tripleclouds* in an operational context.</span>"
456   ]
457  },
458  {
459   "cell_type": "code",
460   "execution_count": null,
461   "metadata": {},
462   "outputs": [],
463   "source": []
464  },
465  {
466   "cell_type": "markdown",
467   "metadata": {},
468   "source": [
469    "#### <span style=\"color:red\">5.  Ice optical properties are an uncertain part of a radiative transfer scheme.  Investigate the size of this uncertainty by switching from the default Fu ice optics model to that of [Yi et al. (2013)](https://git.ecmwf.int/projects/ECRAD/repos/ecrad/raw/practical/ecrad_practical.pdf?at=refs%2Fheads%2Fgithub#cite.Yi+2013) (set `ice_model_name` to `Yi`). Is the main impact in the longwave or shortwave?</span>"
470   ]
471  },
472  {
473   "cell_type": "code",
474   "execution_count": null,
475   "metadata": {},
476   "outputs": [],
477   "source": []
478  },
479  {
480   "cell_type": "markdown",
481   "metadata": {},
482   "source": [
483    "#### <span style=\"color:red\">6. A unique property of *ecRad* is the availability of the *SPARTACUS* solver  [(Hogan  et  al.,  2016)](https://git.ecmwf.int/projects/ECRAD/repos/ecrad/raw/practical/ecrad_practical.pdf?at=refs%2Fheads%2Fgithub#cite.Hogan+2016)  for  approximately representing the 3D radiative effects of clouds, available by changing `sw_solver_name` and `lw_solver_name` both to `SPARTACUS`. What is the effect on both the radiation fields and the computational cost?</span>"
484   ]
485  },
486  {
487   "cell_type": "code",
488   "execution_count": null,
489   "metadata": {},
490   "outputs": [],
491   "source": []
492  },
493  {
494   "cell_type": "markdown",
495   "metadata": {},
496   "source": [
497    "## 5. Aerosols\n",
498    "\n",
499    "### <span style=\"color:red\">5.1 Questions and exercises</span>\n",
500    "\n",
501    "#### <span style=\"color:red\">1.  Turn  off  the  interaction  of  radiation  with  aerosols  by  setting  the  namelist  parameter `use_aerosols` to `false`. With reference to the surface fluxes, what do you think the impact of Saharan aerosols is on both daytime and nighttime surface temperature?</span>"
502   ]
503  },
504  {
505   "cell_type": "code",
506   "execution_count": null,
507   "metadata": {},
508   "outputs": [],
509   "source": []
510  },
511  {
512   "cell_type": "markdown",
513   "metadata": {},
514   "source": [
515    "#### <span style=\"color:red\">2. The direct downwelling solar radiation is that part of the solar radiation field that has not yet been scattered, and to a first approximation its value at a particular point in the atmosphere is proportional to $\\exp(−\\tau)$, where $\\tau$ is the optical depth of the atmosphere above that point along a path towards the sun.  Use a clear-sky profile of direct downwelling solar radiation over Africa to estimate the optical depth of the atmosphere with and without aerosols.</span>"
516   ]
517  },
518  {
519   "cell_type": "code",
520   "execution_count": null,
521   "metadata": {},
522   "outputs": [],
523   "source": []
524  },
525  {
526   "cell_type": "markdown",
527   "metadata": {},
528   "source": [
529    "#### <span style=\"color:red\">3. Concentrating solar power installations focus the direct solar beam to generate energy, whereas photovoltaic power installations can use all downwelling solar radiation. Which of these installations is most sensitive to dust storms?</span>"
530   ]
531  },
532  {
533   "cell_type": "code",
534   "execution_count": null,
535   "metadata": {},
536   "outputs": [],
537   "source": []
538  },
539  {
540   "cell_type": "markdown",
541   "metadata": {},
542   "source": [
543    "#### <span style=\"color:red\">4.  From the effect of aerosols on shortwave radiation at the top-of-atmosphere, do aerosols have a warming or cooling effect on climate?  What would the effect on climate be if you turned all the aerosols into black carbon (set each of the elements of `i_aerosol_type_map` to `11` and check the output of *ecRad*)? Why?</span>"
544   ]
545  },
546  {
547   "cell_type": "code",
548   "execution_count": null,
549   "metadata": {},
550   "outputs": [],
551   "source": []
552  },
553  {
554   "cell_type": "markdown",
555   "metadata": {},
556   "source": [
557    "## 6. Quick guide to Python plotting scripts\n",
558    "\n",
559    "**``plot_input.main(<in.nc>)``** \n",
560    "Plot the main fields in the input file (`era5slice.nc` in this practical) to the image file `<in>.png`. \n",
561    "\n",
562    "**``plot_input_profile.main(<lat>,<in.nc>)``** \n",
563    "Plot profiles of a selection of properties in the input file at the specified latitude (in degrees north) to `<in>_profile_<lat>.png`. \n",
564    "\n",
565    "**``plot_output.main(<in.nc>,<out.nc>)``**\n",
566    "Plot the fluxes and heating rates from the specified output file versus latitude and pressure, with the input file providing the temperature and latitude information, and save the result in `<in>_<out>.png`.\n",
567    "\n",
568    "**``plot_output_profile.main(<lat>,<in.nc>,[<out1.nc>,<out2.nc>, ...])``**\n",
569    "Plot profiles of variables from one or more output files at the specified latitude, saving the result in `<in>_<out1>[_<out2>...]_profile_<lat>.png`. \n",
570    "\n",
571    "**``plot_output_scalar.main(<in.nc>,[<out1.nc>,<out2.nc>...])``**\n",
572    "Line plots versus latitude of upwelling fluxes at top-of-atmosphere, downwelling fluxes at the surface, top-of-atmosphere cloud radiative effect, cloud cover and surface direct shortwave flux, for one or more output files. The result is saved in `<in>_<out1>[_<out2>...]_surface_and_TOA.png`. \n",
573    "\n",
574    "**``compare_output.main(<in.nc>,<control.nc>,<out2.nc>)``**\n",
575    "Plot the difference between the fluxes and heating rates in second output file (the experiment) and the first (the control), saving the result in `<in>_<out2>_vs_<control>.png.` \n",
576    "\n",
577    "**``compare_output_profile.main(<lat>,<in.nc>,<control.nc>, [<out2.nc>,<out3.nc>...])``** \n",
578    "Compare profiles at the specified latitude of the fluxes and heating rates in several output files, where the first is treated as the control, and write the output to `<in>_<out2>[_<out3>...]_vs_<control>_profile_<lat>.png`. \n",
579    "\n",
580    "**``compare_output_scalar.main(<in.nc>,<control.nc>,[<out2.nc>,<out3.nc>...])``**\n",
581    "Compare net fluxes at top-of-atmosphere and the surface, as well as the cloud cover and surface direct shortwave flux, from several output files, where the first is treated as the control. The result is saved in `<in>_<out2>[_<out3>...]_vs_<control>_scalar.png`. "
582   ]
583  },
584  {
585   "cell_type": "markdown",
586   "metadata": {},
587   "source": [
588    "# References\n",
589    "\n",
590    "Hogan, R. J., and A. Bozzo, 2018: A flexible radiation scheme for the ECMWF model. *J. Adv. Model. Earth Syst.*, **10**, [doi:10.1029/2018MS001364](doi:10.1029/2018MS001364).\n",
591    "\n",
592    "Hogan, R. J., S. A. K. Schäfer, C. Klinger, J.-C. Chiu and B. Mayer, 2016: Representing 3D cloud-radiation effects in two-stream schemes: 2. Matrix formulation and broadband evaluation. *J. Geophys. Res.*, **121**, 8583–8599.\n",
593    "\n",
594    "Pincus, R., H. W. Barker, and J.-J. Morcrette, 2003: A fast, flexible, approximate technique for computing radiative transfer in inhomogeneous clouds. *J. Geophys. Res. Atmos.*, **108**, 4376, [doi:10.1029/2002JD003322](doi:10.1029/2002JD003322).\n",
595    "\n",
596    "Shonk, J. K. P., and R. J. Hogan, 2008: Tripleclouds: an efficient method for representing horizontal cloud inho-mogeneity in 1D radiation schemes by using three regions at each height. *J. Climate*, **21**, 2352–2370.\n",
597    "\n",
598    "Yi, B., P. Yang, B. A. Baum, T. L’Ecuyer, L. Oreopoulos, E. J. Mlawer, A. J. Heymsfield and K.-K. Liou, 2013: Influence of ice particle surface roughening on the global cloud radiative effect. *J. Atmos. Sci.*, **70**, 2794–2807."
599   ]
600  },
601  {
602   "cell_type": "code",
603   "execution_count": null,
604   "metadata": {},
605   "outputs": [],
606   "source": []
607  }
608 ],
609 "metadata": {
610  "kernelspec": {
611   "display_name": "Python 3",
612   "language": "python",
613   "name": "python3"
614  },
615  "language_info": {
616   "codemirror_mode": {
617    "name": "ipython",
618    "version": 3
619   },
620   "file_extension": ".py",
621   "mimetype": "text/x-python",
622   "name": "python",
623   "nbconvert_exporter": "python",
624   "pygments_lexer": "ipython3",
625   "version": "3.6.10"
626  }
627 },
628 "nbformat": 4,
629 "nbformat_minor": 4
630}
Note: See TracBrowser for help on using the repository browser.