Skip to content

Group utils_group

Modules > utils_group

Collection of utility and calculation functions for canopy modeling. More...

Public Functions

Type Name
real(rk) function, public canopy_utils_mod::calccair (pmbi pmbi, tki tki)
real(rk) function, public canopy_utils_mod::calcdx (lat lat, dlon dlon)
real(rk) function, public canopy_utils_mod::calcflameh (frp frp, dx dx, lu_opt lu_opt, vtype vtype, flameh_cal flameh_cal)
real(rk) function, public canopy_utils_mod::calcpai (ch ch, canfrac canfrac)
real(rk) function, public canopy_utils_mod::calcpressure (zk zk, zref zref, pmbzref pmbzref, tref tref, t0 t0)
real(rk) function, public canopy_utils_mod::calcrelhum (tki tki, pmbi pmbi, qhi qhi)
real(rk) function, public canopy_utils_mod::calcrib (tak tak, tsk tsk, ubari ubari, d d, zref zref)
real(rk) function, public canopy_utils_mod::calcspechum (rhi rhi, tki tki, pmbi pmbi)
real(rk) function, public canopy_utils_mod::calctemp (zk zk, zref zref, taref taref, tsref tsref)
subroutine canopy_dealloc ()
Deallocate arrays for canopy model.
subroutine canopy_init ()
Initialize arrays for canopy model inputs and outputs.
subroutine canopy_readnml ()
Read canopy model namelist configuration.
real(rk) function, public canopy_utils_mod::convert_qh_to_h2o (qhi qhi, cairi cairi)
real(rk) function, public canopy_utils_mod::effhenryslawcoeff (chemmechgas_opt chemmechgas_opt, chemmechgas_tot chemmechgas_tot, ispec ispec)
real(rk) function, public canopy_utils_mod::esat (tki tki)
real(rk) function, public canopy_utils_mod::get_canloss_bio (loss_opt loss_opt, lifetime lifetime, ustar ustar, ch ch)
real(rk) function, public canopy_utils_mod::get_gamma_aq (aq_opt aq_opt, w126_ozone w126_ozone, w126_set w126_set, caq caq, taq taq, dtaq dtaq)
real(rk) function, public canopy_utils_mod::get_gamma_co2 (co2_opt co2_opt, co2_set co2_set)
real(rk) function, public canopy_utils_mod::get_gamma_ht (ht_opt ht_opt, maxt2m maxt2m, cht cht, tht tht, dtht dtht)
real(rk) function, public canopy_utils_mod::get_gamma_hw (hw_opt hw_opt, maxws10m maxws10m, chw chw, thw thw, dthw dthw)
real(rk) function, public canopy_utils_mod::get_gamma_leafage (leafage_opt leafage_opt, LAIpast LAIpast, LAIcurrent LAIcurrent, tsteplai tsteplai, TABOVE TABOVE, Anew Anew, Agro Agro, Amat Amat, Aold Aold)
real(rk) function, public canopy_utils_mod::get_gamma_lt (lt_opt lt_opt, mint2m mint2m, clt clt, tlt tlt, dtlt dtlt)
real(rk) function, public canopy_utils_mod::get_gamma_soim (soim_opt soim_opt, soim1 soim1, soim2 soim2, soim3 soim3, soim4 soim4, soid1 soid1, soid2 soid2, soid3 soid3, soid4 soid4, wilt wilt, roota roota, rootb rootb)
real(rk) function, public canopy_utils_mod::interp_linear1_internal (x x, y y, xout xout)
Linear interpolation function.
real(rk) function, public canopy_utils_mod::lebasmvgas (chemmechgas_opt chemmechgas_opt, chemmechgas_tot chemmechgas_tot, ispec ispec)
real(rk) function, public canopy_utils_mod::molarmassgas (chemmechgas_opt chemmechgas_opt, chemmechgas_tot chemmechgas_tot, ispec ispec)
real(rk) function, public canopy_utils_mod::molecdiff (chemmechgas_opt chemmechgas_opt, chemmechgas_tot chemmechgas_tot, ispec ispec, tkx tkx, pmbx pmbx)
real(rk) function, public canopy_utils_mod::rav (ubar ubar, zref zref, d d, hc hc, rib rib)
real(rk) function, public canopy_utils_mod::rbl (mdiffl mdiffl, ubari ubari)
real(rk) function, public canopy_utils_mod::rcl (hstarl hstarl, f01 f01)
real(rk) function, public canopy_utils_mod::reactivityparam (chemmechgas_opt chemmechgas_opt, chemmechgas_tot chemmechgas_tot, ispec ispec)
real(rk) function, public canopy_utils_mod::reactivityparamhno3 (chemmechgas_opt chemmechgas_opt, chemmechgas_tot chemmechgas_tot, ispec ispec)
real(rk) function, public canopy_utils_mod::rml (hstarl hstarl, f01 f01)
real(rk) function, public canopy_utils_mod::rs_zhang_gas (mdiffl mdiffl, tki tki, pmbi pmbi, ppfdi ppfdi, srad srad, relhumi relhumi)
subroutine, public canopy_utils_mod::seteffhenryslawcoeffs (chemmechgas_opt chemmechgas_opt, chemmechgas_tot chemmechgas_tot, hstar hstar)
subroutine, public canopy_utils_mod::setlebasmvgas (chemmechgas_opt chemmechgas_opt, chemmechgas_tot chemmechgas_tot, mvg mvg)
subroutine, public canopy_utils_mod::setmolarmassgas (chemmechgas_opt chemmechgas_opt, chemmechgas_tot chemmechgas_tot, mmg mmg)
subroutine, public canopy_utils_mod::setmolecdiffstp (chemmechgas_opt chemmechgas_opt, chemmechgas_tot chemmechgas_tot, mdiffstp mdiffstp)
subroutine, public canopy_utils_mod::setreactivityhno3 (chemmechgas_opt chemmechgas_opt, chemmechgas_tot chemmechgas_tot, ar ar)
subroutine, public canopy_utils_mod::setreactivityparams (chemmechgas_opt chemmechgas_opt, chemmechgas_tot chemmechgas_tot, f0 f0)
real(rk) function, public canopy_utils_mod::soilrbg (ubar ubar)
real(rk) function, public canopy_utils_mod::soilresist (mdiffl mdiffl, socat socat, sotyp sotyp, dsoil dsoil, stheta stheta)
real(rk) function, public canopy_utils_mod::waterrbw (ustar ustar)

