Skip to content
Snippets Groups Projects
Commit 5671b4ac authored by 数学の武士's avatar 数学の武士 Committed by Debolskiy Andrey
Browse files

comment fixes update

parent f6d9f3ae
Branches
Tags
No related merge requests found
......@@ -348,7 +348,7 @@ OPTIMIZE_OUTPUT_SLICE = NO
#
# Note see also the list of default file extension mappings.
EXTENSION_MAPPING = cu=c++
EXTENSION_MAPPING = cu=c++ f=FortranFixed f90=FortranFree F90=FortranFree
# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
# according to the Markdown format, which allows for more readable
......
!> @brief surface flux model common subroutines
module sfx_common
!> @brief surface flux model common subroutines
public
contains
! ----------------------------------------------------------------------------
!> @brief string to int conversion
elemental subroutine str2int(int, str, stat)
!> @brief string to int conversion
! ----------------------------------------------------------------------------
implicit none
integer, intent(out) :: int
......@@ -19,9 +18,9 @@ contains
end subroutine str2int
! ----------------------------------------------------------------------------
! ----------------------------------------------------------------------------
!> @brief check if value is finite
elemental function is_finite(value)
!> @brief check if value is finite
! ----------------------------------------------------------------------------
use ieee_arithmetic
implicit none
......
!> @brief surface flux model module data
module sfx_data
!> @brief surface flux model module data
! modules used
! --------------------------------------------------------------------------------
......@@ -20,62 +20,62 @@ module sfx_data
! --------------------------------------------------------------------------------
! --------------------------------------------------------------------------------
!> @brief meteorological input for surface flux calculation
type, public :: meteoDataType
!> @brief meteorological input for surface flux calculation
real :: h !> constant flux layer height [m]
real :: U !> abs(wind speed) at 'h' [m/s]
real :: dT !> difference between potential temperature at 'h' and at surface [K]
real :: Tsemi !> semi-sum of potential temperature at 'h' and at surface [K]
real :: dQ !> difference between humidity at 'h' and at surface [g/g]
real :: z0_m !> surface aerodynamic roughness (should be < 0 for water bodies surface)
real :: h !< constant flux layer height [m]
real :: U !< abs(wind speed) at 'h' [m/s]
real :: dT !< difference between potential temperature at 'h' and at surface [K]
real :: Tsemi !< semi-sum of potential temperature at 'h' and at surface [K]
real :: dQ !< difference between humidity at 'h' and at surface [g/g]
real :: z0_m !< surface aerodynamic roughness (should be < 0 for water bodies surface)
end type
!> @brief meteorological input for surface flux calculation
!> &details using arrays as input
type, public :: meteoDataVecType
!> @brief meteorological input for surface flux calculation
!> &details using arrays as input
real, allocatable :: h(:) !> constant flux layer height [m]
real, allocatable :: U(:) !> abs(wind speed) at 'h' [m/s]
real, allocatable :: dT(:) !> difference between potential temperature at 'h' and at surface [K]
real, allocatable :: Tsemi(:) !> semi-sum of potential temperature at 'h' and at surface [K]
real, allocatable :: dQ(:) !> difference between humidity at 'h' and at surface [g/g]
real, allocatable :: z0_m(:) !> surface aerodynamic roughness (should be < 0 for water bodies surface)
real, allocatable :: h(:) !< constant flux layer height [m]
real, allocatable :: U(:) !< abs(wind speed) at 'h' [m/s]
real, allocatable :: dT(:) !< difference between potential temperature at 'h' and at surface [K]
real, allocatable :: Tsemi(:) !< semi-sum of potential temperature at 'h' and at surface [K]
real, allocatable :: dQ(:) !< difference between humidity at 'h' and at surface [g/g]
real, allocatable :: z0_m(:) !< surface aerodynamic roughness (should be < 0 for water bodies surface)
end type
! --------------------------------------------------------------------------------
! --------------------------------------------------------------------------------
!> @brief surface flux output data
type, public :: sfxDataType
!> @brief surface flux output data
real :: zeta !> = z/L [n/d]
real :: Rib !> bulk Richardson number [n/d]
real :: Re !> Reynolds number [n/d]
real :: B !> = log(z0_m / z0_h) [n/d]
real :: z0_m !> aerodynamic roughness [m]
real :: z0_t !> thermal roughness [m]
real :: Rib_conv_lim !> Ri-bulk convection critical value [n/d]
real :: Cm !> transfer coefficient for momentum [n/d]
real :: Ct !> transfer coefficient for heat [n/d]
real :: Km !> eddy viscosity coeff. at h [m^2/s]
real :: Pr_t_inv !> inverse turbulent Prandtl number at h [n/d]
real :: zeta !< = z/L [n/d]
real :: Rib !< bulk Richardson number [n/d]
real :: Re !< Reynolds number [n/d]
real :: B !< = log(z0_m / z0_h) [n/d]
real :: z0_m !< aerodynamic roughness [m]
real :: z0_t !< thermal roughness [m]
real :: Rib_conv_lim !< Ri-bulk convection critical value [n/d]
real :: Cm !< transfer coefficient for momentum [n/d]
real :: Ct !< transfer coefficient for heat [n/d]
real :: Km !< eddy viscosity coeff. at h [m^2/s]
real :: Pr_t_inv !< inverse turbulent Prandtl number at h [n/d]
end type
!> @brief surface flux output data
!> &details using arrays as output
type, public :: sfxDataVecType
!> @brief surface flux output data
!> &details using arrays as output
real, allocatable :: zeta(:) !> = z/L [n/d]
real, allocatable :: Rib(:) !> bulk Richardson number [n/d]
real, allocatable :: Re(:) !> Reynolds number [n/d]
real, allocatable :: B(:) !> = log(z0_m / z0_h) [n/d]
real, allocatable :: z0_m(:) !> aerodynamic roughness [m]
real, allocatable :: z0_t(:) !> thermal roughness [m]
real, allocatable :: Rib_conv_lim(:) !> Ri-bulk convection critical value [n/d]
real, allocatable :: Cm(:) !> transfer coefficient for momentum [n/d]
real, allocatable :: Ct(:) !> transfer coefficient for heat [n/d]
real, allocatable :: Km(:) !> eddy viscosity coeff. at h [m^2/s]
real, allocatable :: Pr_t_inv(:) !> inverse turbulent Prandtl number at h [n/d]
real, allocatable :: zeta(:) !< = z/L [n/d]
real, allocatable :: Rib(:) !< bulk Richardson number [n/d]
real, allocatable :: Re(:) !< Reynolds number [n/d]
real, allocatable :: B(:) !< = log(z0_m / z0_h) [n/d]
real, allocatable :: z0_m(:) !< aerodynamic roughness [m]
real, allocatable :: z0_t(:) !< thermal roughness [m]
real, allocatable :: Rib_conv_lim(:) !< Ri-bulk convection critical value [n/d]
real, allocatable :: Cm(:) !< transfer coefficient for momentum [n/d]
real, allocatable :: Ct(:) !< transfer coefficient for heat [n/d]
real, allocatable :: Km(:) !< eddy viscosity coeff. at h [m^2/s]
real, allocatable :: Pr_t_inv(:) !< inverse turbulent Prandtl number at h [n/d]
end type
! --------------------------------------------------------------------------------
......@@ -142,8 +142,8 @@ contains
! --------------------------------------------------------------------------------
! --------------------------------------------------------------------------------
!> @brief deallocate surface fluxes data vector
subroutine deallocate_sfx_vec(sfx)
!> @brief deallocate surface fluxes data vector
! ----------------------------------------------------------------------------
type (sfxDataVecType), intent(inout) :: sfx
! ----------------------------------------------------------------------------
......@@ -164,8 +164,8 @@ contains
! --------------------------------------------------------------------------------
! --------------------------------------------------------------------------------
!> @brief helper subroutine for copying data in sfxDataVecType
subroutine push_sfx_data(sfx, sfx_cell, idx)
!> @brief helper subroutine for copying data in sfxDataVecType
! ----------------------------------------------------------------------------
type (sfxDataVecType), intent(inout) :: sfx
......
#include "../includeF/sfx_def.fi"
module sfx_esm
!> @brief main Earth System Model surface flux module
!< @brief main Earth System Model surface flux module
! modules used
! --------------------------------------------------------------------------------
......@@ -30,8 +30,8 @@ module sfx_esm
! --------------------------------------------------------------------------------
type, public :: numericsType
integer :: maxiters_convection = 10 !> maximum (actual) number of iterations in convection
integer :: maxiters_charnock = 10 !> maximum (actual) number of iterations in charnock roughness
integer :: maxiters_convection = 10 !< maximum (actual) number of iterations in convection
integer :: maxiters_charnock = 10 !< maximum (actual) number of iterations in charnock roughness
end type
! --------------------------------------------------------------------------------
......@@ -39,8 +39,8 @@ contains
! --------------------------------------------------------------------------------
subroutine get_surface_fluxes_vec(sfx, meteo, numerics, n)
!> @brief surface flux calculation for array data
!> @details contains C/C++ & CUDA interface
!< @brief surface flux calculation for array data
!< @details contains C/C++ & CUDA interface
! ----------------------------------------------------------------------------
type (sfxDataVecType), intent(inout) :: sfx
......@@ -88,8 +88,8 @@ contains
! --------------------------------------------------------------------------------
subroutine get_surface_fluxes(sfx, meteo, numerics)
!> @brief surface flux calculation for single cell
!> @details contains C/C++ interface
!< @brief surface flux calculation for single cell
!< @details contains C/C++ interface
! ----------------------------------------------------------------------------
#ifdef SFX_CHECK_NAN
use ieee_arithmetic
......@@ -103,43 +103,43 @@ contains
! --- meteo derived datatype name shadowing
! ----------------------------------------------------------------------------
real :: h !> constant flux layer height [m]
real :: U !> abs(wind speed) at 'h' [m/s]
real :: dT !> difference between potential temperature at 'h' and at surface [K]
real :: Tsemi !> semi-sum of potential temperature at 'h' and at surface [K]
real :: dQ !> difference between humidity at 'h' and at surface [g/g]
real :: z0_m !> surface aerodynamic roughness (should be < 0 for water bodies surface)
real :: h !< constant flux layer height [m]
real :: U !< abs(wind speed) at 'h' [m/s]
real :: dT !< difference between potential temperature at 'h' and at surface [K]
real :: Tsemi !< semi-sum of potential temperature at 'h' and at surface [K]
real :: dQ !< difference between humidity at 'h' and at surface [g/g]
real :: z0_m !< surface aerodynamic roughness (should be < 0 for water bodies surface)
! ----------------------------------------------------------------------------
! --- local variables
! ----------------------------------------------------------------------------
real z0_t !> thermal roughness [m]
real B !> = ln(z0_m / z0_t) [n/d]
real h0_m, h0_t !> = h / z0_m, h / z0_h [n/d]
real z0_t !< thermal roughness [m]
real B !< = ln(z0_m / z0_t) [n/d]
real h0_m, h0_t !< = h / z0_m, h / z0_h [n/d]
real u_dyn0 !> dynamic velocity in neutral conditions [m/s]
real Re !> roughness Reynolds number = u_dyn0 * z0_m / nu [n/d]
real u_dyn0 !< dynamic velocity in neutral conditions [m/s]
real Re !< roughness Reynolds number = u_dyn0 * z0_m / nu [n/d]
real zeta !> = z/L [n/d]
real Rib !> bulk Richardson number
real zeta !< = z/L [n/d]
real Rib !< bulk Richardson number
real zeta_conv_lim !> z/L critical value for matching free convection limit [n/d]
real Rib_conv_lim !> Ri-bulk critical value for matching free convection limit [n/d]
real zeta_conv_lim !< z/L critical value for matching free convection limit [n/d]
real Rib_conv_lim !< Ri-bulk critical value for matching free convection limit [n/d]
real f_m_conv_lim !> stability function (momentum) value in free convection limit [n/d]
real f_h_conv_lim !> stability function (heat) value in free convection limit [n/d]
real f_m_conv_lim !< stability function (momentum) value in free convection limit [n/d]
real f_h_conv_lim !< stability function (heat) value in free convection limit [n/d]
real psi_m, psi_h !> universal functions (momentum) & (heat) [n/d]
real phi_m, phi_h !> stability functions (momentum) & (heat) [n/d]
real psi_m, psi_h !< universal functions (momentum) & (heat) [n/d]
real phi_m, phi_h !< stability functions (momentum) & (heat) [n/d]
real Km !> eddy viscosity coeff. at h [m^2/s]
real Pr_t_inv !> invese Prandt number [n/d]
real Km !< eddy viscosity coeff. at h [m^2/s]
real Pr_t_inv !< invese Prandt number [n/d]
real Cm, Ct !> transfer coeff. for (momentum) & (heat) [n/d]
real Cm, Ct !< transfer coeff. for (momentum) & (heat) [n/d]
integer surface_type !> surface type = (ocean || land)
integer surface_type !< surface type = (ocean || land)
real fval !> just a shortcut for partial calculations
real fval !< just a shortcut for partial calculations
#ifdef SFX_CHECK_NAN
real NaN
......@@ -287,12 +287,12 @@ contains
! universal functions
! --------------------------------------------------------------------------------
subroutine get_psi_neutral(psi_m, psi_h, h0_m, h0_t, B)
!> @brief universal functions (momentum) & (heat): neutral case
!< @brief universal functions (momentum) & (heat): neutral case
! ----------------------------------------------------------------------------
real, intent(out) :: psi_m, psi_h !> universal functions
real, intent(out) :: psi_m, psi_h !< universal functions
real, intent(in) :: h0_m, h0_t !> = z/z0_m, z/z0_h
real, intent(in) :: B !> = log(z0_m / z0_h)
real, intent(in) :: h0_m, h0_t !< = z/z0_m, z/z0_h
real, intent(in) :: B !< = log(z0_m / z0_h)
! ----------------------------------------------------------------------------
psi_m = log(h0_m)
......@@ -303,14 +303,14 @@ contains
end subroutine
subroutine get_psi_stable(psi_m, psi_h, zeta, Rib, h0_m, h0_t, B)
!> @brief universal functions (momentum) & (heat): stable case
!< @brief universal functions (momentum) & (heat): stable case
! ----------------------------------------------------------------------------
real, intent(out) :: psi_m, psi_h !> universal functions [n/d]
real, intent(out) :: zeta !> = z/L [n/d]
real, intent(out) :: psi_m, psi_h !< universal functions [n/d]
real, intent(out) :: zeta !< = z/L [n/d]
real, intent(in) :: Rib !> bulk Richardson number [n/d]
real, intent(in) :: h0_m, h0_t !> = z/z0_m, z/z0_h [n/d]
real, intent(in) :: B !> = log(z0_m / z0_h) [n/d]
real, intent(in) :: Rib !< bulk Richardson number [n/d]
real, intent(in) :: h0_m, h0_t !< = z/z0_m, z/z0_h [n/d]
real, intent(in) :: B !< = log(z0_m / z0_h) [n/d]
! ----------------------------------------------------------------------------
! --- local variables
......@@ -336,15 +336,15 @@ contains
end subroutine
subroutine get_psi_semi_convection(psi_m, psi_h, zeta, Rib, h0_m, h0_t, B, maxiters)
!> @brief universal functions (momentum) & (heat): semi-strong convection case
!< @brief universal functions (momentum) & (heat): semi-strong convection case
! ----------------------------------------------------------------------------
real, intent(out) :: psi_m, psi_h !> universal functions [n/d]
real, intent(out) :: zeta !> = z/L [n/d]
real, intent(out) :: psi_m, psi_h !< universal functions [n/d]
real, intent(out) :: zeta !< = z/L [n/d]
real, intent(in) :: Rib !> bulk Richardson number [n/d]
real, intent(in) :: h0_m, h0_t !> = z/z0_m, z/z0_h [n/d]
real, intent(in) :: B !> = log(z0_m / z0_h) [n/d]
integer, intent(in) :: maxiters !> maximum number of iterations
real, intent(in) :: Rib !< bulk Richardson number [n/d]
real, intent(in) :: h0_m, h0_t !< = z/z0_m, z/z0_h [n/d]
real, intent(in) :: B !< = log(z0_m / z0_h) [n/d]
integer, intent(in) :: maxiters !< maximum number of iterations
! --- local variables
real :: zeta0_m, zeta0_h
......@@ -388,18 +388,18 @@ contains
subroutine get_psi_convection(psi_m, psi_h, zeta, Rib, &
zeta_conv_lim, f_m_conv_lim, f_h_conv_lim, &
h0_m, h0_t, B, maxiters)
!> @brief universal functions (momentum) & (heat): fully convective case
!< @brief universal functions (momentum) & (heat): fully convective case
! ----------------------------------------------------------------------------
real, intent(out) :: psi_m, psi_h !> universal functions [n/d]
real, intent(out) :: zeta !> = z/L [n/d]
real, intent(out) :: psi_m, psi_h !< universal functions [n/d]
real, intent(out) :: zeta !< = z/L [n/d]
real, intent(in) :: Rib !> bulk Richardson number [n/d]
real, intent(in) :: h0_m, h0_t !> = z/z0_m, z/z0_h [n/d]
real, intent(in) :: B !> = log(z0_m / z0_h) [n/d]
integer, intent(in) :: maxiters !> maximum number of iterations
real, intent(in) :: Rib !< bulk Richardson number [n/d]
real, intent(in) :: h0_m, h0_t !< = z/z0_m, z/z0_h [n/d]
real, intent(in) :: B !< = log(z0_m / z0_h) [n/d]
integer, intent(in) :: maxiters !< maximum number of iterations
real, intent(in) :: zeta_conv_lim !> convective limit zeta
real, intent(in) :: f_m_conv_lim, f_h_conv_lim !> universal function shortcuts in limiting case
real, intent(in) :: zeta_conv_lim !< convective limit zeta
real, intent(in) :: f_m_conv_lim, f_h_conv_lim !< universal function shortcuts in limiting case
! ----------------------------------------------------------------------------
! --- local variables
......@@ -447,12 +447,12 @@ contains
subroutine get_convection_lim(zeta_lim, Rib_lim, f_m_lim, f_h_lim, &
h0_m, h0_t, B)
! ----------------------------------------------------------------------------
real, intent(out) :: zeta_lim !> limiting value of z/L
real, intent(out) :: Rib_lim !> limiting value of Ri-bulk
real, intent(out) :: f_m_lim, f_h_lim !> limiting values of universal functions shortcuts
real, intent(out) :: zeta_lim !< limiting value of z/L
real, intent(out) :: Rib_lim !< limiting value of Ri-bulk
real, intent(out) :: f_m_lim, f_h_lim !< limiting values of universal functions shortcuts
real, intent(in) :: h0_m, h0_t !> = z/z0_m, z/z0_h [n/d]
real, intent(in) :: B !> = log(z0_m / z0_h) [n/d]
real, intent(in) :: h0_m, h0_t !< = z/z0_m, z/z0_h [n/d]
real, intent(in) :: B !< = log(z0_m / z0_h) [n/d]
! ----------------------------------------------------------------------------
! --- local variables
......
module sfx_esm_param
!> @brief ESM surface flux model parameters
!> @details all in SI units
!< @brief ESM surface flux model parameters
!< @details all in SI units
! modules used
! --------------------------------------------------------------------------------
......@@ -13,23 +13,23 @@ module sfx_esm_param
! --------------------------------------------------------------------------------
!> von Karman constant [n/d]
!< von Karman constant [n/d]
real, parameter :: kappa = 0.40
!> inverse Prandtl (turbulent) number in neutral conditions [n/d]
!< inverse Prandtl (turbulent) number in neutral conditions [n/d]
real, parameter :: Pr_t_0_inv = 1.15
!> inverse Prandtl (turbulent) number in free convection [n/d]
!< inverse Prandtl (turbulent) number in free convection [n/d]
real, parameter :: Pr_t_inf_inv = 3.5
!> stability function coeff. (unstable) [= g4 & g10 in deprecated code]
!< stability function coeff. (unstable) [= g4 & g10 in deprecated code]
real, parameter :: alpha_m = 16.0
real, parameter :: alpha_h = 16.0
real, parameter :: alpha_h_fix = 1.2
!> stability function coeff. (stable)
!< stability function coeff. (stable)
real, parameter :: beta_m = 4.7
real, parameter :: beta_h = beta_m
!> --- max Ri-bulk value in stable case ( < 1 / beta_m )
!< --- max Ri-bulk value in stable case ( < 1 / beta_m )
real, parameter :: Rib_max = 0.9 / beta_m
end module sfx_esm_param
#include "../includeF/sfx_def.fi"
module sfx_log
!> @brief simple log-roughness surface flux module
!< @brief simple log-roughness surface flux module
! modules used
! --------------------------------------------------------------------------------
......@@ -27,7 +27,7 @@ module sfx_log
! --------------------------------------------------------------------------------
type, public :: numericsType
integer :: maxiters_charnock = 10 !> maximum (actual) number of iterations in charnock roughness
integer :: maxiters_charnock = 10 !< maximum (actual) number of iterations in charnock roughness
end type
! --------------------------------------------------------------------------------
......@@ -35,8 +35,8 @@ contains
! --------------------------------------------------------------------------------
subroutine get_surface_fluxes_vec(sfx, meteo, numerics, n)
!> @brief surface flux calculation for array data
!> @details contains C/C++ & CUDA interface
!< @brief surface flux calculation for array data
!< @details contains C/C++ & CUDA interface
! ----------------------------------------------------------------------------
type (sfxDataVecType), intent(inout) :: sfx
......@@ -67,8 +67,8 @@ contains
! --------------------------------------------------------------------------------
subroutine get_surface_fluxes(sfx, meteo, numerics)
!> @brief surface flux calculation for single cell
!> @details contains C/C++ interface
!< @brief surface flux calculation for single cell
!< @details contains C/C++ interface
! ----------------------------------------------------------------------------
#ifdef SFX_CHECK_NAN
use ieee_arithmetic
......@@ -82,34 +82,34 @@ contains
! --- meteo derived datatype name shadowing
! ----------------------------------------------------------------------------
real :: h !> constant flux layer height [m]
real :: U !> abs(wind speed) at 'h' [m/s]
real :: dT !> difference between potential temperature at 'h' and at surface [K]
real :: Tsemi !> semi-sum of potential temperature at 'h' and at surface [K]
real :: dQ !> difference between humidity at 'h' and at surface [g/g]
real :: z0_m !> surface aerodynamic roughness (should be < 0 for water bodies surface)
real :: h !< constant flux layer height [m]
real :: U !< abs(wind speed) at 'h' [m/s]
real :: dT !< difference between potential temperature at 'h' and at surface [K]
real :: Tsemi !< semi-sum of potential temperature at 'h' and at surface [K]
real :: dQ !< difference between humidity at 'h' and at surface [g/g]
real :: z0_m !< surface aerodynamic roughness (should be < 0 for water bodies surface)
! ----------------------------------------------------------------------------
! --- local variables
! ----------------------------------------------------------------------------
real z0_t !> thermal roughness [m]
real B !> = ln(z0_m / z0_t) [n/d]
real h0_m, h0_t !> = h / z0_m, h / z0_h [n/d]
real z0_t !< thermal roughness [m]
real B !< = ln(z0_m / z0_t) [n/d]
real h0_m, h0_t !< = h / z0_m, h / z0_h [n/d]
real u_dyn0 !> dynamic velocity in neutral conditions [m/s]
real Re !> roughness Reynolds number = u_dyn0 * z0_m / nu [n/d]
real u_dyn0 !< dynamic velocity in neutral conditions [m/s]
real Re !< roughness Reynolds number = u_dyn0 * z0_m / nu [n/d]
real Rib !> bulk Richardson number
real Rib !< bulk Richardson number
real psi_m, psi_h !> universal functions (momentum) & (heat) [n/d]
real phi_m, phi_h !> stability functions (momentum) & (heat) [n/d]
real psi_m, psi_h !< universal functions (momentum) & (heat) [n/d]
real phi_m, phi_h !< stability functions (momentum) & (heat) [n/d]
real Km !> eddy viscosity coeff. at h [m^2/s]
real Pr_t_inv !> invese Prandt number [n/d]
real Km !< eddy viscosity coeff. at h [m^2/s]
real Pr_t_inv !< invese Prandt number [n/d]
real Cm, Ct !> transfer coeff. for (momentum) & (heat) [n/d]
real Cm, Ct !< transfer coeff. for (momentum) & (heat) [n/d]
integer surface_type !> surface type = (ocean || land)
integer surface_type !< surface type = (ocean || land)
#ifdef SFX_CHECK_NAN
......@@ -197,12 +197,12 @@ contains
! universal functions
! --------------------------------------------------------------------------------
subroutine get_psi_neutral(psi_m, psi_h, h0_m, h0_t, B)
!> @brief universal functions (momentum) & (heat): neutral case
!< @brief universal functions (momentum) & (heat): neutral case
! ----------------------------------------------------------------------------
real, intent(out) :: psi_m, psi_h !> universal functions
real, intent(out) :: psi_m, psi_h !< universal functions
real, intent(in) :: h0_m, h0_t !> = z/z0_m, z/z0_h
real, intent(in) :: B !> = log(z0_m / z0_h)
real, intent(in) :: h0_m, h0_t !< = z/z0_m, z/z0_h
real, intent(in) :: B !< = log(z0_m / z0_h)
! ----------------------------------------------------------------------------
psi_m = log(h0_m)
......
module sfx_log_param
!> @brief log-roughness surface flux model parameters
!> @details all in SI units
!< @brief log-roughness surface flux model parameters
!< @details all in SI units
! modules used
! --------------------------------------------------------------------------------
......@@ -13,9 +13,9 @@ module sfx_log_param
! --------------------------------------------------------------------------------
!> von Karman constant [n/d]
!< von Karman constant [n/d]
real, parameter :: kappa = 0.40
!> inverse Prandtl (turbulent) number in neutral conditions [n/d]
!< inverse Prandtl (turbulent) number in neutral conditions [n/d]
real, parameter :: Pr_t_0_inv = 1.15
end module sfx_log_param
......@@ -20,31 +20,31 @@ program sfx_main
implicit none
! --------------------------------------------------------------------------------
!> dataset ID:
integer :: dataset_id
integer :: dataset_id !< dataset ID:
character(len = 256) :: dataset_name
integer, parameter :: dataset_MOSAiC = 1 !> MOSAiC campaign
integer, parameter :: dataset_IRGASON = 2 !> IRGASON data
integer, parameter :: dataset_SHEBA = 3 !> please spell 'SHIBA'
integer, parameter :: dataset_USER = 4 !> used defined dataset
integer, parameter :: dataset_MOSAiC = 1 !< MOSAiC campaign
integer, parameter :: dataset_IRGASON = 2 !< IRGASON data
integer, parameter :: dataset_SHEBA = 3 !< please spell 'SHIBA'
integer, parameter :: dataset_USER = 4 !< used defined dataset
!> sfx model ID:
integer :: model_id
integer :: model_id !< sfx model ID:
character(len = 256) :: model_name
integer, parameter :: model_esm = 0 !> ESM model
integer, parameter :: model_log = 1 !> LOG simplified model
integer, parameter :: model_esm = 0 !< ESM model
integer, parameter :: model_log = 1 !< LOG simplified model
! input/output data
! --------------------------------------------------------------------------------
type(meteoDataVecType) :: meteo !> meteorological data (input)
type(meteoDataVecType) :: meteo !< meteorological data (input)
type(meteoDataType) :: meteo_cell
type(sfxDataVecType) :: sfx !> surface fluxes (output)
type(sfxDataVecType) :: sfx !< surface fluxes (output)
type(numericsType_esm) :: numerics_esm !> surface flux module (ESM) numerics parameters
type(numericsType_log) :: numerics_log !> surface flux module (LOG) numerics parameters
type(numericsType_esm) :: numerics_esm !< surface flux module (ESM) numerics parameters
type(numericsType_log) :: numerics_log !< surface flux module (LOG) numerics parameters
integer :: num !> number of 'cells' in input
integer :: num !< number of 'cells' in input
! --- input/output filenames
......@@ -83,9 +83,9 @@ program sfx_main
! --------------------------------------------------------------------------------
!> @brief define model & dataset
model_id = model_esm !> default = ESM
dataset_id = dataset_MOSAiC !> default = MOSAiC
!< @brief define model & dataset
model_id = model_esm !< default = ESM
dataset_id = dataset_MOSAiC !< default = MOSAiC
is_output_set = 0
nmax = 0
......@@ -175,7 +175,7 @@ program sfx_main
end do
!> @brief set name for specific model
!< @brief set name for specific model
if (model_id == model_esm) then
model_name = "ESM"
else if (model_id == model_log) then
......@@ -185,7 +185,7 @@ program sfx_main
stop
end if
!> @brief set name & filenames for specific dataset
!< @brief set name & filenames for specific dataset
if (dataset_id == dataset_MOSAiC) then
dataset_name = 'MOSAiC'
......@@ -218,7 +218,7 @@ program sfx_main
write(*, *) ' filename[OUT] = ', trim(filename_out)
!> @brief define number of cells
!< @brief define number of cells
open(1, file= filename_in, status ='old')
status = 0
......@@ -239,18 +239,18 @@ program sfx_main
end if
!> @brief allocate input & output data
!< @brief allocate input & output data
call allocate_meteo_vec(meteo, num)
call allocate_sfx_vec(sfx, num)
!> @brief read input data common parameters
!< @brief read input data common parameters
open(1, file = filename_in_common, status = 'old')
read(1, *) meteo_cell%h, meteo_cell%z0_m
close(1)
!> @brief read input data
!< @brief read input data
open(1, file = filename_in, status = 'old')
do i = 1, num
read(1, *) meteo_cell%U, meteo_cell%dT, meteo_cell%Tsemi, meteo_cell%dQ
......@@ -265,7 +265,7 @@ program sfx_main
close(1)
!> @brief calling flux module
!< @brief calling flux module
if (model_id == model_esm) then
call get_surface_fluxes_vec_esm(sfx, meteo, numerics_esm, num)
else if (model_id == model_log) then
......@@ -273,7 +273,7 @@ program sfx_main
end if
!> @brief write output data
!< @brief write output data
call write_ascii_vec11(filename_out, &
sfx%zeta, sfx%Rib, &
sfx%Re, sfx%B, sfx%z0_m, sfx%z0_t, &
......@@ -281,7 +281,7 @@ program sfx_main
sfx%Cm,sfx%Ct, sfx%Km, sfx%Pr_t_inv, num, '(11(f10.4,3x))', status)
!> @brief deallocate input & output data
!< @brief deallocate input & output data
call deallocate_meteo_vec(meteo)
call deallocate_sfx_vec(sfx)
......
module sfx_phys_const
!> @brief general physics constants
!> @details all in SI units
!< @brief general physics constants
!< @details all in SI units
implicit none
public
real, parameter :: g = 9.81 !> acceleration due to gravity [m/s^2]
real, parameter :: g = 9.81 !< acceleration due to gravity [m/s^2]
real, parameter :: nu_air = 0.000015e0 !> kinematic viscosity of air [m^2/s]
real, parameter :: Pr_m = 0.71 !> molecular Prandtl number (air) [n/d]
real, parameter :: nu_air = 0.000015e0 !< kinematic viscosity of air [m^2/s]
real, parameter :: Pr_m = 0.71 !< molecular Prandtl number (air) [n/d]
end module sfx_phys_const
#include "../includeF/sfx_def.fi"
module sfx_surface
!> @brief surface roughness parameterizations
!< @brief surface roughness parameterizations
! modules used
! --------------------------------------------------------------------------------
......@@ -21,16 +21,16 @@ module sfx_surface
! *: add surface type as input value
integer, public, parameter :: surface_ocean = 0 !> ocean surface
integer, public, parameter :: surface_land = 1 !> land surface
integer, public, parameter :: surface_lake = 2 !> lake surface
integer, public, parameter :: surface_ocean = 0 !< ocean surface
integer, public, parameter :: surface_land = 1 !< land surface
integer, public, parameter :: surface_lake = 2 !< lake surface
! --------------------------------------------------------------------------------
real, parameter, private :: kappa = 0.40 !> von Karman constant [n/d]
real, parameter, private :: kappa = 0.40 !< von Karman constant [n/d]
! --------------------------------------------------------------------------------
!> Charnock parameters
!> z0 = Re_visc_min * (nu / u_dyn) + gamma_c * (u_dyn^2 / g)
!< Charnock parameters
!< z0 = Re_visc_min * (nu / u_dyn) + gamma_c * (u_dyn^2 / g)
! --------------------------------------------------------------------------------
real, parameter :: gamma_c = 0.0144
......@@ -41,17 +41,17 @@ module sfx_surface
real, parameter :: c2_charnock = Re_visc_min * nu_air * c1_charnock
! --------------------------------------------------------------------------------
!> Re fully roughness minimum value [n/d]
!< Re fully roughness minimum value [n/d]
real, parameter :: Re_rough_min = 16.3
!> roughness model coeff. [n/d]
!> --- transitional mode
!> B = log(z0_m / z0_t) = B1 * log(B3 * Re) + B2
!< roughness model coeff. [n/d]
!< --- transitional mode
!< B = log(z0_m / z0_t) = B1 * log(B3 * Re) + B2
real, parameter :: B1_rough = 5.0 / 6.0
real, parameter :: B2_rough = 0.45
real, parameter :: B3_rough = kappa * Pr_m
!> --- fully rough mode (Re > Re_rough_min)
!> B = B4 * Re^(B2)
!< --- fully rough mode (Re > Re_rough_min)
!< B = B4 * Re^(B2)
real, parameter :: B4_rough =(0.14 * (30.0**B2_rough)) * (Pr_m**0.8)
real, parameter :: B_max_land = 2.0
......@@ -64,12 +64,12 @@ contains
! --------------------------------------------------------------------------------
subroutine get_charnock_roughness(z0_m, u_dyn0, U, h, maxiters)
! ----------------------------------------------------------------------------
real, intent(out) :: z0_m !> aerodynamic roughness [m]
real, intent(out) :: u_dyn0 !> dynamic velocity in neutral conditions [m/s]
real, intent(out) :: z0_m !< aerodynamic roughness [m]
real, intent(out) :: u_dyn0 !< dynamic velocity in neutral conditions [m/s]
real, intent(in) :: h !> constant flux layer height [m]
real, intent(in) :: U !> abs(wind speed) [m/s]
integer, intent(in) :: maxiters !> maximum number of iterations
real, intent(in) :: h !< constant flux layer height [m]
real, intent(in) :: U !< abs(wind speed) [m/s]
integer, intent(in) :: maxiters !< maximum number of iterations
! ----------------------------------------------------------------------------
! --- local variables
......@@ -112,12 +112,12 @@ contains
subroutine get_thermal_roughness(z0_t, B, &
z0_m, Re, surface_type)
! ----------------------------------------------------------------------------
real, intent(out) :: z0_t !> thermal roughness [m]
real, intent(out) :: B !> = log(z0_m / z0_t) [n/d]
real, intent(out) :: z0_t !< thermal roughness [m]
real, intent(out) :: B !< = log(z0_m / z0_t) [n/d]
real, intent(in) :: z0_m !> aerodynamic roughness [m]
real, intent(in) :: Re !> roughness Reynolds number [n/d]
integer, intent(in) :: surface_type !> = [ocean] || [land] || [lake]
real, intent(in) :: z0_m !< aerodynamic roughness [m]
real, intent(in) :: Re !< roughness Reynolds number [n/d]
integer, intent(in) :: surface_type !< = [ocean] || [land] || [lake]
! ----------------------------------------------------------------------------
! --- local variables
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment