Ignore:
Timestamp:
Nov 26, 2021, 8:27:26 AM (3 years ago)
Author:
lguez
Message:

Send 3 more fields to the ocean

Send 3 more fields to the ocean to compute CO2 flux at
ocean-atmosphere interface. The three fields are dter and dser, which
already existed, and a newly created field: dt_ds. So dter and dser
have to become state variables. The variable dt_ds of module
phys_state_var_mod is only allocated and defined if
activate_ocean_skin == 2 and type_ocean == "couple".

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

Legend:

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

    r3798 r4020  
    4949  !$OMP THREADPRIVATE(cpl_snow,cpl_evap,cpl_tsol)
    5050
    51   REAL, ALLOCATABLE, SAVE:: cpl_delta_sst(:), cpl_delta_sal(:)
    52   !$OMP THREADPRIVATE(cpl_delta_sst, cpl_delta_sal)
     51  REAL, ALLOCATABLE, SAVE:: cpl_delta_sst(:), cpl_delta_sal(:), cpl_dter(:), &
     52       cpl_dser(:), cpl_dt_ds(:)
     53  !$OMP THREADPRIVATE(cpl_delta_sst, cpl_delta_sal, cpl_dter, cpl_dser)
     54  !$OMP THREADPRIVATE(cpl_dt_ds)
    5355 
    5456  REAL, ALLOCATABLE, DIMENSION(:,:), SAVE   :: cpl_fder, cpl_albe, cpl_taux, cpl_tauy
     
    9496  !$OMP THREADPRIVATE(cpl_snow2D, cpl_evap2D, cpl_tsol2D)
    9597
    96   REAL, ALLOCATABLE, SAVE:: cpl_delta_sst_2D(:,:), cpl_delta_sal_2D(:,:)
     98  REAL, ALLOCATABLE, SAVE:: cpl_delta_sst_2D(:, :), cpl_delta_sal_2D(:, :), &
     99       cpl_dter_2D(:, :), cpl_dser_2D(:, :), cpl_dt_ds_2D(:, :)
    97100  !$OMP THREADPRIVATE(cpl_delta_sst_2D, cpl_delta_sal_2D)
     101  !$OMP THREADPRIVATE(cpl_dter_2D, cpl_dser_2D, cpl_dt_ds_2D)
    98102
    99103  REAL, ALLOCATABLE, DIMENSION(:,:,:), SAVE :: cpl_fder2D, cpl_albe2D
     
    238242   
    239243       if (activate_ocean_skin == 2) then
    240           ALLOCATE(cpl_delta_sst(klon), cpl_delta_sal(klon), stat = error)
     244          ALLOCATE(cpl_delta_sst(klon), cpl_delta_sal(klon), cpl_dter(klon), &
     245               cpl_dser(klon), cpl_dt_ds(klon), stat = error)
    241246          sum_error = sum_error + error
    242247       end if
     
    650655       precip_rain, precip_snow, evap, tsurf, fder, albsol, taux, tauy, windsp,&
    651656       sens_prec_liq, sens_prec_sol, lat_prec_liq, lat_prec_sol, delta_sst, &
    652        delta_sal)
     657       delta_sal, dTer, dSer, dt_ds)
    653658
    654659    ! This subroutine cumulates some fields for each time-step during
     
    683688    real, intent(in):: delta_sal(:) ! (knon)
    684689    ! Ocean-air interface salinity minus bulk salinity, in ppt.
     690
     691    REAL, intent(in):: dter(:) ! (knon)
     692    ! Temperature variation in the diffusive microlayer, that is
     693    ! ocean-air interface temperature minus subskin temperature. In
     694    ! K.
     695
     696    REAL, intent(in):: dser(:) ! (knon)
     697    ! Salinity variation in the diffusive microlayer, that is
     698    ! ocean-air interface salinity minus subskin salinity. In ppt.
     699
     700    real, intent(in):: dt_ds(:) ! (knon)
     701    ! (tks / tkt) * dTer, in K
    685702
    686703! Local variables
     
    722739          cpl_delta_sst = 0.
    723740          cpl_delta_sal = 0.
     741          cpl_dter = 0.
     742          cpl_dser = 0.
     743          cpl_dt_ds = 0.
    724744       end if
    725745    ENDIF
     
    768788          cpl_delta_sst(ig) = cpl_delta_sst(ig) + delta_sst(ig) / REAL(nexca)
    769789          cpl_delta_sal(ig) = cpl_delta_sal(ig) + delta_sal(ig) / REAL(nexca)
     790          cpl_dter(ig) = cpl_dter(ig) + dter(ig) / REAL(nexca)
     791          cpl_dser(ig) = cpl_dser(ig) + dser(ig) / REAL(nexca)
     792          cpl_dt_ds(ig) = cpl_dt_ds(ig) + dt_ds(ig) / REAL(nexca)
    770793       end if
    771794     ENDDO
     
    817840          if (activate_ocean_skin == 2) then
    818841             ALLOCATE(cpl_delta_sst_2D(nbp_lon, jj_nb), &
    819                   cpl_delta_sal_2D(nbp_lon, jj_nb), stat = error)
     842                  cpl_delta_sal_2D(nbp_lon, jj_nb), &
     843                  cpl_dter_2D(nbp_lon, jj_nb), cpl_dser_2D(nbp_lon, jj_nb), &
     844                  cpl_dt_ds_2D(nbp_lon, jj_nb), stat = error)
    820845             sum_error = sum_error + error
    821846          end if
     
    878903          CALL gath2cpl(cpl_delta_sst, cpl_delta_sst_2D, knon, knindex)
    879904          CALL gath2cpl(cpl_delta_sal, cpl_delta_sal_2D, knon, knindex)
     905          CALL gath2cpl(cpl_dter, cpl_dter_2D, knon, knindex)
     906          CALL gath2cpl(cpl_dser, cpl_dser_2D, knon, knindex)
     907          CALL gath2cpl(cpl_dt_ds, cpl_dt_ds_2D, knon, knindex)
    880908       end if
    881909    ENDIF
     
    12761304       tab_flds(:, :, ids_delta_sst) = cpl_delta_sst_2D
    12771305       tab_flds(:, :, ids_delta_sal) = cpl_delta_sal_2D
     1306       tab_flds(:, :, ids_dter) = cpl_dter_2D
     1307       tab_flds(:, :, ids_dser) = cpl_dser_2D
     1308       tab_flds(:, :, ids_dt_ds) = cpl_dt_ds_2D
    12781309    end if
    12791310   
     
    15131544    ENDIF
    15141545
    1515     if (activate_ocean_skin == 2) deallocate(cpl_delta_sst_2d, cpl_delta_sal_2d)
     1546    if (activate_ocean_skin == 2) deallocate(cpl_delta_sst_2d, &
     1547         cpl_delta_sal_2d, cpl_dter_2d, cpl_dser_2d, cpl_dt_ds_2d)
    15161548
    15171549    IF (sum_error /= 0) THEN
  • LMDZ6/branches/Ocean_skin/libf/phylmd/oasis.F90

    r3767 r4020  
    5959  INTEGER, PARAMETER :: ids_qraiic = 28
    6060  INTEGER, PARAMETER :: ids_qsnoic = 29
    61   INTEGER, PARAMETER :: ids_delta_sst = 30, ids_delta_sal = 31
    62  
    63   INTEGER, PARAMETER :: maxsend    = 31  ! Maximum number of fields to send
     61  INTEGER, PARAMETER :: ids_delta_sst = 30, ids_delta_sal = 31, ids_dter = 32, &
     62       ids_dser = 33, ids_dt_ds = 34
     63 
     64  INTEGER, PARAMETER :: maxsend    = 34  ! Maximum number of fields to send
    6465 
    6566  ! Id for fields received from ocean
     
    194195       infosend(ids_delta_sal)%action = .TRUE.
    195196       infosend(ids_delta_sal)%name = 'CODELSSS'
     197       infosend(ids_dter)%action = .TRUE.
     198       infosend(ids_dter)%name = 'CODELTER'
     199       infosend(ids_dser)%action = .TRUE.
     200       infosend(ids_dser)%name = 'CODELSER'
     201       infosend(ids_dt_ds)%action = .TRUE.
     202       infosend(ids_dt_ds)%name = 'CODTDS'
    196203    end if
    197204           
  • LMDZ6/branches/Ocean_skin/libf/phylmd/ocean_cpl_mod.F90

    r3767 r4020  
    5656       qsurf, evap, fluxsens, fluxlat, flux_u1, flux_v1, &
    5757       tsurf_new, dflux_s, dflux_l, sens_prec_liq, sss, delta_sal, rhoa, &
    58        delta_sst)
     58       delta_sst, dTer, dSer, dt_ds)
    5959
    6060!
     
    103103    ! only if activate_ocean_skin >= 1.
    104104
     105    REAL, intent(in):: dter(:) ! (knon)
     106    ! Temperature variation in the diffusive microlayer, that is
     107    ! ocean-air interface temperature minus subskin temperature. In
     108    ! K.
     109
     110    REAL, intent(in):: dser(:) ! (knon)
     111    ! Salinity variation in the diffusive microlayer, that is
     112    ! ocean-air interface salinity minus subskin salinity. In ppt.
     113
     114    real, intent(in):: dt_ds(:) ! (knon)
     115    ! (tks / tkt) * dTer, in K
     116
    105117! In/Output arguments
    106118!****************************************************************************************
     
    219231         fluxsens, precip_rain, precip_snow, evap, tsurf_new, fder_new, alb1, &
    220232         flux_u1, flux_v1, windsp, sens_prec_liq, sens_prec_sol, lat_prec_liq, &
    221          lat_prec_sol, delta_sst, delta_sal)
     233         lat_prec_sol, delta_sst, delta_sal, dTer, dSer, dt_ds)
    222234
    223235  END SUBROUTINE ocean_cpl_noice
  • LMDZ6/branches/Ocean_skin/libf/phylmd/pbl_surface_mod.F90

    r4013 r4020  
    313313    USE print_control_mod,  ONLY : prt_level,lunout
    314314    USE ioipsl_getin_p_mod, ONLY : getin_p
    315     use phys_state_var_mod, only: ds_ns, dt_ns, delta_sst, delta_sal, zsig, zmea
    316     use phys_output_var_mod, only: dter, dser, tkt, tks, taur, sss
     315    use phys_state_var_mod, only: ds_ns, dt_ns, delta_sst, delta_sal, dter, &
     316         dser, dt_ds, zsig, zmea
     317    use phys_output_var_mod, only: tkt, tks, taur, sss
    317318#ifdef CPP_XIOS
    318319    USE wxios, ONLY: missing_val
     
    875876    ! Martin
    876877
    877     REAL, DIMENSION(klon):: ydelta_sst, ydelta_sal, yds_ns, ydt_ns, ydter, ydser, &
    878          ytkt, ytks, ytaur, ysss
    879     ! compression of delta_sst, delta_sal, ds_ns, dt_ns, dter, dser, tkt, tks,
    880     ! taur, sss on ocean points
     878    REAL, DIMENSION(klon):: ydelta_sst, ydelta_sal, yds_ns, ydt_ns, ydter, &
     879         ydser, ydt_ds, ytkt, ytks, ytaur, ysss
     880    ! compression of delta_sst, delta_sal, ds_ns, dt_ns, dter, dser,
     881    ! dt_ds, tkt, tks, taur, sss on ocean points
    881882
    882883!****************************************************************************************
     
    15331534             ydelta_sal(:knon) = delta_sal(ni(:knon))
    15341535             ydelta_sst(:knon) = delta_sst(ni(:knon))
     1536             ydter(:knon) = dter(ni(:knon))
     1537             ydser(:knon) = dser(ni(:knon))
     1538             ydt_ds(:knon) = dt_ds(ni(:knon))
    15351539          end if
    15361540         
     
    21082112               y_flux_u1, y_flux_v1, ydelta_sst(:knon), ydelta_sal(:knon), &
    21092113               yds_ns(:knon), ydt_ns(:knon), ydter(:knon), ydser(:knon), &
    2110                ytkt(:knon), ytks(:knon), ytaur(:knon), ysss)
     2114               ydt_ds(:knon), ytkt(:knon), ytks(:knon), ytaur(:knon), ysss)
    21112115      IF (prt_level >=10) THEN
    21122116          print *,'arg de surf_ocean: ycdragh ',ycdragh
     
    28552859          taur(ni(:knon)) = ytaur(:knon)
    28562860          sss(ni(:knon)) = ysss(:knon)
     2861
     2862          if (activate_ocean_skin == 2 .and. type_ocean == "couple") then
     2863             dt_ds = missing_val
     2864             dt_ds(ni(:knon)) = ydt_ds(:knon)
     2865          end if
    28572866       end if
    28582867
     
    35223531
    35233532    USE indice_sol_mod
    3524     use phys_state_var_mod, only: delta_sal, ds_ns, dt_ns, delta_sst
     3533    use phys_state_var_mod, only: delta_sal, ds_ns, dt_ns, delta_sst, dter, &
     3534         dser, dt_ds
    35253535    use config_ocean_skin_m, only: activate_ocean_skin
    35263536
     
    36153625                         delta_sal(i) = 0.
    36163626                         delta_sst(i) = 0.
     3627                         dter(i) = 0.
     3628                         dser(i) = 0.
     3629                         dt_ds(i) = 0.
    36173630                      end if
    36183631                     
  • LMDZ6/branches/Ocean_skin/libf/phylmd/phyetat0.F90

    r4013 r4020  
    1919       wake_s, wake_dens, awake_dens, cv_gen, 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, ds_ns, dt_ns, delta_sst, delta_sal, ratqs_inter
     21       ale_wake, ale_bl_stat, ds_ns, dt_ns, delta_sst, delta_sal, dter, dser, &
     22       dt_ds, ratqs_inter
    2223!FC
    2324  USE geometry_mod, ONLY : longitude_deg, latitude_deg
     
    537538        found = phyetat0_get(1, delta_sst, "delta_SST", &
    538539             "ocean-air interface temperature minus bulk SST", 0.)
     540        found = phyetat0_get(1, dter, "dter", &
     541             "ocean-air interface temperature minus subskin temperature", 0.)
     542        found = phyetat0_get(1, dser, "dser", &
     543             "ocean-air interface salinity minus subskin salinity", 0.)
     544        found = phyetat0_get(1, dt_ds, "dt_ds", "(tks / tkt) * dTer", 0.)
     545
     546        where (pctsrf(:, is_oce) == 0.)
     547           dter = missing_val
     548           dser = missing_val
     549           dt_ds = missing_val
     550        end where
    539551     end if
    540552     
  • LMDZ6/branches/Ocean_skin/libf/phylmd/phyredem.F90

    r4013 r4020  
    3030                                du_gwd_rando, du_gwd_front, u10m, v10m, &
    3131                                treedrg, solswfdiff, delta_sal, ds_ns, dt_ns, &
    32                                 delta_sst, ratqs_inter
     32                                delta_sst, ratqs_inter, dter, dser, dt_ds
    3333
    3434  USE geometry_mod, ONLY : longitude_deg, latitude_deg
     
    372372          CALL put_field(pass, "delta_SST", &
    373373               "ocean-air interface temperature minus bulk SST", delta_sst)
     374          CALL put_field(pass, "dter", &
     375               "ocean-air interface temperature minus subskin temperature", &
     376               dter)
     377          CALL put_field(pass, "dser", &
     378               "ocean-air interface salinity minus subskin salinity", dser)
     379          CALL put_field(pass, "dt_ds", &
     380               "(tks / tkt) * dTer", dt_ds)
    374381       end if
    375382       
  • LMDZ6/branches/Ocean_skin/libf/phylmd/phys_output_var_mod.F90

    r4013 r4020  
    134134  ! Ocean-atmosphere interface, subskin ocean and near-surface ocean:
    135135 
    136   REAL, ALLOCATABLE, SAVE:: dter(:)
    137   ! Temperature variation in the diffusive microlayer, that is
    138   ! ocean-air interface temperature minus subskin temperature. In K.
    139      
    140   REAL, SAVE, ALLOCATABLE:: dser(:)
    141   ! Temperature variation in the diffusive microlayer, that is
    142   ! subskin temperature minus ocean-air interface temperature. In K.
    143 
    144136  REAL, SAVE, ALLOCATABLE:: tkt(:)
    145137  ! épaisseur (m) de la couche de diffusion thermique (microlayer)
     
    154146  ! bulk salinity of the surface layer of the ocean, in ppt
    155147 
    156   !$OMP THREADPRIVATE(dter, dser, tkt, tks, taur, sss)
     148  !$OMP THREADPRIVATE(tkt, tks, taur, sss)
    157149
    158150CONTAINS
     
    215207    IF (ok_gwd_rando) allocate(zustr_gwd_rando(klon), zvstr_gwd_rando(klon))
    216208
    217     if (activate_ocean_skin >= 1) allocate(dter(klon), dser(klon), tkt(klon), &
    218          tks(klon), taur(klon), sss(klon))
     209    if (activate_ocean_skin >= 1) allocate(tkt(klon), tks(klon), taur(klon), &
     210         sss(klon))
    219211
    220212  END SUBROUTINE phys_output_var_init
  • LMDZ6/branches/Ocean_skin/libf/phylmd/phys_output_write_mod.F90

    r4013 r4020  
    253253         rhlevSTD, O3STD, O3daySTD, uvSTD, vqSTD, vTSTD, wqSTD, vphiSTD, &
    254254         wTSTD, u2STD, v2STD, T2STD, missing_val_nf90, delta_sal, ds_ns, &
    255          dt_ns, delta_sst
     255         dt_ns, delta_sst, dter, dser
    256256
    257257    USE phys_local_var_mod, ONLY: zxfluxlat, slp, ptstar, pt0, zxtsol, zt2m, &
     
    360360         alt_tropo, &
    361361!Ionela
    362          ok_4xCO2atm, dter, dser, tkt, tks, taur, sss
     362         ok_4xCO2atm, tkt, tks, taur, sss
    363363
    364364    USE ocean_slab_mod, ONLY: nslay, tslab, slab_bilg, tice, seaice, &
  • LMDZ6/branches/Ocean_skin/libf/phylmd/phys_state_var_mod.F90

    r4013 r4020  
    455455      ! Ocean-air interface salinity minus bulk salinity, in ppt
    456456     
    457       !$OMP THREADPRIVATE(delta_sal, ds_ns, dt_ns, delta_sst)
     457      REAL, ALLOCATABLE, SAVE:: dter(:) ! (klon)
     458      ! Temperature variation in the diffusive microlayer, that is
     459      ! ocean-air interface temperature minus subskin temperature. In K.
     460
     461      REAL, SAVE, ALLOCATABLE:: dser(:) ! (klon)
     462      ! Salinity variation in the diffusive microlayer, that is
     463      ! ocean-air interface salinity minus subskin salinity. In ppt.
     464
     465      real, SAVE, ALLOCATABLE:: dt_ds(:) ! (klon)
     466      ! (tks / tkt) * dTer, in K
     467
     468      !$OMP THREADPRIVATE(delta_sal, ds_ns, dt_ns, delta_sst, dter, dser, dt_ds)
    458469
    459470    CONTAINS
     
    466477USE indice_sol_mod
    467478use config_ocean_skin_m, only: activate_ocean_skin
     479use surface_data, only: type_ocean
    468480IMPLICIT NONE
    469481
     
    666678        du_gwd_front(:,:) = 0 !ym missing init   
    667679      ENDIF
    668       if (activate_ocean_skin >= 1) ALLOCATE(delta_sal(klon), ds_ns(klon), &
    669            dt_ns(klon), delta_sst(klon))
     680
     681      if (activate_ocean_skin >= 1) then
     682         ALLOCATE(delta_sal(klon), ds_ns(klon), dt_ns(klon), delta_sst(klon), &
     683              dter(klon), dser(klon))
     684         if (activate_ocean_skin == 2 .and. type_ocean == "couple") &
     685              allocate(dt_ds(klon))
     686      end if
    670687
    671688    END SUBROUTINE phys_state_var_init
     
    677694USE indice_sol_mod
    678695use config_ocean_skin_m, only: activate_ocean_skin
     696use surface_data, only: type_ocean
    679697IMPLICIT NONE
    680698include "clesphys.h"
     
    805823      DEALLOCATE(ratqs_inter)
    806824
    807       if (activate_ocean_skin >= 1) deALLOCATE(delta_sal, ds_ns, dt_ns, &
    808            delta_sst)
     825      if (activate_ocean_skin >= 1) then
     826         deALLOCATE(delta_sal, ds_ns, dt_ns, delta_sst, dter, dser)
     827         if (activate_ocean_skin == 2 .and. type_ocean == "couple") &
     828              deALLOCATE(dt_ds)
     829      end if
    809830
    810831      is_initialized=.FALSE.
  • LMDZ6/branches/Ocean_skin/libf/phylmd/surf_ocean_mod.F90

    r4013 r4020  
    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, delta_sal, ds_ns, dt_ns, dter, dser, tkt, tks, &
    23        taur, sss)
     22       flux_u1, flux_v1, delta_sst, delta_sal, ds_ns, dt_ns, dter, dser, &
     23       dt_ds, tkt, tks, taur, sss)
    2424
    2525    use albedo, only: alboc, alboc_cd
     
    9494    ! minus foundation temperature. (Can be negative.) In K.
    9595
     96    REAL, intent(inout):: dter(:) ! (knon)
     97    ! Temperature variation in the diffusive microlayer, that is
     98    ! ocean-air interface temperature minus subskin temperature. In
     99    ! K.
     100
     101    REAL, intent(inout):: dser(:) ! (knon)
     102    ! Salinity variation in the diffusive microlayer, that is
     103    ! ocean-air interface salinity minus subskin salinity. In ppt.
     104
     105    real, intent(inout):: dt_ds(:) ! (knon)
     106    ! (tks / tkt) * dTer, in K
     107
    96108    ! Output variables
    97109    !**************************************************************************
     
    109121    REAL, DIMENSION(klon), INTENT(OUT)       :: flux_u1, flux_v1
    110122
    111     REAL, intent(out):: dter(:) ! (knon)
    112     ! Temperature variation in the diffusive microlayer, that is
    113     ! ocean-air interface temperature minus subskin temperature. In
    114     ! K.
    115 
    116     REAL, intent(out):: dser(:) ! (knon)
    117     ! Salinity variation in the diffusive microlayer, that is
    118     ! ocean-air interface salinity minus subskin salinity. In ppt.
    119 
    120123    REAL, intent(out):: tkt(:) ! (knon)
    121124    ! épaisseur (m) de la couche de diffusion thermique (microlayer)
     
    192195            qsurf, evap, fluxsens, fluxlat, flux_u1, flux_v1, &
    193196            tsurf_new, dflux_s, dflux_l, sens_prec_liq, sss, delta_sal, rhoa, &
    194             delta_sst)
     197            delta_sst, dTer, dSer, dt_ds)
    195198
    196199    CASE('slab')
     
    332335       delta_sal = s_int - sss(:knon)
    333336       if (activate_ocean_skin >= 2) tsurf_new(:knon) = t_int
     337       if (activate_ocean_skin == 2 .and. type_ocean == 'couple') &
     338            dt_ds = (tks / tkt) * dter
    334339    end if
    335340   
Note: See TracChangeset for help on using the changeset viewer.