Detailed Description

This group contains various utility functions including: * Mathematical operations (integration, interpolation) * Environmental calculations (temperature, pressure, humidity) * Biogenic emission factors and corrections * Molecular property calculations * Physical parameterizations for deposition and resistance

Public Functions Documentation

function calccair

real(rk) function , public canopy_utils_mod::calccair (
    pmbi pmbi,
    tki tki
) 

function calcdx

real(rk) function , public canopy_utils_mod::calcdx (
    lat lat,
    dlon dlon
) 

function calcflameh

real(rk) function , public canopy_utils_mod::calcflameh (
    frp frp,
    dx dx,
    lu_opt lu_opt,
    vtype vtype,
    flameh_cal flameh_cal
) 

function calcpai

real(rk) function , public canopy_utils_mod::calcpai (
    ch ch,
    canfrac canfrac
) 

Parameters:

  • ch Input Grid cell canopy height (m)
  • canfrac Input Grid cell canopy fraction

function calcpressure

real(rk) function , public canopy_utils_mod::calcpressure (
    zk zk,
    zref zref,
    pmbzref pmbzref,
    tref tref,
    t0 t0
) 

function calcrelhum

real(rk) function , public canopy_utils_mod::calcrelhum (
    tki tki,
    pmbi pmbi,
    qhi qhi
) 

function calcrib

real(rk) function , public canopy_utils_mod::calcrib (
    tak tak,
    tsk tsk,
    ubari ubari,
    d d,
    zref zref
) 

function calcspechum

real(rk) function , public canopy_utils_mod::calcspechum (
    rhi rhi,
    tki tki,
    pmbi pmbi
) 

function calctemp

real(rk) function , public canopy_utils_mod::calctemp (
    zk zk,
    zref zref,
    taref taref,
    tsref tsref
) 

function canopy_dealloc

Deallocate arrays for canopy model.

subroutine canopy_dealloc () 

Deallocates all allocated arrays including: * Input variable arrays * Canopy distribution arrays * Meteorological arrays * Leaf temperature and PPFD arrays * 24-hour and 240-hour temporary arrays * Biogenic emission arrays * Chemical species arrays

Author:

P.C. Campbell

Date:

October 2022


function canopy_init

Initialize arrays for canopy model inputs and outputs.

subroutine canopy_init () 

Initializes all arrays for canopy model including: * Canopy distribution variables * Meteorological arrays * Leaf temperature and PPFD arrays * 24-hour and 240-hour temporary arrays * Biogenic emission arrays * Chemical species arrays

Author:

P.C. Campbell

Date:

October 2022


function canopy_readnml

Read canopy model namelist configuration.

subroutine canopy_readnml () 

Reads input namelist to get user control variables including: * File names and paths * Model configuration options * Physical and chemical parameters * Time and grid settings * Output options

Author:

P.C. Campbell

Date:

July 2022


function convert_qh_to_h2o

real(rk) function , public canopy_utils_mod::convert_qh_to_h2o (
    qhi qhi,
    cairi cairi
) 

function effhenryslawcoeff

real(rk) function , public canopy_utils_mod::effhenryslawcoeff (
    chemmechgas_opt chemmechgas_opt,
    chemmechgas_tot chemmechgas_tot,
    ispec ispec
) 

function esat

real(rk) function , public canopy_utils_mod::esat (
    tki tki
) 

function get_canloss_bio

real(rk) function , public canopy_utils_mod::get_canloss_bio (
    loss_opt loss_opt,
    lifetime lifetime,
    ustar ustar,
    ch ch
) 

function get_gamma_aq

real(rk) function , public canopy_utils_mod::get_gamma_aq (
    aq_opt aq_opt,
    w126_ozone w126_ozone,
    w126_set w126_set,
    caq caq,
    taq taq,
    dtaq dtaq
) 

function get_gamma_co2

real(rk) function , public canopy_utils_mod::get_gamma_co2 (
    co2_opt co2_opt,
    co2_set co2_set
) 

function get_gamma_ht

real(rk) function , public canopy_utils_mod::get_gamma_ht (
    ht_opt ht_opt,
    maxt2m maxt2m,
    cht cht,
    tht tht,
    dtht dtht
) 

function get_gamma_hw

real(rk) function , public canopy_utils_mod::get_gamma_hw (
    hw_opt hw_opt,
    maxws10m maxws10m,
    chw chw,
    thw thw,
    dthw dthw
) 

function get_gamma_leafage

real(rk) function , public canopy_utils_mod::get_gamma_leafage (
    leafage_opt leafage_opt,
    LAIpast LAIpast,
    LAIcurrent LAIcurrent,
    tsteplai tsteplai,
    TABOVE TABOVE,
    Anew Anew,
    Agro Agro,
    Amat Amat,
    Aold Aold
) 

function get_gamma_lt

real(rk) function , public canopy_utils_mod::get_gamma_lt (
    lt_opt lt_opt,
    mint2m mint2m,
    clt clt,
    tlt tlt,
    dtlt dtlt
) 

function get_gamma_soim

real(rk) function , public canopy_utils_mod::get_gamma_soim (
    soim_opt soim_opt,
    soim1 soim1,
    soim2 soim2,
    soim3 soim3,
    soim4 soim4,
    soid1 soid1,
    soid2 soid2,
    soid3 soid3,
    soid4 soid4,
    wilt wilt,
    roota roota,
    rootb rootb
) 

function interp_linear1_internal

Linear interpolation function.

real(rk) function , public canopy_utils_mod::interp_linear1_internal (
    x x,
    y y,
    xout xout
) 

Interpolates for the y value at the desired x value, given x and y values around the desired point.

Parameters:

  • x Two x-values surrounding the interpolation point
  • y Two y-values corresponding to the x-values
  • xout Desired x-value for interpolation

Returns:

yout Interpolated y-value at xout

Parameters:

  • xout Input arrays and target value

Returns:

Interpolated result


function lebasmvgas

real(rk) function , public canopy_utils_mod::lebasmvgas (
    chemmechgas_opt chemmechgas_opt,
    chemmechgas_tot chemmechgas_tot,
    ispec ispec
) 

function molarmassgas

real(rk) function , public canopy_utils_mod::molarmassgas (
    chemmechgas_opt chemmechgas_opt,
    chemmechgas_tot chemmechgas_tot,
    ispec ispec
) 

function molecdiff

real(rk) function , public canopy_utils_mod::molecdiff (
    chemmechgas_opt chemmechgas_opt,
    chemmechgas_tot chemmechgas_tot,
    ispec ispec,
    tkx tkx,
    pmbx pmbx
) 

function rav

real(rk) function , public canopy_utils_mod::rav (
    ubar ubar,
    zref zref,
    d d,
    hc hc,
    rib rib
) 

function rbl

real(rk) function , public canopy_utils_mod::rbl (
    mdiffl mdiffl,
    ubari ubari
) 

function rcl

real(rk) function , public canopy_utils_mod::rcl (
    hstarl hstarl,
    f01 f01
) 

function reactivityparam

real(rk) function , public canopy_utils_mod::reactivityparam (
    chemmechgas_opt chemmechgas_opt,
    chemmechgas_tot chemmechgas_tot,
    ispec ispec
) 

function reactivityparamhno3

real(rk) function , public canopy_utils_mod::reactivityparamhno3 (
    chemmechgas_opt chemmechgas_opt,
    chemmechgas_tot chemmechgas_tot,
    ispec ispec
) 

function rml

real(rk) function , public canopy_utils_mod::rml (
    hstarl hstarl,
    f01 f01
) 

function rs_zhang_gas

real(rk) function , public canopy_utils_mod::rs_zhang_gas (
    mdiffl mdiffl,
    tki tki,
    pmbi pmbi,
    ppfdi ppfdi,
    srad srad,
    relhumi relhumi
) 

function seteffhenryslawcoeffs

subroutine, public canopy_utils_mod::seteffhenryslawcoeffs (
    chemmechgas_opt chemmechgas_opt,
    chemmechgas_tot chemmechgas_tot,
    hstar hstar
) 

function setlebasmvgas

subroutine, public canopy_utils_mod::setlebasmvgas (
    chemmechgas_opt chemmechgas_opt,
    chemmechgas_tot chemmechgas_tot,
    mvg mvg
) 

function setmolarmassgas

subroutine, public canopy_utils_mod::setmolarmassgas (
    chemmechgas_opt chemmechgas_opt,
    chemmechgas_tot chemmechgas_tot,
    mmg mmg
) 

function setmolecdiffstp

subroutine, public canopy_utils_mod::setmolecdiffstp (
    chemmechgas_opt chemmechgas_opt,
    chemmechgas_tot chemmechgas_tot,
    mdiffstp mdiffstp
) 

function setreactivityhno3

subroutine, public canopy_utils_mod::setreactivityhno3 (
    chemmechgas_opt chemmechgas_opt,
    chemmechgas_tot chemmechgas_tot,
    ar ar
) 

function setreactivityparams

subroutine, public canopy_utils_mod::setreactivityparams (
    chemmechgas_opt chemmechgas_opt,
    chemmechgas_tot chemmechgas_tot,
    f0 f0
) 

function soilrbg

real(rk) function , public canopy_utils_mod::soilrbg (
    ubar ubar
) 

function soilresist

real(rk) function , public canopy_utils_mod::soilresist (
    mdiffl mdiffl,
    socat socat,
    sotyp sotyp,
    dsoil dsoil,
    stheta stheta
) 

function waterrbw

real(rk) function , public canopy_utils_mod::waterrbw (
    ustar ustar
)