Changeset 3767 for LMDZ6


Ignore:
Timestamp:
Jul 19, 2020, 5:25:06 PM (4 years ago)
Author:
lguez
Message:

Store delta_sal instead of s_int

Revision analoguous to revision [3744], for salinity. Store as a state
variable and send to the ocean delta_sal, the difference between
ocean-air interface salinity and bulk salinity, instead of s_int,
the interface salinity.

So replace dummy argument s_int of procedure cpl_send_ocean_fields
by dummy argument delta_sal. Replace dummy argument s_int of
procedures ocean_cpl_noice and surf_ocean by dummy argument
delta_sal. Replace variable s_int of module phys_state_var_mod
by variable delta_sal. Rename local variable ys_int of procedure
pbl_surface to ydelta_sal. Set variable delta_sal of module
phys_state_var_mod to 0 for an appearing ocean fraction and a
missing startup field. Replace variable o_s_int of module
phys_output_ctrlout_mod by variable o_delta_sal.

Rename variables cpl_s_int and cpl_s_int_2D of module cpl_mod to
cpl_delta_sal and cpl_delta_sal_2D. Rename variable ids_s_int of
module oasis to ids_delta_sal. Change infosend(ids_delta_sal)%name
to "CODELSSS".

Location:
LMDZ6/branches/Ocean_skin/libf/phylmd
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/branches/Ocean_skin/libf/phylmd/cpl_mod.F90

    r3744 r3767  
    4949  !$OMP THREADPRIVATE(cpl_snow,cpl_evap,cpl_tsol)
    5050
    51   REAL, ALLOCATABLE, SAVE:: cpl_delta_sst(:), cpl_s_int(:)
    52   !$OMP THREADPRIVATE(cpl_delta_sst, cpl_s_int)
     51  REAL, ALLOCATABLE, SAVE:: cpl_delta_sst(:), cpl_delta_sal(:)
     52  !$OMP THREADPRIVATE(cpl_delta_sst, cpl_delta_sal)
    5353 
    5454  REAL, ALLOCATABLE, DIMENSION(:,:), SAVE   :: cpl_fder, cpl_albe, cpl_taux, cpl_tauy
     
    9494  !$OMP THREADPRIVATE(cpl_snow2D, cpl_evap2D, cpl_tsol2D)
    9595
    96   REAL, ALLOCATABLE, SAVE:: cpl_delta_sst_2D(:,:), cpl_s_int_2D(:,:)
    97   !$OMP THREADPRIVATE(cpl_delta_sst_2D, cpl_s_int_2D)
     96  REAL, ALLOCATABLE, SAVE:: cpl_delta_sst_2D(:,:), cpl_delta_sal_2D(:,:)
     97  !$OMP THREADPRIVATE(cpl_delta_sst_2D, cpl_delta_sal_2D)
    9898
    9999  REAL, ALLOCATABLE, DIMENSION(:,:,:), SAVE :: cpl_fder2D, cpl_albe2D
     
    237237   
    238238       if (activate_ocean_skin == 2) then
    239           ALLOCATE(cpl_delta_sst(klon), cpl_s_int(klon), stat = error)
     239          ALLOCATE(cpl_delta_sst(klon), cpl_delta_sal(klon), stat = error)
    240240          sum_error = sum_error + error
    241241       end if
     
    646646       precip_rain, precip_snow, evap, tsurf, fder, albsol, taux, tauy, windsp,&
    647647       sens_prec_liq, sens_prec_sol, lat_prec_liq, lat_prec_sol, delta_sst, &
    648        s_int)
     648       delta_sal)
    649649
    650650    ! This subroutine cumulates some fields for each time-step during
     
    677677    ! K. Defined only if activate_ocean_skin >= 1.
    678678
    679     real, intent(in):: s_int(:) ! (knon) ocean-air interface salinity, in ppt
     679    real, intent(in):: delta_sal(:) ! (knon)
     680    ! Ocean-air interface salinity minus bulk salinity, in ppt.
    680681
    681682! Local variables
     
    715716
    716717       if (activate_ocean_skin == 2) then
    717           cpl_delta_sst(:knon) = 0.
    718           cpl_s_int = 0.
     718          cpl_delta_sst = 0.
     719          cpl_delta_sal = 0.
    719720       end if
    720721    ENDIF
     
    762763       if (activate_ocean_skin == 2) then
    763764          cpl_delta_sst(ig) = cpl_delta_sst(ig) + delta_sst(ig) / REAL(nexca)
    764           cpl_s_int(ig) = cpl_s_int(ig) + s_int(ig) / REAL(nexca)
     765          cpl_delta_sal(ig) = cpl_delta_sal(ig) + delta_sal(ig) / REAL(nexca)
    765766       end if
    766767     ENDDO
     
    812813          if (activate_ocean_skin == 2) then
    813814             ALLOCATE(cpl_delta_sst_2D(nbp_lon, jj_nb), &
    814                   cpl_s_int_2D(nbp_lon, jj_nb), stat = error)
     815                  cpl_delta_sal_2D(nbp_lon, jj_nb), stat = error)
    815816             sum_error = sum_error + error
    816817          end if
     
    872873       if (activate_ocean_skin == 2) then
    873874          CALL gath2cpl(cpl_delta_sst, cpl_delta_sst_2D, knon, knindex)
    874           CALL gath2cpl(cpl_s_int, cpl_s_int_2D, knon, knindex)
     875          CALL gath2cpl(cpl_delta_sal, cpl_delta_sal_2D, knon, knindex)
    875876       end if
    876877    ENDIF
     
    12701271    if (activate_ocean_skin == 2) then
    12711272       tab_flds(:, :, ids_delta_sst) = cpl_delta_sst_2D
    1272        tab_flds(:, :, ids_s_int) = cpl_s_int_2D
     1273       tab_flds(:, :, ids_delta_sal) = cpl_delta_sal_2D
    12731274    end if
    12741275   
     
    15081509    ENDIF
    15091510
    1510     if (activate_ocean_skin == 2) deallocate(cpl_delta_sst_2d, cpl_s_int_2d)
     1511    if (activate_ocean_skin == 2) deallocate(cpl_delta_sst_2d, cpl_delta_sal_2d)
    15111512
    15121513    IF (sum_error /= 0) THEN
  • LMDZ6/branches/Ocean_skin/libf/phylmd/oasis.F90

    r3744 r3767  
    5959  INTEGER, PARAMETER :: ids_qraiic = 28
    6060  INTEGER, PARAMETER :: ids_qsnoic = 29
    61   INTEGER, PARAMETER :: ids_delta_sst = 30, ids_s_int = 31
     61  INTEGER, PARAMETER :: ids_delta_sst = 30, ids_delta_sal = 31
    6262 
    6363  INTEGER, PARAMETER :: maxsend    = 31  ! Maximum number of fields to send
     
    192192       infosend(ids_delta_sst)%action = .TRUE.
    193193       infosend(ids_delta_sst)%name = 'CODELSST'
    194        infosend(ids_s_int)%action = .TRUE.
    195        infosend(ids_s_int)%name = 'COSSSSKN'
     194       infosend(ids_delta_sal)%action = .TRUE.
     195       infosend(ids_delta_sal)%name = 'CODELSSS'
    196196    end if
    197197           
  • LMDZ6/branches/Ocean_skin/libf/phylmd/ocean_cpl_mod.F90

    r3744 r3767  
    5555       radsol, snow, agesno, &
    5656       qsurf, evap, fluxsens, fluxlat, flux_u1, flux_v1, &
    57        tsurf_new, dflux_s, dflux_l, sens_prec_liq, sss, s_int, rhoa, delta_sst)
     57       tsurf_new, dflux_s, dflux_l, sens_prec_liq, sss, delta_sal, rhoa, &
     58       delta_sst)
    5859
    5960!
     
    9293    REAL, DIMENSION(klon), INTENT(IN)        :: u1, v1, gustiness
    9394    REAL, INTENT(IN) :: tsurf_in(:) ! (klon)
    94     real, intent(in):: s_int(:) ! (knon) ocean-air interface salinity, in ppt
     95
     96    real, intent(in):: delta_sal(:) ! (knon)
     97    ! ocean-air interface salinity minus bulk salinity, in ppt
     98
    9599    real, intent(in):: rhoa(:) ! (knon) density of moist air  (kg / m3)
    96100
     
    215219         fluxsens, precip_rain, precip_snow, evap, tsurf_new, fder_new, alb1, &
    216220         flux_u1, flux_v1, windsp, sens_prec_liq, sens_prec_sol, lat_prec_liq, &
    217          lat_prec_sol, delta_sst, s_int)
     221         lat_prec_sol, delta_sst, delta_sal)
    218222
    219223  END SUBROUTINE ocean_cpl_noice
  • LMDZ6/branches/Ocean_skin/libf/phylmd/pbl_surface_mod.F90

    r3744 r3767  
    292292    USE print_control_mod,  ONLY : prt_level,lunout
    293293    USE ioipsl_getin_p_mod, ONLY : getin_p
    294     use phys_state_var_mod, only: s_int, ds_ns, dt_ns, delta_sst
     294    use phys_state_var_mod, only: ds_ns, dt_ns, delta_sst, delta_sal
    295295    use phys_output_var_mod, only: dter, dser, tkt, tks, taur, sss
    296296#ifdef CPP_XIOS
     
    830830    ! Martin
    831831
    832     real, DIMENSION(klon):: ydelta_sst, ys_int, yds_ns, ydt_ns, ydter, ydser, &
     832    real, DIMENSION(klon):: ydelta_sst, ydelta_sal, yds_ns, ydt_ns, ydter, ydser, &
    833833         ytkt, ytks, ytaur, ysss
    834     ! compression of delta_sst, s_int, ds_ns, dt_ns, dter, dser, tkt, tks,
     834    ! compression of delta_sst, delta_sal, ds_ns, dt_ns, dter, dser, tkt, tks,
    835835    ! taur, sss on ocean points
    836836
     
    14301430       if (nsrf == is_oce .and. activate_ocean_skin >= 1) then
    14311431          if (activate_ocean_skin == 2 .and. type_ocean == "couple") then
    1432              ys_int(:knon) = s_int(ni(:knon))
     1432             ydelta_sal(:knon) = delta_sal(ni(:knon))
    14331433             ydelta_sst(:knon) = delta_sst(ni(:knon))
    14341434          end if
     
    19571957               yz0m, yz0h, SFRWL,yalb_dir_new, yalb_dif_new, yevap, yfluxsens,yfluxlat,&
    19581958               ytsurf_new, y_dflux_t, y_dflux_q, slab_wfbils, &
    1959                y_flux_u1, y_flux_v1, ydelta_sst(:knon), ys_int(:knon), &
     1959               y_flux_u1, y_flux_v1, ydelta_sst(:knon), ydelta_sal(:knon), &
    19601960               yds_ns(:knon), ydt_ns(:knon), ydter(:knon), ydser(:knon), &
    19611961               ytkt(:knon), ytks(:knon), ytaur(:knon), ysss)
     
    25642564
    25652565       if (nsrf == is_oce .and. activate_ocean_skin >= 1) then
    2566           s_int = missing_val
     2566          delta_sal = missing_val
    25672567          ds_ns = missing_val
    25682568          dt_ns = missing_val
     
    25752575          sss = missing_val
    25762576         
    2577           s_int(ni(:knon)) = ys_int(:knon)
     2577          delta_sal(ni(:knon)) = ydelta_sal(:knon)
    25782578          ds_ns(ni(:knon)) = yds_ns(:knon)
    25792579          dt_ns(ni(:knon)) = ydt_ns(:knon)
     
    31973197
    31983198    USE indice_sol_mod
    3199     use phys_state_var_mod, only: s_int, ds_ns, dt_ns, delta_sst
     3199    use phys_state_var_mod, only: delta_sal, ds_ns, dt_ns, delta_sst
    32003200    use config_ocean_skin_m, only: activate_ocean_skin
    32013201
     
    32883288                      if (activate_ocean_skin == 2 &
    32893289                           .and. type_ocean == "couple") then
    3290                          s_int(i) = 35.
     3290                         delta_sal(i) = 0.
    32913291                         delta_sst(i) = 0.
    32923292                      end if
  • LMDZ6/branches/Ocean_skin/libf/phylmd/phyetat0.F90

    r3766 r3767  
    1919       wake_s, wake_dens, zgam, zmax0, zmea, zpic, zsig, &
    2020       zstd, zthe, zval, ale_bl, ale_bl_trig, alp_bl, u10m, v10m, treedrg, &
    21        ale_wake, ale_bl_stat, s_int, ds_ns, dt_ns, delta_sst
     21       ale_wake, ale_bl_stat, ds_ns, dt_ns, delta_sst, delta_sal
    2222!FC
    2323  USE geometry_mod, ONLY : longitude_deg, latitude_deg
     
    525525  if (activate_ocean_skin >= 1) then
    526526     if (activate_ocean_skin == 2 .and. type_ocean == 'couple') then
    527         found = phyetat0_get(1, s_int, "S_int", &
    528              "salinity at air-ocean interface", 35.)
     527        found = phyetat0_get(1, delta_sal, "delta_sal", &
     528             "ocean-air interface salinity minus bulk salinity", 0.)
    529529        found = phyetat0_get(1, delta_sst, "delta_SST", &
    530530             "ocean-air interface temperature minus bulk SST", 0.)
     
    536536
    537537     where (pctsrf(:, is_oce) == 0.)
    538         s_int = missing_val
    539538        ds_ns = missing_val
    540539        dt_ns = missing_val
    541540        delta_sst = missing_val
     541        delta_sal = missing_val
    542542     end where
    543543  end if
  • LMDZ6/branches/Ocean_skin/libf/phylmd/phyredem.F90

    r3744 r3767  
    2727                                ale_wake, ale_bl_stat,                       &
    2828                                du_gwd_rando, du_gwd_front, u10m, v10m,      &
    29                                 treedrg, s_int, ds_ns, dt_ns, delta_sst
     29                                treedrg, delta_sal, ds_ns, dt_ns, delta_sst
    3030  USE geometry_mod, ONLY : longitude_deg, latitude_deg
    3131  USE iostart, ONLY: open_restartphy, close_restartphy, enddef_restartphy, put_field, put_var
     
    343343    if (activate_ocean_skin >= 1) then
    344344       if (activate_ocean_skin == 2 .and. type_ocean == 'couple') then
    345           CALL put_field(pass, "S_int", "salinity at air-ocean interface", &
    346                s_int)
     345          CALL put_field(pass, "delta_sal", &
     346               "ocean-air interface salinity minus bulk salinity", delta_sal)
    347347          CALL put_field(pass, "delta_SST", &
    348348               "ocean-air interface temperature minus bulk SST", delta_sst)
  • LMDZ6/branches/Ocean_skin/libf/phylmd/phys_output_ctrlout_mod.F90

    r3747 r3767  
    19511951        "ocean-air interface temperature minus bulk SST", "K", '')
    19521952
    1953    type(ctrl_out), save:: o_s_int &
    1954         = ctrl_out([1, 10, 10, 1, 10, 10, 11, 11, 11, 11], 'S_int', &
    1955         "ocean-air interface salinity", "ppt", '')
     1953   type(ctrl_out), save:: o_delta_sal &
     1954        = ctrl_out([1, 10, 10, 1, 10, 10, 11, 11, 11, 11], 'delta_sal', &
     1955        "ocean-air interface salinity minus bulk salinity", "ppt", '')
    19561956
    19571957   type(ctrl_out), save:: o_ds_ns &
    19581958        = ctrl_out([1, 10, 10, 1, 10, 10, 11, 11, 11, 11], 'dS_ns', &
    1959         "delta salinity near surface", "ppt", '')
     1959        "subskin salinity minus foundation salinity", "ppt", '')
    19601960
    19611961   type(ctrl_out), save:: o_dt_ns &
    19621962        = ctrl_out([1, 10, 10, 1, 10, 10, 11, 11, 11, 11], 'dT_ns', &
    1963         "sub-skin temperature minus foundation temperature", "K", '')
     1963        "subskin temperature minus foundation temperature", "K", '')
    19641964
    19651965   type(ctrl_out), save:: o_dter &
    19661966        = ctrl_out([1, 10, 10, 1, 10, 10, 11, 11, 11, 11], 'dTer', &
    1967         "interface temperature minus sub-skin temperature", "K", '')
     1967        "ocean-air interface temperature minus sub-skin temperature", "K", '')
    19681968
    19691969   type(ctrl_out), save:: o_dser &
    19701970        = ctrl_out([1, 10, 10, 1, 10, 10, 11, 11, 11, 11], 'dSer', &
    1971         "salinity variation in the diffusive microlayer", "ppt", '')
     1971        "ocean-air interface salinity minus sub-skin salinity", "ppt", '')
    19721972
    19731973   type(ctrl_out), save:: o_tkt &
  • LMDZ6/branches/Ocean_skin/libf/phylmd/phys_output_write_mod.F90

    r3747 r3767  
    202202!--interactive CO2
    203203         o_flx_co2_ocean, o_flx_co2_land, o_flx_co2_ff, o_flx_co2_bb, &
    204          o_delta_sst, o_s_int, o_ds_ns, o_dt_ns, o_dter, o_dser, o_tkt, o_tks, &
    205          o_taur, o_sss
     204         o_delta_sst, o_delta_sal, o_ds_ns, o_dt_ns, o_dter, o_dser, o_tkt, &
     205         o_tks, o_taur, o_sss
    206206
    207207#ifdef CPP_StratAer
     
    249249         ulevSTD, vlevSTD, wlevSTD, philevSTD, qlevSTD, tlevSTD, &
    250250         rhlevSTD, O3STD, O3daySTD, uvSTD, vqSTD, vTSTD, wqSTD, vphiSTD, &
    251          wTSTD, u2STD, v2STD, T2STD, missing_val_nf90, s_int, ds_ns, dt_ns, &
    252          delta_sst
     251         wTSTD, u2STD, v2STD, T2STD, missing_val_nf90, delta_sal, ds_ns, &
     252         dt_ns, delta_sst
    253253
    254254    USE phys_local_var_mod, ONLY: zxfluxlat, slp, ptstar, pt0, zxtsol, zt2m, &
     
    23042304       if (activate_ocean_skin >= 1) then
    23052305          CALL histwrite_phy(o_delta_sst, delta_sst)
    2306           CALL histwrite_phy(o_s_int, s_int)
     2306          CALL histwrite_phy(o_delta_sal, delta_sal)
    23072307          CALL histwrite_phy(o_ds_ns, ds_ns)
    23082308          CALL histwrite_phy(o_dt_ns, dt_ns)
  • LMDZ6/branches/Ocean_skin/libf/phylmd/phys_state_var_mod.F90

    r3744 r3767  
    430430!$OMP THREADPRIVATE(is_initialized)   
    431431
    432       ! Ocean-atmosphere interface, subskin ocean and near-surface ocean:
    433 
    434       REAL, ALLOCATABLE, SAVE:: s_int(:) ! interface salinity, in ppt
    435      
     432      ! Ocean-atmosphere interface:
     433
    436434      REAL, ALLOCATABLE, SAVE:: ds_ns(:) ! (klon)
    437435      ! "delta salinity near surface". Salinity variation in the
     
    448446      ! K. Allocated and defined only if activate_ocean_skin >= 1.
    449447
    450       !$OMP THREADPRIVATE(s_int, ds_ns, dt_ns, delta_sst)
     448      REAL, ALLOCATABLE, SAVE:: delta_sal(:) ! (klon)
     449      ! Ocean-air interface salinity minus bulk salinity, in ppt
     450     
     451      !$OMP THREADPRIVATE(delta_sal, ds_ns, dt_ns, delta_sst)
    451452
    452453    CONTAINS
     
    656657        du_gwd_front(:,:) = 0 !ym missing init   
    657658      ENDIF
    658       if (activate_ocean_skin >= 1) ALLOCATE(s_int(klon), ds_ns(klon), &
     659      if (activate_ocean_skin >= 1) ALLOCATE(delta_sal(klon), ds_ns(klon), &
    659660           dt_ns(klon), delta_sst(klon))
    660661
     
    795796!!! fin nrlmd le 10/04/2012
    796797
    797       if (activate_ocean_skin >= 1) deALLOCATE(s_int, ds_ns, dt_ns, delta_sst)
     798      if (activate_ocean_skin >= 1) deALLOCATE(delta_sal, ds_ns, dt_ns, &
     799           delta_sst)
    798800
    799801      is_initialized=.FALSE.
  • LMDZ6/branches/Ocean_skin/libf/phylmd/surf_ocean_mod.F90

    r3744 r3767  
    2020       z0m, z0h, SFRWL, alb_dir_new, alb_dif_new, evap, fluxsens, fluxlat, &
    2121       tsurf_new, dflux_s, dflux_l, lmt_bils, &
    22        flux_u1, flux_v1, delta_sst, s_int, ds_ns, dt_ns, dter, dser, tkt, tks, &
     22       flux_u1, flux_v1, delta_sst, delta_sal, ds_ns, dt_ns, dter, dser, tkt, tks, &
    2323       taur, sss)
    2424
     
    7676    REAL, DIMENSION(klon), INTENT(inOUT):: z0h
    7777
    78     real, intent(inout):: s_int(:) ! (knon) ocean-air interface salinity, in ppt
     78    REAL, intent(inout):: delta_sst(:) ! (knon)
     79    ! Ocean-air interface temperature minus bulk SST, in K. Defined
     80    ! only if activate_ocean_skin >= 1.
     81
     82    real, intent(inout):: delta_sal(:) ! (knon)
     83    ! Ocean-air interface salinity minus bulk salinity, in ppt.
    7984
    8085    REAL, intent(inout):: ds_ns(:) ! (knon)
     
    8893    ! minus foundation temperature. (Can be negative.) In K.
    8994
    90     REAL, intent(inout):: delta_sst(:) ! (knon)
    91     ! Ocean-air interface temperature minus bulk SST, in K. Defined
    92     ! only if activate_ocean_skin >= 1.
    93 
    9495    ! Output variables
    95     !******************************************************************************
     96    !**************************************************************************
    9697    REAL, DIMENSION(klon), INTENT(OUT)       :: z0m
    9798    !albedo SB >>>
     
    132133
    133134    ! Local variables
    134     !******************************************************************************
     135    !*************************************************************************
    135136    INTEGER               :: i, k
    136137    REAL                  :: tmp
     
    144145
    145146    REAL t_int(knon) ! ocean-air interface temperature, in K
    146 
    147     !******************************************************************************
     147    real s_int(knon) ! ocean-air interface salinity, in ppt
     148
     149    !**************************************************************************
    148150
    149151
     
    188190            radsol, snow, agesno, &
    189191            qsurf, evap, fluxsens, fluxlat, flux_u1, flux_v1, &
    190             tsurf_new, dflux_s, dflux_l, sens_prec_liq, sss, s_int, rhoa, &
     192            tsurf_new, dflux_s, dflux_l, sens_prec_liq, sss, delta_sal, rhoa, &
    191193            delta_sst)
    192194
     
    327329            rns = swnet(:knon))
    328330       delta_sst = t_int - tsurf_new(:knon)
     331       delta_sal = s_int - sss(:knon)
    329332       if (activate_ocean_skin >= 2) tsurf_new(:knon) = t_int
    330333    end if
Note: See TracChangeset for help on using the changeset viewer.