source: trunk/LMDZ.GENERIC/libf/phystd/calcul_fluxs_mod.F90 @ 3300

Last change on this file since 3300 was 3100, checked in by bhatnags, 13 months ago

Generic-PCM

This commit updates the slab ocean module to a parallelisable dynamic slab ocean module. This is particularly relevant if you want to be able to use oceanic heat transport in parallel mode.

It has the following features:

(a) Computes sea ice creation and evolution.
(b) Snow has thermodynamic properties.
(c) Computes oceanic horizontal transport (diffusion & surface-wind driven Ekman transport).
(d) Can be used in parallel mode.

Required callphys.def flags:
The slab ocean and its dependencies can be activated with the following flags (already added to deftank):
## Ocean options
## ~
# Model slab-ocean (Main flag for slab ocean)
ok_slab_ocean = .true.
# The following flags can only be set to true if ok_slab_ocean is true
# Ekman transport
slab_ekman = .true.
# Ekman zonal advection
slab_ekman_zonadv = .true.
# Horizontal diffusion (default coef_hdiff=25000., can be changed)
slab_hdiff = .true.
# Slab-ocean timestep (in physics timesteps)
cpl_pas = 1
# Gent-McWilliams? Scheme (can only be true if slab_ekman is true)
slab_gm = .true.

Notes:
In the current state, the model crashes if moistadjustment = .true. Unsure whether this is due to the slab or is an inherent issue with moistadj (under investigation).

SB and EM

File size: 2.1 KB
Line 
1!
2! $Id: calcul_fluxs_mod.F90 3102 2017-12-03 20:27:42Z oboucher $
3!
4MODULE calcul_fluxs_mod
5
6
7CONTAINS
8
9  SUBROUTINE calcul_flux_wind(knon, dtime, &
10       u0, v0, u1, v1, gustiness, cdrag_m, &
11       AcoefU, AcoefV, BcoefU, BcoefV, &
12       p1lay, t1lay, &
13       flux_u1, flux_v1)
14
15    USE dimphy
16    USE comcstfi_mod, ONLY: r
17!    INCLUDE "YOMCST.h"
18!    INCLUDE "clesphys.h"
19
20! Input arguments
21!****************************************************************************************
22    INTEGER, INTENT(IN)                  :: knon
23    REAL, INTENT(IN)                     :: dtime
24    REAL, DIMENSION(klon), INTENT(IN)    :: u0, v0  ! u and v at niveau 0
25    REAL, DIMENSION(klon), INTENT(IN)    :: u1, v1, gustiness  ! u and v at niveau 1
26    REAL, DIMENSION(klon), INTENT(IN)    :: cdrag_m ! cdrag pour momentum
27    REAL, DIMENSION(klon), INTENT(IN)    :: AcoefU, AcoefV, BcoefU, BcoefV
28    REAL, DIMENSION(klon), INTENT(IN)    :: p1lay   ! pression 1er niveau (milieu de couche)
29    REAL, DIMENSION(klon), INTENT(IN)    :: t1lay   ! temperature
30! Output arguments
31!****************************************************************************************
32    REAL, DIMENSION(klon), INTENT(OUT)   :: flux_u1
33    REAL, DIMENSION(klon), INTENT(OUT)   :: flux_v1
34
35! Local variables
36!****************************************************************************************
37    INTEGER                              :: i
38    REAL                                 :: mod_wind, buf
39
40!****************************************************************************************
41! Calculate the surface flux
42!
43!****************************************************************************************
44    DO i=1,knon
45       mod_wind = min_wind_speed + SQRT(gustiness(i)+(u1(i) - u0(i))**2 + (v1(i)-v0(i))**2)
46       buf = cdrag_m(i) * mod_wind * p1lay(i)/(r*t1lay(i))
47       flux_u1(i) = (AcoefU(i) - u0(i)) / (1/buf - BcoefU(i)*dtime )
48       flux_v1(i) = (AcoefV(i) - v0(i)) / (1/buf - BcoefV(i)*dtime )
49    END DO
50
51  END SUBROUTINE calcul_flux_wind
52!
53!****************************************************************************************
54!
55END MODULE calcul_fluxs_mod
Note: See TracBrowser for help on using the repository browser.