From 5efe82bf4e71f943be3935d1e7e5b601bd23c6d8 Mon Sep 17 00:00:00 2001 From: bderembl Date: Mon, 8 Dec 2025 14:33:30 +0100 Subject: [PATCH] user input exchange coefs --- src/airsea/CMakeLists.txt | 1 + src/airsea/airsea.F90 | 12 ++- src/airsea/airsea_fluxes.F90 | 2 + src/airsea/airsea_variables.F90 | 1 + src/airsea/constant_cd.F90 | 136 ++++++++++++++++++++++++++++++++ 5 files changed, 151 insertions(+), 1 deletion(-) create mode 100644 src/airsea/constant_cd.F90 diff --git a/src/airsea/CMakeLists.txt b/src/airsea/CMakeLists.txt index 05060350e..7709364e9 100644 --- a/src/airsea/CMakeLists.txt +++ b/src/airsea/CMakeLists.txt @@ -12,6 +12,7 @@ add_library(airsea longwave_radiation.F90 fairall.F90 kondo.F90 + constant_cd.F90 solar_zenith_angle.F90 albedo_water.F90 shortwave_radiation.F90 diff --git a/src/airsea/airsea.F90 b/src/airsea/airsea.F90 index 20efa6d59..7198499c1 100644 --- a/src/airsea/airsea.F90 +++ b/src/airsea/airsea.F90 @@ -169,6 +169,7 @@ subroutine init_airsea_yaml() ! {\tt fluxes\_method} & Select which parameterisation to use for latent and sensible fluxes: \\ ! & 1: Kondo (1975) \\ ! & 2: Fairall et al. (1996) \\ +! & 3: user input exchange coefs (cdd, chd, ced) \\ ! {\tt longwave\_radiation\_method} & Select which parameterisation to use: \\ ! & 3: Clark et al. (1974) \\ ! & 4: Hastenrath and Lamb (1978) \\ @@ -248,7 +249,7 @@ subroutine init_airsea_yaml() twig => branch%get_typed_child('fluxes', 'heat and momentum fluxes') call twig%get(fluxes_method, 'method', 'method to calculate fluxes from meteorological conditions', & - options=(/option(0, 'use prescribed fluxes', 'off'), option(1, 'Kondo (1975)', 'kondo'), option(2, 'Fairall et al. (1996)', 'fairall')/), default=0) + options=(/option(0, 'use prescribed fluxes', 'off'), option(1, 'Kondo (1975)', 'kondo'), option(2, 'Fairall et al. (1996)', 'fairall'), option(3, 'prescribed exchange coefs', 'constant_cd')/), default=0) call twig%get(heat_input, 'heat', 'prescribed total heat flux (sensible, latent and net longwave-radiation)', 'W/m^2', & default=0._rk) call twig%get(tx_input, 'tx', 'prescribed momentum flux in West-East direction', 'Pa', & @@ -300,6 +301,9 @@ subroutine init_airsea_yaml() default=0._rk, display=display_advanced) call branch%get(sss_input, 'sss', 'observed surface salinity', 'psu', & default=0._rk, display=display_advanced) + call branch%get(const_cdd, 'cdd', 'momentum exchange coefficient', '1', default=0._rk) + call branch%get(const_chd, 'chd', 'heat exchange coefficient', '1', default=0._rk) + call branch%get(const_ced, 'ced', 'humidity exchange coefficient', '1', default=0._rk) LEVEL2 'done' return end subroutine init_airsea_yaml @@ -326,6 +330,7 @@ subroutine post_init_airsea(lat,lon) ! {\tt fluxes\_method} & Select which parameterisation to use for latent and sensible fluxes: \\ ! & 1: Kondo (1975) \\ ! & 2: Fairall et al. (1996) \\ +! & 3: user input cdd, chd, ced \\ ! {\tt longwave\_radiation\_method} & Select which parameterisation to use: \\ ! & 1: Clark et al. (1974) \\ ! & 2: Hastenrath and Lamb (1978) \\ @@ -481,6 +486,11 @@ subroutine post_init_airsea(lat,lon) LEVEL3 'using Kondo formulation' case(2) LEVEL3 'using Fairall et. all formulation' + case(3) + LEVEL3 'user input exchange coefficients' + LEVEL3 'cdd=',const_cdd + LEVEL3 'chd=',const_chd + LEVEL3 'ced=',const_ced case default end select select case (ql_input%method) diff --git a/src/airsea/airsea_fluxes.F90 b/src/airsea/airsea_fluxes.F90 index 6a2542b4b..48ede1574 100644 --- a/src/airsea/airsea_fluxes.F90 +++ b/src/airsea/airsea_fluxes.F90 @@ -38,6 +38,8 @@ subroutine airsea_fluxes(method,sst,airt,u10,v10,precip, & call kondo(sst,airt,u10,v10,precip,evap,taux,tauy,qe,qh) case (2) ! Fairall et. all call fairall(sst,airt,u10,v10,precip,evap,taux,tauy,qe,qh) + case (3) ! Constant cd + call constant_cd(sst,airt,u10,v10,precip,evap,taux,tauy,qe,qh) case default end select diff --git a/src/airsea/airsea_variables.F90 b/src/airsea/airsea_variables.F90 index b2d9bd632..e10fc49cf 100644 --- a/src/airsea/airsea_variables.F90 +++ b/src/airsea/airsea_variables.F90 @@ -35,6 +35,7 @@ module airsea_variables REALTYPE, public :: L REALTYPE, public :: rhoa REALTYPE, public, target :: ta ! 2m air temperature (degree_Celsius) + REALTYPE, public :: const_cdd, const_ced, const_chd logical, public :: rain_impact logical, public :: calc_evaporation ! diff --git a/src/airsea/constant_cd.F90 b/src/airsea/constant_cd.F90 new file mode 100644 index 000000000..ff7fb1220 --- /dev/null +++ b/src/airsea/constant_cd.F90 @@ -0,0 +1,136 @@ +#include "cppdefs.h" +!----------------------------------------------------------------------- +!BOP +! +! !ROUTINE: Heat and momemtum fluxes computed with constant transfert coefs +! +! !INTERFACE: + subroutine constant_cd(sst,airt,u10,v10,precip,evap,taux,tauy,qe,qh) +! +! !DESCRIPTION: +! Based on the model sea surface temperature, the wind vector +! at 10 m height, the air pressure at 2 m, the dry air +! temperature and the air pressure at 2 m, and the relative +! humidity (either directly given or recalculated from the +! wet bulb or the dew point temperature), +! this routine the surface +! momentum flux vector, $(\tau_x^s,\tau_y^s)$, +! the latent heat flux, $Q_e$, +! and the sensible heat flux, $Q_h$, according to the +! bulk formulae. +! +! \begin{equation} +! \begin{array}{rcl} +! \tau_x^s &=& c_{dd} \rho_a W_x W \\ \\ +! \tau_y^s &=& c_{dd} \rho_a W_y W \\ \\ +! Q_e &=& c_{ed} L \rho_a W (q_s-q_a) \\ \\ +! Q_h &=& c_{hd} C_{pa} \rho_a W (T_w-T_a) +! \end{array} +! \end{equation} +! +! with the air density $\rho_a$, the wind speed at 10 m, $W$, +! the $x$- and the $y$-component of the wind velocity vector, +! $W_x$ and $W_y$, respectively, the specific evaporation heat of sea water, +! $L$, the specific saturation humidity, $q_s$, the actual +! specific humidity $q_a$, the specific heat capacity of air at constant +! pressure, $C_{pa}$, the sea surface temperature, $T_w$ and the +! dry air temperature, $T_a$. +! +! !USES: + use airsea_variables, only: kelvin,const06,rgas,rho_0 + use airsea_variables, only: qs,qa,rhoa + use airsea_variables, only: cpa,cpw + use airsea_variables, only: rain_impact,calc_evaporation + use airsea_variables, only: const_cdd, const_ced, const_chd + IMPLICIT NONE +! +! !INPUT PARAMETERS: + REALTYPE, intent(in) :: sst,airt,u10,v10,precip +! +! !INPUT/OUTPUT PARAMETERS: + REALTYPE, intent(inout) :: evap +! +! !OUTPUT PARAMETERS: + REALTYPE, intent(out) :: taux,tauy,qe,qh +! +! !REVISION HISTORY: +! Original author(s): Bruno Deremble +! +! !LOCAL VARIABLES: + REALTYPE :: w,L + + REALTYPE :: x1,x2,x3 + REALTYPE :: ta,ta_k,tw,tw_k + REALTYPE :: cdd,chd,ced + REALTYPE :: tmp,rainfall,cd_rain + REALTYPE, parameter :: eps=1.0e-12 +!EOP +!----------------------------------------------------------------------- +!BOC + w = sqrt(u10*u10+v10*v10) + L = (2.5-0.00234*sst)*1.e6 + + if (sst .lt. 100.) then + tw = sst + tw_k= sst+kelvin + else + tw = sst-kelvin + tw_k= sst + end if + + if (airt .lt. 100.) then + ta_k = airt + kelvin + ta = airt + else + ta = airt - kelvin + ta_k = airt + end if + + + cdd = const_cdd + chd = const_chd + ced = const_ced + + + qh=-chd*cpa*rhoa*w*(sst-airt) ! sensible + qe=-ced*L*rhoa*w*(qs-qa) ! latent + +! compute sensible heatflux correction due to rain fall + if (rain_impact) then +! units of qs and qa - should be kg/kg + rainfall=precip * 1000. ! (convert from m/s to kg/m2/s) + x1 = 2.11e-5*(ta_k/kelvin)**1.94 + x2 = 0.02411*(1.0+ta*(3.309e-3-1.44e-6*ta))/(rhoa*cpa) + x3 = qa * L /(rgas * ta_K * ta_K) + cd_rain = 1.0/(1.0+const06*(x3*L*x1)/(cpa*x2)) + cd_rain = cd_rain*cpw*((tw-ta) + (qs-qa)*L/cpa) + qh = qh - rainfall * cd_rain + end if + +! calculation of evaporation/condensation in m/s + if (rain_impact .and. calc_evaporation) then +! ced from latent heatflux for moisture flux + evap = rhoa/rho_0*ced*w*(qa-qs) + else + evap = _ZERO_ + end if + + tmp = cdd*rhoa*w + taux = tmp*u10 + tauy = tmp*v10 + +! Compute momentum flux (N/m2) due to rainfall (kg/m2/s). +! according to Caldwell and Elliott (1971, JPO) + if ( rain_impact ) then + tmp = 0.85d0 * rainfall + taux = taux + tmp * u10 + tauy = tauy + tmp * v10 + end if + + return + end subroutine constant_cd +!EOC + +!----------------------------------------------------------------------- +! Copyright by the GOTM-team under the GNU Public License - www.gnu.org +!-----------------------------------------------------------------------