Commit 67a57cfb authored by sbiri's avatar sbiri
Browse files

Update docs/Documentation.pdf, docs/Documentation.tex files

parent f56e1e51
No related merge requests found
File added
%% Generated by Sphinx.
\def\sphinxdocclass{report}
\documentclass[letterpaper,10pt,english]{sphinxmanual}
\ifdefined\pdfpxdimen
\let\sphinxpxdimen\pdfpxdimen\else\newdimen\sphinxpxdimen
\fi \sphinxpxdimen=49336sp\relax
\usepackage[margin=1in,marginparwidth=0.5in]{geometry}
\usepackage[utf8]{inputenc}
\ifdefined\DeclareUnicodeCharacter
\DeclareUnicodeCharacter{00A0}{\nobreakspace}
\fi
\usepackage{cmap}
\usepackage[T1]{fontenc}
\usepackage{amsmath,amssymb,amstext}
\usepackage{babel}
\usepackage{times}
\usepackage[Bjarne]{fncychap}
\usepackage{longtable}
\usepackage{sphinx}
\usepackage{multirow}
\usepackage{eqparbox}
\usepackage[inline]{trackchanges}
\addeditor{sbiri}
\usepackage{natbib}
\usepackage{amsmath}
% Include hyperref last.
\usepackage{hyperref}
% Fix anchor placement for figures with captions.
\usepackage{hypcap}% it must be loaded after hyperref.
% Set up styles of URL: it should be placed after hyperref.
\urlstyle{same}
\addto\captionsenglish{\renewcommand{\contentsname}{Contents:}}
\addto\captionsenglish{\renewcommand{\figurename}{Fig.\@ }}
\addto\captionsenglish{\renewcommand{\tablename}{Table }}
\addto\captionsenglish{\renewcommand{\literalblockname}{Listing }}
\addto\extrasenglish{\def\pageautorefname{page}}
\setcounter{tocdepth}{3}
\title{AirSeaFluxCode Documentation}
\date{\today}
\release{1.0.0}
\author{Stavroula Biri}
\newcommand{\sphinxlogo}{}
\renewcommand{\releasename}{Release}
\makeindex
\begin{document}
\maketitle
\sphinxtableofcontents
\phantomsection\label{\detokenize{index::doc}}
\chapter{Getting started}
\label{\detokenize{index:flux-code-documentation}}\label{\detokenize{index:getting-started}}
AirSeaFluxCode.py is a Python 3.6+ module designed to process data (input as numpy ndarray float number type) to calculate surface turbulent fluxes, flux product estimates and to provide height adjusted values for wind speed, air temperature and specific humidity of air at a user defined reference height from a minimum number of meteorological parameters (wind speed, air temperature, and sea surface temperature) and for a variety of different bulk algorithms (at the time of the release amount to ten).
Several optional parameters can be input such as: an estimate of humidity (relative humidity, specific humidity or dew point temperature) is required in the case an output of latent heat flux is requested; atmospheric pressure. If cool skin/warm layer adjustments are switched on then shortwave/longwave radiations should be provided as input. Other options the user can define on input are the height on to which the output parameters would be adjusted, the function of the cool skin adjustment provided that the option for applying the adjustment is switched on, the option to consider the effect of convective gustiness. The user can: choose from a wide variety of saturation vapour pressure function in order to compute specific humidity from relative humidity or dew point temperature, provide user defined tolerance limits, user define the maximum number of iterations.
%For the original publication of this package see: \href{https://}{link to the paper}.
%
For recommendations or bug reports, please visit \url{https://git.noc.ac.uk/NOCSurfaceProcesses/AirSeaFluxCode}
\section{Description of test data}
\label{\detokenize{index:description-of-test-data}}
A suite of data is provided for testing, containing values for air temperature, sea surface temperature, wind speed, air pressure, relative humidity, shortwave radiation, longitude and latitude.\\
The first test data set (data\_all.csv) is developed as daily averages from minute data provided by the Shipboard Automated Meteorological and Oceanographic System \cite[SAMOS,][]{Smith_etal_2019a, Smith_etal_2018} ; it contains a synthesis of various conditions from meteorological and surface oceanographic data from research vessels and three that increase the accuracy of the flux estimate (atmospheric pressure, relative humidity, shortwave radiation). We use quality control level three (research level quality), and we only keep variables flagged as Z (good data) \citep[for details on flag definitions see][]{Smith_etal_2018}. The input sensors' heights vary by ship and sometimes by cruise. The data contain wind speeds ranging between 0.015 and 18.5ms$^{-1}$, air temperatures ranging from -3 to 9.7$^{\circ}$C and air-sea temperature differences (T-T\textsubscript{0}, hereafter $\Delta$T) from around -3 to 3$^{\circ}$C. A sample output file is given (data\_all\_out.csv and its statistics in data\_all\_stats.txt) run with default options (see data\_all\_stats.txt for the input summary); note that deviations from the output values might occur due to floating point errors. \\
The second test data set contained in era5\_r360x180.nc contains ERA5 \citep{Hersbach_etal_2018, era5_doc} hourly data for one sample day (15/07/2019) remapped to 1$^{\circ}$\,$\times$\,1$^{\circ}$ regular grid resolution using cdo \citep{schulzweida_uwe_2019_3539275}. In this case all essential and optional input SSVs are available. For the calculation of TSFs we only consider values over the ice-free ocean by applying the available land mask and sea-ice concentration (equal to zero) and setting values over land or ice to missing (flag=``m''). The data contain wind speeds ranging from 0.01 to 24.9 ms$^{-1}$, air temperatures ranging from -17.2 to 35.4 $^{\circ}$C and $\Delta$T from around -16.2 to 8$^{\circ}$C.
\section{Description of sample code}
In the AirSeaFluxCode repository \url{AirSeaFluxCode} we provide two types of sample routines to aid the user running the code. The first is the routine toy\_ASFC.py which is an example of running AirSeaFluxCode either with one-dimensional data sets (like a subset of R/V data) loading the necessary parameters from the test data (data\_all.csv) or gridded 3D data sampled in era5\_r360x180.nc.\\
The routine first loads the data in the appropriate format (numpy.ndarray, type float), then calls AirSeaFluxCode loads the data as input, and finally saves the output as text or as a NetCDF file and at the same time generates a table of statistics for all the output parameters and figures of the mean values of the turbulent surface fluxes.
Second a jupyter notebook (ASFC\_notebook.ipynb) is provided as a step by step guide on how to run AirSeaFluxCode, starting from the libraries the user would need to import. It also provides an example on how to run AirSeaFluxCode with the research vessel data as input and generate basic plots of momentum and (sensible and latent) heat fluxes. The user can launch the \href{https://jupyter-notebook-beginner-guide.readthedocs.io/en/latest/what\_is\_jupyter.html}{Jupyter Notebook App} by clicking on \textit{Jupyter Notebook} icon in Anaconda start menu, this will launch a new browser window in your browser of choice (more details can be found \href{https://jupyter-notebook-beginner-guide.readthedocs.io/en/latest/execute.html}{here}).
\chapter{Users guide}
\label{\detokenize{index:users-guide}}
\section{Introduction}
\label{\detokenize{index:introduction}}
The flux calculation code was implemented in order to provide a useful, easy to use and straightforward ~\lq\lq\,roadmap\,\rq\rq~ of when and why to use different bulk formulae for the calculation of surface turbulent fluxes.
Differences in the calculations between different methods can be found in:
\begin{itemize}
\item the way they compute specific humidity from relative humidity, temperature and pressure
\item the way they parameterise the exchange coefficients
\item the inclusion of heat and moisture roughness lengths
\item the inclusion of cool skin/warm layer correction instead of the bulk sea surface temperature, and
\item the inclusion of gustiness in the wind speed
\item the momentum, heat and moisture stability functions definitions
\end{itemize}
The available parameterizations in AirSeaFluxCode provided in order to calculate the momentum, sensible heat and latent heat fluxes are implemented following:
\begin{itemize}
\item \cite{Smith_1980} as S80: the surface drag coefficient is related to 10\,m wind speed (u\textsubscript{10}), surface heat and moisture exchange coefficients are constant. The stability parameterizations are based on the Monin-Obukhov similarity theory for stable and unstable condition which modify the wind, temperature and humidity profiles and derives surface turbulent fluxes in open ocean conditions (valid for wind speeds from 6 to 22\,ms$^{-1}$).
\item \cite{Smith_1988} as S88: is an improvement of the S80 parameterization in the sense that it provides the surface drag coefficient in relation to surface roughness over smooth and viscous surface and otherwise derives surface turbulent fluxes in open ocean conditions as described for S80.
\item \cite{Large_Pond_1981,Large_Pond_1982} as LP82: the surface drag coefficient is computed in relation to u\textsubscript{10} and has different parameterization for different ranges of wind speed. The heat and moisture exchange coefficients are constant for wind speeds \textless\,11ms$^{-1}$ and a function of u\textsubscript{10} for wind speeds between 11 and 25ms$^{-1}$. The stability parameterizations are based on the Monin-Obukhov similarity theory for stable and unstable condition.
\item \cite{Yelland_Taylor_1996, Yelland_etal_1998} as YT96: the surface drag coefficient is a function of u\textsubscript{$\ast$}. The heat and moisture exchange coefficients are considered constant as in the cases of S80 and S88.
\item \cite{Zeng_etal_1998} as UA: the drag coefficient is given as a function of roughness length over smooth and viscous surface. The parameterization includes the effect of gustiness. The heat and moisture exchange coefficients are a function of heat and moisture roughness lengths and are valid in the range of 0.5 and 18\,ms$^{-1}$.
\item \cite{Large_Yeager_2004, Large_Yeager_2009} as NCAR: the surface drag coefficient is computed in relation to wind speed for u\textsubscript{10}\,\textgreater{}0.5\,ms$^{-1}$. The heat exchange coefficient is given as a function of the drag coefficient (one for stable and one for unstable conditions) and the moisture exchange coefficient is also a function of the drag coefficient.
\item \cite{Fairall_etal_1996a, Fairall_etal_2003, Edson_etal_2013} as C30, and C35: is based on data collected from four expeditions in order to improve the drag and exchange coefficients parameterizations relative to surface roughness. It includes the effects of ~\lq\lq\,cool skin\,\rq\rq~, and gustiness. The effects of waves and sea state are neglected in order to keep the software as simple as possible, without compromising the integrity of the outputs though.
\item \cite{era5_2019} as ecmwf: the drag, heat and moisture coefficients parameterizations are computed relative to surface roughness estimates. It includes gustiness in the computation of wind speed.
\item \cite{Beljaars_1995a, Beljaars_1995b, Zeng_Beljaars_2005} as Beljaars: the drag, heat and moisture coefficients parameterizations are computed relative to surface roughness estimates. It includes gustiness in the computation of wind speed.
\end{itemize}
\section{Description of AirSeaFluxCode}
\label{\detokenize{index:description-of-AirSeaFluxCode}}
In AirSeaFluxCode we use a consistent calculation approach across all algorithms; where this requires changes from published descriptions the effect of those changes are quantified and shown to be small compared to the significance levels we set in table\,\ref{tab:tol}. The AirSeaFluxCode software calculates air-sea flux of momentum, sensible heat and latent heat fluxes from bulk meteorological variables (wind speed (spd), air temperature (T), and relative humidity (RH)) provided at a certain height (hin) above the surface and sea surface temperature (SST) and height adjusted values for wind speed, air temperature and specific humidity of air at a user specified reference height (default is 10\,m). \\
Additionally, non essential parameters can be given as inputs, such as: downward long/shortwave radiation (Rl, Rs), latitude (lat), reference output height (hout), cool skin (cskin), cool skin correction method (skin, following either \cite{Fairall_etal_1996b} (default for C30, and C35), \cite{Zeng_Beljaars_2005} (default for Beljaars), \cite{era5_2019} (default for ecmwf)), warm layer correction (wl), gustiness (gust) and boundary layer height (zi), choice of bulk algorithm method (meth), the choice of saturation vapour pressure function (qmeth), tolerance limits (tol), choice of Monin-Obukhov length function (L), and the maximum number of iterations (maxiter). Note that all input variables need to be loaded as numpy.ndarray.
The air and sea surface specific humidity are calculated using the functions qsat\_air(T, P, RH, qmeth) and qsat\_sea(SST, P, qmeth) , which call functions contained in VaporPressure.py to calculate saturation vapour pressure following a chosen method (default is \cite{Buck_2012}).
\label{\detokenize{index:constants}}\begin{itemize}
\item The air temperature is converted to air temperature for adiabatic expansion following: Ta = T + 273.16 +$\Gamma$\,$\cdot$\,hin
\item The density of air is defined as $\rho$ = (0.34838\,$\cdot$\,P)/T$_\text{v10n}$
\item The specific heat at constant pressure is defined as c$_\text{p}$ = 1004.67\,$\cdot$\,(1 + 0.00084\,$\cdot$\,q$_\text{sea}$)
\item The latent heat of vapourization is defined as L$_\text{v}$ = (2.501-0.00237\,$\cdot$\,SST)\,$\cdot$\,10$^\text{6}$ (SST in $^{\circ}$C)
\end{itemize}
Initial values for the exchange coefficients and friction velocity are calculated assuming neutral stability. The program iterates to calculate the temperature and humidity fluxes and the virtual temperature as T$_{\text{v}}$=T$_{\text{a}}$(1+0.61q$_{\text{air}}$) , then the stability parameter z/L either as,
\begin{equation}
\frac{z}{L}=\frac{z(g\,\cdot\,k\,\cdot\,T_{*v})}{T_{v10n}\,\cdot\,u_{*}^{2}}
\end{equation}
or as a function of the Richardson number as described by \cite{era5_2019}[their equations 3.23--3.25]; hence a new value for u$_{\text{10n}}$, hence new transfer coefficients, hence new flux values until convergence is obtained (Table \ref{tab:tol}). At every iteration step if there are points where the neutral 10\,m wind speed (u$_{\text{10n}}$) becomes negative the wind speed value at these points is set to NaN.
The values for air density, specific heat at constant volume, and the latent heat of vaporisation are used in converting the scaled fluxes u$_{\text{$\ast$}}$, T$_{\text{$\ast$}}$, and q$_{\text{$\ast$}}$ (eq.\,\ref{eq:strs}, for UA we retain their equations 7-14) to flux values in Nm$^{-2}$ and Wm$^{-2}$, respectively.
\begin{equation}
\begin{array}{l}
u_{\ast} = \frac{k\cdot u_{z}}{\log(\frac{z}{z_{om}})-\Psi_{m}(\frac{z}{L})+\Psi_{m}(\frac{z_{om}}{L})} \\
t_{\ast} = \frac{k\cdot (T-SST)}{\log(\frac{z}{z_{oh}})-\Psi_{h}(\frac{z}{L})+\Psi_{h}(\frac{z_{oh}}{L})} \\
q_{\ast} = \frac{k\cdot (q_{air}-q_{sea})}{\log(\frac{z}{z_{oq}})-\Psi_{q}(\frac{z}{L})+\Psi_{q}(\frac{z_{oq}}{L})}
\end{array}
\label{eq:strs}
\end{equation}
AirSeaFluxCode is set up to test for convergence between the i$^{th}$ and (i-1)$^{th}$ iteration according to the tolerance limits shown in Table\,\ref{tab:tol} for six variables in total, of which three are relative to the height adjustment (u$_{10}$, t$_{10}$, q$_{10}$) and three to the flux calculation ($\tau$, shf, lhf) respectively. The tolerance limits are set according to the maximum accuracy that can be feasible for each variable. The user can choose to allow for convergence either only for the fluxes (default), or only for height adjustment or for both (all six variables). Values that have not converged are by default set to missing, but the number of iterations until convergence is provided as an output (this number is set to -1 for non convergent points).
A set of flags are provided as an output that signify: ``m'' where input values are missing; ``o'' where the wind speed for this point is outside the nominal range for the used parameterization; ``u'' or ``q'' for points that produce unphysical values for u\textsubscript{10n} or q\textsubscript{10n} respectively during the iteration loop; ``r'' where relative humidity is greater than 100\%; ``l'' where the bulk Richardson number is below -0.5 or above 0.2 or z/L is greater than 1000; ``i'' where the value failed to converge after n number of iterations, if the points converged normally they are flagged with ``n''. The user should expect NaN values if out is set to zero (namely output only values that have converged) for values that have not converged after the set number of iterations (default is ten) or if they produced unphysical values for u\textsubscript{10n} or q\textsubscript{10n}.
\begin{table}[h]
\caption{Tolerance and significance limits}
\centering
\begin{tabular}{|c|c|c|}
\hline
\textbf{Variable} & \textbf{Tolerance} & \textbf{Significance} \\ \hline
u$_{\text{10n}}$ & 0.01\,ms$^{-1}$ & 0.1\,ms$^{-1}$ \\ \hline
T$_{\text{10n}}$ & 0.01\,K & 0.1\,K \\ \hline
q$_{\text{10n}}$ & 1$\cdot$\,10$^{\text{-5}}$\,kg/kg & 1$\cdot$\,10$^{\text{-4}}$\,kg/kg \\ \hline
\textrm{$\tau$} & 10$^{\text{-3}}$\,N/m$^{2}$ & 10$^{\text{-2}}$\,N/m$^{2}$ \\ \hline
shf & 0.1\,W/m$^{2}$ & 2\,W/m$^{2}$ \\ \hline
lhf & 0.1\,W/m$^{2}$ & 2\,W/m$^{2}$ \\ \hline
\end{tabular}
\label{tab:tol}
\end{table}
%A schematic view of AirSeaFluxCode is given in the flow chart in Fig.\,\ref{fig:FC}.
%
%\begin{figure}[h]
% \begin{center}
% \includegraphics[width=15cm]{/Users/sbiri/Desktop/transfers/ASFCpaper_figures/FlowChart.pdf}
% \end{center}
% \caption{Schematic view of AirSeaFluxCode.}
% \label{fig:FC}
%\end{figure}
\newpage
\section{AirSeaFluxCode module}
\label{\detokenize{index:AirSeaFluxCode-module}}
\index{AirSeaFluxCode}
\phantomsection\label{\detokenize{index:module-AirSeaFluxCode}}\index{AirSeaFluxCode (module)}\index{AirSeaFluxCode() (in module AirSeaFluxCode)}
\begin{fulllineitems}
\phantomsection\label{\detokenize{index:AirSeaFluxCode.AirSeaFluxCode}}\pysiglinewithargsret{\sphinxcode{}\sphinxbfcode{AirSeaFluxCode}}{\emph{spd}, \emph{T}, \emph{SST}, \emph{SST\_fl}, \emph{meth}, \emph{lat}, \emph{hum}, \emph{P}, \emph{hin}, \emph{hout}, \emph{Rl}, \emph{Rs}, \emph{cskin}, \emph{skin}, \emph{wl}, \emph{gust}, \emph{qmeth}, \emph{tol}, \emph{maxiter}, \emph{out}, , \emph{out\_var}, \emph{L}}{}
Calculates momentum and heat fluxes using different parameterizations
inputs should be numpy.ndarray float type.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {}
\sphinxstyleliteralstrong{spd} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- relative wind speed in ms$^{-1}$ (is assumed as magnitude difference
between wind and surface current vectors for C30, C35)
\item {}
\sphinxstyleliteralstrong{T} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- air temperature in K (will convert if in $^\circ$\,C)
\item {}
\sphinxstyleliteralstrong{SST} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- sea surface temperature in K (will convert if in $^\circ$\,C)
\item {}
\sphinxstyleliteralstrong{SST\_fl} (\href{https://docs.python.org/3/library/functions.html\#str}{\sphinxstyleliteralemphasis{str}}) -- sea surface temperature type ``bulk'' or ``skin''
\item {}
\sphinxstyleliteralstrong{meth} (\href{https://docs.python.org/3/library/stdtypes.html\#str}{\sphinxstyleliteralemphasis{str}}) -- bulk parameterization method option: "S80", "S88", "LP82", "YT96", "UA", "NCAR", "C30", "C35", "ecmwf", "Beljaars"
\item {}
\sphinxstyleliteralstrong{lat} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- latitude (deg), default is 45$^\circ$
\item {}
\sphinxstyleliteralstrong{hum} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- humidity input is an array of the form [x, values] where: \\
x="rh" for relative humidity (\%)--default, \\
x="q" for specific humidity (g\slash\,kg) and \\
x="Td" for dew point temperature (K).
\item {}
\sphinxstyleliteralstrong{P} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- air pressure in hPa, in the input is empty it is set to 1013hPa
\item {}
\sphinxstyleliteralstrong{hin} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- sensor heights in m (array 3x1 or 3xn)
\item {}
\sphinxstyleliteralstrong{hout} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- output height, default is 10\,m
\item {}
\sphinxstyleliteralstrong{Rl} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- downward longwave radiation (Wm$^{-2}$)
\item {}
\sphinxstyleliteralstrong{Rs} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- downward shortwave radiation (Wm$^{-2}$)
\item {}
\sphinxstyleliteralstrong{cskin} (\href{https://docs.python.org/3/library/functions.html\#int}{\sphinxstyleliteralemphasis{int}}) -- 0 (default) no cool skin adjustment, otherwise is set to 1;
\item {}
\sphinxstyleliteralstrong{skin} (\href{https://docs.python.org/3/library/functions.html\#str}{\sphinxstyleliteralemphasis{str}}) -- cool skin adjustment method option "C35" (default), "ecmwf" or "Beljaars"
\item {}
\sphinxstyleliteralstrong{wl} (\href{https://docs.python.org/3/library/functions.html\#int}{\sphinxstyleliteralemphasis{int}}) -- warm layer correction switched off by default (wl=0), to switch on set to 1
\item {}
\sphinxstyleliteralstrong{gust} (\href{https://docs.python.org/3/library/functions.html\#int}{\sphinxstyleliteralemphasis{int}}) -- 4x1 [x, beta, zi, ugmin] x=0 gustiness is OFF, x=1-5 gustiness is ON
and use gustiness factor: 1. \cite{Fairall_etal_2003}, 2. GF is removed from TSFs u\textsubscript{10n}, u\textsubscript{ref}, 3. GF=1, 4. following ECMWF, 5. following \cite{Zeng_etal_1998},
5. following C35 matlab code; beta gustiness parameter, default is 1.2, zi PBL height (m) default is 600, ugmin is the minimum value for gust speed, default is 0.01ms$^{-1}$
\item {}
\sphinxstyleliteralstrong{qmeth} (\href{https://docs.python.org/3/library/stdtypes.html\#str}{\sphinxstyleliteralemphasis{str}}) -- is the saturation evaporation function to use amongst ``HylandWexler", ``Hardy", ``Preining", ``Wexler", ``GoffGratch", ``MagnusTetens", ``Buck", ``Buck2", ``WMO", ``WMO2018", ``Sonntag", ``Bolton", ``IAPWS", ``MurphyKoop"
\item {}
\sphinxstyleliteralstrong{tol} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- tolerance limits are set as a 4x1 or 7x1 array of the type [option, tol$_{u_{10n}}$, tol$_{t_{10n}}$, tol$_{q_{10n}}$, tol$_{tau}$, tol$_{shf}$, tol$_{lhf}$]. option can be 'flux' to set tolerance limits for the flux calculation only e.g. tol = ['flux', 0.01, 1, 1], 'ref' to set tolerance limits for height adjustment to hout e.g. tol = ['ref', 0.01, 0.01, 5$\cdot$\,10$^{-5}$] or 'all' to set tolerance limits for both air-sea fluxes and height adjustment e.g. ['all', 0.01, 0.01, 1$\cdot$\,10$^{-5}$, 0.01, 1, 1]. Default is tol = ['all', 0.01, 0.01, 1$\cdot$\,10$^{-5}$, 0.01, 1, 1]
\item {}
\sphinxstyleliteralstrong{maxiter} (\href{https://docs.python.org/3/library/functions.html\#int}{\sphinxstyleliteralemphasis{int}}) -- number of iterations, default is 10; note that the number of iterations should not be less than 5.
\item {}
\sphinxstyleliteralstrong{out} (\href{https://docs.python.org/3/library/functions.html\#int}{\sphinxstyleliteralemphasis{int}}) -- 0 to set points that have not converged to missing, otherwise set to 1
\item {}
\sphinxstyleliteralstrong{out\_var} (\href{https://docs.python.org/3/library/functions.html\#int}{\sphinxstyleliteralemphasis{str}}) -- optional. user can define pandas array of variables to be output.
the default full pandas array is :
out\_var = ("tau", "sensible", "latent", "monob", "cd", "cd10n",
"ct", "ct10n", "cq", "cq10n", "tsrv", "tsr", "qsr",
"usr", "usr\_gust", "usr\_nogust","ug", "GustFact",
"psim", "psit", "psiq", "psim\_ref", "psit\_ref",
"psiq\_ref", "u10n", "t10n", "q10n", "zo", "zot", "zoq",
"uref", "tref", "qref", "dter", "dqer", "dtwl", "tkt",
"Rl", "Rs", "Rnl", "qair", "qsea", "Rb", "rh", "rho",
"cp", "lv", "theta", "itera")
the "limited" pandas array is:
out\_var = ("tau", "sensible", "latent", "uref", "tref", "qref")
the user can define a custom pandas array of variables to output
\item {}
\sphinxstyleliteralstrong{L} (\href{https://docs.python.org/3/library/functions.html\#int}{\sphinxstyleliteralemphasis{str}}) -- Monin-Obukhov length definition options \\
"tsrv" : default or "Rb" \\
\end{itemize}
\item[{Returns}] \leavevmode
\begin{itemize}
\item {}
\sphinxstylestrong{res} (\sphinxstyleemphasis{array that contains}) --
\begin{enumerate}
\item {}
momentum flux (Nm$^{-2}$)
\item {}
sensible heat (Wm$^{-2}$)
\item {}
latent heat (Wm$^{-2}$)
\item {}
Monin-Obhukov length (m)
\item {}
drag coefficient (cd)
\item {}
neutral drag coefficient at 10\,m (cd10n)
\item {}
heat exchange coefficient (ct)
\item {}
neutral heat exchange coefficient at 10\,m (ct10n)
\item {}
moisture exchange coefficient (cq)
\item {}
neutral moisture exchange coefficient at 10\,m (cq10n)
\item {}
virtual temperature scaling parameter (tsrv)
\item {}
temperature scaling parameter (tsr)
\item {}
specific humidity scaling parameter (qsr)
\item {}
wind speed scaling parameter (usr)
\item {}
wind speed scaling parameter including effect of gustiness (usr\_gust)
\item {}
wind speed scaling parameter effect of gustiness removed (usr\_nogust)
\item {}
gust wind speed (ug)
\item {}
gustiness factor (GustFact)
\item {}
momentum stability function (psim)
\item {}
heat stability function (psit)
\item {}
moisture stability function (psiq)
\item {}
momentum stability function at reference height (psim\_ref)
\item {}
heat stability function at reference height (psit\_ref)
\item {}
moisture stability function at reference height (psiq\_ref)
\item {}
10m neutral wind speed (u10n)
\item {}
10m neutral temperature (t10n)
\item {}
10m neutral specific humidity (q10n)
\item {}
surface momentum roughness length (zo)
\item {}
heat roughness length (zot)
\item {}
moisture roughness length (zoq)
\item {}
wind speed at reference height (uref)
\item {}
temperature at reference height (tref)
\item {}
specific humidity at reference height (qref)
\item {}
cool-skin temperature depression (dter)
\item {}
cool-skin humidity depression (dqer)
\item {}
warm layer correction (dtwl)
\item {}
thickness of the viscous layer (tkt)
\item {}
downward longwave radiation (Rl)
\item {}
downward shortwave radiation (Rs)
\item {}
downward net longwave radiation (Rnl)
\item {}
specific humidity of air (qair)
\item {}
specific humidity at sea surface (qsea)
\item {}
Bulk Richardson number (Rb)
\item {}
relative humidity (rh)
\item{}
air density (rho)
\item{}
specific heat of moist air (cp)
\item {}
latent heat of vaporisation (lv)
\item {}
air potential temperature (theta)
\item {}
number of iterations until convergence
\item {}
flag (``n'': normal, ``o'': out of nominal range,\\
``u'': u\textsubscript{10n}<0, ``q'': q\textsubscript{10n}<0, \\
``m'': missing, \\
``l'': R\textsubscript{ib}<-0.5 or R\textsubscript{ib}>0.2 or $\mid\zeta\mid$>1000,\\
``r'': RH>100\%, \\
``t''': t10n<173K or t10n>373K \\
``i'': convergence fails after n iterations)
\end{enumerate}
\end{itemize}
\end{description}\end{quote}
\end{fulllineitems}
\section{Description of subroutines}
\label{\detokenize{index:description-of-subroutines}}
This section provides a description of the constants and subroutines that are called in AirSeaFluxCode.
\index{util\_subs}
\subsection{Constants}
\label{\detokenize{index:constants-in-util_subs}}
\index{util_subs.CtoK}
\phantomsection\label{\detokenize{index:module-util_subs}}\index{util\_subs (module)}\index{CtoK (in module util\_subs)}
\begin{fulllineitems}
\phantomsection\label{\detokenize{index:util_subs.CtoK}}\pysigline{\sphinxcode{util\_subs.}\sphinxbfcode{CtoK}\sphinxstrong{ = 273.16}}
Conversion factor for $^\circ$C to K
\end{fulllineitems}
\index{util_subs.kappa}
\begin{fulllineitems}
\phantomsection\label{\detokenize{index:util_subs.kappa}}\pysigline{\sphinxcode{util\_subs.}\sphinxbfcode{kappa}\sphinxstrong{ = 0.4}}
von Karman's constant
\end{fulllineitems}
% -------------------------------------------------------------------------------------------------------------------------------------------------------------------------
\subsection{Drag coefficient functions}
\label{\detokenize{index:drag-coefficient-functions}}
\phantomsection\label{\detokenize{index:module-flux_subs}}\index{flux\_subs (module)}\index{cdn\_calc() (in module flux\_subs)}
\index{flux_subs.cdn_calc}
\begin{fulllineitems}
\phantomsection\label{\detokenize{index:flux_subs.cdn_calc}}\pysiglinewithargsret{\sphinxcode{flux\_subs.}\sphinxbfcode{cdn\_calc}}{\emph{u$_{10n}$}, \emph{usr}, \emph{Ta}, \emph{grav}, \emph{meth}}{}
Calculate neutral drag coefficient
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {}
\sphinxstyleliteralstrong{u$_{10n}$} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- neutral 10m wind speed (ms$^{-1}$)
\item {}
\sphinxstyleliteralstrong{usr} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- friction velocity (ms$^{-1}$)
\item {}
\sphinxstyleliteralstrong{Ta} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- air temperature (K)
\item {}
\sphinxstyleliteralstrong{grav} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- acceleration of gravity (ms$^{-2}$)
\item {}
\sphinxstyleliteralstrong{meth} (\href{https://docs.python.org/3/library/stdtypes.html\#str}{\sphinxstyleliteralemphasis{str}}) -- bulk parameterization method option: "S80", "S88", "LP82", "YT96", "UA", "NCAR", "C30", "C35", "ecmwf", "Beljaars"
\end{itemize}
\item[{Returns}] \leavevmode
\begin{itemize}
\item {}
\sphinxstylestrong{cdn} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- drag coefficient
\item {}
\sphinxstylestrong{zo} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- roughness length (m)
\end{itemize}
\end{description}\end{quote}
\end{fulllineitems}
% -------------------------------------------------------------------------------------------------------------------------------------------------------------------------
\index{flux_subs.cdn_from_roughness}
\begin{fulllineitems}
\phantomsection\label{\detokenize{index:flux_subs.cdn_from_roughness}}\pysiglinewithargsret{\sphinxcode{flux\_subs.}\sphinxbfcode{cdn\_from\_roughness}}{\emph{u$_{10n}$}, \emph{usr}, \emph{Ta}, \emph{grav}, \emph{meth}}{}
Calculate neutral drag coefficient from roughness length
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {}
\sphinxstyleliteralstrong{u$_{10n}$} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- neutral 10m wind speed (ms$^{-1}$)
\item {}
\sphinxstyleliteralstrong{usr} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- friction velocity (ms$^{-1}$)
\item {}
\sphinxstyleliteralstrong{Ta} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- air temperature (K)
\item {}
\sphinxstyleliteralstrong{grav} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- acceleration of gravity (ms$^{-2}$)
\item {}
\sphinxstyleliteralstrong{meth} (\href{https://docs.python.org/3/library/stdtypes.html\#str}{\sphinxstyleliteralemphasis{str}}) -- bulk parameterization method option: "S80", "S88", "LP82", "YT96", "UA", "NCAR", "C30", "C35", "ecmwf", "Beljaars"
\end{itemize}
\item[{Returns}] \leavevmode
\sphinxstylestrong{cdn} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}})
\end{description}\end{quote}
\end{fulllineitems}
% -------------------------------------------------------------------------------------------------------------------------------------------------------------------------
\index{flux_subs.cd_calc}
\begin{fulllineitems}
\phantomsection\label{\detokenize{index:flux_subs.cd_calc}}\pysiglinewithargsret{\sphinxcode{flux\_subs.}\sphinxbfcode{cd\_calc}}{\emph{cdn}, \emph{hin}, \emph{hout}, \emph{psim}}{}
Calculate drag coefficient at reference height
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {}
\sphinxstyleliteralstrong{cdn} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- neutral drag coefficient
\item {}
\sphinxstyleliteralstrong{hin} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- wind speed sensor height (m)
\item {}
\sphinxstyleliteralstrong{hout} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- reference height (m)
\item {}
\sphinxstyleliteralstrong{psim} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- momentum stability function
\end{itemize}
\item[{Returns}] \leavevmode
\sphinxstylestrong{cd} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}})
\end{description}\end{quote}
\end{fulllineitems}
% -------------------------------------------------------------------------------------------------------------------------------------------------------------------------
\subsection{Heat and moisture exchange coefficients functions}
\label{\detokenize{index:heat-and-moisture-exchange-coefficients-functions}}
\index{flux_subs.ctcqn_calc}
\begin{fulllineitems}
\phantomsection\label{\detokenize{index:flux_subs.ctcqn_calc}}\pysiglinewithargsret{\sphinxcode{flux\_subs.}\sphinxbfcode{ctcqn\_calc}}{\emph{corq}, \emph{zol}, \emph{cdn}, \emph{usr}, \emph{zo}, \emph{Ta}, \emph{meth}}{}
Calculate neutral heat and moisture exchange coefficients
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {}
\sphinxstyleliteralstrong{corq} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{str}}) -- flag to select ``ct'' or ``cq''
\item {}
\sphinxstyleliteralstrong{zol} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- height over MO length
\item {}
\sphinxstyleliteralstrong{cdn} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- neutral drag coefficient
\item {}
\sphinxstyleliteralstrong{usr} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- friction velocity (ms$^{-1}$)
\item {}
\sphinxstyleliteralstrong{zo} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- surface roughness (m)
\item {}
\sphinxstyleliteralstrong{Ta} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- air temperature (K)
\item {}
\sphinxstyleliteralstrong{meth} (\href{https://docs.python.org/3/library/stdtypes.html\#str}{\sphinxstyleliteralemphasis{str}}) -- bulk parameterization method option: "S80", "S88", "LP82", "YT96", "UA", "NCAR", "C30", "C35", "ecmwf", "Beljaars"
\end{itemize}
\item[{Returns}] \leavevmode
\begin{itemize}
\item {}
\sphinxstylestrong{ctn or cqn} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- neutral heat or moisture exchange coefficient
\item {}
\sphinxstylestrong{zot or zoq} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- roughness length for heat or moisture
\end{itemize}
\end{description}\end{quote}
\end{fulllineitems}
% -------------------------------------------------------------------------------------------------------------------------------------------------------------------------
\index{flux_subs.ctcq_calc}
\begin{fulllineitems}
\phantomsection\label{\detokenize{index:flux_subs.ctcq_calc}}\pysiglinewithargsret{\sphinxcode{flux\_subs.}\sphinxbfcode{ctcq\_calc}}{\emph{cdn}, \emph{cd}, \emph{ctqn}, \emph{hin},\emph{hout}, \emph{psitq}}{}
Calculates heat and moisture exchange coefficients at reference height
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {}
\sphinxstyleliteralstrong{cdn} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- neutral drag coefficient
\item {}
\sphinxstyleliteralstrong{cd} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- drag coefficient at reference height
\item {}
\sphinxstyleliteralstrong{ctqn} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- neutral heat or moisture exchange coefficient
\item {}
\sphinxstyleliteralstrong{hin} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- original temperature/moisture sensor height (m)
\item {}
\sphinxstyleliteralstrong{hout} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- reference height (m)
\item {}
\sphinxstyleliteralstrong{psit} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- heat or moisture stability function
\end{itemize}
\item[{Returns}] \leavevmode
\begin{itemize}
\item {}
\sphinxstylestrong{ctq} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- heat or moisture exchange coefficient
\end{itemize}
\end{description}\end{quote}
\end{fulllineitems}
%
% -------------------------------------------------------------------------------------------------------------------------------------------------------------------------
%
\subsection{Stratification functions}
\label{\detokenize{index:stratification-functions}}
The stratification functions $\Psi_{i}$ are the integrals of the dimensionless profiles $\Phi_{i}$, which are determined experimentally, and are applied as stability corrections to the wind speed, temperature and humidity profiles. They are a function of the stability parameter z\slash\,L, where L is the Monin-Obhukov length.
\phantomsection\label{\detokenize{index:module-flux_subs}}\index{flux\_subs (module)}\index{psim\_calc() (in module flux\_subs)}
\index{flux_subs.psim_calc}
\begin{fulllineitems}
\phantomsection\label{\detokenize{index:flux_subs.psim_calc}}\pysiglinewithargsret{\sphinxcode{flux\_subs.}\sphinxbfcode{psim\_calc}}{\emph{zol}, \emph{meth}}{}
Calculate momentum stability function
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {}
\sphinxstyleliteralstrong{zol} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- z\slash\,L
\item {}
\sphinxstyleliteralstrong{meth} (\href{https://docs.python.org/3/library/stdtypes.html\#str}{\sphinxstyleliteralemphasis{str}}) -- bulk parameterization method option: "S80", "S88", "LP82", "YT96", "UA", "NCAR", "C30", "C35", "ecmwf", "Beljaars"
\end{itemize}
\item[{Returns}] \leavevmode
\sphinxstylestrong{psim} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}})
\end{description}\end{quote}
\end{fulllineitems}
% -------------------------------------------------------------------------------------------------------------------------------------------------------------------------
\index{flux_subs.psit_calc}
\begin{fulllineitems}
\phantomsection\label{\detokenize{index:flux_subs.psit_calc}}\pysiglinewithargsret{\sphinxcode{flux\_subs.}\sphinxbfcode{psit\_calc}}{\emph{zol}, \emph{meth}}{}
Calculate heat/moisture stability function
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {}
\sphinxstyleliteralstrong{zol} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- z\slash\,L
\item {}
\sphinxstyleliteralstrong{meth} (\href{https://docs.python.org/3/library/stdtypes.html\#str}{\sphinxstyleliteralemphasis{str}}) -- bulk parameterization method option: "S80", "S88", "LP82", "YT96", "UA", "NCAR", "C30", "C35", "ecmwf", "Beljaars"
\end{itemize}
\item[{Returns}] \leavevmode
\sphinxstylestrong{psit} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}})
\end{description}\end{quote}
\end{fulllineitems}
% -------------------------------------------------------------------------------------------------------------------------------------------------------------------------
\index{flux_subs.psi_Bel}
\begin{fulllineitems}
\phantomsection\label{\detokenize{index:flux_subs.psi_Bel}}\pysiglinewithargsret{\sphinxcode{flux\_subs.}\sphinxbfcode{psi\_Bel}}{\emph{zol}}{}
Calculate heat/moisture stability function for stable conditions for Beljaars \citep{Beljaars1991}
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {}
\sphinxstyleliteralstrong{zol} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- z\slash\,L
\end{itemize}
\item[{Returns}] \leavevmode
\sphinxstylestrong{psi} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}})
\end{description}\end{quote}
\end{fulllineitems}
% -------------------------------------------------------------------------------------------------------------------------------------------------------------------------
\index{flux_subs.psi_ecmwf}
\begin{fulllineitems}
\phantomsection\label{\detokenize{index:flux_subs.psi_ecmwf}}\pysiglinewithargsret{\sphinxcode{flux\_subs.}\sphinxbfcode{psi\_ecmwf}}{\emph{zol}}{}
Calculate heat stability function for stable conditions for method ecmwf \citep{era5_2019}
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {}
\sphinxstyleliteralstrong{zol} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- z\slash\,L
\end{itemize}
\item[{Returns}] \leavevmode
\sphinxstylestrong{psit} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}})
\end{description}\end{quote}
\end{fulllineitems}
% -------------------------------------------------------------------------------------------------------------------------------------------------------------------------
\index{flux_subs.psim_ecmwf}
\begin{fulllineitems}
\phantomsection\label{\detokenize{index:flux_subs.psim_ecmwf}}\pysiglinewithargsret{\sphinxcode{flux\_subs.}\sphinxbfcode{psim\_ecmwf}}{\emph{zol}}{}
Calculate momentum stability function for method ecmwf \citep{era5_2019}
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {}
\sphinxstyleliteralstrong{zol} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- z\slash\,L
\end{itemize}
\item[{Returns}] \leavevmode
\sphinxstylestrong{psim} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}})
\end{description}\end{quote}
\end{fulllineitems}
% -------------------------------------------------------------------------------------------------------------------------------------------------------------------------
\index{flux_subs.psi_conv}
\begin{fulllineitems}
\phantomsection\label{\detokenize{index:flux_subs.psi_conv}}\pysiglinewithargsret{\sphinxcode{flux\_subs.}\sphinxbfcode{psi\_conv}}{\emph{zol}, \emph{meth}}{}
Calculate heat/moisture stability function for unstable conditions
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {}
\sphinxstyleliteralstrong{zol} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- height over MO length
\item {}
\sphinxstyleliteralstrong{meth} (\href{https://docs.python.org/3/library/stdtypes.html\#str}{\sphinxstyleliteralemphasis{str}}) -- bulk parameterization method option: "S80", "S88", "LP82", "YT96", "UA", "NCAR", "C30", "C35", "ecmwf", "Beljaars"
\end{itemize}
\item[{Returns}] \leavevmode
\sphinxstylestrong{psit} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}})
\end{description}\end{quote}
\end{fulllineitems}
% -------------------------------------------------------------------------------------------------------------------------------------------------------------------------
\index{flux_subs.psi_stab}
\begin{fulllineitems}
\phantomsection\label{\detokenize{index:flux_subs.psi_stab}}\pysiglinewithargsret{\sphinxcode{flux\_subs.}\sphinxbfcode{psi\_stab}}{\emph{zol}, \emph{meth}}{}
Calculate heat/moisture stability function for stable conditions
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {}
\sphinxstyleliteralstrong{zol} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- height over MO length
\item {}
\sphinxstyleliteralstrong{meth} (\href{https://docs.python.org/3/library/stdtypes.html\#str}{\sphinxstyleliteralemphasis{str}}) -- bulk parameterization method option: "S80", "S88", "LP82", "YT96", "UA", "NCAR", "C30", "C35", "ecmwf", "Beljaars"
\end{itemize}
\item[{Returns}] \leavevmode
\sphinxstylestrong{psit} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}})
\end{description}\end{quote}
\end{fulllineitems}
% -------------------------------------------------------------------------------------------------------------------------------------------------------------------------
\index{flux_subs.psit_26}
\begin{fulllineitems}
\phantomsection\label{\detokenize{index:flux_subs.psit_26}}\pysiglinewithargsret{\sphinxcode{flux\_subs.}\sphinxbfcode{psit\_26}}{\emph{zol}}{}
Compute temperature structure function as in COARE3.5 \citep{Fairall_etal_1996a}
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstyleliteralstrong{zol} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- z\slash\,L
\item[{Returns}] \leavevmode
\sphinxstylestrong{psi} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}})
\end{description}\end{quote}
\end{fulllineitems}
% -------------------------------------------------------------------------------------------------------------------------------------------------------------------------
\index{flux_subs.psim_conv}
\begin{fulllineitems}
\phantomsection\label{\detokenize{index:flux_subs.psim_conv}}\pysiglinewithargsret{\sphinxcode{flux\_subs.}\sphinxbfcode{psim\_conv}}{\emph{zol}, \emph{meth}}{}
Calculate momentum stability function for unstable conditions
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {}
\sphinxstyleliteralstrong{zol} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- z\slash\,L
\item {}
\sphinxstyleliteralstrong{meth} (\href{https://docs.python.org/3/library/stdtypes.html\#str}{\sphinxstyleliteralemphasis{str}}) -- bulk parameterization method option
\end{itemize}
\item[{Returns}] \leavevmode
\sphinxstylestrong{psim} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}})
\end{description}\end{quote}
\end{fulllineitems}
% -------------------------------------------------------------------------------------------------------------------------------------------------------------------------
\index{flux_subs.psim_stab}
\begin{fulllineitems}
\phantomsection\label{\detokenize{index:flux_subs.psim_stab}}\pysiglinewithargsret{\sphinxcode{flux\_subs.}\sphinxbfcode{psim\_stab}}{\emph{zol}, \emph{meth}}{}
Calculate momentum stability function for stable conditions
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {}
\sphinxstyleliteralstrong{zol} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- z\slash\,L
\item {}
\sphinxstyleliteralstrong{meth} (\href{https://docs.python.org/3/library/stdtypes.html\#str}{\sphinxstyleliteralemphasis{str}}) -- bulk parameterization method option
\end{itemize}
\item[{Returns}] \leavevmode
\sphinxstylestrong{psim} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}})
\end{description}\end{quote}
\end{fulllineitems}
% -------------------------------------------------------------------------------------------------------------------------------------------------------------------------
\index{flux_subs.psiu_26}
\begin{fulllineitems}
\phantomsection\label{\detokenize{index:flux_subs.psiu_26}}\pysiglinewithargsret{\sphinxcode{flux\_subs.}\sphinxbfcode{psiu\_26}}{\emph{zol}, \emph{meth}}{}
Compute the velocity structure function in COARE 3.0 or 3.5
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {}
\sphinxstyleliteralstrong{zol} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- height over MO length
\item {}
\sphinxstyleliteralstrong{meth} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{str}}) -- method (C30 or C35)
\end{itemize}
\item[{Returns}] \leavevmode
\sphinxstylestrong{psi} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}})
\end{description}\end{quote}
\end{fulllineitems}
%--------------------------------------------------------------------------------------------------------------
\index{flux_subs.get_stabco}
\begin{fulllineitems}
\phantomsection\label{\detokenize{index:flux_subs.get_stabco}}\pysiglinewithargsret{\sphinxcode{flux\_subs.}\sphinxbfcode{get\_stabco}}{\emph{meth}}{}
Provide the coefficients $\alpha$, $\beta$, $\gamma$ that feed in the stability functions
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstyleliteralstrong{meth} (\href{https://docs.python.org/3/library/stdtypes.html\#str}{\sphinxstyleliteralemphasis{str}}) -- bulk parameterization method option: "S80", "S88", "LP82", "YT96", "UA", "NCAR", "C30", "C35", "ecmwf", "Beljaars"
\item[{Returns}] \leavevmode
\sphinxstylestrong{coeffs} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}})
\end{description}\end{quote}
\end{fulllineitems}
%
%
%--------------------------------------------------------------------------------------------------------------
\subsection{Cool skin/warm layer subroutines}
\label{\detokenize{index:cool-skin-warm-layer-subroutines}}
\index{module-cs_wl_subs}
\phantomsection\label{\detokenize{index:module-cs_wl_subs}}\
%--------------------------------------------------------------------------------------------------------------
\index{cs_wl_subs.delta}
\begin{fulllineitems}
\phantomsection\label{\detokenize{index:cs_wl_subs.delta}}\pysiglinewithargsret{\sphinxcode{cs\_wl\_subs.}\sphinxbfcode{delta}}{\emph{aw}, \emph{Q}, \emph{usr}, \emph{grav}}{}
Compute the thickness (m) of the viscous skin layer. Based on \citet{Fairall_etal_1996b} and cited in \citet{era5_2019} eq. 8.155 p. 164
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {}
\sphinxstyleliteralstrong{aw} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- thermal expansion coefficient of sea-water (K$^{-1}$)
\item {}
\sphinxstyleliteralstrong{Q} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) --part of the net heat flux actually absorbed in the warm layer (W\,m$^{-2}$)
\item {}
\sphinxstyleliteralstrong{usr} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- friction velocity (ms$^{-1}$)
\item {}
\sphinxstyleliteralstrong{grav} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- acceleration of gravity (ms$^{-2}$)
\end{itemize}
\item[{Returns}] \leavevmode
\begin{itemize}
\item {}
\sphinxstylestrong{delta} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- the thickness (m) of the viscous skin layer
\end{itemize}
\end{description}\end{quote}
\end{fulllineitems}
%--------------------------------------------------------------------------------------------------------------
\index{cs_wl_subs.cs_C35}
\begin{fulllineitems}
\phantomsection\label{\detokenize{index:cs_wl_subs.cs_C35}}\pysiglinewithargsret{\sphinxcode{cs\_wl\_subs.}\sphinxbfcode{cs\_C35}}{\emph{sst}, \emph{rho}, \emph{Rs}, \emph{Rnl}, \emph{cp}, \emph{lv}, \emph{delta}, \emph{usr}, \emph{tsr}, \emph{qsr}, \emph{grav}}{}
Compute cool skin following the methodology described in COARE3.5 \citep{Fairall_etal_1996b, Edson_etal_2013}
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {}
\sphinxstyleliteralstrong{sst} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- sea surface temperature (K)
\item {}
\sphinxstyleliteralstrong{rho} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- density of air (kgm$^{-3}$)
\item {}
\sphinxstyleliteralstrong{Rs} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- downward shortwave radiation (Wm$^{-2}$)
\item {}
\sphinxstyleliteralstrong{Rnl} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- downward net longwave radiation (Wm$^{-2}$)
\item {}
\sphinxstyleliteralstrong{cp} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- specific heat of air at constant pressure (J/K/kg)
\item {}
\sphinxstyleliteralstrong{lv} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- latent heat of vaporization (J/kg)
\item {}
\sphinxstyleliteralstrong{delta} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- cool skin thickness (m)
\item {}
\sphinxstyleliteralstrong{usr} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- friction velocity (ms$^{-1}$)
\item {}
\sphinxstyleliteralstrong{tsr} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- star temperature (K)
\item {}
\sphinxstyleliteralstrong{qsr} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- star humidity (g/kg)
\item {}
\sphinxstyleliteralstrong{grav} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- acceleration of gravity (ms$^{-2}$)
\end{itemize}
\item[{Returns}] \leavevmode
\begin{itemize}
\item {}
\sphinxstylestrong{dter} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- cool-skin temperature depression (K)
\item {}
\sphinxstylestrong{delta} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- cool skin thickness (m)
\end{itemize}
\end{description}\end{quote}
\end{fulllineitems}
%--------------------------------------------------------------------------------------------------------------
\index{cs_wl_subs.cs_ecmwf}
\begin{fulllineitems}
\phantomsection\label{\detokenize{index:cs_wl_subs.cs_ecmwf}}\pysiglinewithargsret{\sphinxcode{cs\_wl\_subs.}\sphinxbfcode{cs\_ecmwf}}{\emph{rho}, \emph{Rs}, \emph{Rnl}, \emph{cp}, \emph{lv}, \emph{usr}, \emph{tsr}, \emph{qsr}, \emph{sst}, \emph{grav}}{}
cool skin adjustment based on IFS Documentation cy46r1 \citep{era5_2019}
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {}
\sphinxstyleliteralstrong{rho} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- density of air (kg\,m$^{-3}$)
\item {}
\sphinxstyleliteralstrong{Rs} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- downward shortwave radiation (W/m$^2$)
\item {}
\sphinxstyleliteralstrong{Rnl} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- downward net longwave radiation (W/m$^2$)
\item {}
\sphinxstyleliteralstrong{cp} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- specific heat of air at constant pressure (J/K/kg)
\item {}
\sphinxstyleliteralstrong{lv} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- latent heat of vaporization (J/kg)
\item {}
\sphinxstyleliteralstrong{usr} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- friction velocity (ms$^{-1}$)
\item {}
\sphinxstyleliteralstrong{tsr} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- star temperature (K)
\item {}
\sphinxstyleliteralstrong{qsr} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- star humidity (g/kg)
\item {}
\sphinxstyleliteralstrong{sst} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- sea surface temperature (K)
\item {}
\sphinxstyleliteralstrong{grav} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- acceleration of gravity (ms$^{-2}$)
\end{itemize}
\item[{Returns}] \leavevmode
\begin{itemize}
\item {}
\sphinxstylestrong{dtc} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- cool-skin temperature depression (K)
\end{itemize}
\end{description}\end{quote}
\end{fulllineitems}
%--------------------------------------------------------------------------------------------------------------
\index{cs_wl_subs.cs_Beljaars}
\begin{fulllineitems}
\phantomsection\label{\detokenize{index:cs_wl_subs.cs_Beljaars}}\pysiglinewithargsret{\sphinxcode{cs\_wl\_subs.}\sphinxbfcode{cs\_Beljaars}}{ \emph{rho}, \emph{Rs}, \emph{Rnl}, \emph{cp}, \emph{lv}, \emph{usr}, \emph{tsr}, \emph{qsr}, \emph{grav}, \emph{Qs}}{}
cool skin adjustment based on Beljaars (1997): air-sea interaction in the ECMWF model
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {}
\sphinxstyleliteralstrong{rho} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- density of air (kg\,m$^{-3}$)
\item {}
\sphinxstyleliteralstrong{Rs} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- downward shortwave radiation (W/m$^2$)
\item {}
\sphinxstyleliteralstrong{Rnl} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- downward net longwave radiation (W/m$^2$)
\item {}
\sphinxstyleliteralstrong{cp} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- specific heat of air at constant pressure (J/K/kg)
\item {}
\sphinxstyleliteralstrong{lv} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- latent heat of vaporization (J/kg)
\item {}
\sphinxstyleliteralstrong{usr} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- friction velocity (ms$^{-1}$)
\item {}
\sphinxstyleliteralstrong{tsr} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- star temperature (K)
\item {}
\sphinxstyleliteralstrong{qsr} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- star humidity (g/kg)
\item {}
\sphinxstyleliteralstrong{sst} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- sea surface temperature (K)
\item {}
\sphinxstyleliteralstrong{grav} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- acceleration of gravity (ms$^{-2}$)
\item {}
\sphinxstyleliteralstrong{Qs} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- radiation balance from previous step (W\,m$^{-2}$)
\end{itemize}
\item[{Returns}] \leavevmode
\begin{itemize}
\item {}
\sphinxstyleliteralstrong{Qs} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- radiation balance (W\,m$^{-2}$)
\item {}
\sphinxstylestrong{dtc} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- cool-skin temperature depression (K)
\end{itemize}
\end{description}\end{quote}
\end{fulllineitems}
%--------------------------------------------------------------------------------------------------------------
\index{cs_wl_subs.wl_ecmwf}
\begin{fulllineitems}
\phantomsection\label{\detokenize{index:cs_wl_subs.wl_ecmwf}}\pysiglinewithargsret{\sphinxcode{cs\_wl\_subs.}\sphinxbfcode{wl\_ecmwf}}{\emph{rho}, \emph{Rs}, \emph{Rnl}, \emph{cp}, \emph{lv}, \emph{usr}, \emph{tsr}, \emph{qsr}, \emph{sst}, \emph{skt}, \emph{dtc}, \emph{grav}}{}
warm layer correction following IFS Documentation cy46r1 \citep{era5_2019} and aerobulk \citep{Brodeau_etal_2017}
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {}
\sphinxstyleliteralstrong{rho} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- density of air (kg\,m$^{-3}$)
\item {}
\sphinxstyleliteralstrong{Rs} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- downward shortwave radiation (W/m$^2$)
\item {}
\sphinxstyleliteralstrong{Rnl} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- downward net longwave radiation (W/m$^2$)
\item {}
\sphinxstyleliteralstrong{cp} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- specific heat of air at constant pressure (J/K/kg)
\item {}
\sphinxstyleliteralstrong{lv} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- latent heat of vaporization (J/kg)
\item {}
\sphinxstyleliteralstrong{usr} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- friction velocity (ms$^{-1}$)
\item {}
\sphinxstyleliteralstrong{tsr} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- star temperature (K)
\item {}
\sphinxstyleliteralstrong{qsr} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- star humidity (g/kg)
\item {}
\sphinxstyleliteralstrong{sst} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- sea surface temperature (K)
\item {}
\sphinxstyleliteralstrong{skt} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- skin temperature from previous step(K)
\item {}
\sphinxstyleliteralstrong{dtc} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- cool skin correction (K)
\item {}
\sphinxstyleliteralstrong{grav} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- acceleration of gravity (ms$^{-2}$)
\end{itemize}
\item[{Returns}] \leavevmode
\begin{itemize}
\item {}
\sphinxstylestrong{dtwl} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- warm layer correction (K)
\end{itemize}
\end{description}\end{quote}
\end{fulllineitems}
%--------------------------------------------------------------------------------------------------------------
\index{cs_wl_subs.get_dqer}
\begin{fulllineitems}
\phantomsection\label{\detokenize{index:cs_wl_subs.get_dqer}}\pysiglinewithargsret{\sphinxcode{cs\_wl\_subs.}\sphinxbfcode{get\_dqer}}{\emph{dter}, \emph{sst}, \emph{qsea}, \emph{lv}}{}
warm layer correction following IFS Documentation cy46r1 \citep{era5_2019} and aerobulk \citep{Brodeau_etal_2017}
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {}
\sphinxstyleliteralstrong{dter} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- cool skin correction (K)
\item {}
\sphinxstyleliteralstrong{sst} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- sea surface temperature (K)
\item {}
\sphinxstyleliteralstrong{qsea} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- specific humidity over sea (g/kg)
\item {}
\sphinxstyleliteralstrong{lv} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- latent heat of vaporization (J/kg)
\end{itemize}
\item[{Returns}] \leavevmode
\begin{itemize}
\item {}
\sphinxstylestrong{dqer} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- humidity correction (g/kg)
\end{itemize}
\end{description}\end{quote}
\end{fulllineitems}
%
%
%--------------------------------------------------------------------------------------------------------------
\subsection{Other subroutines related to fluxes}
\label{\detokenize{index:other-subroutines-related-to-fluxes}}
%--------------------------------------------------------------------------------------------------------------
\index{flux_subs.get_gust}
\begin{fulllineitems}
\phantomsection\label{\detokenize{index:flux_subs.get_gust}}\pysiglinewithargsret{\sphinxcode{flux\_subs.}\sphinxbfcode{get\_gust}}{\emph{beta}, \emph{zi}, \emph{ugmin}, \emph{Ta}, \emph{usr}, \emph{tsrv}, \emph{grav}}{}
Compute convective gustiness
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {}
\sphinxstyleliteralstrong{beta} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- constant
\item {}
\sphinxstyleliteralstrong{zi} (\href{https://docs.python.org/3/library/functions.html\#int}{\sphinxstyleliteralemphasis{int}}) -- scale height of the boundary layer depth (m)
\item {}
\sphinxstyleliteralstrong{ugmin} (\href{https://docs.python.org/3/library/functions.html\#int}{\sphinxstyleliteralemphasis{int}}) -- minimum gust wind (ms$^{-1}$)
\item {}
\sphinxstyleliteralstrong{Ta} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- air temperature (K)
\item {}
\sphinxstyleliteralstrong{usr} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- friction velocity (ms$^{-1}$)
\item {}
\sphinxstyleliteralstrong{tsrv} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- star virtual temperature of air (K)
\item {}
\sphinxstyleliteralstrong{grav} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- acceleration of gravity (ms$^{-2}$)
\end{itemize}
\item[{Returns}] \leavevmode
\sphinxstylestrong{ug} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}})
\end{description}\end{quote}
\end{fulllineitems}
%--------------------------------------------------------------------------------------------------------------
\index{flux_subs.apply_GF}
\begin{fulllineitems}
\phantomsection\label{\detokenize{index:flux_subs.apply_GF}}\pysiglinewithargsret{\sphinxcode{flux\_subs.}\sphinxbfcode{apply\_GF}}{\emph{gust}, \emph{spd}, \emph{wind}, \emph{step}}{}
There are different ways to remove the effect of gustiness according to the user's choice.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {}
\sphinxstyleliteralstrong{gust} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- first instance from get\_gust
option on how to apply gustiness
0: gustiness is switched OFF \\
1: gustiness is switched ON following \cite{Fairall_etal_2003}
2: gustiness is switched ON and GF is removed from TSFs u10n, uref
3: gustiness is switched ON and GF=1
4: gustiness is switched ON following ECMWF
5: gustiness is switched ON following \cite{Zeng_etal_1998}
6: gustiness is switched ON following C35 matlab code
\item {}
\sphinxstyleliteralstrong{spd} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- input wind speed (ms$^{-1}$)
\item {}
\sphinxstyleliteralstrong{wind} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- wind speed including gust wind (ms$^{-1}$)
\item {}
\sphinxstyleliteralstrong{step} (\href{https://docs.python.org/3/library/functions.html\#str}{\sphinxstyleliteralemphasis{str}}) -- step during AirSeaFluxCode the GF is applied: "u", "TSF"
\end{itemize}
\item[{Returns}] \leavevmode
\sphinxstylestrong{GustFact} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- gustiness factor
\end{description}\end{quote}
\end{fulllineitems}
%--------------------------------------------------------------------------------------------------------------
\index{flux_subs.get_strs}
\begin{fulllineitems}
\phantomsection\label{\detokenize{index:flux_subs.get_strs}}\pysiglinewithargsret{\sphinxcode{flux\_subs.}\sphinxbfcode{get\_strs}}{\emph{hin}, \emph{monob}, \emph{wind}, \emph{zo}, \emph{zot}, \emph{zoq}, \emph{dt}, \emph{dq}, \emph{cd}, \emph{ct}, \emph{cq}, \emph{meth}}{}
Calculate star wind speed, temperature and specific humidity
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\begin{itemize}
\item {}
\sphinxstyleliteralstrong{hin}(\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- sensor heights (m)
\item {}
\sphinxstyleliteralstrong{monob}(\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- Monin-Obukhov length (m)
\item {}
\sphinxstyleliteralstrong{wind}(\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- wind speed (ms$^{-1}$)
\item {}
\sphinxstyleliteralstrong{zo}(\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- momentum roughness length (m)
\item {}
\sphinxstyleliteralstrong{zot}(\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- temperature roughness length (m)
\item {}
\sphinxstyleliteralstrong{zoq}(\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- moisture roughness length (m)
\item {}
\sphinxstyleliteralstrong{dt}(\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- temperature difference (K)
\item {}
\sphinxstyleliteralstrong{dq}(\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- specific humidity difference (g/kg)
\item {}
\sphinxstyleliteralstrong{cd}(\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- drag coefficient
\item {}
\sphinxstyleliteralstrong{ct }(\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- temperature exchange coefficient
\item {}
\sphinxstyleliteralstrong{cq}(\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- moisture exchange coefficient
\item {}
\sphinxstyleliteralstrong{meth}(\href{https://docs.python.org/3/library/functions.html\#str}{\sphinxstyleliteralemphasis{str}}) -- bulk parameterization method option: "S80", "S88", "LP82", "YT96", "UA", "NCAR", "C30", "C35", "ecmwf", "Beljaars"
\end{itemize}
\item[{Returns}] \leavevmode
\begin{itemize}
\item {}
\sphinxstyleliteralstrong{usr}(\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- friction wind speed (m\slash\,s)
\item {}
\sphinxstyleliteralstrong{tsr}(\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- star temperature (K)
\item {}
\sphinxstyleliteralstrong{qsr}(\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- star specific humidity (g\slash\,kg)
\end{itemize}
\end{description}\end{quote}
\end{fulllineitems}
%--------------------------------------------------------------------------------------------------------------
\index{flux_subs.get_tsrv}
\begin{fulllineitems}
\phantomsection\label{\detokenize{index:flux_subs.get_tsrv}}\pysiglinewithargsret{\sphinxcode{flux\_subs.}\sphinxbfcode{get\_tsrv}}{\emph{tsr}, \emph{qsr}, \emph{Ta}, \emph{qair}}{}
Calculate virtual star temperature
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\begin{itemize}
\item {}
\sphinxstyleliteralstrong{tsr}(\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- star temperature (K)
\item {}
\sphinxstyleliteralstrong{qsr}(\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- star specific humidity (g\slash\,kg)
\item {}
\sphinxstyleliteralstrong{Ta}(\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- air temperature (K)
\item {}
\sphinxstyleliteralstrong{qsr}(\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- air specific humidity (g\slash\,kg)
\end{itemize}
\item[{Returns}] \leavevmode
\begin{itemize}
\item {}
\sphinxstyleliteralstrong{tsrv}(\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- virtual star temperature (K)
\end{itemize}
\end{description}\end{quote}
\end{fulllineitems}
%--------------------------------------------------------------------------------------------------------------
\index{flux_subs.get_Rb}
\begin{fulllineitems}
\phantomsection\label{\detokenize{index:flux_subs.get_Rb}}\pysiglinewithargsret{\sphinxcode{flux\_subs.}\sphinxbfcode{get\_Rb}}{\emph{grav}, \emph{usr}, \emph{hin\_u}, \emph{tv}, \emph{dtv}, \emph{wind}, \emph{monob}, \emph{meth}}{}
Calculate bulk Richardson number
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\begin{itemize}
\item {}
\sphinxstyleliteralstrong{grav}(\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- acceleration of gravity (ms$^{-2}$)
\item {}
\sphinxstyleliteralstrong{usr}(\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- friction wind speed (ms$^{-1}$)
\item {}
\sphinxstyleliteralstrong{hin\_u}(\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- wind speed sensor height (m)
\item {}
\sphinxstyleliteralstrong{tv}(\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- virtual temperature (K)
\item {}
\sphinxstyleliteralstrong{dtv}(\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- virtual temperature difference, air and sea (K)
\item {}
\sphinxstyleliteralstrong{wind}(\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- wind speed (ms$^{-1}$)
\item {}
\sphinxstyleliteralstrong{monob}(\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- Monin-Obukhov length from previous iteration step (m)
\item {}
\sphinxstyleliteralstrong{meth}(\href{https://docs.python.org/3/library/functions.html\#str}{\sphinxstyleliteralemphasis{str}}) -- bulk parameterization method option: "S80", "S88", "LP82", "YT96", "UA", "NCAR", "C30", "C35", "ecmwf", "Beljaars"
\end{itemize}
\item[{Returns}] \leavevmode
\begin{itemize}
\item {}
\sphinxstyleliteralstrong{Rb}(\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- Richardson number
\end{itemize}
\end{description}\end{quote}
\end{fulllineitems}
%--------------------------------------------------------------------------------------------------------------
\index{flux_subs.get_Ltsrv}
\begin{fulllineitems}
\phantomsection\label{\detokenize{index:flux_subs.get_Ltsrv}}\pysiglinewithargsret{\sphinxcode{flux\_subs.}\sphinxbfcode{get\_Ltsrv}}{\emph{tsrv}, \emph{grav}, \emph{tv}, \emph{usr}}{}
Calculate Monin-Obukhov length from virtual star temperature
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\begin{itemize}
\item {}
\sphinxstyleliteralstrong{tsrv} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- virtual star temperature (K)
\item {}
\sphinxstyleliteralstrong{grav} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- acceleration of gravity (ms$^{-2}$)
\item {}
\sphinxstyleliteralstrong{tv}(\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- virtual temperature (K)
\item {}
\sphinxstyleliteralstrong{usr}(\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- friction wind speed (ms$^{-1}$)
\end{itemize}
\item[{Returns}] \leavevmode
\begin{itemize}
\item {}
\sphinxstyleliteralstrong{monob}(\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- Monin-Obukhov length (m)
\end{itemize}
\end{description}\end{quote}
\end{fulllineitems}
%--------------------------------------------------------------------------------------------------------------
\index{flux_subs.get_LRb}
\begin{fulllineitems}
\phantomsection\label{\detokenize{index:flux_subs.get_LRb}}\pysiglinewithargsret{\sphinxcode{flux\_subs.}\sphinxbfcode{get\_LRb}}{\emph{Rb}, \emph{hin\_t}, \emph{monob}, \emph{zo}, \emph{zot}, \emph{meth}}{}
Calculate Monin-Obukhov length following \cite{era5_2019}
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\begin{itemize}
\item {}
\sphinxstyleliteralstrong{Rb} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- Richardson number
\item {}
\sphinxstyleliteralstrong{hin\_t} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- temperature measurement height (m)
\item {}
\sphinxstyleliteralstrong{monob}(\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- Monin-Obukhov length from previous iteration step (m)
\item {}
\sphinxstyleliteralstrong{zo}(\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- surface roughness (m)
\item {}
\sphinxstyleliteralstrong{zot}(\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- temperature roughness length (m)
\item {}
\sphinxstyleliteralstrong{meth}(\href{https://docs.python.org/3/library/functions.html\#str}{\sphinxstyleliteralemphasis{str}}) -- bulk parameterization method option: "S80", "S88", "LP82", "YT96", "UA", "NCAR", "C30", "C35", "ecmwf", "Beljaars"
\end{itemize}
\item[{Returns}] \leavevmode
\begin{itemize}
\item {}
\sphinxstyleliteralstrong{monob}(\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- Monin-Obukhov length (m)
\end{itemize}
\end{description}\end{quote}
\end{fulllineitems}
\subsection{Utility functions}
\label{\detokenize{index:utility-functions}}
\index{module-util_subs}
\phantomsection\label{\detokenize{index:module-util_subs}}
%--------------------------------------------------------------------------------------------------------------
\index{util_subs.get_heights}
\begin{fulllineitems}
\phantomsection\label{\detokenize{index:util_subs.get_heights}}\pysiglinewithargsret{\sphinxcode{util\_subs.}\sphinxbfcode{get\_heights}}{\emph{h}, \emph{dim\_len}}{}
Read input heights for velocity, temperature and humidity
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {}
\sphinxstyleliteralstrong{h} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- input heights (m)
\item {}
\sphinxstyleliteralstrong{dim\_len} (\href{https://docs.python.org/3/library/functions.html\#int}{\sphinxstyleliteralemphasis{int}}) -- length dimension
\end{itemize}
\item[{Returns}] \leavevmode
\sphinxstylestrong{hh} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}})
\end{description}\end{quote}
\end{fulllineitems}
%--------------------------------------------------------------------------------------------------------------
\index{util_subs.gc}
\begin{fulllineitems}
\phantomsection\label{\detokenize{index:util_subs.gc}}\pysiglinewithargsret{\sphinxcode{util\_subs.}\sphinxbfcode{gc}}{\emph{lat}, \emph{lon=None}}{}
Compute acceleration of gravity relative to latitude
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {}
\sphinxstyleliteralstrong{lat} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- latitude ($^\circ$)
\item {}
\sphinxstyleliteralstrong{lon} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- longitude ($^\circ$)
\end{itemize}
\item[{Returns}] \leavevmode
\sphinxstylestrong{gc} (\sphinxstyleliteralemphasis{float}) -- gravity constant (ms$^{-2}$)
\end{description}\end{quote}
\end{fulllineitems}
%--------------------------------------------------------------------------------------------------------------
\index{util_subs.visc_air}
\begin{fulllineitems}
\phantomsection\label{\detokenize{index:util_subs.visc_air}}\pysiglinewithargsret{\sphinxcode{util\_subs.}\sphinxbfcode{visc\_air}}{\emph{T}}{}
Computes the kinematic viscosity of dry air as a function of air temp.
following Andreas (1989), CRREL Report 89-11.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstyleliteralstrong{T} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- air temperature ($^\circ$\,C)
\item[{Returns}] \leavevmode
\sphinxstylestrong{visa} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- kinematic viscosity (m$^2$/s)
\end{description}\end{quote}
\end{fulllineitems}
%--------------------------------------------------------------------------------------------------------------
\index{util_subs.set_flag}
\begin{fulllineitems}
\phantomsection\label{\detokenize{index:util_subs.set_flag}}\pysiglinewithargsret{\sphinxcode{util\_subs.}\sphinxbfcode{set\_flag}}{\emph{miss}, \emph{rh}, \emph{u10n}, \emph{q10n}, \emph{Rb}, \emph{hin}, \emph{monob}, \emph{itera}, \emph{out=0}}{}
Set general flags
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item{}
\sphinxstyleliteralstrong{miss} (\href{https://docs.python.org/3/library/functions.html\#int}{\sphinxstyleliteralemphasis{int}}) -- mask of missing input points
\item{}
\sphinxstyleliteralstrong{rh} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- relative humidity (\%)
\item{}
\sphinxstyleliteralstrong{u10n} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- wind speed at 10\,m neutral stability (ms$^{-1}$)
\item{}
\sphinxstyleliteralstrong{q10n} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- specific humidity at 10\,m neutral stability (kg/kg)
\item{}
\sphinxstyleliteralstrong{Rb} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- bulk Richardson number
\item{}
\sphinxstyleliteralstrong{hin} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- input measurement heights (m)
\item{}
\sphinxstyleliteralstrong{monob} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- Monin-Obhukov length (m)
\item{}
\sphinxstyleliteralstrong{itera} (\href{https://docs.python.org/3/library/functions.html\#int}{\sphinxstyleliteralemphasis{int}}) -- iteration step
\item{}
\sphinxstyleliteralstrong{out} (\href{https://docs.python.org/3/library/functions.html\#int}{\sphinxstyleliteralemphasis{int}}) -- output option for non converged points. The default is 0
\end{itemize}
\item[{Returns}] \leavevmode
\sphinxstylestrong{flag} (\href{https://docs.python.org/3/library/functions.html\#str}{\sphinxstyleliteralemphasis{str}}) --flag
\end{description}\end{quote}
\end{fulllineitems}
%--------------------------------------------------------------------------------------------------------------
\index{util_subs.get_outvars}
\begin{fulllineitems}
\phantomsection\label{\detokenize{index:util_subs.get_outvars}}\pysiglinewithargsret{\sphinxcode{util\_subs.}\sphinxbfcode{get\_outvars}}{\emph{out\_var}, \emph{cskin}, \emph{gust}}{}
Set list of variables to ouput
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item{}
\sphinxstyleliteralstrong{out\_var} (\href{https://docs.python.org/3/library/functions.html\#str}{\sphinxstyleliteralemphasis{str}}) -- list of variables we want to output
\item{}
\sphinxstyleliteralstrong{cskin} (\href{https://docs.python.org/3/library/functions.html\#int}{\sphinxstyleliteralemphasis{int}}) -- cool skin switch 0 or 1
\item{}
\sphinxstyleliteralstrong{gust} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- gustiness input options
\end{itemize}
\item[{Returns}] \leavevmode
\sphinxstylestrong{outvar} (\href{https://docs.python.org/3/library/functions.html\#str}{\sphinxstyleliteralemphasis{str}}) -- list of variables
\end{description}\end{quote}
\end{fulllineitems}
%--------------------------------------------------------------------------------------------------------------
\subsection{Humidity functions}
\label{\detokenize{index:humidity-functions}}
\index{module-hum_subs}
\phantomsection\label{\detokenize{index:module-hum_subs}}
%--------------------------------------------------------------------------------------------------------------
\index{hum_subs.get_hum}
\begin{fulllineitems}
\phantomsection\label{\detokenize{index:hum_subs.get_hum}}\pysiglinewithargsret{\sphinxcode{hum\_subs.}\sphinxbfcode{get\_hum}}{\emph{hum}, \emph{T}, \emph{sst}, \emph{P}, \emph{qmeth}}{}
Get specific humidity air and sea
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {}
\sphinxstyleliteralstrong{hum} (\href{https://docs.python.org/3/library/functions.html\#array}{\sphinxstyleliteralemphasis{array}}) -- humidity input switch 2x1 [x, values] default is relative humidity
x=``h'' : relative humidity in \%
x=``q'' : specific humidity (g/kg)
x=``Td'' : dew point temperature (K)
\item {}
\sphinxstyleliteralstrong{T} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- air temperature (K)
\item {}
\sphinxstyleliteralstrong{sst} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- sea surface temperature (K)
\item {}
\sphinxstyleliteralstrong{P} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- air pressure at sea level (hPa)
\item {}
\sphinxstyleliteralstrong{qmeth} (\href{https://docs.python.org/3/library/functions.html\#str}{\sphinxstyleliteralemphasis{str}}) -- method to calculate specific humidity from vapour pressure
\end{itemize}
\item[{Returns}] \leavevmode
\begin{itemize}
\item {}
\sphinxstylestrong{qair} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- specific humidity of air (g/kg)
\item {}
\sphinxstylestrong{qsea} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- specific humidity over sea surface (g/kg)
\end{itemize}
\end{description}\end{quote}
\end{fulllineitems}
%--------------------------------------------------------------------------------------------------------------
\index{hum_subs.VaporPressure}
\begin{fulllineitems}
\phantomsection\label{\detokenize{index:hum_subs.VaporPressure}}\pysiglinewithargsret{\sphinxcode{hum\_subs.}\sphinxbfcode{VaporPressure}}{\emph{temp}, \emph{P}, \emph{phase}, \emph{meth}}{}
Calculate the saturation vapor pressure. For temperatures above 0$^{\circ}$C the vapor pressure over liquid water is calculated.
Based on Holger V\"{o}mel's routine modified by S. Biri
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {}
\sphinxstyleliteralstrong{temp} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- temperature ($^\circ$C)
\item {}
\sphinxstyleliteralstrong{P} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- pressure (mb)
\item {}
\sphinxstyleliteralstrong{phase} (\href{https://docs.python.org/3/library/functions.html\#str}{\sphinxstyleliteralemphasis{str}}) -- ``liquid'' : Calculate vapor pressure over liqiud water or ``ice'' : Calculate vapor pressure over ice
\item {}
\sphinxstyleliteralstrong{meth} (\href{https://docs.python.org/3/library/functions.html\#str}{\sphinxstyleliteralemphasis{str}}) -- method to calculate vapour pressure amongst ``HylandWexler" \citep{Hyland_Wexler_1983}, ``Hardy" \citep{Hardy_1998}, ``Preining" \citep{Vehkamaeki_etal_2002}, ``Wexler" \citep{Wexler_1976}, ``GoffGratch" \citep{Goff_Gratch_1946}, ``MagnusTetens" \citep{Murray_1967}, ``Buck" \citep{Buck_1981}, ``Buck2" \citep{Buck_2012}, ``WMO" \citep{WMO_1988}, ``WMO2018" \citep{WMO_2018}, ``Sonntag" \citep{Sonntag_1994}, ``Bolton" \citep{Bolton_1980}, ``IAPWS" \citep{Wagner_Pruss_2002}, ``MurphyKoop" \citep{Murphy_Koop_2005}
\end{itemize}
\item[{Returns}] \leavevmode
\sphinxstylestrong{Psat} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- Saturation vapour pressure [hPa]
\end{description}\end{quote}
\end{fulllineitems}
%--------------------------------------------------------------------------------------------------------------
\index{hum_subs.qsat_sea}
\begin{fulllineitems}
\phantomsection\label{\detokenize{index:hum_subs.qsat_sea}}\pysiglinewithargsret{\sphinxcode{hum\_subs.}\sphinxbfcode{qsat\_sea}}{\emph{T}, \emph{P}, \emph{meth}}{}
Compute specific humidity of the sea surface air
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {}
\sphinxstyleliteralstrong{T} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- sea surface temperature (K)
\item {}
\sphinxstyleliteralstrong{P} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- pressure (mb)
\item {}
\sphinxstyleliteralstrong{qmeth} (\href{https://docs.python.org/3/library/functions.html\#str}{\sphinxstyleliteralemphasis{str}}) --method to calculate vapour pressure
\end{itemize}
\item[{Returns}] \leavevmode
\sphinxstylestrong{qsea} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- (kg/kg)
\end{description}\end{quote}
\end{fulllineitems}
%--------------------------------------------------------------------------------------------------------------
\index{hum_subs.qsat_air}
\begin{fulllineitems}
\phantomsection\label{\detokenize{index:hum_subs.qsat_air}}\pysiglinewithargsret{\sphinxcode{hum\_subs.}\sphinxbfcode{qsat\_air}}{\emph{T}, \emph{P}, \emph{rh}, \emph{qmeth}}{}
Computes specific humidity of the sea surface air
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {}
\sphinxstyleliteralstrong{T} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- sea surface temperature (K)
\item {}
\sphinxstyleliteralstrong{P} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- pressure (mb)
\item {}
\sphinxstyleliteralstrong{rh} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- relative humidity (\%)
\item {}
\sphinxstyleliteralstrong{qmeth} (\href{https://docs.python.org/3/library/functions.html\#str}{\sphinxstyleliteralemphasis{str}}) --method to calculate vapour pressure
\end{itemize}
\item[{Returns}] \leavevmode
\sphinxstylestrong{qsea} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- (kg/kg)
\end{description}\end{quote}
\end{fulllineitems}
%--------------------------------------------------------------------------------------------------------------
\index{hum_subs.gamma}
\begin{fulllineitems}
\phantomsection\label{\detokenize{index:hum_subs.gamma}}\pysiglinewithargsret{\sphinxcode{hum\_subs.}\sphinxbfcode{gamma}}{\emph{opt}, \emph{sst}, \emph{t}, \emph{q}, \emph{cp}}{}
Computes the moist adiabatic lapse-rate
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {}
\sphinxstyleliteralstrong{opt} (\href{https://docs.python.org/3/library/functions.html\#str}{\sphinxstyleliteralemphasis{str}}) -- type of adiabatic lapse rate dry or ``moist''. dry can be set to be constant (``dry\_c''), for dry air (``dry'', default) or for unsaturated air with water vapour (``dry\_v'')
\item {}
\sphinxstyleliteralstrong{sst} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- sea surface temperature (K)
\item {}
\sphinxstyleliteralstrong{t} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- air temperature (K)
\item {}
\sphinxstyleliteralstrong{q} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- specific humidity (kg/kg)
\item {}
\sphinxstyleliteralstrong{cp} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- heat capacity of air at constant pressure (kJ/kgK)
\end{itemize}
\item[{Returns}] \leavevmode
\sphinxstylestrong{gamma} (\href{https://docs.python.org/3/library/functions.html\#float}{\sphinxstyleliteralemphasis{float}}) -- lapse rate (K/m)
\end{description}\end{quote}
\end{fulllineitems}
% \begin{sphinxthebibliography}
\bibliographystyle{apalike}
\bibliography{../publications/Reference.bib}
% \end{sphinxthebibliography}
\renewcommand{\indexname}{Python Module Index}
\begin{sphinxtheindex}
\def\bigletter#1{{\Large\sffamily#1}\nopagebreak\vspace{1mm}}
\bigletter{a}
\item {\sphinxstyleindexentry{AirSeaFluxCode}}\sphinxstyleindexpageref{index:\detokenize{module-AirSeaFluxCode}}
\item {\sphinxstyleindexentry{apply\_GF}}\sphinxstyleindexpageref{index:\detokenize{flux_subs.apply_GF}}\\
\bigletter{c}
\item {\sphinxstyleindexentry{cd\_calc}}\sphinxstyleindexpageref{index:\detokenize{flux_subs.cd_calc}}
\item {\sphinxstyleindexentry{cdn\_calc}}\sphinxstyleindexpageref{index:\detokenize{flux_subs.cdn_calc}}
\item {\sphinxstyleindexentry{cdn\_from\_roughness}}\sphinxstyleindexpageref{index:\detokenize{flux_subs.cdn_from_roughness}}
\item {\sphinxstyleindexentry{cs\_Beljaars}}\sphinxstyleindexpageref{index:\detokenize{cs_wl_subs.cs_Beljaars}}
\item {\sphinxstyleindexentry{cs\_C35}}\sphinxstyleindexpageref{index:\detokenize{cs_wl_subs.cs_C35}}
\item {\sphinxstyleindexentry{cs\_ecmwf}}\sphinxstyleindexpageref{index:\detokenize{cs_wl_subs.cs_ecmwf}}
\item {\sphinxstyleindexentry{cs\_wl\_subs}}\sphinxstyleindexpageref{index:\detokenize{module-cs_wl_subs}}
\item {\sphinxstyleindexentry{ctcq\_calc}}\sphinxstyleindexpageref{index:\detokenize{flux_subs.ctcq_calc}}
\item {\sphinxstyleindexentry{ctcqn\_calc}}\sphinxstyleindexpageref{index:\detokenize{flux_subs.ctcq_calc}}
\item {\sphinxstyleindexentry{CtoK}}\sphinxstyleindexpageref{index:\detokenize{util_subs.CtoK}}\\
\bigletter{d}
\item {\sphinxstyleindexentry{delta}}\sphinxstyleindexpageref{index:\detokenize{cs_wl_subs.delta}}\\
\bigletter{f}
\item {\sphinxstyleindexentry{flux\_subs}}\sphinxstyleindexpageref{index:\detokenize{module-flux_subs}}\\
\bigletter{g}
\item {\sphinxstyleindexentry{gamma}}\sphinxstyleindexpageref{index:\detokenize{hum_subs.gamma}}
\item {\sphinxstyleindexentry{gc}}\sphinxstyleindexpageref{index:\detokenize{util_subs.gc}}
\item {\sphinxstyleindexentry{get\_gust}}\sphinxstyleindexpageref{index:\detokenize{flux_subs.get_gust}}
\item {\sphinxstyleindexentry{get\_heights}}\sphinxstyleindexpageref{index:\detokenize{util_subs.get_heights}}
\item {\sphinxstyleindexentry{get\_hum}}\sphinxstyleindexpageref{index:\detokenize{hum_subs.get_hum}}
\item {\sphinxstyleindexentry{get\_LRb}}\sphinxstyleindexpageref{index:\detokenize{flux_subs.get_LRb}}
\item {\sphinxstyleindexentry{get\_Ltsrv}}\sphinxstyleindexpageref{index:\detokenize{flux_subs.get_Ltsrv}}
\item {\sphinxstyleindexentry{get\_outvars}}\sphinxstyleindexpageref{index:\detokenize{util_subs.get_outvars}}
\item {\sphinxstyleindexentry{get\_Rb}}\sphinxstyleindexpageref{index:\detokenize{flux_subs.get_Rb}}
\item {\sphinxstyleindexentry{get\_stabco}}\sphinxstyleindexpageref{index:\detokenize{flux_subs.get_stabco}}
\item {\sphinxstyleindexentry{get\_strs}}\sphinxstyleindexpageref{index:\detokenize{flux_subs.get_strs}}
\item {\sphinxstyleindexentry{get\_tsrv}}\sphinxstyleindexpageref{index:\detokenize{flux_subs.get_tsrv}}\\
%\item {\sphinxstyleindexentry{}}\sphinxstyleindexpageref{index:\detokenize{}}\\
\bigletter{h}
\item {\sphinxstyleindexentry{hum\_subs}}\sphinxstyleindexpageref{index:\detokenize{module-hum_subs}}
\\
\bigletter{k}
\item {\sphinxstyleindexentry{kappa}}\sphinxstyleindexpageref{index:\detokenize{util_subs.kappa}}\\
\bigletter{p}
\item {\sphinxstyleindexentry{psi\_Bel}}\sphinxstyleindexpageref{index:\detokenize{flux_subs.psi_Bel}}
\item {\sphinxstyleindexentry{psi\_conv}}\sphinxstyleindexpageref{index:\detokenize{flux_subs.psi_conv}}
\item {\sphinxstyleindexentry{psi\_ecmwf}}\sphinxstyleindexpageref{index:\detokenize{flux_subs.psi_ecmwf}}
\item {\sphinxstyleindexentry{psi\_stab}}\sphinxstyleindexpageref{index:\detokenize{flux_subs.psi_stab}}
\item {\sphinxstyleindexentry{psim\_calc}}\sphinxstyleindexpageref{index:\detokenize{flux_subs.psim_calc}}
\item {\sphinxstyleindexentry{psim\_conv}}\sphinxstyleindexpageref{index:\detokenize{flux_subs.psim_conv}}
\item {\sphinxstyleindexentry{psim\_ecmwf}}\sphinxstyleindexpageref{index:\detokenize{flux_subs.psim_ecmwf}}
\item {\sphinxstyleindexentry{psim\_stab}}\sphinxstyleindexpageref{index:\detokenize{flux_subs.psim_stab}}
\item {\sphinxstyleindexentry{psit\_26}}\sphinxstyleindexpageref{index:\detokenize{flux_subs.psit_26}}
\item {\sphinxstyleindexentry{psit\_calc}}\sphinxstyleindexpageref{index:\detokenize{flux_subs.psit_calc}}
\item {\sphinxstyleindexentry{psiu\_26}}\sphinxstyleindexpageref{index:\detokenize{flux_subs.psiu_26}}\\
\bigletter{q}
\item {\sphinxstyleindexentry{qsat\_air}}\sphinxstyleindexpageref{index:\detokenize{hum_subs.qsat_air}}
\item {\sphinxstyleindexentry{qsat\_sea}}\sphinxstyleindexpageref{index:\detokenize{hum_subs.qsat_sea}}\\
\bigletter{q}
\item {\sphinxstyleindexentry{set\_flag}}\sphinxstyleindexpageref{index:\detokenize{util_subs.set_flag}}\\
\bigletter{u}
\item {\sphinxstyleindexentry{util\_subs}}\sphinxstyleindexpageref{index:\detokenize{module-util_subs}}\\
\bigletter{v}
\item {\sphinxstyleindexentry{VaporPressure}}\sphinxstyleindexpageref{index:\detokenize{hum_subs.VaporPressure}}
\item {\sphinxstyleindexentry{visc\_air}}\sphinxstyleindexpageref{index:\detokenize{util_subs.visc_air}}
\\
\bigletter{w}
\item {\sphinxstyleindexentry{wl\_ecmwf}}\sphinxstyleindexpageref{index:\detokenize{cs_wl_subs.wl_ecmwf}}\\
\end{sphinxtheindex}
\renewcommand{\indexname}{Index}
\printindex
\end{document}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment