Ignore:
Timestamp:
Oct 17, 2022, 10:15:06 AM (2 years ago)
Author:
pcadule
Message:

modifications to ensure restartability of the model when CO2 tracer is passed to radiative code, and to add diagnostics variables

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

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/libf/phylmdiso/phyetat0.F90

    r4170 r4298  
    3333  USE infotrac_phy,     ONLY: nqtot, nbtr, types_trac, tracers
    3434  USE traclmdz_mod,     ONLY: traclmdz_from_restart
    35   USE carbon_cycle_mod, ONLY: carbon_cycle_tr, carbon_cycle_cpl, co2_send
     35  USE carbon_cycle_mod, ONLY: carbon_cycle_init, carbon_cycle_cpl, carbon_cycle_tr, carbon_cycle_rad, co2_send, RCO2_glo
    3636  USE indice_sol_mod,   ONLY: nbsrf, is_ter, epsfra, is_lic, is_oce, is_sic
    3737  USE ocean_slab_mod,   ONLY: nslay, tslab, seaice, tice, ocean_slab_init
     
    134134
    135135  ! co2_ppm : value from the previous time step
     136
     137  ! co2_ppm0 : initial value of atmospheric CO2 (from create_etat0_limit.e .def)
     138  co2_ppm0 = 284.32
     139  ! when no initial value is available e.g., from a restart
     140  ! this variable must be set  in a .def file which will then be
     141  ! used by the conf_phys_m.F90 routine.
     142  ! co2_ppm0 = 284.32 (illustrative example on how to set the variable in .def
     143  ! file, for a pre-industrial CO2 concentration value)
     144
    136145  IF (carbon_cycle_tr .OR. carbon_cycle_cpl) THEN
    137146     co2_ppm = tab_cntrl(3)
    138147     RCO2    = co2_ppm * 1.0e-06 * RMCO2 / RMD
     148     IF (tab_cntrl(17) > 0. .AND. carbon_cycle_rad) THEN
     149           RCO2_glo = tab_cntrl(17)
     150       ELSE
     151           RCO2_glo    = co2_ppm0 * 1.0e-06 * RMCO2 / RMD
     152     ENDIF
    139153     ! ELSE : keep value from .def
    140154  ENDIF
    141 
    142 ! co2_ppm0 : initial value of atmospheric CO2 (from create_etat0_limit.e .def)
    143 ! co2_ppm0   = tab_cntrl(16)
    144 ! initial value for interactive CO2 run when there is no tracer field for CO2 in restart
    145   co2_ppm0=284.32
    146155
    147156  solaire_etat0      = tab_cntrl(4)
     
    166175  clesphy0(7)=tab_cntrl( 11 )
    167176  clesphy0(8)=tab_cntrl( 12 )
     177  clesphy0(9)=tab_cntrl( 17 )
    168178
    169179  ! set time iteration
     
    473483        ALLOCATE(co2_send(klon), stat=ierr)
    474484        IF (ierr /= 0) CALL abort_physic('phyetat0', 'pb allocation co2_send', 1)
    475         found=phyetat0_get(1,co2_send,"co2_send","co2 send",co2_ppm)
     485        found=phyetat0_get(1,co2_send,"co2_send","co2 send",co2_ppm0)
    476486     ENDIF
    477487  ELSE IF (ANY(types_trac == 'lmdz')) THEN
  • LMDZ6/trunk/libf/phylmdiso/phyredem.F90

    r4170 r4298  
    4545#endif
    4646#endif
    47   USE carbon_cycle_mod, ONLY : carbon_cycle_cpl, co2_send
     47  USE carbon_cycle_mod, ONLY : carbon_cycle_cpl, co2_send, carbon_cycle_rad, RCO2_glo
    4848  USE indice_sol_mod, ONLY: nbsrf, is_oce, is_sic, is_ter, is_lic, epsfra
    4949  USE surface_data, ONLY: type_ocean, version_ocean
     
    130130
    131131  ! co2_ppm0 : initial value of atmospheric CO2
    132   tab_cntrl(16) = co2_ppm0
     132  ! tab_cntrl(16) = co2_ppm0
     133
     134  !  PC -- initial value of RCO2 for the radiation scheme
     135  !  tab_cntrl(17) = co2_ppm * 1.0e-06 * RMCO2 / RMD
     136  IF (carbon_cycle_rad) tab_cntrl(17) = RCO2_glo
     137  !PRINT*, "PC : phyredem RCO2_glo =",RCO2_glo
    133138
    134139  DO pass=1,2   ! pass=1 netcdf definition ; pass=2 netcdf write
  • LMDZ6/trunk/libf/phylmdiso/physiq_mod.F90

    r4234 r4298  
    54975497          !
    54985498          !--interactive CO2 in ppm from carbon cycle
    5499           IF (carbon_cycle_rad.AND..NOT.debut) THEN
    5500             RCO2=RCO2_glo
    5501           ENDIF
     5499          IF (carbon_cycle_rad) RCO2=RCO2_glo
    55025500          !
    55035501          IF (prt_level .GE.10) THEN
Note: See TracChangeset for help on using the changeset viewer.