Changeset 3744 for LMDZ6


Ignore:
Timestamp:
Jul 1, 2020, 6:57:48 PM (4 years ago)
Author:
lguez
Message:

Store delta_sst instead of sst_nff

Store as a state variable the difference between ocean-air interface
temperature and bulk SST instead of sst_nff, which can be either
interface temperature or bulk SST. This is clearer. Also, it is
analoguous to what we will do with salinity.

So replace the two dummy arguments tsurf_in and sst_nff of
procedure cpl_send_ocean_fields by a single dummy argument
delta_sst. Replace dummy argument sst_nff of procedures
ocean_cpl_noice and surf_ocean by dummy argument
delta_sst. Replace variable sst_nff of module phys_state_var_mod
by variable delta_sst. Rename local variable ysst_nff of procedure
pbl_surface to ydelta_sst. Set variable delta_sst of module
phys_state_var_mod to 0 for an appearing ocean fraction and a
missing startup field. Replace variable o_sst_nff of module
phys_output_ctrlout_mod by variable o_delta_sst.

Rename variables cpl_delta_temp and cpl_delta_temp_2D of module
cpl_mod to cpl_delta_sst and cpl_delta_sst_2D, clearer. Rename
variable ids_delta_temp of module oasis to ids_delta_sst. Change
infosend(ids_delta_temp)%name to "CODELSST".

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

Legend:

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

    r3740 r3744  
    4949  !$OMP THREADPRIVATE(cpl_snow,cpl_evap,cpl_tsol)
    5050
    51   REAL, ALLOCATABLE, SAVE:: cpl_delta_temp(:), cpl_s_int(:)
    52   !$OMP THREADPRIVATE(cpl_delta_temp, cpl_s_int)
     51  REAL, ALLOCATABLE, SAVE:: cpl_delta_sst(:), cpl_s_int(:)
     52  !$OMP THREADPRIVATE(cpl_delta_sst, cpl_s_int)
    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_temp_2D(:,:), cpl_s_int_2D(:,:)
    97   !$OMP THREADPRIVATE(cpl_delta_temp_2D, cpl_s_int_2D)
     96  REAL, ALLOCATABLE, SAVE:: cpl_delta_sst_2D(:,:), cpl_s_int_2D(:,:)
     97  !$OMP THREADPRIVATE(cpl_delta_sst_2D, cpl_s_int_2D)
    9898
    9999  REAL, ALLOCATABLE, DIMENSION(:,:,:), SAVE :: cpl_fder2D, cpl_albe2D
     
    237237   
    238238       if (activate_ocean_skin == 2) then
    239           ALLOCATE(cpl_delta_temp(klon), cpl_s_int(klon), stat = error)
     239          ALLOCATE(cpl_delta_sst(klon), cpl_s_int(klon), stat = error)
    240240          sum_error = sum_error + error
    241241       end if
     
    645645       swdown, lwdown, fluxlat, fluxsens, &
    646646       precip_rain, precip_snow, evap, tsurf, fder, albsol, taux, tauy, windsp,&
    647        sens_prec_liq, sens_prec_sol, lat_prec_liq, lat_prec_sol, tsurf_in, &
    648        sst_nff, s_int)
     647       sens_prec_liq, sens_prec_sol, lat_prec_liq, lat_prec_sol, delta_sst, &
     648       s_int)
    649649
    650650    ! This subroutine cumulates some fields for each time-step during
     
    672672    REAL, INTENT(IN):: sens_prec_liq(:), sens_prec_sol(:) ! (knon)
    673673    REAL, DIMENSION(klon), INTENT(IN)       :: lat_prec_liq, lat_prec_sol
    674     real, intent(in):: tsurf_in(:) ! (klon)
    675    
    676     REAL, intent(in):: sst_nff(:) ! (knon)
    677     ! SST not used to compute surface fluxes, in K. If
    678     ! activate_ocean_skin == 0 then it is not defined; if
    679     ! activate_ocean_skin == 1 then it is the ocean-air interface
    680     ! temperature; if activate_ocean_skin == 2 then it is the bulk SST.
     674   
     675    REAL, intent(in):: delta_sst(:) ! (knon)
     676    ! Ocean-air interface temperature minus bulk SST, in
     677    ! K. Defined only if activate_ocean_skin >= 1.
    681678
    682679    real, intent(in):: s_int(:) ! (knon) ocean-air interface salinity, in ppt
     
    718715
    719716       if (activate_ocean_skin == 2) then
    720           cpl_delta_temp(:knon) = 0.
     717          cpl_delta_sst(:knon) = 0.
    721718          cpl_s_int = 0.
    722719       end if
     
    764761
    765762       if (activate_ocean_skin == 2) then
    766           cpl_delta_temp(ig) = cpl_delta_temp(ig) &
    767                + (tsurf_in(ig) - sst_nff(ig)) / REAL(nexca)
     763          cpl_delta_sst(ig) = cpl_delta_sst(ig) + delta_sst(ig) / REAL(nexca)
    768764          cpl_s_int(ig) = cpl_s_int(ig) + s_int(ig) / REAL(nexca)
    769765       end if
     
    815811
    816812          if (activate_ocean_skin == 2) then
    817              ALLOCATE(cpl_delta_temp_2D(nbp_lon, jj_nb), &
     813             ALLOCATE(cpl_delta_sst_2D(nbp_lon, jj_nb), &
    818814                  cpl_s_int_2D(nbp_lon, jj_nb), stat = error)
    819815             sum_error = sum_error + error
     
    875871            CALL gath2cpl(cpl_atm_co2(:,cpl_index), cpl_atm_co22D(:,:), knon, knindex)
    876872       if (activate_ocean_skin == 2) then
    877           CALL gath2cpl(cpl_delta_temp, cpl_delta_temp_2D, knon, knindex)
     873          CALL gath2cpl(cpl_delta_sst, cpl_delta_sst_2D, knon, knindex)
    878874          CALL gath2cpl(cpl_s_int, cpl_s_int_2D, knon, knindex)
    879875       end if
     
    12731269
    12741270    if (activate_ocean_skin == 2) then
    1275        tab_flds(:, :, ids_delta_temp) = cpl_delta_temp_2D
     1271       tab_flds(:, :, ids_delta_sst) = cpl_delta_sst_2D
    12761272       tab_flds(:, :, ids_s_int) = cpl_s_int_2D
    12771273    end if
     
    15121508    ENDIF
    15131509
    1514     if (activate_ocean_skin == 2) deallocate(cpl_delta_temp_2d, cpl_s_int_2d)
     1510    if (activate_ocean_skin == 2) deallocate(cpl_delta_sst_2d, cpl_s_int_2d)
    15151511
    15161512    IF (sum_error /= 0) THEN
  • LMDZ6/branches/Ocean_skin/libf/phylmd/oasis.F90

    r3740 r3744  
    5959  INTEGER, PARAMETER :: ids_qraiic = 28
    6060  INTEGER, PARAMETER :: ids_qsnoic = 29
    61   INTEGER, PARAMETER :: ids_delta_temp = 30, ids_s_int = 31
     61  INTEGER, PARAMETER :: ids_delta_sst = 30, ids_s_int = 31
    6262 
    6363  INTEGER, PARAMETER :: maxsend    = 31  ! Maximum number of fields to send
     
    190190   
    191191    if (activate_ocean_skin == 2) then
    192        infosend(ids_delta_temp)%action = .TRUE.
    193        infosend(ids_delta_temp)%name = 'CODTEMP'
     192       infosend(ids_delta_sst)%action = .TRUE.
     193       infosend(ids_delta_sst)%name = 'CODELSST'
    194194       infosend(ids_s_int)%action = .TRUE.
    195195       infosend(ids_s_int)%name = 'COSSSSKN'
  • LMDZ6/branches/Ocean_skin/libf/phylmd/ocean_cpl_mod.F90

    r3740 r3744  
    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, sst_nff)
     57       tsurf_new, dflux_s, dflux_l, sens_prec_liq, sss, s_int, rhoa, delta_sst)
    5858
    5959!
     
    9595    real, intent(in):: rhoa(:) ! (knon) density of moist air  (kg / m3)
    9696
    97     REAL, intent(in):: sst_nff(:) ! (knon)
    98     ! SST not used to compute surface fluxes, in K. If
    99     ! activate_ocean_skin == 0 then it is not defined; if
    100     ! activate_ocean_skin == 1 then it is the ocean-air interface
    101     ! temperature; if activate_ocean_skin == 2 then it is the bulk SST.
     97    REAL, intent(in):: delta_sst(:) ! (knon)
     98    ! Ocean-air interface temperature minus bulk SST, in K. Defined
     99    ! only if activate_ocean_skin >= 1.
    102100
    103101! In/Output arguments
     
    217215         fluxsens, precip_rain, precip_snow, evap, tsurf_new, fder_new, alb1, &
    218216         flux_u1, flux_v1, windsp, sens_prec_liq, sens_prec_sol, lat_prec_liq, &
    219          lat_prec_sol, tsurf_in, sst_nff, s_int)
     217         lat_prec_sol, delta_sst, s_int)
    220218
    221219  END SUBROUTINE ocean_cpl_noice
  • LMDZ6/branches/Ocean_skin/libf/phylmd/pbl_surface_mod.F90

    r3740 r3744  
    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, sst_nff
     294    use phys_state_var_mod, only: s_int, ds_ns, dt_ns, delta_sst
    295295    use phys_output_var_mod, only: dter, dser, tkt, tks, taur, sss
    296296#ifdef CPP_XIOS
     
    830830    ! Martin
    831831
    832     real, DIMENSION(klon):: ysst_nff, ys_int, yds_ns, ydt_ns, ydter, ydser, &
     832    real, DIMENSION(klon):: ydelta_sst, ys_int, yds_ns, ydt_ns, ydter, ydser, &
    833833         ytkt, ytks, ytaur, ysss
    834     ! compression of sst_nff, s_int, ds_ns, dt_ns, dter, dser, tkt, tks,
     834    ! compression of delta_sst, s_int, ds_ns, dt_ns, dter, dser, tkt, tks,
    835835    ! taur, sss on ocean points
    836836
     
    14311431          if (activate_ocean_skin == 2 .and. type_ocean == "couple") then
    14321432             ys_int(:knon) = s_int(ni(:knon))
    1433              ysst_nff(:knon) = sst_nff(ni(:knon))
     1433             ydelta_sst(:knon) = delta_sst(ni(:knon))
    14341434          end if
    14351435         
     
    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, ysst_nff(:knon), ys_int(:knon), &
     1959               y_flux_u1, y_flux_v1, ydelta_sst(:knon), ys_int(:knon), &
    19601960               yds_ns(:knon), ydt_ns(:knon), ydter(:knon), ydser(:knon), &
    19611961               ytkt(:knon), ytks(:knon), ytaur(:knon), ysss)
     
    25672567          ds_ns = missing_val
    25682568          dt_ns = missing_val
    2569           sst_nff = missing_val
     2569          delta_sst = missing_val
    25702570          dter = missing_val
    25712571          dser = missing_val
     
    25782578          ds_ns(ni(:knon)) = yds_ns(:knon)
    25792579          dt_ns(ni(:knon)) = ydt_ns(:knon)
    2580           sst_nff(ni(:knon)) = ysst_nff(:knon)
     2580          delta_sst(ni(:knon)) = ydelta_sst(:knon)
    25812581          dter(ni(:knon)) = ydter(:knon)
    25822582          dser(ni(:knon)) = ydser(:knon)
     
    31973197
    31983198    USE indice_sol_mod
    3199     use phys_state_var_mod, only: s_int, ds_ns, dt_ns, sst_nff
     3199    use phys_state_var_mod, only: s_int, ds_ns, dt_ns, delta_sst
    32003200    use config_ocean_skin_m, only: activate_ocean_skin
    32013201
     
    32893289                           .and. type_ocean == "couple") then
    32903290                         s_int(i) = 35.
    3291                          sst_nff(i) = tsurf(i,nsrf)
     3291                         delta_sst(i) = 0.
    32923292                      end if
    32933293                     
  • LMDZ6/branches/Ocean_skin/libf/phylmd/phyetat0.F90

    r3740 r3744  
    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, sst_nff
     21       ale_wake, ale_bl_stat, s_int, ds_ns, dt_ns, delta_sst
    2222!FC
    2323  USE geometry_mod, ONLY : longitude_deg, latitude_deg
     
    544544        found = phyetat0_get(1, s_int, "S_int", &
    545545             "salinity at air-ocean interface", 35.)
    546         found = phyetat0_get(1, sst_nff, "T1", "bulk SST of coupled ocean", 0.)
    547         if (.not. found) sst_nff = ftsol(:,is_oce)
     546        found = phyetat0_get(1, delta_sst, "delta_SST", &
     547             "ocean-air interface temperature minus bulk SST", 0.)
    548548     end if
    549549     
     
    556556        ds_ns = missing_val
    557557        dt_ns = missing_val
    558         sst_nff = missing_val
     558        delta_sst = missing_val
    559559     end where
    560560  end if
  • LMDZ6/branches/Ocean_skin/libf/phylmd/phyredem.F90

    r3740 r3744  
    2727                                ale_wake, ale_bl_stat,                       &
    2828                                du_gwd_rando, du_gwd_front, u10m, v10m,      &
    29                                 treedrg, s_int, ds_ns, dt_ns, sst_nff
     29                                treedrg, s_int, 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
     
    345345          CALL put_field(pass, "S_int", "salinity at air-ocean interface", &
    346346               s_int)
    347           CALL put_field(pass, "T1", "bulk SST of coupled ocean", sst_nff)
     347          CALL put_field(pass, "delta_SST", &
     348               "ocean-air interface temperature minus bulk SST", delta_sst)
    348349       end if
    349350       
  • LMDZ6/branches/Ocean_skin/libf/phylmd/phys_output_ctrlout_mod.F90

    r3720 r3744  
    19471947#endif
    19481948
    1949    type(ctrl_out), save:: o_sst_nff &
    1950         = ctrl_out([1, 10, 10, 1, 10, 10, 11, 11, 11, 11], 'SST_nff', &
    1951         "SST not used to compute fluxes", "K", '')
     1949   type(ctrl_out), save:: o_delta_sst &
     1950        = ctrl_out([1, 10, 10, 1, 10, 10, 11, 11, 11, 11], 'delta_sst', &
     1951        "ocean-air interface temperature minus bulk SST", "K", '')
    19521952
    19531953   type(ctrl_out), save:: o_s_int &
  • LMDZ6/branches/Ocean_skin/libf/phylmd/phys_output_write_mod.F90

    r3740 r3744  
    202202!--interactive CO2
    203203         o_flx_co2_ocean, o_flx_co2_land, o_flx_co2_ff, o_flx_co2_bb, &
    204          o_sst_nff, o_s_int, o_ds_ns, o_dt_ns, o_dter, o_dser, o_tkt, o_tks, &
     204         o_delta_sst, o_s_int, o_ds_ns, o_dt_ns, o_dter, o_dser, o_tkt, o_tks, &
    205205         o_taur, o_sss
    206206
     
    250250         rhlevSTD, O3STD, O3daySTD, uvSTD, vqSTD, vTSTD, wqSTD, vphiSTD, &
    251251         wTSTD, u2STD, v2STD, T2STD, missing_val_nf90, s_int, ds_ns, dt_ns, &
    252          sst_nff
     252         delta_sst
    253253
    254254    USE phys_local_var_mod, ONLY: zxfluxlat, slp, ptstar, pt0, zxtsol, zt2m, &
     
    23052305
    23062306       if (activate_ocean_skin >= 1) then
    2307           CALL histwrite_phy(o_sst_nff, sst_nff)
     2307          CALL histwrite_phy(o_delta_sst, delta_sst)
    23082308          CALL histwrite_phy(o_s_int, s_int)
    23092309          CALL histwrite_phy(o_ds_ns, ds_ns)
  • LMDZ6/branches/Ocean_skin/libf/phylmd/phys_state_var_mod.F90

    r3740 r3744  
    434434      REAL, ALLOCATABLE, SAVE:: s_int(:) ! interface salinity, in ppt
    435435     
    436       REAL, ALLOCATABLE, SAVE:: ds_ns(:)
     436      REAL, ALLOCATABLE, SAVE:: ds_ns(:) ! (klon)
    437437      ! "delta salinity near surface". Salinity variation in the
    438438      ! near-surface turbulent layer. That is subskin salinity minus
    439439      ! foundation salinity. In ppt.
    440440
    441       REAL, ALLOCATABLE, SAVE:: dt_ns(:)
     441      REAL, ALLOCATABLE, SAVE:: dt_ns(:) ! (klon)
    442442      ! "delta temperature near surface". Temperature variation in the
    443443      ! near-surface turbulent layer. That is subskin temperature
    444444      ! minus foundation temperature. (Can be negative.) In K.
    445445     
    446       REAL, ALLOCATABLE, SAVE:: sst_nff(:)
    447       ! SST not used to compute surface fluxes, in K. If
    448       ! activate_ocean_skin == 0 then it is not allocated; if
    449       ! activate_ocean_skin == 1 then it is the ocean-air interface
    450       ! temperature; if activate_ocean_skin == 2 then it is the bulk SST.
    451 
    452       !$OMP THREADPRIVATE(s_int, ds_ns, dt_ns, sst_nff)
     446      REAL, ALLOCATABLE, SAVE:: delta_sst(:) ! (klon)
     447      ! Ocean-air interface temperature minus bulk SST, in
     448      ! K. Allocated and defined only if activate_ocean_skin >= 1.
     449
     450      !$OMP THREADPRIVATE(s_int, ds_ns, dt_ns, delta_sst)
    453451
    454452    CONTAINS
     
    659657      ENDIF
    660658      if (activate_ocean_skin >= 1) ALLOCATE(s_int(klon), ds_ns(klon), &
    661            dt_ns(klon), sst_nff(klon))
     659           dt_ns(klon), delta_sst(klon))
    662660
    663661    END SUBROUTINE phys_state_var_init
     
    797795!!! fin nrlmd le 10/04/2012
    798796
    799       if (activate_ocean_skin >= 1) deALLOCATE(s_int, ds_ns, dt_ns, sst_nff)
     797      if (activate_ocean_skin >= 1) deALLOCATE(s_int, ds_ns, dt_ns, delta_sst)
    800798
    801799      is_initialized=.FALSE.
  • LMDZ6/branches/Ocean_skin/libf/phylmd/surf_ocean_mod.F90

    r3740 r3744  
    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, sst_nff, s_int, ds_ns, dt_ns, dter, dser, tkt, tks, &
     22       flux_u1, flux_v1, delta_sst, s_int, ds_ns, dt_ns, dter, dser, tkt, tks, &
    2323       taur, sss)
    2424
     
    8888    ! minus foundation temperature. (Can be negative.) In K.
    8989
    90     REAL, intent(inout):: sst_nff(:) ! (knon)
    91     ! SST not used to compute surface fluxes, in K. If
    92     ! activate_ocean_skin == 0 then it is not defined; if
    93     ! activate_ocean_skin == 1 then it is the ocean-air interface
    94     ! temperature; if activate_ocean_skin == 2 then it is the bulk SST.
     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.
    9593
    9694    ! Output variables
     
    191189            qsurf, evap, fluxsens, fluxlat, flux_u1, flux_v1, &
    192190            tsurf_new, dflux_s, dflux_l, sens_prec_liq, sss, s_int, rhoa, &
    193             sst_nff)
     191            delta_sst)
    194192
    195193    CASE('slab')
     
    328326            xlv = [(rlvtt, i = 1, knon)], rf = - sens_prec_liq, dtime = dtime, &
    329327            rns = swnet(:knon))
    330 
    331        if (activate_ocean_skin == 1) then
    332           sst_nff = t_int
    333        else
    334           ! activate_ocean_skin == 2
    335           sst_nff = tsurf_new(:knon)
    336           tsurf_new(:knon) = t_int
    337        end if
     328       delta_sst = t_int - tsurf_new(:knon)
     329       if (activate_ocean_skin >= 2) tsurf_new(:knon) = t_int
    338330    end if
    339331   
Note: See TracChangeset for help on using the changeset viewer.