This page was generated from /home/docs/checkouts/readthedocs.org/user_builds/blm/checkouts/latest/docs/tasks/task5.ipynb. Interactive online version: Binder badge Slideshow: Binder badge

1.6. Modelling \(Q_E\) and \(Q_H\) with Penman-Monteith

1.6.1. Objectives

  1. Calculate \(Q_E\) and \(Q_H\) using Penman-Monteith

  2. Evaluate the above results with EC measurements

Tips:

  1. The Penman Monteith equation assumes energy balance closure at each model time step.

  2. Identify parameter values used initially.

  3. Use the calculated roughness length and the canopy resistances to calculate the PM fluxes (QH and QE) for the same period. What is the impact on the evaluation statistics?

1.6.2. Task explained

1.6.2.1. basic equations

The Penman-Monteith equation:

\[Q_{E} = \frac{s\left( Q^{*} - Q_{G} \right) + \rho c_{p}(e_{s} - e)/r_{H}} {s + \gamma\ (1 + r_{s}/r_{a})}\]

where

\(s\): the slope of saturation vapour pressure curve at temperature \(T_a\);

\(Q^*\): net all-wave radiation;

\(Q_G\): ground heat flux;

\(\rho\): air density;

\(c_p\): heat capacity of air;

\(e_s\): saturation vapour pressure at temperature \(T_a\);

\(e\): actual vapour pressure;

\(\gamma\): psychrometric constant;

\(r_s\): surface resistance;

\(r_H\): aerodynamic resistance for heat transfer;

\(r_a\): aerodynamic resistance for momentum transfer.

The surface energy balance equation:

\[Q^*-Q_G=Q_E+Q_H\]

where \(Q^*\) is the net all-wave radiation, \(Q_G\) the ground heat flux, \(Q_E\) the latent heat flux and \(Q_H\) the sensible heat flux.

1.6.2.2. specific aims

Before starting coding, we need to interpret the problem into the following major task: With atmospheric forcing conditions and other variables in your specific AmeriFlux dataset, one needs

  1. to model \(Q_E\) using the above equation and \(Q_H\) using surface energy balance (SEB) equation; and

  2. to evaluate the modelled \(Q_E\) and \(Q_H\) against their observed counterparts using quantitative metrics.

1.6.2.3. assumptions

For simplicity, we make the following assumptions:

  1. perfect SEB closure;

  2. known outgoing longwave radiation; and

  3. equivalence between \(r_H\) and \(r_a\): i.e. :math:`r_H=r_a`.

1.6.2.4. guide questions for modelling \(Q_E\)

As \(Q_H\) would be easily obtained as residual of other terms (i.e., \(Q_H=Q^*-Q_G-Q_E\)), let’s first focus on how to get \(Q_E\) by thinking the following questions:

  1. What are the known and unknown terms in the above given the progress so far?

  2. For each of the unknown terms, is it related to atmospheric forcing or surface properties?

1.6.2.5. input data we have

As a reminder, we know that we have the following atmospheric forcing variables available in the AmeriFlux dataset:

  1. incoming solar radiation \(K_\downarrow\);

  2. incoming longwave radiation \(L_\downarrow\);

  3. outgoing longwave radiation \(L_\uparrow\);

  4. air temperature \(T_a\);

  5. relative humidity \(RH\);

  6. atmospheric pressure \(p\);

  7. wind speed \(u\); and

  8. precipitation \(P\) (note this is NOT used in this task).

Other variables are provided either as auxiliary data to derive surface properties (e.g., friction velocity \(u_*\)) or as observed values for evaluation of modeled variables (e.g., sensible heat flux \(Q_H\)).

Now let’s move onto the calculations below: more specific hints are provided in comments of cells below.

1.6.3. Tasks

1.6.3.1. load necessary packages

[3]:
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
from pathlib import Path

Note:

The following cell enables the autoreload module, which allows auto-reloading of external packages. This would be particularly useful if we make changes in the utility.py file: such changes will take immediate effec in this notebook without restarting the Jupyter kernal as one would usually do.

[1]:
%load_ext autoreload
%autoreload 2

1.6.3.2. load data

[4]:
group_number = 5
path_dir = Path.cwd() / 'data' / f'{group_number}'
# examine available files in your folder
list(path_dir.glob('*gz'))
[4]:
[PosixPath('/Users/sunt05/Dropbox/6.Repos/task-5-blm2019/data/5/US-Slt_clean.csv.gz'),
 PosixPath('/Users/sunt05/Dropbox/6.Repos/task-5-blm2019/data/5/US-UMB_clean.csv.gz')]
[ ]:
# specify the site name
name_of_site = 'US-UMB'
[ ]:
# load dataset
site_file = name_of_site + '_clean.csv.gz'
path_data = path_dir / site_file
df_data = pd.read_csv(path_data, index_col='time', parse_dates=['time'])
df_data.head()

1.6.3.3. Calculate \(Q_E\) using Penman-Monteith

1.6.3.3.1. calculate \(Q^*\) using surface radiation balance

Note: we’ve got albedo in Task 1.

[ ]:
# your code

1.6.3.3.2. calculate \(Q_G\) using a simple linear model

Note: we’ve done this in Task 4.

[ ]:
# your code

1.6.3.3.3. calculate \(r_a\)

Note: we’ve done this in Task 3.

[ ]:
# your code

1.6.3.3.4. calculate \(r_s\)

Note: we’ve done this in Task 4.

[ ]:
# your code

1.6.3.3.5. calculate other atmospheric states

Note: related functions are all provided in the utility.py file.

[ ]:
# slope `s`:
# s = cal_des_dta(Temp_C, Press_hPa)
[ ]:
# psychrometric constant `gamma`:
# gamma = cal_gamma(Press_hPa)
[ ]:
# air density `rho`
# rho = cal_dens_air(Press_hPa, Temp_C)
[ ]:
# specific heat capacity of air mass `cp`
# cp = cal_cpa(Temp_C, RH_pct, Press_hPa)
[ ]:
# vapour pressure deficit `es-e`, or `vpd`
# vpd = cal_vpd(Temp_C, RH_pct, Press_hPa)

1.6.3.3.6. integrate the above results to get \(Q_E\)

[ ]:
# your code

1.6.3.4. calculate \(Q_H\) using SEB equation

[ ]:
# your code

1.6.3.5. evaluation of modelled \(Q_E\) and \(Q_H\)

[ ]:
# calculate MAE to see the overal performance
[ ]:
# calculate MBE to see if your model is overestimating or underestimating the variables
[ ]:
# plot observed and modelled values on the same chart with a 1:1 line
# note: we've done this in task 3 for `ra`