Changeset 4754 for LMDZ6


Ignore:
Timestamp:
Nov 21, 2023, 2:51:40 PM (13 months ago)
Author:
acozic
Message:

Add possibility to coupled n2o between ocean and atmosphere

Location:
LMDZ6/trunk/libf/phylmd
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/libf/phylmd/chemistry_cycle_mod.F90

    r4640 r4754  
    1515
    1616! Variables read from parmeter file physiq.def
    17   LOGICAL, SAVE, PUBLIC :: dms_cycle_cpl       ! Coupling of CO2 fluxes between LMDZ/ORCHIDEE and LMDZ/OCEAN(PISCES)
     17  LOGICAL, SAVE, PUBLIC :: dms_cycle_cpl       ! Coupling of DMS fluxes between LMDZ/ORCHIDEE and LMDZ/OCEAN(PISCES)
    1818!$OMP THREADPRIVATE(dms_cycle_cpl)   
     19
     20  LOGICAL, SAVE, PUBLIC :: n2o_cycle_cpl       ! Coupling of N2O fluxes between LMDZ/ORCHIDEE and LMDZ/OCEAN(PISCES)
     21!$OMP THREADPRIVATE(n2o_cycle_cpl)   
    1922
    2023
  • LMDZ6/trunk/libf/phylmd/conf_phys_m.F90

    r4722 r4754  
    2929    USE carbon_cycle_mod,  ONLY: read_fco2_ocean_cor,var_fco2_ocean_cor
    3030    USE carbon_cycle_mod,  ONLY: read_fco2_land_cor,var_fco2_land_cor
    31     USE chemistry_cycle_mod, ONLY: dms_cycle_cpl
     31    USE chemistry_cycle_mod, ONLY: dms_cycle_cpl, n2o_cycle_cpl
    3232    USE mod_grid_phy_lmdz, ONLY: klon_glo
    3333    USE print_control_mod, ONLY: lunout
     
    233233    LOGICAL, SAVE :: carbon_cycle_cpl_omp
    234234    LOGICAL, SAVE :: carbon_cycle_rad_omp
    235     LOGICAL, SAVE :: dms_cycle_cpl_omp
     235    LOGICAL, SAVE :: dms_cycle_cpl_omp, n2o_cycle_cpl_omp
    236236    INTEGER, SAVE :: level_coupling_esm_omp
    237237    LOGICAL, SAVE :: read_fco2_ocean_cor_omp
     
    22542254    !Config Help = can be activated only if lmdz use inca for the atmospheric chemistry
    22552255
     2256    n2o_cycle_cpl_omp=.FALSE.
     2257    CALL getin('transm_n2o_oa',n2o_cycle_cpl_omp)
     2258    !
     2259    !Config Key  = n2o_cycle_cpl
     2260    !Config Desc = receive n2o from pisces via oasis
     2261    !Config Def  = .FALSE.
     2262    !Config Help = can be activated only if lmdz use inca for the atmospheric chemistry
     2263   
    22562264   
    22572265    !$OMP END MASTER
     
    25272535    var_fco2_land_cor = var_fco2_land_cor_omp
    25282536    dms_cycle_cpl = dms_cycle_cpl_omp
     2537    n2o_cycle_cpl = n2o_cycle_cpl_omp
    25292538    !rajout Olivier Torres
    25302539    kz0=kz0_omp
     
    26522661
    26532662    ! Test on chemistry cycle
    2654     IF ((type_trac .ne. "inca" .AND. type_trac .ne. "inco") .AND. dms_cycle_cpl ) THEN
    2655        CALL abort_physic('conf_phys', 'dms_cycle_cpl has to be TRUE only with INCA coupling model',1)
     2663    IF ((type_trac .ne. "inca" .AND. type_trac .ne. "inco") .AND. ( dms_cycle_cpl .OR. n2o_cycle_cpl) ) THEN
     2664       CALL abort_physic('conf_phys', 'dms_cycle_cpl or n2o_cycle_cpl has to be TRUE only with INCA coupling model',1)
    26562665    ENDIF
    26572666   
     
    28652874    WRITE(lunout,*) ' var_fco2_land_cor = ', var_fco2_land_cor
    28662875    WRITE(lunout,*) ' dms_cycle_cpl = ', dms_cycle_cpl
     2876    WRITE(lunout,*) ' n2o_cycle_cpl = ', n2o_cycle_cpl
    28672877    WRITE(lunout,*) ' iflag_tsurf_inlandsis = ', iflag_tsurf_inlandsis
    28682878    WRITE(lunout,*) ' iflag_temp_inlandsis = ', iflag_temp_inlandsis
  • LMDZ6/trunk/libf/phylmd/oasis.F90

    r4642 r4754  
    7777  INTEGER, PARAMETER :: idr_sss = 9
    7878  INTEGER, PARAMETER :: idr_ocedms = 10
    79 
    80   INTEGER, PARAMETER :: maxrecv      = 10     ! Maximum number of fields to receive
     79  INTEGER, PARAMETER :: idr_ocen2o = 11
     80
     81  INTEGER, PARAMETER :: maxrecv      = 11     ! Maximum number of fields to receive
    8182  INTEGER, PARAMETER :: maxrecv_phys = 9      ! Maximum number of fields to receive in physiq (without fields received in INCA model )
    8283                                              ! will be changed in next version - INCA fields will be received in LMDZ (like for ORCHIDEE fields)
     
    114115    USE carbon_cycle_mod, ONLY : carbon_cycle_cpl
    115116    USE wxios, ONLY : wxios_context_init
    116     USE chemistry_cycle_mod, ONLY : dms_cycle_cpl
     117    USE chemistry_cycle_mod, ONLY : dms_cycle_cpl, n2o_cycle_cpl
    117118    USE lmdz_xios 
    118119    USE print_control_mod, ONLY: lunout
     
    265266      inforecv(idr_ocedms)%action = .TRUE. ; inforecv(idr_ocedms)%name = 'SIDMSFLX'
    266267   ENDIF
     268   IF (n2o_cycle_cpl) THEN
     269      inforecv(idr_ocen2o)%action = .TRUE. ; inforecv(idr_ocen2o)%name = 'SIN2OFLX'
     270   ENDIF
    267271 
    268272
     
    353357
    354358#ifdef INCA
    355     IF (dms_cycle_cpl) THEN
    356        CALL init_inca_oasis(inforecv(idr_ocedms))
     359    IF (dms_cycle_cpl .OR. n2o_cycle_cpl) THEN
     360       CALL init_inca_oasis(inforecv(idr_ocedms:idr_ocen2o))
    357361    ENDIF
    358362#endif
Note: See TracChangeset for help on using the changeset viewer.