Changeset 6116 for LMDZ6/trunk/libf/phylmd/phyetat0_mod.f90
- Timestamp:
- Mar 21, 2026, 7:18:46 PM (2 weeks ago)
- File:
-
- 1 edited
-
LMDZ6/trunk/libf/phylmd/phyetat0_mod.f90 (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/phylmd/phyetat0_mod.f90
r6070 r6116 49 49 USE traclmdz_mod, ONLY: traclmdz_from_restart 50 50 USE carbon_cycle_mod, ONLY: carbon_cycle_init, carbon_cycle_cpl, carbon_cycle_tr, carbon_cycle_rad, co2_send, RCO2_glo 51 ! << PC 52 USE carbon_cycle_mod, ONLY: carbon_cycle_conc_driven 53 USE mod_phys_lmdz_mpi_data, ONLY: is_mpi_root 54 ! >> PC 51 55 USE indice_sol_mod, ONLY: nbsrf, is_ter, epsfra, is_lic, is_oce, is_sic 52 56 !GG USE ocean_slab_mod, ONLY: nslay, tslab, seaice, tice, ocean_slab_init … … 145 149 ! co2_ppm : value from the previous time step 146 150 147 ! co2_ppm0 : initial value of atmospheric CO2 (from create_etat0_limit.e .def) 148 co2_ppm0 = 284.32 151 ! << PC 152 ! ! co2_ppm0 : initial value of atmospheric CO2 (from create_etat0_limit.e .def) 153 ! co2_ppm0 = 284.32 154 ! co2_ppm0 is read from config.def by conf_phys_m 155 ! Only fall back to a default if it is not set to a value 156 IF (co2_ppm0 <= 0.0) co2_ppm0 = 284.32 157 ! >> PC 158 149 159 ! when no initial value is available e.g., from a restart 150 160 ! this variable must be set in a .def file which will then be … … 153 163 ! file, for a pre-industrial CO2 concentration value) 154 164 155 IF (carbon_cycle_tr .OR. carbon_cycle_cpl) THEN 156 co2_ppm = tab_cntrl(3) 157 RCO2 = co2_ppm * 1.0e-06 * RMCO2 / RMD 158 IF (tab_cntrl(17) > 0. .AND. carbon_cycle_rad) THEN 165 ! << PC 166 IF (carbon_cycle_tr .OR. carbon_cycle_cpl .OR. carbon_cycle_conc_driven) THEN 167 168 IF (.NOT. carbon_cycle_conc_driven) THEN 169 ! Emission-driven: restart controls the initial CO2 value 170 co2_ppm = tab_cntrl(3) 171 ELSE 172 ! Concentration-driven: co2_ppm must be prescribed by the forcing 173 IF (co2_ppm <= 0.0) co2_ppm = tab_cntrl(3) 174 END IF 175 176 RCO2 = co2_ppm * 1.0e-06 * RMCO2 / RMD 177 178 IF (carbon_cycle_conc_driven) THEN 179 ! Concentration-driven: radiative CO2 must follow prescribed co2_ppm 180 RCO2_glo = co2_ppm * 1.0e-06 * RMCO2 / RMD 181 ELSE 182 ! Emission-driven: may restore from restart 183 IF (tab_cntrl(17) > 0. .AND. carbon_cycle_rad) THEN 159 184 RCO2_glo = tab_cntrl(17) 160 ELSE 161 RCO2_glo = co2_ppm0 * 1.0e-06 * RMCO2 / RMD 162 ENDIF 163 ! ELSE : keep value from .def 164 ENDIF 185 ELSE 186 RCO2_glo = co2_ppm0 * 1.0e-06 * RMCO2 / RMD 187 END IF 188 END IF 189 190 END IF 191 192 ! >> PC 165 193 166 194 solaire_etat0 = tab_cntrl(4) … … 602 630 !=========================================== 603 631 604 !-- OB now this is for co2i - ThL: and therefore also for inco632 !--PC+OB now this is for co2i - ThL: and therefore also for inco 605 633 IF (ANY(type_trac == ['co2i','inco'])) THEN 606 IF (carbon_cycle_cpl) THEN 607 ALLOCATE(co2_send(klon), stat=ierr) 608 IF (ierr /= 0) CALL abort_physic('phyetat0', 'pb allocation co2_send', 1) 609 found=phyetat0_get(co2_send,"co2_send","co2 send",co2_ppm0) 610 ENDIF 634 ! << PC 635 ! Always allocate co2_send 636 IF (.NOT. ALLOCATED(co2_send)) ALLOCATE(co2_send(klon)) 637 638 IF (carbon_cycle_conc_driven) THEN 639 ! In concentration driven mode, we do NOT read co2_send from restart 640 ! We rely on tracco2i to set it to co2_ppm 641 PRINT*, 'phyetat0: Carbon cycle is Concentration Driven' 642 PRINT*, 'phyetat0: co2_send will be initialized to co2_ppm in tracco2i' 643 co2_send(:) = co2_ppm 644 IF (is_mpi_root) PRINT*, 'phyetat0: Conc-Driven. co2_send init to ', co2_ppm 645 ELSE 646 ! Emission driven: Standard behavior (alloc and read from restart) 647 IF (.NOT. ALLOCATED(co2_send)) ALLOCATE(co2_send(klon)) 648 found = phyetat0_get(co2_send, "co2_send", "co2 send", co2_ppm0) 649 IF (.NOT.found) co2_send(:) = co2_ppm0 650 END IF 651 ! >> PC 652 611 653 ELSE IF (type_trac == 'lmdz') THEN 612 654 it = 0
Note: See TracChangeset
for help on using the changeset viewer.
