Changeset 5117 for LMDZ6/branches/Amaury_dev/libf/phylmd/Ocean_skin
- Timestamp:
- Jul 24, 2024, 4:23:34 PM (6 months ago)
- Location:
- LMDZ6/branches/Amaury_dev/libf/phylmd/Ocean_skin
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/Amaury_dev/libf/phylmd/Ocean_skin/bulk_flux_m.F90
r5116 r5117 8 8 u, t_ocean_1, s1, rain, hf, hlb, rnl, tau, rhoa, xlv, rf, dtime, rns) 9 9 10 useconfig_ocean_skin_m, ONLY: jwarm, jcool, rain_effect11 useMicrolayer_m, ONLY: Microlayer12 usemom_flux_rain_m, ONLY: mom_flux_rain13 useNear_Surface_m, ONLY: Near_Surface, depth14 usetherm_expans_m, ONLY: therm_expans10 USE config_ocean_skin_m, ONLY: jwarm, jcool, rain_effect 11 USE Microlayer_m, ONLY: Microlayer 12 USE mom_flux_rain_m, ONLY: mom_flux_rain 13 USE Near_Surface_m, ONLY: Near_Surface, depth 14 USE therm_expans_m, ONLY: therm_expans 15 15 16 real, intent(out):: tkt(:)16 REAL, INTENT(OUT):: tkt(:) 17 17 ! thickness of cool skin (microlayer), in m 18 18 19 real, intent(out):: tks(:)19 REAL, INTENT(OUT):: tks(:) 20 20 ! thickness of mass diffusion layer (microlayer), in m 21 21 22 real, intent(out):: taur(:) ! momentum flux due to rain, in Pa22 REAL, INTENT(OUT):: taur(:) ! momentum flux due to rain, in Pa 23 23 24 real, intent(out):: dter(:)24 REAL, INTENT(OUT):: dter(:) 25 25 ! Temperature variation in the diffusive microlayer, that is 26 26 ! ocean-air interface temperature minus subskin temperature. In K. 27 27 28 real, intent(out):: dser(:)28 REAL, INTENT(OUT):: dser(:) 29 29 ! Salinity variation in the diffusive microlayer, that is ocean-air 30 30 ! interface salinity minus subskin salinity. In ppt. 31 31 32 real, intent(out):: t_int(:) ! interface temperature, in K33 real, intent(out):: s_int(:) ! interface salinity, in ppt32 REAL, INTENT(OUT):: t_int(:) ! interface temperature, in K 33 REAL, INTENT(OUT):: s_int(:) ! interface salinity, in ppt 34 34 35 real, intent(inout):: ds_ns(:)35 REAL, INTENT(INOUT):: ds_ns(:) 36 36 ! "delta salinity near surface". Salinity variation in the 37 37 ! near-surface turbulent layer. That is subskin salinity minus 38 38 ! foundation salinity. In ppt. 39 39 40 real, intent(inout):: dt_ns(:)40 REAL, INTENT(INOUT):: dt_ns(:) 41 41 ! "delta temperature near surface". Temperature variation in the 42 42 ! near-surface turbulent layer. That is subskin temperature minus 43 43 ! foundation temperature. (Can be negative.) In K. 44 44 45 real, intent(in):: u(:)45 REAL, INTENT(IN):: u(:) 46 46 ! Wind speed relative to the sea surface, i. e. taking current 47 47 ! vector into account. In m s-1. 48 48 49 real, intent(in):: t_ocean_1(:) ! input sea temperature, at depth_1, in K50 real, intent(in):: S1(:) ! salinity at depth_1, in ppt49 REAL, INTENT(IN):: t_ocean_1(:) ! input sea temperature, at depth_1, in K 50 REAL, INTENT(IN):: S1(:) ! salinity at depth_1, in ppt 51 51 52 real, intent(in):: rain(:)52 REAL, INTENT(IN):: rain(:) 53 53 ! rain mass flux, averaged on a timestep, in kg m-2 s-1 54 54 55 real, intent(in):: hf(:)55 REAL, INTENT(IN):: hf(:) 56 56 ! turbulent part of sensible heat flux, positive upward, in W m-2 57 57 58 real, intent(in):: hlb(:)58 REAL, INTENT(IN):: hlb(:) 59 59 ! latent heat flux at the surface, positive upward (W m-2) 60 60 61 real, intent(in):: rnl(:)61 REAL, INTENT(IN):: rnl(:) 62 62 ! net longwave radiation, positive upward, in W m-2 63 63 64 real, intent(in):: tau(:)64 REAL, INTENT(IN):: tau(:) 65 65 ! wind stress at the surface, turbulent part only, in Pa 66 66 67 real, intent(in):: rhoa(:) ! density of moist air (kg / m3)68 real, intent(in):: xlv(:) ! latent heat of evaporation (J / kg)67 REAL, INTENT(IN):: rhoa(:) ! density of moist air (kg / m3) 68 REAL, INTENT(IN):: xlv(:) ! latent heat of evaporation (J / kg) 69 69 70 real, intent(in):: rf(:)70 REAL, INTENT(IN):: rf(:) 71 71 ! sensible heat flux at the surface due to rainfall, in W m-2, 72 72 ! positive upward 73 73 74 real, intent(in):: dtime ! time step, in s75 real, intent(in):: rns(:) ! net downward shortwave radiation, in W m-274 REAL, INTENT(IN):: dtime ! time step, in s 75 REAL, INTENT(IN):: rns(:) ! net downward shortwave radiation, in W m-2 76 76 77 77 ! Local: 78 78 79 realal(size(t_ocean_1)) ! water thermal expansion coefficient (in K-1)80 realdels(size(t_ocean_1)), null_array(size(t_ocean_1))81 integeriter82 realt_subskin(size(t_ocean_1)) ! subskin temperature, in K83 reals_subskin(size(t_ocean_1)) ! subskin salinity, in ppt79 REAL al(size(t_ocean_1)) ! water thermal expansion coefficient (in K-1) 80 REAL dels(size(t_ocean_1)), null_array(size(t_ocean_1)) 81 INTEGER iter 82 REAL t_subskin(size(t_ocean_1)) ! subskin temperature, in K 83 REAL s_subskin(size(t_ocean_1)) ! subskin salinity, in ppt 84 84 85 real, parameter:: fxp = 1. - (0.28 * 0.014 &85 REAL, parameter:: fxp = 1. - (0.28 * 0.014 & 86 86 + 0.27 * 0.357 * (1. - exp(- depth / 0.357)) & 87 87 + .45 * 12.82 * (1.- exp(- depth / 12.82))) / depth … … 90 90 ! H. Bellenger 2016 91 91 92 realtau_with_min(size(t_ocean_1))92 REAL tau_with_min(size(t_ocean_1)) 93 93 ! modified wind stress, avoiding very low values 94 94 95 real, parameter:: tau_0 = 1e-3 ! in N m-295 REAL, parameter:: tau_0 = 1e-3 ! in N m-2 96 96 97 97 !------------------------------------------------------------------- 98 98 99 if(rain_effect) THEN99 IF (rain_effect) THEN 100 100 taur = mom_flux_rain(u, rain) 101 101 else 102 if (jwarm .or. jcool) null_array = 0.102 IF (jwarm .OR. jcool) null_array = 0. 103 103 taur = 0. 104 104 end if 105 105 106 if (jwarm .or. jcool) tau_with_min = tau + tau_0 * (1. - exp(- tau_0 / tau))106 IF (jwarm .OR. jcool) tau_with_min = tau + tau_0 * (1. - exp(- tau_0 / tau)) 107 107 108 if(Jwarm) THEN109 if(rain_effect) THEN108 IF (Jwarm) THEN 109 IF (rain_effect) THEN 110 110 CALL Near_Surface(al, t_subskin, s_subskin, ds_ns, dt_ns, & 111 111 tau_with_min, taur, hlb, rhoa, xlv, dtime, t_ocean_1, s1, rain, & … … 117 117 end if 118 118 else 119 if(Jcool) al = therm_expans(t_ocean_1)119 IF (Jcool) al = therm_expans(t_ocean_1) 120 120 t_subskin = t_ocean_1 121 121 s_subskin = s1 122 122 end if 123 123 124 if(Jcool) THEN124 IF (Jcool) THEN 125 125 ! First guess: 126 126 tkt = 0.001 … … 131 131 dels = rns * (0.065 + 11. * tkt - 6.6e-5 / tkt & 132 132 * (1. - exp(- tkt / 8e-4))) ! equation 16 Ohlmann 133 if(rain_effect) THEN133 IF (rain_effect) THEN 134 134 CALL Microlayer(dter, dser, tkt, tks, hlb, tau_with_min, & 135 135 s_subskin, al, xlv, taur, rf, rain, & -
LMDZ6/branches/Amaury_dev/libf/phylmd/Ocean_skin/config_ocean_skin_m.F90
r5116 r5117 7 7 logical, protected:: rain_effect 8 8 9 real, protected:: depth_1 = 20.9 REAL, protected:: depth_1 = 20. 10 10 ! Depth at which the temperature and salinity are input. Could be 11 11 ! the depth of a sensor, or the depth at the middle of the first … … 18 18 19 19 #ifdef IN_LMDZ 20 integer, protected:: activate_ocean_skin = 020 INTEGER, protected:: activate_ocean_skin = 0 21 21 ! Allowed values: 0 do not activate; 1 activate without retroaction 22 22 ! on LMDZ; 2 activate with retroaction on LMDZ … … 30 30 31 31 #ifdef IN_LMDZ 32 uselmdz_ioipsl_getin_p, ONLY: getin_p33 uselmdz_assert, ONLY: assert32 USE lmdz_ioipsl_getin_p, ONLY: getin_p 33 USE lmdz_assert, ONLY: assert 34 34 #endif 35 35 36 integer:: flag_ocean_skin = 336 INTEGER:: flag_ocean_skin = 3 37 37 !$omp threadprivate(flag_ocean_skin) 38 38 … … 43 43 #ifdef IN_LMDZ 44 44 CALL getin_p("activate_ocean_skin", activate_ocean_skin) 45 CALL assert(activate_ocean_skin >= 0 . and. activate_ocean_skin <= 2, &45 CALL assert(activate_ocean_skin >= 0 .AND. activate_ocean_skin <= 2, & 46 46 "config_ocean_skin bad value of activate_ocean_skin") 47 if(activate_ocean_skin >= 1) THEN47 IF (activate_ocean_skin >= 1) THEN 48 48 CALL getin_p("flag_ocean_skin", flag_ocean_skin) 49 49 CALL getin_p("depth_1", depth_1) -
LMDZ6/branches/Amaury_dev/libf/phylmd/Ocean_skin/const.F90
r5113 r5117 3 3 IMPLICIT NONE 4 4 5 real, parameter :: beta = 0.756 / 1023.3435 REAL, parameter :: beta = 0.756 / 1023.343 6 6 ! Salinity expansion coefficient. Derivative with respect to 7 7 ! practical salinity, not mass fraction of salt. Value at 25 Celsius … … 9 9 ! k0829, table A.3.1). 10 10 11 real, parameter :: cpa = 1004.6711 REAL, parameter :: cpa = 1004.67 12 12 ! specific heat of dry air, in J / kg / K (Businger 1982) 13 13 14 real, parameter :: cpw = 4000. ! specific heat of liquid water, in J / kg / K15 real, parameter :: grav = 9.780326772 ! constante de gravitation, m s-216 real, parameter :: rhow = 1022. ! density of liquid water, in kg / m314 REAL, parameter :: cpw = 4000. ! specific heat of liquid water, in J / kg / K 15 REAL, parameter :: grav = 9.780326772 ! constante de gravitation, m s-2 16 REAL, parameter :: rhow = 1022. ! density of liquid water, in kg / m3 17 17 18 real, parameter :: rgas = 287.118 REAL, parameter :: rgas = 287.1 19 19 ! specific ideal gas constant for dry air, in J / kg / K 20 20 21 real, parameter :: von = 0.4 ! von Karman's "constant"21 REAL, parameter :: von = 0.4 ! von Karman's "constant" 22 22 23 real, parameter :: eps_w = 0.6219723 REAL, parameter :: eps_w = 0.62197 24 24 ! molecular mass of water over molecular mass of dry air (Gill 1982 25 25 ! k0829, equation 3.1.13) -
LMDZ6/branches/Amaury_dev/libf/phylmd/Ocean_skin/esat_m.F90
r5116 r5117 10 10 ! J. Appl. Meteor. 20, 1527-1532, equation (8). 11 11 12 real, intent(in):: T ! temperature, in K13 real, intent(in):: P ! air pressure, in Pa12 REAL, INTENT(IN):: T ! temperature, in K 13 REAL, INTENT(IN):: P ! air pressure, in Pa 14 14 15 15 !-------------------------------------------------------------------- -
LMDZ6/branches/Amaury_dev/libf/phylmd/Ocean_skin/fv_m.F90
r5116 r5117 9 9 ! H. Bellenger 2016 10 10 11 real, intent(in):: z ! profondeur en m (z < 0)12 real, intent(in):: rain ! rain mass flux, in kg m-2 s-111 REAL, INTENT(IN):: z ! profondeur en m (z < 0) 12 REAL, INTENT(IN):: rain ! rain mass flux, in kg m-2 s-1 13 13 14 14 ! Local: 15 15 16 realdfV16 REAL dfV 17 17 ! fraction of rain volume entering the ocean and deposited within depth "z" 18 18 19 realrc, lbd, f020 realz_mm19 REAL rc, lbd, f0 20 REAL z_mm 21 21 22 22 ! Schlussel et al. 1997, Table 1: 23 real, parameter:: zeta(14) = [0.0026091, 0.0022743, 0.0015406, 0.0012281, &23 REAL, parameter:: zeta(14) = [0.0026091, 0.0022743, 0.0015406, 0.0012281, & 24 24 0.0008795, 0.00077123, 0.00057451, 0.000438, 6.7228e-5, 6.4955e-5, & 25 25 4.4234e-5, 3.3906e-5, 2.7433e-6, 4.0283e-7] 26 real, parameter:: psi(14) = [0.60107, 0.29968, 0.5563, 1.80858, 0.2175, &26 REAL, parameter:: psi(14) = [0.60107, 0.29968, 0.5563, 1.80858, 0.2175, & 27 27 0.33961, 0.96368, 0.65081, 0.5967, 2.7661, 2.2812, 2.7674, 2.6095, & 28 28 6.5308] … … 30 30 !--------------------------------------------------------------------- 31 31 32 if(rain > 0.) THEN32 IF (rain > 0.) THEN 33 33 rc = 0.4 ! mm 34 34 z_mm = z * 1000. ! mm and <0 -
LMDZ6/branches/Amaury_dev/libf/phylmd/Ocean_skin/microlayer_m.F90
r5116 r5117 10 10 ! H. Bellenger 2016 11 11 12 useconst, ONLY: beta, cpw, grav, rhow13 usefv_m, ONLY: fv12 USE const, ONLY: beta, cpw, grav, rhow 13 USE fv_m, ONLY: fv 14 14 15 real, intent(out):: dter(:)15 REAL, INTENT(OUT):: dter(:) 16 16 ! Temperature variation in the diffusive microlayer, that is 17 17 ! ocean-air interface temperature minus subskin temperature. In K. 18 18 19 real, intent(out):: dser(:)19 REAL, INTENT(OUT):: dser(:) 20 20 ! Salinity variation in the diffusive microlayer, that is ocean-air 21 21 ! interface salinity minus subskin salinity. In ppt. 22 22 23 real, intent(inout):: tkt(:)23 REAL, INTENT(INOUT):: tkt(:) 24 24 ! thickness of cool skin (microlayer), in m 25 25 26 real, intent(inout):: tks(:)26 REAL, INTENT(INOUT):: tks(:) 27 27 ! thickness of mass diffusion layer (microlayer), in m 28 28 29 real, intent(in):: hlb(:)29 REAL, INTENT(IN):: hlb(:) 30 30 ! latent heat flux at the surface, positive upward (W m-2) 31 31 32 real, intent(in):: tau(:) ! wind stress, turbulent part only, in Pa33 real, intent(in):: s_subskin(:) ! subskin salinity, in ppt34 real, intent(in):: al(:) ! water thermal expansion coefficient (in K-1)35 real, intent(in):: xlv(:) ! latent heat of evaporation (J/kg)36 real, intent(in):: taur(:) ! momentum flux due to rainfall, in Pa32 REAL, INTENT(IN):: tau(:) ! wind stress, turbulent part only, in Pa 33 REAL, INTENT(IN):: s_subskin(:) ! subskin salinity, in ppt 34 REAL, INTENT(IN):: al(:) ! water thermal expansion coefficient (in K-1) 35 REAL, INTENT(IN):: xlv(:) ! latent heat of evaporation (J/kg) 36 REAL, INTENT(IN):: taur(:) ! momentum flux due to rainfall, in Pa 37 37 38 real, intent(in):: rf(:)38 REAL, INTENT(IN):: rf(:) 39 39 ! sensible heat flux at the surface due to rainfall, in W m-2 40 40 41 real, intent(in):: rain(:) ! rain mass flux, in kg m-2 s-141 REAL, INTENT(IN):: rain(:) ! rain mass flux, in kg m-2 s-1 42 42 43 real, intent(in):: qcol(:)43 REAL, INTENT(IN):: qcol(:) 44 44 ! net flux at the surface, without sensible heat flux due to rain, in W m-2 45 45 46 46 ! Local: 47 47 48 real, dimension(size(qcol)):: usrk, usrct, usrcs, alq49 realxlamx(size(qcol)) ! Saunders coefficient50 real, parameter:: visw = 1e-651 real, parameter:: tcw = 0.6 ! thermal conductivity of water48 REAL, DIMENSION(size(qcol)):: usrk, usrct, usrcs, alq 49 REAL xlamx(size(qcol)) ! Saunders coefficient 50 REAL, parameter:: visw = 1e-6 51 REAL, parameter:: tcw = 0.6 ! thermal conductivity of water 52 52 53 real, parameter:: mu = 0.0129e-7 ! in m2 / s53 REAL, parameter:: mu = 0.0129e-7 ! in m2 / s 54 54 ! molecular salinity diffusivity, Kraus and Businger, page 47 55 55 56 real, parameter:: kappa = 1.49e-7 ! thermal diffusivity, in m2 / s56 REAL, parameter:: kappa = 1.49e-7 ! thermal diffusivity, in m2 / s 57 57 58 real, parameter:: afk = 4e-459 real, parameter:: bfk = 1.358 REAL, parameter:: afk = 4e-4 59 REAL, parameter:: bfk = 1.3 60 60 ! a and b coefficient for the power function fitting the TKE flux 61 61 ! carried by rain: Fk = a * R**b, derived form the exact solution -
LMDZ6/branches/Amaury_dev/libf/phylmd/Ocean_skin/mom_flux_rain_m.F90
r5116 r5117 9 9 ! Computes momentum flux due to rainfall, in Pa. 10 10 11 real, intent(in):: U11 REAL, INTENT(IN):: U 12 12 ! difference of velocity between air and sea, including gustiness, in m / s 13 13 14 real, intent(in):: rain ! rain mass flux, in kg m-2 s-114 REAL, INTENT(IN):: rain ! rain mass flux, in kg m-2 s-1 15 15 16 16 !------------------------------------------------------------------------ -
LMDZ6/branches/Amaury_dev/libf/phylmd/Ocean_skin/near_surface_m.F90
r5116 r5117 3 3 Implicit none 4 4 5 real, parameter:: depth = 3.5 REAL, parameter:: depth = 3. 6 6 ! diurnal warm layer and fresh water lens depth, in m (Zeng and Beljaars 2005) 7 7 … … 13 13 ! Hugo Bellenger, 2016 14 14 15 useconfig_ocean_skin_m, ONLY: depth_116 useconst, ONLY: beta, cpw, grav, rhow, von17 usePhiw_m, ONLY: Phiw18 usetherm_expans_m, ONLY: therm_expans15 USE config_ocean_skin_m, ONLY: depth_1 16 USE const, ONLY: beta, cpw, grav, rhow, von 17 USE Phiw_m, ONLY: Phiw 18 USE therm_expans_m, ONLY: therm_expans 19 19 20 real, intent(out):: al(:) ! water thermal expansion coefficient (in K-1)21 real, intent(out):: t_subskin(:) ! subskin temperature, in K22 real, intent(out):: s_subskin(:) ! subskin salinity, in ppt20 REAL, INTENT(OUT):: al(:) ! water thermal expansion coefficient (in K-1) 21 REAL, INTENT(OUT):: t_subskin(:) ! subskin temperature, in K 22 REAL, INTENT(OUT):: s_subskin(:) ! subskin salinity, in ppt 23 23 24 real, intent(inout):: ds_ns(:)24 REAL, INTENT(INOUT):: ds_ns(:) 25 25 ! "delta salinity near surface". Salinity variation in the 26 26 ! near-surface turbulent layer. That is subskin salinity minus 27 27 ! foundation salinity. In ppt. 28 28 29 real, intent(inout):: dt_ns(:)29 REAL, INTENT(INOUT):: dt_ns(:) 30 30 ! "delta temperature near surface". Temperature variation in the 31 31 ! near-surface turbulent layer. That is subskin temperature minus 32 32 ! foundation temperature. (Can be negative.) In K. 33 33 34 real, intent(in):: tau(:)34 REAL, INTENT(IN):: tau(:) 35 35 ! wind stress at the surface, turbulent part only, in Pa 36 36 37 real, intent(in):: taur(:) ! momentum flux due to rainfall, in Pa38 real, intent(in):: hlb(:) ! latent heat flux, turbulent part only, in W / m239 real, intent(in):: rhoa(:) ! density of moist air (kg / m3)40 real, intent(in):: xlv(:) ! latent heat of evaporation (J/kg)41 real, intent(in):: dtime ! time step (s)42 real, intent(in):: t_ocean_1(:) ! input sea temperature, at depth_1, in K43 real, intent(in):: S1(:) ! salinity at depth_1, in ppt44 real, intent(in):: rain(:) ! rain mass flux, in kg m-2 s-137 REAL, INTENT(IN):: taur(:) ! momentum flux due to rainfall, in Pa 38 REAL, INTENT(IN):: hlb(:) ! latent heat flux, turbulent part only, in W / m2 39 REAL, INTENT(IN):: rhoa(:) ! density of moist air (kg / m3) 40 REAL, INTENT(IN):: xlv(:) ! latent heat of evaporation (J/kg) 41 REAL, INTENT(IN):: dtime ! time step (s) 42 REAL, INTENT(IN):: t_ocean_1(:) ! input sea temperature, at depth_1, in K 43 REAL, INTENT(IN):: S1(:) ! salinity at depth_1, in ppt 44 REAL, INTENT(IN):: rain(:) ! rain mass flux, in kg m-2 s-1 45 45 46 real, intent(in):: q_pwp(:)46 REAL, INTENT(IN):: q_pwp(:) 47 47 ! net flux absorbed by the warm layer (part of the solar flux 48 48 ! absorbed at "depth"), minus surface fluxes, in W m-2 … … 50 50 ! Local: 51 51 52 real, parameter:: khor = 1. / 1.5e452 REAL, parameter:: khor = 1. / 1.5e4 53 53 ! Parameter for the lens spread, in m-1. Inverse of the size of 54 54 ! the lens. 55 55 56 real, parameter:: umax = 15.57 real, parameter:: fact = 1.58 realbuoyf(size(t_ocean_1)) ! buoyancy flux59 realusrc(size(t_ocean_1))60 realdrho(size(t_ocean_1)) ! rho(- delta) - rho(- d)61 realLmo(size(t_ocean_1)) ! Monin-Obukhov length56 REAL, parameter:: umax = 15. 57 REAL, parameter:: fact = 1. 58 REAL buoyf(size(t_ocean_1)) ! buoyancy flux 59 REAL usrc(size(t_ocean_1)) 60 REAL drho(size(t_ocean_1)) ! rho(- delta) - rho(- d) 61 REAL Lmo(size(t_ocean_1)) ! Monin-Obukhov length 62 62 63 realu(size(t_ocean_1))63 REAL u(size(t_ocean_1)) 64 64 ! Wind speed at 15 m relative to the sea surface, i. e. taking 65 65 ! current vector into account. In m s-1. 66 66 67 real, dimension(size(t_ocean_1)):: At, Bt, As, Bs, correction67 REAL, DIMENSION(size(t_ocean_1)):: At, Bt, As, Bs, correction 68 68 69 realeta(size(t_ocean_1))69 REAL eta(size(t_ocean_1)) 70 70 ! exponent in the function giving T(z) and S(z), equation (11) in 71 71 ! Bellenger et al. 2017 JGR 72 72 73 realt_fnd(size(t_ocean_1)) ! foundation temperature, in K74 reals_fnd(size(t_ocean_1)) ! foundation salinity, in ppt73 REAL t_fnd(size(t_ocean_1)) ! foundation temperature, in K 74 REAL s_fnd(size(t_ocean_1)) ! foundation salinity, in ppt 75 75 76 76 !---------------------------------------------------------------------- … … 86 86 eta = 2. / (fact * umax) 87 87 elsewhere 88 ! {u > 2. . and. u < umax}88 ! {u > 2. .AND. u < umax} 89 89 eta = u / (fact * umax) 90 90 end where … … 93 93 end where 94 94 95 if(depth_1 < depth) THEN95 IF (depth_1 < depth) THEN 96 96 correction = 1. - (depth_1 / depth)**eta 97 97 ! (neglecting microlayer thickness compared to depth_1 and depth) … … 115 115 ! Case of stable stratification and negative flux, Bellenger 2017 116 116 ! k0976, equation (15): 117 where (buoyf < 0. . and. drho < 0.)117 where (buoyf < 0. .AND. drho < 0.) 118 118 buoyf = sqrt(- eta * grav / (5. * depth * rhow) * drho) * usrc**2 119 119 elsewhere (buoyf == 0.) … … 129 129 130 130 ! Lens horizontal spreading: 131 where (drho < 0. . and. ds_ns < 0.) At = At &131 where (drho < 0. .AND. ds_ns < 0.) At = At & 132 132 - (eta + 1.) * khor * sqrt(depth * grav * abs(drho) / rhow) 133 133 … … 141 141 142 142 ! Lens horizontal spreading: 143 where (drho < 0. . and. ds_ns < 0.) As = As &143 where (drho < 0. .AND. ds_ns < 0.) As = As & 144 144 - (eta + 1.) * khor * sqrt(depth * grav * abs(drho) / rhow) 145 145 -
LMDZ6/branches/Amaury_dev/libf/phylmd/Ocean_skin/phiw_m.F90
r5116 r5117 9 9 ! Fonction de stabilit\'e (Monin Obukhov) 10 10 11 real, intent(in):: zL ! profondeur / longueur de Monin-Obukhov11 REAL, INTENT(IN):: zL ! profondeur / longueur de Monin-Obukhov 12 12 13 13 !---------------------------------------------- 14 14 15 if(zL < 0.) THEN15 IF (zL < 0.) THEN 16 16 Phiw = (1. - 16. * zL)**(- 0.5) 17 17 else -
LMDZ6/branches/Amaury_dev/libf/phylmd/Ocean_skin/sens_heat_rain_m.F90
r5116 r5117 6 6 7 7 #ifdef IN_LMDZ 8 realfunction sens_heat_rain(rain, t, q, rhoa, xlv, t_int, p)8 REAL function sens_heat_rain(rain, t, q, rhoa, xlv, t_int, p) 9 9 #else 10 10 elemental real function sens_heat_rain(rain, t, q, rhoa, xlv, t_int, p) … … 18 18 ! OpenMP 5.0. 19 19 20 useconst, ONLY: cpa, cpw, rgas20 USE const, ONLY: cpa, cpw, rgas 21 21 #ifndef IN_LMDZ 22 useconst, ONLY: eps_w22 USE const, ONLY: eps_w 23 23 #endif 24 useesat_m, ONLY: esat24 USE esat_m, ONLY: esat 25 25 26 26 #ifdef IN_LMDZ … … 29 29 #endif 30 30 31 real, intent(in):: rain ! rain mass flux, in kg m-2 s-132 real, intent(in):: t ! air temperature at 10 m, in K33 real, intent(in):: q ! specific humidity at 10 m34 real, intent(in):: rhoa ! density of moist air (kg / m3)35 real, intent(in):: xlv ! latent heat of evaporation (J / kg)36 real, intent(in):: t_int ! interface temperature, in K37 real, intent(in):: p ! surface pressure, in Pa31 REAL, INTENT(IN):: rain ! rain mass flux, in kg m-2 s-1 32 REAL, INTENT(IN):: t ! air temperature at 10 m, in K 33 REAL, INTENT(IN):: q ! specific humidity at 10 m 34 REAL, INTENT(IN):: rhoa ! density of moist air (kg / m3) 35 REAL, INTENT(IN):: xlv ! latent heat of evaporation (J / kg) 36 REAL, INTENT(IN):: t_int ! interface temperature, in K 37 REAL, INTENT(IN):: p ! surface pressure, in Pa 38 38 39 39 ! Local: 40 40 41 reales ! saturation pressure of wator vapor, in Pa42 realalfac ! wet bulb factor43 realdwat ! water vapour diffusivity44 realdtmp ! heat diffusivity45 realq_int ! specific (saturation) humidity at ocean interface46 realt_celsius ! air temperature at 10 m, in Celsius degrees41 REAL es ! saturation pressure of wator vapor, in Pa 42 REAL alfac ! wet bulb factor 43 REAL dwat ! water vapour diffusivity 44 REAL dtmp ! heat diffusivity 45 REAL q_int ! specific (saturation) humidity at ocean interface 46 REAL t_celsius ! air temperature at 10 m, in Celsius degrees 47 47 48 realwetc48 REAL wetc 49 49 ! derivative of saturated mass fraction of water vapor with 50 50 ! respect to temperature, at constant total pressure -
LMDZ6/branches/Amaury_dev/libf/phylmd/Ocean_skin/therm_expans_m.F90
r5116 r5117 9 9 ! Compute the thermal expansion coefficient of sea water. 10 10 11 real, intent(in):: t ! temperature, in K11 REAL, INTENT(IN):: t ! temperature, in K 12 12 13 13 !--------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.