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

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

File:
1 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, &
Note: See TracChangeset for help on using the changeset viewer.