How to add new variables in POP? see here
Unit transfer for surface flux terms
module constants give an explanation on units convertion.
...
real (r8), public :: &
grav ,&! gravit. accel. (cm/s^2)
omega ,&! angular vel. of Earth 1/s
radius ,&! radius of Earth (cm)
rho_air ,&! ambient air density (kg/m^3)
rho_fw ,&! density of fresh water (g/cm^3)
rho_sw ,&! density of salt water (g/cm^3)
cp_sw ,&! specific heat salt water
cp_air ,&! heat capacity of air (J/kg/K)
....
momentum_factor ,&! wind stress (N/m^2) to vel flux (cm^2/s^2)
hflux_factor ,&! heat flux (W/m^2) to temp flux (C*cm/s)
fwflux_factor ,&! fw flux (kg/m^2/s) to salt((msu/psu)*cm/s)
salinity_factor ,&! fw flux (kg/m^2/s) to salt flux (msu*cm/s)
sflux_factor ,&! salt flux (kg/m^2/s) to salt flux (msu*cm/s)
...
subroutine init_constants
...
rho_air = 1.2_r8 ! ambient air density (kg/m^3)
rho_sw = 4.1_r8/3.996_r8 ! density of salt water (g/cm^3)
rho_fw = 1.0_r8 ! avg. water density (g/cm^3)
cp_sw = 3.996e7_r8 ! specific heat salt water
cp_air = 1005.0_r8 ! heat capacity of air (J/kg/K)
ocn_ref_salinity = 34.7_r8 ! (psu)
...
!-----------------------------------------------------------------------
!
! convert heat, solar flux (W/m^2) to temperature flux (C*cm/s):
! --------------------------------------------------------------
! heat_flux in (W/m^2) = (J/s/m^2) = 1000(g/s^3)
! density of seawater rho_sw in (g/cm^3)
! specific heat of seawater cp_sw in (erg/g/C) = (cm^2/s^2/C)
!
! temp_flux = heat_flux / (rho_sw*cp_sw)
! temp_flux (C*cm/s) = heat_flux (W/m^2)
! * 1000 (g/s^3)/(W/m^2)
! / [(rho_sw*cp_sw) (g/cm/s^2/C)]
!
! = heat_flux (W/m^2)
! * hflux_factor (C*cm/s)/(W/m^2)
!
! ==> hflux_factor = 1000/(rho_sw*cp_sw)
!
!-----------------------------------------------------------------------
hflux_factor = 1000.0_r8/(rho_sw*cp_sw)
!-----------------------------------------------------------------------
!
! convert fresh water flux (kg/m^2/s) to virtual salt flux (msu*cm/s):
! --------------------------------------------------------------------
! ocean reference salinity in (o/oo=psu)
! density of freshwater rho_fw = 1.0 (g/cm^3)
! h2o_flux in (kg/m^2/s) = 0.1 (g/cm^2/s)
!
! salt_flux = - h2o_flux * ocn_ref_salinity / rho_fw
! salt_flux (msu*cm/s) = - h2o_flux (kg/m^2/s)
! * ocn_ref_salinity (psu)
! * 1.e-3 (msu/psu)
! * 0.1 (g/cm^2/s)/(kg/m^2/s)
! / 1.0 (g/cm^3)
! = - h2o_flux (kg/m^2/s)
! * ocn_ref_salinity (psu)
! * fwflux_factor (cm/s)(msu/psu)/(kg/m^2/s)
!
! ==> fwflux_factor = 1.e-4
!
! salt_flux(msu*cm/s) = h2oflux(kg/m^2/s) * salinity_factor
!
! ==> salinity_factor = - ocn_ref_salinity(psu) * fwflux_factor
!
!-----------------------------------------------------------------------
fwflux_factor = 1.e-4_r8
salinity_factor = -ocn_ref_salinity*fwflux_factor
!-----------------------------------------------------------------------
!
! convert salt flux (kg/m^2/s) to salt flux (msu*cm/s):
! -----------------------------------------------------
! density of freshwater rho_fw = 1.0 (g/cm^3)
! salt_flux_kg in (kg/m^2/s) = 0.1 (g/cm^2/s)
!
! salt_flux = - h2o_flux * ocn_ref_salinity / rho_fw
! salt_flux (msu*cm/s) = salt_flux_kg (kg/m^2/s)
! * 0.1 (g/cm^2/s)/(kg/m^2/s)
! / 1.0 (g/cm^3)
! = salt_flux_kg (kg/m^2/s)
! * sflux_factor (msu*cm/s)/(kg/m^2/s)
!
! ==> sflux_factor = 0.1
!
!-----------------------------------------------------------------------
sflux_factor = 0.1_r8
!-----------------------------------------------------------------------
!
! convert fresh water mass flux (kg/m^2/s) to fresh water flux (cm/s):
! --------------------------------------------------------------------
! density of freshwater rho_fw = 1.0 (g/cm^3)
! h2o_flux in (kg/m^2/s) = 0.1 (g/cm^2/s)
!
! fw_flux = h2o_flux / rho_fw
! fw_flux (cm/s) = h2o_flux (kg/m^2/s)
! * 0.1 (g/cm^2/s)/(kg/m^2/s)
! / 1.0 (g/cm^3)
! = h2o_flux (kg/m^2/s)
! * fwmass_to_fwflux (cm/s)/(kg/m^2/s)
!
! ==> fwmass_to_fwflux = 0.1
!
!-----------------------------------------------------------------------
fwmass_to_fwflux = 0.1_r8
Derivation
SHF convertion
The erg is a unit of energy equal to 10^−7 joules (100 nJ). It originated in the centimetre–gram–second (CGS) system of units. It is not an SI unit. 1 erg = 10^−7 J = 1 g⋅cm^2/s^2.
C is for degC.
Temperature and salinity restoring term in flux forms can be written as follows:
$F_T = HρC_p\frac{T^{obs}-T^{eq}}{τ_T} = μ_T(T^{obs}-T^{eq})\quad unit:w/m^2$
$F_S = Hρ\frac{S^{obs}-S^{eq}}{τ_S} = μ_S(S^{obs}-S^{eq})\quad unit: kg/m^2/s$
Unit of temp restoring term $\frac{T^{obs}-T^{eq}}{τ_T}\quad$ calculated in forcing_pt_interior.F90 is K/s or C/s
Unit of sainlity restoring term $\frac{S^{obs}-S^{eq}}{τ_S}\quad$ calculated in forcing_s_interior.F90 is g/kg/s
Note that
$W/m^2\rightarrow J/s/m^2\rightarrow (kgm^2s{-2})s^{-1}m^{-2}\rightarrow 1000gs^{-3}$
Converting temp restoring term to temp flux term:
$\frac{T^{obs}-T^{eq}}{τ_T}\rightarrow ρC_p*\frac{T^{obs}-T^{eq}}{τ_T}$
This indicates that temp flux unit converting coefficient is:
rho_sw * cp_sw /1000 = 1/hflux_factor
where hflux_factor = 1000/(rho_sw*cp_sw)
Note that cp_sw = 3.996e7_r8 erg/g/C = 3996*10^4 erg/g/C, which means 10^4 is merged in cp_sw with the unit of erg/g/C
Continue converting temp flux to heat flux:
$ρC_p\frac{T^{obs}-T^{eq}}{τ_T}\rightarrow HρC_p\frac{T^{obs}-T^{eq}}{τ_T}\quad$
$gs^{-3}cm^{-1}\rightarrow gs^{-3}cm^{-1}cm\rightarrow gs^{-3}\rightarrow W/m^2$
Thus, 1000 * rho_sw * cp_sw*H = 1/hflux_factor * H
We can diagnose heat flux F from model and observational temperature by:
F = [4000 (JKg-1K-1) *1025 (Kg/m3) * H (m)] * [Tobs (K) - Tmodel (K)]/(τ * 86400 (s))
A transfer factor hflux_factor is
hflux_factor = [4000 (JKg-1K-1) *1025 (Kg/m3) * H (m)] /(τ * 86400 (s)) Eq.1
with a unit of W/m2/K.
Check:
There are some examples in module forcing_shf:
! shf_weak_restore= weak(non-ice) restoring heatflux per degree (W/m2/C)
! shf_strong_restore= strong (ice) .. .. .. .. .. ..
!
! to calculate restoring factors, use mixed layer of 50m,
! and restoring time constant tau (days):
!
! Q (W/m2/C)
! tau = 6 : 386.0
! tau = 30 : 77.2
! tau = 182.5: 12.0
! tau = 365 : 6.0
! tau = 730 : 3.0
! tau = Inf : 0.0
If a 10m temperature restoring is conducted, the factor to transfer a flux can be calculate as the following two ways, which are consistent!
Way1: 386 (Q: tau=6, H=50m) * 6 /10 (day) /5 = 46.3
Way2: 4000 x 1025 x 10/(10 x 86400) = 46.3
SFWF convertion
We notice that salinity_factor = -ocn_ref_salinity*fwflux_factor, but why there is a minus sign?
We know that a positive sign in freshwater flux means freshwater enter the ocean (downward), and a minus sign means ocean export freshwater (upward). The salinity will be decrease if ocean gains freshwater and will be increase if ocean lose freshwater. In this case, a minus sign can be associated with the salinity change in a salinity equation.
We can diagnose freshwater flux F from model and observational salinity by:
F = -[1000 (Kg/m3) * H (m)] * [Sobs (kg/kg) - Smodel (kg/kg)] / (S0 (kg/kg) * τ * 86400 (s))
or
F = -[1000 (Kg/m3) * H (m)] * [Sobs (g/kg) - Smodel (g/kg)] / (S0 (g/kg) * τ * 86400 (s))
Unit:
$(kgm^{-3}m)(kg/kg)/(kg/kg s)\rightarrow kgm^{-2}s^{-1}$
A transfer factor salinity_factor is
salinity_factor = -[1000 (Kg/m3) * H (m)] /(S0 (kg/kg) * τ * 86400 (s)) Eq.2
with a unit of kg/m2/s/msu.
S0 = 0.0347 msu
Note that msu = g/g or kg/kg; psu = g/kg
Check:
There are some examples in module forcing_sfwf:
! sfwf_weak_restore= weak(non-ice) restoring h2o flux per msu (kg/s/m^2/msu)
! sfwf_strong_restore= strong (ice) .. .. .. .. .. ..
!
! to calculate restoring factors, use mixed layer of 50m,
! and restoring time constant tau (days):
!
! F (kg/s/m^2/msu)
! tau = 6 : 2.77
! tau = 30 : 0.55
! tau = 182.5: 0.092
! tau = 365 : 0.046
! tau = 730 : 0.023
! tau = Inf : 0.0
If a 10m salinity restoring is conducted, the factor to transfer a flux can be calculate as the following two ways, which are consistent!
Way1: 2.77 (F: tau=6, H=50m) * 6 /10 (day) /5 = 0.33
Way2: (1000 x 10)/(10 x 86400 x 0.0347) = 0.33
Last update: 08/25/2020