ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
ERF_SEBSkinInit.H File Reference

The first value of the two-stream force-restore balance's skin temperature from the skin temperature of the initial file (TSK of a wrfinput file, SKINTEMP of a metgrid file), with erf.radiation.seb_init_skin_from_file. More...

#include <AMReX_GpuQualifiers.H>
#include <AMReX_INT.H>
#include <AMReX_Math.H>
#include <AMReX_MultiFab.H>
#include <AMReX_REAL.H>
#include <AMReX_iMultiFab.H>
Include dependency graph for ERF_SEBSkinInit.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  SEBSkinInitReport
 What seb_init_skin_from_file did on the boxes of this rank. More...
 

Functions

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool seb_skin_init_usable (const amrex::Real temperature, const amrex::Real t_lo, const amrex::Real t_hi) noexcept
 True when temperature [K] can start the skin: finite and inside the range the balance holds the skin in, t_lo, t_hi @a. More...
 
SEBSkinInitReport seb_init_skin_from_file (amrex::MultiFab &t_sfc, const amrex::MultiFab &file_skin, const amrex::iMultiFab *land_mask, amrex::Real t_lo, amrex::Real t_hi)
 Copy file_skin [K] into the land columns of t_sfc [K], valid columns only. More...
 

Detailed Description

The first value of the two-stream force-restore balance's skin temperature from the skin temperature of the initial file (TSK of a wrfinput file, SKINTEMP of a metgrid file), with erf.radiation.seb_init_skin_from_file.

Without the input every column starts at the one value erf.rad_t_sfc. With it a land column starts at the file's value. A water column keeps erf.rad_t_sfc: the balance does not run there and the sweep takes the surface layer's sea surface temperature.

Function Documentation

◆ seb_init_skin_from_file()

SEBSkinInitReport seb_init_skin_from_file ( amrex::MultiFab &  t_sfc,
const amrex::MultiFab &  file_skin,
const amrex::iMultiFab *  land_mask,
amrex::Real  t_lo,
amrex::Real  t_hi 
)

Copy file_skin [K] into the land columns of t_sfc [K], valid columns only.

Parameters
[in,out]t_sfcthe balance's skin temperature of one level
[in]file_skinthe file's skin temperature on the same grids
[in]land_maskERF::lmask_lev of the level (0 is water); nullptr means all land
[in]t_lolowest usable value [K]
[in]t_hihighest usable value [K]
Returns
the counts and range of this rank. The caller sums them over the ranks, stops when a column was refused, and fills the ghost columns of t_sfc.

◆ seb_skin_init_usable()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool seb_skin_init_usable ( const amrex::Real  temperature,
const amrex::Real  t_lo,
const amrex::Real  t_hi 
)
noexcept

True when temperature [K] can start the skin: finite and inside the range the balance holds the skin in, t_lo, t_hi @a.

A value outside the range would be moved to the nearest bound by the first update of the balance, so it is refused here.

34 {
35  return amrex::Math::isfinite(temperature) && temperature >= t_lo && temperature <= t_hi;
36 }

Referenced by seb_init_skin_from_file().

Here is the caller graph for this function: