Ignore:
Timestamp:
Jun 30, 2020, 9:14:36 PM (4 years ago)
Author:
lguez
Message:

Send delta temperature to the ocean

The grid of Nemo is finer than the grid of LMDZ. So LMDZ receives from
Oasis a spatial average of bulk SST. If we send to Nemo the interface
temperature computed by LMDZ, it is regridded as a step function
by Oasis and, in Nemo, the difference between bulk SST and interface
temperature has spatial oscillations. To avoid this, we send to Nemo
the difference between bulk SST and interface temperature computed by
LMDZ, instead of the interface temperature.

So, in module cpl_mod, rename cpl_t_int to cpl_delta_temp,
cpl_t_int_2D to cpl_delta_temp_2D. In module oasis, rename
ids_t_int to ids_delta_temp. Change
infosend(ids_delta_temp)%name to "CODTEMP".

In procedure cpl_send_ocean_fields, rename dummy argument
t_int to tsurf_in just for clarity, because this argument is
passed also when activate_ocean_skin /= 2. Add dummy argument
sst_nff. We cannot just replace dummy argument t_int by a dummy
argument that would receive tsurf_in - sst_nff because sst_nff is
not defined when activate_ocean_skin == 0.

In procedure ocean_cpl_noice, add dummy argument sst_nff.

As for interface salinity, we have to send delta temperature from the
previous time step. So we have to transform sst_nff into a state
variable. So move sst_nff from module phys_output_var_mod to
module phys_state_var_mod. Define ysst_nff in procedure
pbl_surface before the call to surf_ocean. Choose a value of
sst_nff for an appearing ocean fraction. Read sst_nff in procedure
phyetat0, write it in procedure phyredem. Change the intent of dummy argument
sst_nff in procedure surf_ocean to inout.

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

Legend:

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

    r3687 r3740  
    4949  !$OMP THREADPRIVATE(cpl_snow,cpl_evap,cpl_tsol)
    5050
    51   REAL, ALLOCATABLE, SAVE:: cpl_t_int(:), cpl_s_int(:)
    52   !$OMP THREADPRIVATE(cpl_t_int, cpl_s_int)
     51  REAL, ALLOCATABLE, SAVE:: cpl_delta_temp(:), cpl_s_int(:)
     52  !$OMP THREADPRIVATE(cpl_delta_temp, 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_t_int_2D(:,:), cpl_s_int_2D(:,:)
    97   !$OMP THREADPRIVATE(cpl_t_int_2D, cpl_s_int_2D)
     96  REAL, ALLOCATABLE, SAVE:: cpl_delta_temp_2D(:,:), cpl_s_int_2D(:,:)
     97  !$OMP THREADPRIVATE(cpl_delta_temp_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_t_int(klon), cpl_s_int(klon), stat = error)
     239          ALLOCATE(cpl_delta_temp(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, t_int, s_int)
     647       sens_prec_liq, sens_prec_sol, lat_prec_liq, lat_prec_sol, tsurf_in, &
     648       sst_nff, s_int)
    648649
    649650    ! This subroutine cumulates some fields for each time-step during
     
    671672    REAL, INTENT(IN):: sens_prec_liq(:), sens_prec_sol(:) ! (knon)
    672673    REAL, DIMENSION(klon), INTENT(IN)       :: lat_prec_liq, lat_prec_sol
    673     real, intent(in):: t_int(:) ! (klon) ocean-air interface temperature, in K
     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.
     681
    674682    real, intent(in):: s_int(:) ! (knon) ocean-air interface salinity, in ppt
    675683
     
    710718
    711719       if (activate_ocean_skin == 2) then
    712           cpl_t_int(:knon) = 0.
     720          cpl_delta_temp(:knon) = 0.
    713721          cpl_s_int = 0.
    714722       end if
     
    756764
    757765       if (activate_ocean_skin == 2) then
    758           cpl_t_int(ig) = cpl_t_int(ig) + t_int(ig) / REAL(nexca)
     766          cpl_delta_temp(ig) = cpl_delta_temp(ig) &
     767               + (tsurf_in(ig) - sst_nff(ig)) / REAL(nexca)
    759768          cpl_s_int(ig) = cpl_s_int(ig) + s_int(ig) / REAL(nexca)
    760769       end if
     
    806815
    807816          if (activate_ocean_skin == 2) then
    808              ALLOCATE(cpl_t_int_2D(nbp_lon, jj_nb), &
     817             ALLOCATE(cpl_delta_temp_2D(nbp_lon, jj_nb), &
    809818                  cpl_s_int_2D(nbp_lon, jj_nb), stat = error)
    810819             sum_error = sum_error + error
     
    866875            CALL gath2cpl(cpl_atm_co2(:,cpl_index), cpl_atm_co22D(:,:), knon, knindex)
    867876       if (activate_ocean_skin == 2) then
    868           CALL gath2cpl(cpl_t_int, cpl_t_int_2D, knon, knindex)
     877          CALL gath2cpl(cpl_delta_temp, cpl_delta_temp_2D, knon, knindex)
    869878          CALL gath2cpl(cpl_s_int, cpl_s_int_2D, knon, knindex)
    870879       end if
     
    12641273
    12651274    if (activate_ocean_skin == 2) then
    1266        tab_flds(:, :, ids_t_int) = cpl_t_int_2D
     1275       tab_flds(:, :, ids_delta_temp) = cpl_delta_temp_2D
    12671276       tab_flds(:, :, ids_s_int) = cpl_s_int_2D
    12681277    end if
     
    15031512    ENDIF
    15041513
    1505     if (activate_ocean_skin == 2) deallocate(cpl_t_int_2d, cpl_s_int_2d)
     1514    if (activate_ocean_skin == 2) deallocate(cpl_delta_temp_2d, cpl_s_int_2d)
    15061515
    15071516    IF (sum_error /= 0) THEN
  • LMDZ6/branches/Ocean_skin/libf/phylmd/oasis.F90

    r3657 r3740  
    5959  INTEGER, PARAMETER :: ids_qraiic = 28
    6060  INTEGER, PARAMETER :: ids_qsnoic = 29
    61   INTEGER, PARAMETER :: ids_t_int = 30, ids_s_int = 31
     61  INTEGER, PARAMETER :: ids_delta_temp = 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_t_int)%action = .TRUE.
    193        infosend(ids_t_int)%name = 'COSSTSKN'
     192       infosend(ids_delta_temp)%action = .TRUE.
     193       infosend(ids_delta_temp)%name = 'CODTEMP'
    194194       infosend(ids_s_int)%action = .TRUE.
    195195       infosend(ids_s_int)%name = 'COSSSSKN'
  • LMDZ6/branches/Ocean_skin/libf/phylmd/ocean_cpl_mod.F90

    r3687 r3740  
    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)
     57       tsurf_new, dflux_s, dflux_l, sens_prec_liq, sss, s_int, rhoa, sst_nff)
    5858
    5959!
     
    9191    REAL, DIMENSION(klon), INTENT(IN)        :: ps
    9292    REAL, DIMENSION(klon), INTENT(IN)        :: u1, v1, gustiness
    93     REAL, DIMENSION(klon), INTENT(IN)        :: tsurf_in
     93    REAL, INTENT(IN) :: tsurf_in(:) ! (klon)
    9494    real, intent(in):: s_int(:) ! (knon) ocean-air interface salinity, in ppt
    9595    real, intent(in):: rhoa(:) ! (knon) density of moist air  (kg / m3)
     96
     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.
    96102
    97103! In/Output arguments
     
    211217         fluxsens, precip_rain, precip_snow, evap, tsurf_new, fder_new, alb1, &
    212218         flux_u1, flux_v1, windsp, sens_prec_liq, sens_prec_sol, lat_prec_liq, &
    213          lat_prec_sol, tsurf_in, s_int)
     219         lat_prec_sol, tsurf_in, sst_nff, s_int)
    214220
    215221  END SUBROUTINE ocean_cpl_noice
  • LMDZ6/branches/Ocean_skin/libf/phylmd/pbl_surface_mod.F90

    r3720 r3740  
    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
    295     use phys_output_var_mod, only: sst_nff, dter, dser, tkt, tks, taur, sss
     294    use phys_state_var_mod, only: s_int, ds_ns, dt_ns, sst_nff
     295    use phys_output_var_mod, only: dter, dser, tkt, tks, taur, sss
    296296#ifdef CPP_XIOS
    297297    USE wxios, ONLY: missing_val
     
    14291429
    14301430       if (nsrf == is_oce .and. activate_ocean_skin >= 1) then
    1431           if (activate_ocean_skin == 2 .and. type_ocean == "couple") &
    1432                ys_int(:knon) = s_int(ni(:knon))
     1431          if (activate_ocean_skin == 2 .and. type_ocean == "couple") then
     1432             ys_int(:knon) = s_int(ni(:knon))
     1433             ysst_nff(:knon) = sst_nff(ni(:knon))
     1434          end if
     1435         
    14331436          yds_ns(:knon) = ds_ns(ni(:knon))
    14341437          ydt_ns(:knon) = dt_ns(ni(:knon))
     
    31943197
    31953198    USE indice_sol_mod
    3196     use phys_state_var_mod, only: s_int, ds_ns, dt_ns
     3199    use phys_state_var_mod, only: s_int, ds_ns, dt_ns, sst_nff
    31973200    use config_ocean_skin_m, only: activate_ocean_skin
    31983201
     
    32843287                   if (activate_ocean_skin >= 1) then
    32853288                      if (activate_ocean_skin == 2 &
    3286                            .and. type_ocean == "couple") s_int(i) = 35.
     3289                           .and. type_ocean == "couple") then
     3290                         s_int(i) = 35.
     3291                         sst_nff(i) = tsurf(i,nsrf)
     3292                      end if
     3293                     
    32873294                      ds_ns(i) = 0.
    32883295                      dt_ns(i) = 0.
  • LMDZ6/branches/Ocean_skin/libf/phylmd/phyetat0.F90

    r3628 r3740  
    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
     21       ale_wake, ale_bl_stat, s_int, ds_ns, dt_ns, sst_nff
    2222!FC
    2323  USE geometry_mod, ONLY : longitude_deg, latitude_deg
     
    541541
    542542  if (activate_ocean_skin >= 1) then
    543      if (activate_ocean_skin == 2 .and. type_ocean == 'couple') found &
    544           = phyetat0_get(1, s_int, "S_int", "salinity at air-ocean interface", &
    545           35.)
     543     if (activate_ocean_skin == 2 .and. type_ocean == 'couple') then
     544        found = phyetat0_get(1, s_int, "S_int", &
     545             "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)
     548     end if
     549     
    546550     found = phyetat0_get(1, ds_ns, "dS_ns", "delta salinity near surface", 0.)
    547551     found = phyetat0_get(1, dt_ns, "dT_ns", "delta temperature near surface", &
     
    552556        ds_ns = missing_val
    553557        dt_ns = missing_val
     558        sst_nff = missing_val
    554559     end where
    555560  end if
  • LMDZ6/branches/Ocean_skin/libf/phylmd/phyredem.F90

    r3628 r3740  
    2727                                ale_wake, ale_bl_stat,                       &
    2828                                du_gwd_rando, du_gwd_front, u10m, v10m,      &
    29                                 treedrg, s_int, ds_ns, dt_ns
     29                                treedrg, s_int, ds_ns, dt_ns, sst_nff
    3030  USE geometry_mod, ONLY : longitude_deg, latitude_deg
    3131  USE iostart, ONLY: open_restartphy, close_restartphy, enddef_restartphy, put_field, put_var
     
    342342
    343343    if (activate_ocean_skin >= 1) then
    344        if (activate_ocean_skin == 2 .and. type_ocean == 'couple') &
    345             CALL put_field(pass, "S_int", "salinity at air-ocean interface", &
    346             s_int)
     344       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)
     347          CALL put_field(pass, "T1", "bulk SST of coupled ocean", sst_nff)
     348       end if
     349       
    347350       CALL put_field(pass, "dS_ns", "delta salinity near surface", ds_ns)
    348351       CALL put_field(pass, "dT_ns", "delta temperature near surface", dT_ns)
  • LMDZ6/branches/Ocean_skin/libf/phylmd/phys_output_var_mod.F90

    r3720 r3740  
    135135  ! Ocean-atmosphere interface, subskin ocean and near-surface ocean:
    136136 
    137   REAL, ALLOCATABLE, SAVE:: sst_nff(:)
    138   ! SST not used to compute surface fluxes, in K. If
    139   ! activate_ocean_skin == 0 then it is not allocated; if
    140   ! activate_ocean_skin == 1 then it is the ocean-air interface
    141   ! temperature; if activate_ocean_skin == 2 then it is the bulk SST.
    142 
    143137  REAL, ALLOCATABLE, SAVE:: dter(:)
    144138  ! Temperature variation in the diffusive microlayer, that is
     
    161155  ! bulk salinity of the surface layer of the ocean, in ppt
    162156 
    163   !$OMP THREADPRIVATE(sst_nff, dter, dser, tkt, tks, taur, sss)
     157  !$OMP THREADPRIVATE(dter, dser, tkt, tks, taur, sss)
    164158
    165159CONTAINS
     
    222216    IF (ok_gwd_rando) allocate(zustr_gwd_rando(klon), zvstr_gwd_rando(klon))
    223217
    224     if (activate_ocean_skin >= 1) allocate(sst_nff(klon), dter(klon), &
    225          dser(klon), tkt(klon), tks(klon), taur(klon), sss(klon))
     218    if (activate_ocean_skin >= 1) allocate(dter(klon), dser(klon), tkt(klon), &
     219         tks(klon), taur(klon), sss(klon))
    226220
    227221  END SUBROUTINE phys_output_var_init
  • LMDZ6/branches/Ocean_skin/libf/phylmd/phys_output_write_mod.F90

    r3720 r3740  
    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
     251         wTSTD, u2STD, v2STD, T2STD, missing_val_nf90, s_int, ds_ns, dt_ns, &
     252         sst_nff
    252253
    253254    USE phys_local_var_mod, ONLY: zxfluxlat, slp, ptstar, pt0, zxtsol, zt2m, &
     
    360361         alt_tropo, &
    361362!Ionela
    362          ok_4xCO2atm, sst_nff, dter, dser, tkt, tks, taur, sss
     363         ok_4xCO2atm, dter, dser, tkt, tks, taur, sss
    363364
    364365    USE ocean_slab_mod, ONLY: nslay, tslab, slab_bilg, tice, seaice, &
  • LMDZ6/branches/Ocean_skin/libf/phylmd/phys_state_var_mod.F90

    r3628 r3740  
    444444      ! minus foundation temperature. (Can be negative.) In K.
    445445     
    446       !$OMP THREADPRIVATE(s_int, ds_ns, dt_ns)
     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)
    447453
    448454    CONTAINS
     
    653659      ENDIF
    654660      if (activate_ocean_skin >= 1) ALLOCATE(s_int(klon), ds_ns(klon), &
    655            dt_ns(klon))
     661           dt_ns(klon), sst_nff(klon))
    656662
    657663    END SUBROUTINE phys_state_var_init
     
    791797!!! fin nrlmd le 10/04/2012
    792798
    793       if (activate_ocean_skin >= 1) deALLOCATE(s_int, ds_ns, dt_ns)
     799      if (activate_ocean_skin >= 1) deALLOCATE(s_int, ds_ns, dt_ns, sst_nff)
    794800
    795801      is_initialized=.FALSE.
  • LMDZ6/branches/Ocean_skin/libf/phylmd/surf_ocean_mod.F90

    r3720 r3740  
    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.
     95
    9096    ! Output variables
    9197    !******************************************************************************
     
    103109    REAL, DIMENSION(klon), INTENT(OUT)       :: flux_u1, flux_v1
    104110
    105     REAL, intent(out):: sst_nff(:) ! (knon)
    106     ! SST not used to compute surface fluxes, in K. If
    107     ! activate_ocean_skin == 0 then it is not defined; if
    108     ! activate_ocean_skin == 1 then it is the ocean-air interface
    109     ! temperature; if activate_ocean_skin == 2 then it is the bulk SST.
    110 
    111111    REAL, intent(out):: dter(:) ! (knon)
    112112    ! Temperature variation in the diffusive microlayer, that is
     
    190190            radsol, snow, agesno, &
    191191            qsurf, evap, fluxsens, fluxlat, flux_u1, flux_v1, &
    192             tsurf_new, dflux_s, dflux_l, sens_prec_liq, sss, s_int, rhoa)
     192            tsurf_new, dflux_s, dflux_l, sens_prec_liq, sss, s_int, rhoa, &
     193            sst_nff)
    193194
    194195    CASE('slab')
Note: See TracChangeset for help on using the changeset viewer.