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

File:
1 edited

Legend:

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

    r4263 r4298  
    2525  USE infotrac_phy,     ONLY: nqtot, nbtr, type_trac, types_trac, tracers
    2626  USE traclmdz_mod,     ONLY: traclmdz_from_restart
    27   USE carbon_cycle_mod, ONLY: carbon_cycle_tr, carbon_cycle_cpl, co2_send
     27  USE carbon_cycle_mod, ONLY: carbon_cycle_init, carbon_cycle_cpl, carbon_cycle_tr, carbon_cycle_rad, co2_send, RCO2_glo
    2828  USE indice_sol_mod,   ONLY: nbsrf, is_ter, epsfra, is_lic, is_oce, is_sic
    2929  USE ocean_slab_mod,   ONLY: nslay, tslab, seaice, tice, ocean_slab_init
     
    113113
    114114  ! co2_ppm : value from the previous time step
     115
     116  ! co2_ppm0 : initial value of atmospheric CO2 (from create_etat0_limit.e .def)
     117  co2_ppm0 = 284.32
     118  ! when no initial value is available e.g., from a restart
     119  ! this variable must be set  in a .def file which will then be
     120  ! used by the conf_phys_m.F90 routine.
     121  ! co2_ppm0 = 284.32 (illustrative example on how to set the variable in .def
     122  ! file, for a pre-industrial CO2 concentration value)
     123
    115124  IF (carbon_cycle_tr .OR. carbon_cycle_cpl) THEN
    116125     co2_ppm = tab_cntrl(3)
    117126     RCO2    = co2_ppm * 1.0e-06 * RMCO2 / RMD
     127     IF (tab_cntrl(17) > 0. .AND. carbon_cycle_rad) THEN
     128           RCO2_glo = tab_cntrl(17)
     129       ELSE
     130           RCO2_glo    = co2_ppm0 * 1.0e-06 * RMCO2 / RMD
     131     ENDIF
    118132     ! ELSE : keep value from .def
    119133  ENDIF
    120 
    121 ! co2_ppm0 : initial value of atmospheric CO2 (from create_etat0_limit.e .def)
    122 ! co2_ppm0   = tab_cntrl(16)
    123 ! initial value for interactive CO2 run when there is no tracer field for CO2 in restart
    124   co2_ppm0=284.32
    125134
    126135  solaire_etat0      = tab_cntrl(4)
     
    145154  clesphy0(7)=tab_cntrl( 11 )
    146155  clesphy0(8)=tab_cntrl( 12 )
     156  clesphy0(9)=tab_cntrl( 17 )
    147157
    148158  ! set time iteration
     
    454464        ALLOCATE(co2_send(klon), stat=ierr)
    455465        IF (ierr /= 0) CALL abort_physic('phyetat0', 'pb allocation co2_send', 1)
    456         found=phyetat0_get(1,co2_send,"co2_send","co2 send",co2_ppm)
     466        !found=phyetat0_get(1,co2_send,"co2_send","co2 send",co2_ppm)
     467        found=phyetat0_get(1,co2_send,"co2_send","co2 send",co2_ppm0)
    457468     ENDIF
    458469  ELSE IF (type_trac == 'lmdz') THEN
Note: See TracChangeset for help on using the changeset viewer.