Changeset 4640 for LMDZ6


Ignore:
Timestamp:
Jul 24, 2023, 4:50:57 PM (16 months ago)
Author:
acozic
Message:

add a flag for the dms cycle between ocean and atmosphere
remove cpp key CPLOCNINCA activated by option cplocninca
remove compilation option cplocninca

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

Legend:

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

    r4613 r4640  
    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
    3132    USE mod_grid_phy_lmdz, ONLY: klon_glo
    3233    USE print_control_mod, ONLY: lunout
    3334    use config_ocean_skin_m, only: config_ocean_skin
    3435    USE phys_state_var_mod, ONLY: phys_tstep
     36    USE infotrac_phy, ONLY: type_trac
    3537
    3638    INCLUDE "conema3.h"
     
    233235    LOGICAL, SAVE :: carbon_cycle_cpl_omp
    234236    LOGICAL, SAVE :: carbon_cycle_rad_omp
     237    LOGICAL, SAVE :: dms_cycle_cpl_omp
    235238    INTEGER, SAVE :: level_coupling_esm_omp
    236239    LOGICAL, SAVE :: read_fco2_ocean_cor_omp
     
    22402243    CALL getin('level_coupling_esm',level_coupling_esm_omp)
    22412244
     2245
     2246    dms_cycle_cpl_omp=.FALSE.
     2247    CALL getin('dms_cycle_cpl',dms_cycle_cpl_omp)
     2248    !
     2249    !Config Key  = dms_cycle_cpl
     2250    !Config Desc = receive dms from pisces via oasis
     2251    !Config Def  = .FALSE.
     2252    !Config Help = can be activated only if lmdz use inca for the atmospheric chemistry
     2253
     2254   
    22422255    !$OMP END MASTER
    22432256    !$OMP BARRIER
     
    25142527    read_fco2_land_cor = read_fco2_land_cor_omp
    25152528    var_fco2_land_cor = var_fco2_land_cor_omp
     2529    dms_cycle_cpl = dms_cycle_cpl_omp
    25162530
    25172531    ! Test of coherence between type_ocean and version_ocean
     
    26332647    ENDIF
    26342648
     2649
     2650    ! Test on chemistry cycle
     2651    IF ((type_trac .ne. "inca" .AND. type_trac .ne. "inco") .AND. dms_cycle_cpl ) THEN
     2652       CALL abort_physic('conf_phys', 'dms_cycle_cpl has to be TRUE only with INCA coupling model',1)
     2653    ENDIF
     2654   
    26352655    ! ORCHIDEE must be activated for ifl_pbltree=1
    26362656    IF (.NOT. ok_veget .AND. ifl_pbltree==1) THEN
     
    28442864    WRITE(lunout,*) ' read_fco2_land_cor = ', read_fco2_land_cor
    28452865    WRITE(lunout,*) ' var_fco2_land_cor = ', var_fco2_land_cor
     2866    WRITE(lunout,*) ' dms_cycle_cpl = ', dms_cycle_cpl
    28462867    WRITE(lunout,*) ' iflag_tsurf_inlandsis = ', iflag_tsurf_inlandsis
    28472868    WRITE(lunout,*) ' iflag_temp_inlandsis = ', iflag_temp_inlandsis
  • LMDZ6/trunk/libf/phylmd/cpl_mod.F90

    r4600 r4640  
    377377            0,zjulian,dtime,nhoridcs,nidcs)
    378378! no vertical axis
    379        DO jf=1,maxrecv
     379       DO jf=1,maxrecv_phys
    380380         IF (inforecv(i)%action) THEN
    381381             CALL histdef(nidcs,inforecv(i)%name ,inforecv(i)%name , &
     
    433433    CHARACTER(len = 80)                     :: abort_message
    434434    REAL, DIMENSION(klon)                   :: read_sic1D
    435     REAL, DIMENSION(nbp_lon,jj_nb,maxrecv)      :: tab_read_flds
     435    REAL, DIMENSION(nbp_lon,jj_nb,maxrecv_phys)      :: tab_read_flds
    436436    REAL, DIMENSION(klon,nbsrf)             :: pctsrf_old
    437437    REAL, DIMENSION(klon_mpi)               :: rlon_mpi, rlat_mpi
     
    462462          ndexcs(:) = 0
    463463          itau_w = itau_phy + itime + start_time * day_step_phy
    464           DO i = 1, maxrecv
     464          DO i = 1, maxrecv_phys
    465465            IF (inforecv(i)%action) THEN
    466466                CALL histwrite(nidcs,inforecv(i)%name,itau_w,tab_read_flds(:,:,i),nbp_lon*(nbp_lat),ndexcs)
  • LMDZ6/trunk/libf/phylmd/oasis.F90

    r4619 r4640  
    2424  USE mod_prism_get_proto
    2525  USE mod_prism_put_proto
    26 #endif
    27 #ifdef CPP_CPLOCNINCA
    28   USE incaoasis, ONLY : inforcv
    2926#endif
    3027#endif
     
    7774  INTEGER, PARAMETER :: idr_curenz = 7
    7875  INTEGER, PARAMETER :: idr_oceco2 = 8
    79 
     76  ! bulk salinity of the surface layer of the ocean, in ppt
    8077  INTEGER, PARAMETER :: idr_sss = 9
    81   ! bulk salinity of the surface layer of the ocean, in ppt
    82 
    83   INTEGER, PARAMETER :: maxrecv    = 9  ! Maximum number of fields to receive
    84  
    85 #ifdef CPP_CPLOCNINCA
    86   INTEGER, PARAMETER :: idr_ocedms = 1
    87   INTEGER, PARAMETER :: maxrcv = 1
    88 #endif
     78  INTEGER, PARAMETER :: idr_ocedms = 10
     79
     80  INTEGER, PARAMETER :: maxrecv      = 10     ! Maximum number of fields to receive
     81  INTEGER, PARAMETER :: maxrecv_phys = 9      ! Maximum number of fields to receive in physiq (without fields received in INCA model )
     82                                              ! will be changed in next version - INCA fields will be received in LMDZ (like for ORCHIDEE fields)
     83                                              ! and then send by routine in INCA model
     84 
    8985
    9086  TYPE, PUBLIC ::   FLD_CPL            ! Type for coupling field information
     
    118114    USE carbon_cycle_mod, ONLY : carbon_cycle_cpl
    119115    USE wxios, ONLY : wxios_context_init
     116    USE chemistry_cycle_mod, ONLY : dms_cycle_cpl
    120117    USE lmdz_xios 
    121118    USE print_control_mod, ONLY: lunout
     
    265262       inforecv(idr_oceco2)%action = .TRUE. ; inforecv(idr_oceco2)%name = 'SICO2FLX'
    266263   ENDIF
    267 #ifdef CPP_CPLOCNINCA
    268        inforcv(idr_ocedms)%action = .TRUE. ; inforcv(idr_ocedms)%name = 'SIDMSFLX'
    269 #endif
     264   IF (dms_cycle_cpl) THEN
     265      inforecv(idr_ocedms)%action = .TRUE. ; inforecv(idr_ocedms)%name = 'SIDMSFLX'
     266   ENDIF
     267 
    270268
    271269!************************************************************************************
     
    353351    END DO
    354352
    355 ! Now, if also coupling CPL with INCA, initialize here fields to be exchanged.
    356 #ifdef CPP_CPLOCNINCA
    357     DO jf=1,maxrcv
    358        IF (inforcv(jf)%action) THEN
    359           CALL prism_def_var_proto(inforcv(jf)%nid, inforcv(jf)%name, il_part_id, &
    360                il_var_nodims, PRISM_In, il_var_actual_shape, il_var_type, &
    361                ierror)
    362           IF (ierror .NE. PRISM_Ok) THEN
    363              WRITE(lunout,*) 'inicma : Problem with prism_def_var_proto for field : ',&
    364                   inforcv(jf)%name
    365              abort_message=' Problem in call to prism_def_var_proto for fields to receive'
    366              CALL abort_physic(modname,abort_message,1)
    367           ENDIF
    368        ENDIF
    369     END DO
     353
     354#ifdef INCA
     355    IF (dms_cycle_cpl) THEN
     356       CALL init_inca_oasis(inforecv(idr_ocedms))
     357    ENDIF
    370358#endif
    371359 
     
    424412! Output arguments
    425413!************************************************************************************
    426     REAL, DIMENSION(nbp_lon, jj_nb,maxrecv), INTENT(OUT) :: tab_get
     414    REAL, DIMENSION(nbp_lon, jj_nb,maxrecv_phys), INTENT(OUT) :: tab_get
    427415
    428416! Local variables
     
    446434    ENDIF
    447435   
    448     DO i = 1, maxrecv
     436    DO i = 1, maxrecv_phys
    449437      IF (inforecv(i)%action .AND. inforecv(i)%nid .NE. -1) THEN
    450438          field(:) = -99999.
Note: See TracChangeset for help on using the changeset viewer.