Version 25 (modified by maronga, 8 years ago) (diff)

--

Radiation models

PALM offers a built-in simple and fast radiation model for clear sky conditions. Moreover, an interface allows for using the RRTMG code.

Constant radiation

Not really being a radiation model, this option allows for prescribing the net radiation at the surface (e.g. as driving for the land surface model). The user has the possibility to modify the net radiation during the run via the user interface. For more information, see net_radiation. Note that this scheme limits several parameterizations in the land surface scheme that require shortwave and longwave radiative fluxes.

Simple clear sky radiation

A simple clear sky radiation model can be used for simulations without clouds and highly-parametrized radiation fluxes.

Radiation budget

The radiation budget at the Earth's surface reads

\begin{equation*}
R_\mathrm{n} = SW_\mathrm{in} - SW_\mathrm{out} + LW_\mathrm{in} - LW_\mathrm{out}
\end{equation*}

with Rn, SWin, SWout, LWin, LWout being the net radiation, shortwave incoming (downward), shortwave outgoing (upward), longwave incoming (downward), and longwave outgoing (upward) flux, respectively.

Parameterization of radiative fluxes

The shortwave outgoing radiative flux depends on the surface albedo α:

\begin{equation*}
SW_\mathrm{out} = \alpha\ SW_\mathrm{in}
\end{equation*}

The longwave outgoing radiative flux can be parameterized as

\begin{equation*}
LW_\mathrm{out} = \epsilon\ \sigma\ T_0^4
\end{equation*}

where ε is the surface emissivity and σ = 5.67 * 10-8 W m-2 K-4 is the Stefan-Boltzmann constant. T0 is the skin temperature provided by the solver for the surface energy budget.

The longwave incoming radiative flux follows a very simple parameterization:

\begin{equation*}
LW_\mathrm{in} = \epsilon_\mathrm{atm}\ \sigma\ T_1^4
\end{equation*}

with

$\epsilon_\mathrm{atm} = 0.8$: Emissivity of the atmosphere\\
$T_1$: Temperature at first grid level

The shortwave incoming radiative flux is calculated from

\begin{equation*}
SW_\mathrm{in} = S_0\ \tau\ \sin(\varPsi) 
\end{equation*}

with

$S_0 = 1368 W m^{-2}$: Solar constant\\
$\varPsi$: Zenith angle

and the transmissivity of the atmosphere τ:

\begin{equation*}
\tau = 0.6 + 0.2\ \sin(\varPsi) 
\end{equation*}

ψ is the cosine of the zenith angle, depending on time, date and location. Input parameters are

  • day of year (1-365)
  • UTC time (0:00 - 23:59)
  • Longitude (-180° - 180°)
  • Latitude (-90° - 90°)

ψ is calculated from the following system of equations:

\begin{equation*}
D = \arcsin \left[ d1 * \sin\left(d2 * day - d3\right) \right]
\end{equation*}

where D is the declination of the sun with

$d1 = \sin \left(\dfrac{23.45 * \pi}{180}\right)$\\
$d2 = \dfrac{2 \pi}{365}$\\
$d3 = 81\ d2$

The hour angle is then given by

\begin{equation*}
H = 2 \pi \left(\dfrac{t_\mathrm{UTC}}{86400}\right) + lon - \pi
\end{equation*}

where tUTC is the current UTC time and lon is longitude.

The cosine of the zenith angle Z is computed as

\begin{equation*}
Z = \sin(lat) \sin(D) + \cos(lat) \cos(D) \cos(H)
\end{equation*}

where lat is latitude.

RRTMG

Since r1585 PALM can be used in combination with the RRTMG radiation code. The RRTMG source code is shipped along with PALM, but it is not part of the model (this means that RRTMG is put under a difference licence than PALM, which e.g. forbids reselling of the code). Unlike most embedded modules in PALM, the RRTMG is thus used as external library and linked to the default PALM code. This in turn means that RRTMG must be installed in advance on the host where PALM shall be executed. The next section explains the installation of RRTMG and how to use it in PALM. Please note that RRTMG requires to use the netCDF data format.

Basics

Installation

