Ignore:
Timestamp:
Jul 24, 2024, 4:23:34 PM (6 months ago)
Author:
abarral
Message:

rename modules properly lmdz_*
move some unused files to obsolete/
(lint) uppercase fortran keywords

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  
    88       u, t_ocean_1, s1, rain, hf, hlb, rnl, tau, rhoa, xlv, rf, dtime, rns)
    99
    10     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
     10    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
    1515
    16     real, intent(out):: tkt(:)
     16    REAL, INTENT(OUT):: tkt(:)
    1717    ! thickness of cool skin (microlayer), in m
    1818
    19     real, intent(out):: tks(:)
     19    REAL, INTENT(OUT):: tks(:)
    2020    ! thickness of mass diffusion layer (microlayer), in m
    2121
    22     real, intent(out):: taur(:) ! momentum flux due to rain, in Pa
     22    REAL, INTENT(OUT):: taur(:) ! momentum flux due to rain, in Pa
    2323
    24     real, intent(out):: dter(:)
     24    REAL, INTENT(OUT):: dter(:)
    2525    ! Temperature variation in the diffusive microlayer, that is
    2626    ! ocean-air interface temperature minus subskin temperature. In K.
    2727
    28     real, intent(out):: dser(:)
     28    REAL, INTENT(OUT):: dser(:)
    2929    ! Salinity variation in the diffusive microlayer, that is ocean-air
    3030    ! interface salinity minus subskin salinity. In ppt.
    3131
    32     real, intent(out):: t_int(:) ! interface temperature, in K
    33     real, intent(out):: s_int(:) ! interface salinity, in ppt
     32    REAL, INTENT(OUT):: t_int(:) ! interface temperature, in K
     33    REAL, INTENT(OUT):: s_int(:) ! interface salinity, in ppt
    3434
    35     real, intent(inout):: ds_ns(:)
     35    REAL, INTENT(INOUT):: ds_ns(:)
    3636    ! "delta salinity near surface". Salinity variation in the
    3737    ! near-surface turbulent layer. That is subskin salinity minus
    3838    ! foundation salinity. In ppt.
    3939
    40     real, intent(inout):: dt_ns(:)
     40    REAL, INTENT(INOUT):: dt_ns(:)
    4141    ! "delta temperature near surface". Temperature variation in the
    4242    ! near-surface turbulent layer. That is subskin temperature minus
    4343    ! foundation temperature. (Can be negative.) In K.
    4444
    45     real, intent(in):: u(:)
     45    REAL, INTENT(IN):: u(:)
    4646    ! Wind speed relative to the sea surface, i. e. taking current
    4747    ! vector into account. In m s-1.
    4848
    49     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
     49    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
    5151
    52     real, intent(in):: rain(:)
     52    REAL, INTENT(IN):: rain(:)
    5353    ! rain mass flux, averaged on a timestep, in kg m-2 s-1
    5454
    55     real, intent(in):: hf(:)
     55    REAL, INTENT(IN):: hf(:)
    5656    !  turbulent part of sensible heat flux, positive upward, in W m-2
    5757
    58     real, intent(in):: hlb(:)
     58    REAL, INTENT(IN):: hlb(:)
    5959    ! latent heat flux at the surface, positive upward (W m-2)
    6060
    61     real, intent(in):: rnl(:)
     61    REAL, INTENT(IN):: rnl(:)
    6262    ! net longwave radiation, positive upward, in W m-2
    6363
    64     real, intent(in):: tau(:)
     64    REAL, INTENT(IN):: tau(:)
    6565    ! wind stress at the surface, turbulent part only, in Pa
    6666   
    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)
    6969
    70     real, intent(in):: rf(:)
     70    REAL, INTENT(IN):: rf(:)
    7171    ! sensible heat flux at the surface due to rainfall, in W m-2,
    7272    ! positive upward
    7373
    74     real, intent(in):: dtime ! time step, in s
    75     real, intent(in):: rns(:) ! net downward shortwave radiation, in W m-2
     74    REAL, INTENT(IN):: dtime ! time step, in s
     75    REAL, INTENT(IN):: rns(:) ! net downward shortwave radiation, in W m-2
    7676
    7777    ! Local:
    7878   
    79     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
     79    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
    8484
    85     real, parameter:: fxp = 1. - (0.28 * 0.014 &
     85    REAL, parameter:: fxp = 1. - (0.28 * 0.014 &
    8686         + 0.27 * 0.357 * (1. - exp(- depth / 0.357)) &
    8787         + .45 * 12.82 * (1.- exp(- depth / 12.82))) / depth
     
    9090    ! H. Bellenger 2016
    9191
    92     real tau_with_min(size(t_ocean_1))
     92    REAL tau_with_min(size(t_ocean_1))
    9393    ! modified wind stress, avoiding very low values
    9494   
    95     real, parameter:: tau_0 = 1e-3 ! in N m-2
     95    REAL, parameter:: tau_0 = 1e-3 ! in N m-2
    9696
    9797    !-------------------------------------------------------------------
    9898
    99     if (rain_effect) THEN
     99    IF (rain_effect) THEN
    100100       taur = mom_flux_rain(u, rain)
    101101    else
    102        if (jwarm .or. jcool) null_array = 0.
     102       IF (jwarm .OR. jcool) null_array = 0.
    103103       taur = 0.
    104104    end if
    105105
    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))
    107107
    108     if (Jwarm) THEN
    109        if (rain_effect) THEN
     108    IF (Jwarm) THEN
     109       IF (rain_effect) THEN
    110110          CALL Near_Surface(al, t_subskin, s_subskin, ds_ns, dt_ns, &
    111111               tau_with_min, taur, hlb, rhoa, xlv, dtime, t_ocean_1, s1, rain, &
     
    117117       end if
    118118    else
    119        if (Jcool) al = therm_expans(t_ocean_1)
     119       IF (Jcool) al = therm_expans(t_ocean_1)
    120120       t_subskin = t_ocean_1
    121121       s_subskin = s1
    122122    end if
    123123
    124     if (Jcool) THEN
     124    IF (Jcool) THEN
    125125       ! First guess:
    126126       tkt = 0.001
     
    131131          dels = rns * (0.065 + 11. * tkt - 6.6e-5 / tkt &
    132132               * (1. - exp(- tkt / 8e-4))) ! equation 16 Ohlmann
    133           if (rain_effect) THEN
     133          IF (rain_effect) THEN
    134134             CALL Microlayer(dter, dser, tkt, tks, hlb, tau_with_min, &
    135135                  s_subskin, al, xlv, taur, rf, rain, &
  • LMDZ6/branches/Amaury_dev/libf/phylmd/Ocean_skin/config_ocean_skin_m.F90

    r5116 r5117  
    77  logical, protected:: rain_effect
    88
    9   real, protected:: depth_1 = 20.
     9  REAL, protected:: depth_1 = 20.
    1010  ! Depth at which the temperature and salinity are input. Could be
    1111  ! the depth of a sensor, or the depth at the middle of the first
     
    1818
    1919#ifdef IN_LMDZ
    20   integer, protected:: activate_ocean_skin = 0
     20  INTEGER, protected:: activate_ocean_skin = 0
    2121  ! Allowed values: 0 do not activate; 1 activate without retroaction
    2222  ! on LMDZ; 2 activate with retroaction on LMDZ
     
    3030
    3131#ifdef IN_LMDZ
    32     use lmdz_ioipsl_getin_p, ONLY: getin_p
    33     use lmdz_assert, ONLY: assert
     32    USE lmdz_ioipsl_getin_p, ONLY: getin_p
     33    USE lmdz_assert, ONLY: assert
    3434#endif
    3535
    36     integer:: flag_ocean_skin = 3
     36    INTEGER:: flag_ocean_skin = 3
    3737    !$omp threadprivate(flag_ocean_skin)
    3838   
     
    4343#ifdef IN_LMDZ
    4444    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, &
    4646         "config_ocean_skin bad value of activate_ocean_skin")
    47     if (activate_ocean_skin >= 1) THEN
     47    IF (activate_ocean_skin >= 1) THEN
    4848       CALL getin_p("flag_ocean_skin", flag_ocean_skin)
    4949       CALL getin_p("depth_1", depth_1)
  • LMDZ6/branches/Amaury_dev/libf/phylmd/Ocean_skin/const.F90

    r5113 r5117  
    33  IMPLICIT NONE
    44
    5   real, parameter :: beta = 0.756 / 1023.343
     5  REAL, parameter :: beta = 0.756 / 1023.343
    66  ! Salinity expansion coefficient. Derivative with respect to
    77  ! practical salinity, not mass fraction of salt. Value at 25 Celsius
     
    99  ! k0829, table A.3.1).
    1010
    11   real, parameter :: cpa = 1004.67
     11  REAL, parameter :: cpa = 1004.67
    1212  ! specific heat of dry air, in J / kg / K (Businger 1982)
    1313
    14   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
     14  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
    1717
    18   real, parameter :: rgas = 287.1
     18  REAL, parameter :: rgas = 287.1
    1919  ! specific ideal gas constant for dry air, in J / kg / K
    2020
    21   real, parameter :: von = 0.4 ! von Karman's "constant"
     21  REAL, parameter :: von = 0.4 ! von Karman's "constant"
    2222
    23   real, parameter :: eps_w = 0.62197
     23  REAL, parameter :: eps_w = 0.62197
    2424  ! molecular mass of water over molecular mass of dry air (Gill 1982
    2525  ! k0829, equation 3.1.13)
  • LMDZ6/branches/Amaury_dev/libf/phylmd/Ocean_skin/esat_m.F90

    r5116 r5117  
    1010    ! J. Appl. Meteor. 20, 1527-1532, equation (8).
    1111
    12     real, intent(in):: T ! temperature, in K
    13     real, intent(in):: P ! air pressure, in Pa
     12    REAL, INTENT(IN):: T ! temperature, in K
     13    REAL, INTENT(IN):: P ! air pressure, in Pa
    1414
    1515    !--------------------------------------------------------------------
  • LMDZ6/branches/Amaury_dev/libf/phylmd/Ocean_skin/fv_m.F90

    r5116 r5117  
    99    ! H. Bellenger 2016
    1010
    11     real, intent(in):: z ! profondeur en m (z < 0)
    12     real, intent(in):: rain ! rain mass flux, in kg m-2 s-1
     11    REAL, INTENT(IN):: z ! profondeur en m (z < 0)
     12    REAL, INTENT(IN):: rain ! rain mass flux, in kg m-2 s-1
    1313
    1414    ! Local:
    1515
    16     real dfV
     16    REAL dfV
    1717    ! fraction of rain volume entering the ocean and deposited within depth "z"
    1818
    19     real rc, lbd, f0
    20     real z_mm
     19    REAL rc, lbd, f0
     20    REAL z_mm
    2121
    2222    ! 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, &
    2424         0.0008795, 0.00077123, 0.00057451, 0.000438, 6.7228e-5, 6.4955e-5, &
    2525         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, &
    2727         0.33961, 0.96368, 0.65081, 0.5967, 2.7661, 2.2812, 2.7674, 2.6095, &
    2828         6.5308]
     
    3030    !---------------------------------------------------------------------
    3131
    32     if (rain > 0.) THEN
     32    IF (rain > 0.) THEN
    3333       rc = 0.4 ! mm
    3434       z_mm = z * 1000. ! mm and <0
  • LMDZ6/branches/Amaury_dev/libf/phylmd/Ocean_skin/microlayer_m.F90

    r5116 r5117  
    1010    ! H. Bellenger 2016
    1111
    12     use const, ONLY: beta, cpw, grav, rhow
    13     use fv_m, ONLY: fv
     12    USE const, ONLY: beta, cpw, grav, rhow
     13    USE fv_m, ONLY: fv
    1414
    15     real, intent(out):: dter(:)
     15    REAL, INTENT(OUT):: dter(:)
    1616    ! Temperature variation in the diffusive microlayer, that is
    1717    ! ocean-air interface temperature minus subskin temperature. In K.
    1818
    19     real, intent(out):: dser(:)
     19    REAL, INTENT(OUT):: dser(:)
    2020    ! Salinity variation in the diffusive microlayer, that is ocean-air
    2121    ! interface salinity minus subskin salinity. In ppt.
    2222
    23     real, intent(inout):: tkt(:)
     23    REAL, INTENT(INOUT):: tkt(:)
    2424    ! thickness of cool skin (microlayer), in m
    2525
    26     real, intent(inout):: tks(:)
     26    REAL, INTENT(INOUT):: tks(:)
    2727    ! thickness of mass diffusion layer (microlayer), in m
    2828
    29     real, intent(in):: hlb(:)
     29    REAL, INTENT(IN):: hlb(:)
    3030    ! latent heat flux at the surface, positive upward (W m-2)
    3131
    32     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
     32    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
    3737
    38     real, intent(in):: rf(:)
     38    REAL, INTENT(IN):: rf(:)
    3939    ! sensible heat flux at the surface due to rainfall, in W m-2
    4040
    41     real, intent(in):: rain(:) ! rain mass flux, in kg m-2 s-1
     41    REAL, INTENT(IN):: rain(:) ! rain mass flux, in kg m-2 s-1
    4242
    43     real, intent(in):: qcol(:)
     43    REAL, INTENT(IN):: qcol(:)
    4444    ! net flux at the surface, without sensible heat flux due to rain, in W m-2
    4545
    4646    ! Local:
    4747
    48     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
     48    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
    5252
    53     real, parameter:: mu = 0.0129e-7 ! in m2 / s
     53    REAL, parameter:: mu = 0.0129e-7 ! in m2 / s
    5454    ! molecular salinity diffusivity, Kraus and Businger, page 47
    5555
    56     real, parameter:: kappa = 1.49e-7 ! thermal diffusivity, in m2 / s
     56    REAL, parameter:: kappa = 1.49e-7 ! thermal diffusivity, in m2 / s
    5757
    58     real, parameter:: afk = 4e-4
    59     real, parameter:: bfk = 1.3
     58    REAL, parameter:: afk = 4e-4
     59    REAL, parameter:: bfk = 1.3
    6060    ! a and b coefficient for the power function fitting the TKE flux
    6161    ! 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  
    99    ! Computes momentum flux due to rainfall, in Pa.
    1010
    11     real, intent(in):: U
     11    REAL, INTENT(IN):: U
    1212    ! difference of velocity between air and sea, including gustiness, in m / s
    1313
    14     real, intent(in):: rain ! rain mass flux, in kg m-2 s-1
     14    REAL, INTENT(IN):: rain ! rain mass flux, in kg m-2 s-1
    1515
    1616    !------------------------------------------------------------------------
  • LMDZ6/branches/Amaury_dev/libf/phylmd/Ocean_skin/near_surface_m.F90

    r5116 r5117  
    33  Implicit none
    44
    5   real, parameter:: depth = 3.
     5  REAL, parameter:: depth = 3.
    66  ! diurnal warm layer and fresh water lens depth, in m (Zeng and Beljaars 2005)
    77
     
    1313    ! Hugo Bellenger, 2016
    1414
    15     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
     15    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
    1919
    20     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
     20    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
    2323
    24     real, intent(inout):: ds_ns(:)
     24    REAL, INTENT(INOUT):: ds_ns(:)
    2525    ! "delta salinity near surface". Salinity variation in the
    2626    ! near-surface turbulent layer. That is subskin salinity minus
    2727    ! foundation salinity. In ppt.
    2828
    29     real, intent(inout):: dt_ns(:)
     29    REAL, INTENT(INOUT):: dt_ns(:)
    3030    ! "delta temperature near surface". Temperature variation in the
    3131    ! near-surface turbulent layer. That is subskin temperature minus
    3232    ! foundation temperature. (Can be negative.) In K.
    3333
    34     real, intent(in):: tau(:)
     34    REAL, INTENT(IN):: tau(:)
    3535    ! wind stress at the surface, turbulent part only, in Pa
    3636
    37     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
     37    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
    4545
    46     real, intent(in):: q_pwp(:)
     46    REAL, INTENT(IN):: q_pwp(:)
    4747    ! net flux absorbed by the warm layer (part of the solar flux
    4848    ! absorbed at "depth"), minus surface fluxes, in W m-2
     
    5050    ! Local:
    5151
    52     real, parameter:: khor = 1. / 1.5e4
     52    REAL, parameter:: khor = 1. / 1.5e4
    5353    ! Parameter for the lens spread, in m-1. Inverse of the size of
    5454    ! the lens.
    5555
    56     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
     56    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
    6262
    63     real u(size(t_ocean_1))
     63    REAL u(size(t_ocean_1))
    6464    ! Wind speed at 15 m relative to the sea surface, i. e. taking
    6565    ! current vector into account. In m s-1.
    6666
    67     real, dimension(size(t_ocean_1)):: At, Bt, As, Bs, correction
     67    REAL, DIMENSION(size(t_ocean_1)):: At, Bt, As, Bs, correction
    6868
    69     real eta(size(t_ocean_1))
     69    REAL eta(size(t_ocean_1))
    7070    ! exponent in the function giving T(z) and S(z), equation (11) in
    7171    ! Bellenger et al. 2017 JGR
    7272
    73     real t_fnd(size(t_ocean_1)) ! foundation temperature, in K
    74     real s_fnd(size(t_ocean_1)) ! foundation salinity, in ppt
     73    REAL t_fnd(size(t_ocean_1)) ! foundation temperature, in K
     74    REAL s_fnd(size(t_ocean_1)) ! foundation salinity, in ppt
    7575
    7676    !----------------------------------------------------------------------
     
    8686          eta = 2. / (fact * umax)
    8787       elsewhere
    88           ! {u > 2. .and. u < umax}
     88          ! {u > 2. .AND. u < umax}
    8989          eta = u / (fact * umax)
    9090       end where
     
    9393    end where
    9494
    95     if (depth_1 < depth) THEN
     95    IF (depth_1 < depth) THEN
    9696       correction = 1. - (depth_1 / depth)**eta
    9797       ! (neglecting microlayer thickness compared to depth_1 and depth)
     
    115115    ! Case of stable stratification and negative flux, Bellenger 2017
    116116    ! k0976, equation (15):
    117     where (buoyf < 0. .and. drho < 0.)
     117    where (buoyf < 0. .AND. drho < 0.)
    118118       buoyf = sqrt(- eta * grav / (5. * depth * rhow) * drho) * usrc**2
    119119    elsewhere (buoyf == 0.)
     
    129129
    130130    ! Lens horizontal spreading:
    131     where (drho < 0. .and. ds_ns < 0.) At = At &
     131    where (drho < 0. .AND. ds_ns < 0.) At = At &
    132132         - (eta + 1.) * khor * sqrt(depth * grav * abs(drho) / rhow)
    133133
     
    141141
    142142    ! Lens horizontal spreading:
    143     where (drho < 0. .and. ds_ns < 0.) As = As &
     143    where (drho < 0. .AND. ds_ns < 0.) As = As &
    144144         - (eta + 1.) * khor * sqrt(depth * grav * abs(drho) / rhow)
    145145
  • LMDZ6/branches/Amaury_dev/libf/phylmd/Ocean_skin/phiw_m.F90

    r5116 r5117  
    99    ! Fonction de stabilit\'e (Monin Obukhov)
    1010
    11     real, intent(in):: zL ! profondeur  / longueur de Monin-Obukhov
     11    REAL, INTENT(IN):: zL ! profondeur  / longueur de Monin-Obukhov
    1212
    1313    !----------------------------------------------
    1414
    15     if (zL < 0.) THEN
     15    IF (zL < 0.) THEN
    1616       Phiw = (1. - 16. * zL)**(- 0.5)
    1717    else
  • LMDZ6/branches/Amaury_dev/libf/phylmd/Ocean_skin/sens_heat_rain_m.F90

    r5116 r5117  
    66
    77#ifdef IN_LMDZ
    8   real function 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)
    99#else
    1010  elemental real function sens_heat_rain(rain, t, q, rhoa, xlv, t_int, p)
     
    1818    ! OpenMP 5.0.
    1919
    20     use const, ONLY: cpa, cpw, rgas
     20    USE const, ONLY: cpa, cpw, rgas
    2121#ifndef IN_LMDZ
    22     use const, ONLY: eps_w
     22    USE const, ONLY: eps_w
    2323#endif
    24     use esat_m, ONLY: esat
     24    USE esat_m, ONLY: esat
    2525
    2626#ifdef IN_LMDZ
     
    2929#endif
    3030
    31     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
     31    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
    3838
    3939    ! Local:
    4040   
    41     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
     41    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
    4747
    48     real wetc
     48    REAL wetc
    4949    ! derivative of saturated mass fraction of water vapor with
    5050    ! respect to temperature, at constant total pressure
  • LMDZ6/branches/Amaury_dev/libf/phylmd/Ocean_skin/therm_expans_m.F90

    r5116 r5117  
    99    ! Compute the thermal expansion coefficient of sea water.
    1010
    11     real, intent(in):: t ! temperature, in K
     11    REAL, INTENT(IN):: t ! temperature, in K
    1212
    1313    !--------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.