The RRTMG source code for creating an external library can be found under trunk/LIB/rrtmg. It is accompanied by an installation script called install_rrtmg. In order to install RRTMG, perform the following steps:

  1. Copy all files from trunk/LIB/rrtmg to the host where PALM/RRTMG shall be executed.
  2. Open install_rrtmg and modify the following lines:
     compiler_name="mpif90"
     fopts="-fltconsistency -O3 -cpp -r8 -nbs -convert little_endian -I /muksoft/packages/netcdf/4_intel/include"
     fopts_trace="-fpe0 -C -check nooutput_conversion -debug -traceback -g -w -xT -O0 -I /muksoft/packages/netcdf/4_intel/include"
     install_path="$HOME/palm/rrtmg"
     compile_static=true
     compile_shared=true
     compile_static_debug=false
     compile_shared_debug=false
    
    For a proper configuration, see your .mrun.config file for the respective computer architecture where RRTMG shall be installed. fopts_trace is only required if you want to have debug options enabled. Use the switch parameters compile_static=true, compile_shared=true, compile_static_debug=false, and compile_shared_debug=false to set flags for compilation of RRTMG as static library, shared library (recommended), static library with debug options (recommended), and shared library with debug options, respectively. Save your changes.
  1. Execute install_rrtmg with option "-p", which defines the path where the library shall be installed, e.g.:
    ./install_rrtmg -p $HOME/lib/rrtmg
    
    The script will create up to four directories depening on the setting of the flag parameters (see above), each including one installation of RRTMG:
    $HOME/lib/rrtmg/shared
    $HOME/lib/rrtmg/shared_trace
    $HOME/lib/rrtmg/static
    $HOME/lib/rrtmg/static_trace
    

with each directory having the following subdirectories:

/include
/lib
  1. Open your .mrun.config file and add -D__rrtmg to %cpp_options of the host where PALM/RRTMG shall be used. Moreover, add the path to the library to %fopts and %lopts, e.g. (here for lcmuk)
    %fopts  -fpe0:-O3:-cpp:-fp-model:source:-I:/home/user/lib/rrtmg/shared/include lcmuk parallel rrtmg
    %lopts  -fpe0:-O3:-cpp:-fp-model:source:-L/home/user/lib/rrtmg/shared/lib:-lrrtmg lcmuk parallel rrtmg
    
    when a shared RRTMG library was installed under "/home/user/lib/rrtmg/shared". A template file including hosts lcmuk and lccrayh/lccrayb are available here

Also add the following line to the list of input files (in:locopt can be modified to meet the needs of the user):

rrtmg_lw.nc              in:locopt     d3#:d3f  $base_data/$fname/INPUT    _rlw nc
rrtmg_sw.nc              in:locopt     d3#:d3f  $base_data/$fname/INPUT    _rsw nc
RAD_SND_DATA             in:locopt     d3#:d3f  $base_data/$fname/INPUT    _rsnd nc
  1. Recompile PALM for the respective host. The RRTMG library will be included either as static or shared library, depending on your configuration.
  1. To be able to use RRTMG, the LD_LIBRARY_PATH variable has to be extended by the path where RRTMG library (plus "/lib" added) was installed. For convenience, setting should be done in the respective profile of the users default shell (e.g. in .profile, if ksh is used), e.g.:
      export LD_LIBRARY_PATH=$HOME/lib/rrtmg/shared/lib:$LD_LIBRARY_PATH
    

when RRTMG was installed as shared library under "$HOME/lib/rrtmg/shared/".

You may have to login again in order to activate the profile settings.

Job preparation

RRTMG requires various vertical profile data that must be provided in the INPUT directory of the job and labeled with underscore _rsw and _rlw, respectively. The required data format is NetCDF. Standard profiles are shipped with the RRTMG library and are located under trunk/LIB/rrtmg/data. Additionally, the user can overwrite the standard trace gas profiles by adding a third NetCDF file labelled as _rsnd that must follow the same data structure as the standard files. The INPUT directory should then contain at least the following files:

jobname_p3d
jobname_rlw (e.g. a copy of rrtmg_lw.nc)
jobname_rsw (e.g. a copy of rrtmg_sw.nc)

and optionally

jobname_rsnd (trace gas sounding data provided by the user)

The _p3d file should contain a NAMELIST for radiation, e.g.:

 &radiation_par radiation_scheme = 'rrtmg',
                lambda = 0.0,
                albedo_type = 0,
                day_init = 287, 
                time_utc_init = 28800.0, 
                dt_radiation = 60.0, 
                albedo_lw_dir = 0.2,
                albedo_lw_dif = 0.2,
                albedo_sw_dir = 0.2,
                albedo_sw_dif = 0.2,
/

A complete example file can be found here.