Ignore:
Timestamp:
Mar 21, 2026, 7:18:46 PM (2 weeks ago)
Author:
Laurent Fairhead
Message:
  1. SZ98 interpolation (Sheng and Zwiers, Climate Dynamics (1998)

Mean-preserving linear interpolation of monthly boundary conditions to daily values

  1. Concentration-Driven mode

Prescribed atmospheric CO2 concentrations without atmospheric CO2 transport

  1. CO2 Fossil fuel emissions

Reading of monthly or daily emissions with SZ98 interpolation when needed

  1. Flux corrections

Implementation of scalar (1D) ans spatially varying (2D) carbon flux corrections for piControl simulations.

PCadule

File:
1 edited

Legend:

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

    r6112 r6116  
    248248         o_flx_co2_land, o_flx_co2_land_cor, &
    249249         o_flx_co2_ff, o_flx_co2_bb, &
     250         o_co2_send, &
    250251         o_delta_sst, o_delta_sal, o_ds_ns, o_dt_ns, o_dter, o_dser, o_tkt, &
    251252         o_tks, o_taur, o_sss, &
     
    479480    USE carbon_cycle_mod, ONLY: fco2_ff, fco2_bb, fco2_land, fco2_ocean
    480481    USE carbon_cycle_mod, ONLY: fco2_ocean_cor, fco2_land_cor
     482    USE carbon_cycle_mod, ONLY: co2_send
    481483
    482484    USE phys_output_var_mod, ONLY: vars_defined, snow_o, zfra_o, bils_diss, &
     
    580582    REAL, DIMENSION (klon,16) :: zx_tmp_fi3dsplw  !FC
    581583
     584    ! << PC
     585    ! Dummy buffer for XIOS
     586    REAL, DIMENSION(:), ALLOCATABLE :: zzero
     587    INTEGER :: ierr_z   
     588    ! >> PC
     589
    582590    CHARACTER (LEN=4)              :: bb2
    583591    INTEGER, DIMENSION(nbp_lon*nbp_lat)  :: ndex2d
     
    613621    CALL set_itau_iophy(itau_w)
    614622
     623    ! << PC
     624    ! Initialize dummy buffer
     625    ALLOCATE(zzero(klon), STAT=ierr_z)
     626    IF (ierr_z /= 0) CALL abort_physic("phys_output_write", "Alloc zzero failed", 1)
     627    zzero(:) = 0.0   
     628    ! >> PC   
     629   
    615630 !   IF (.NOT.vars_defined) THEN
    616631       iinitend = 1
     
    30973112    ENDIF
    30983113  ENDIF !using_xios
    3099 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     3114
     3115! PC: TRACERS OUTPUT SECTION
    31003116       IF (iflag_phytrac == 1 ) then
    31013117!
     
    31053121             IF(.NOT.tracers(iq)%isInPhysics) CYCLE
    31063122             itr = itr + 1
    3107 !            write(*,*) 'phys_output_write_mod 2370: itr=',itr
    31083123             !--3D fields
    31093124             CALL histwrite_phy(o_trac(itr), tr_seri(:,:,itr))
     
    31213136             CALL histwrite_phy(o_trac_cum(itr), zx_tmp_fi2d)
    31223137           ENDDO !--iq
    3123            !--CO2 net fluxes
    3124            CALL histwrite_phy(o_flx_co2_land,  fco2_land)
    3125            CALL histwrite_phy(o_flx_co2_ocean, fco2_ocean)
    3126            CALL histwrite_phy(o_flx_co2_ocean_cor, fco2_ocean_cor)
    3127            CALL histwrite_phy(o_flx_co2_land_cor, fco2_land_cor)
    3128            CALL histwrite_phy(o_flx_co2_ff,    fco2_ff)
    3129            CALL histwrite_phy(o_flx_co2_bb,    fco2_bb)
     3138! PC: CO2 FLUXES           
     3139!           !--CO2 net fluxes
     3140!           CALL histwrite_phy(o_flx_co2_land,  fco2_land)
     3141!           CALL histwrite_phy(o_flx_co2_ocean, fco2_ocean)
     3142!           CALL histwrite_phy(o_flx_co2_ocean_cor, fco2_ocean_cor)
     3143!           CALL histwrite_phy(o_flx_co2_land_cor, fco2_land_cor)
     3144!           CALL histwrite_phy(o_flx_co2_ff,    fco2_ff)
     3145!           CALL histwrite_phy(o_flx_co2_bb,    fco2_bb)
     3146            !--CO2 net fluxes
     3147            ! PC
     3148            IF (ALLOCATED(fco2_land)) THEN
     3149               CALL histwrite_phy(o_flx_co2_land,  fco2_land)
     3150            END IF
     3151           
     3152            IF (ALLOCATED(fco2_ocean)) THEN
     3153               CALL histwrite_phy(o_flx_co2_ocean, fco2_ocean)
     3154            END IF
     3155
     3156            IF (ALLOCATED(fco2_ocean_cor)) THEN
     3157               CALL histwrite_phy(o_flx_co2_ocean_cor, fco2_ocean_cor)
     3158            END IF
     3159           
     3160            IF (ALLOCATED(fco2_land_cor)) THEN
     3161               CALL histwrite_phy(o_flx_co2_land_cor, fco2_land_cor)
     3162            END IF
     3163           
     3164            IF (ALLOCATED(fco2_ff)) THEN
     3165               CALL histwrite_phy(o_flx_co2_ff,    fco2_ff)
     3166            END IF
     3167           
     3168            IF (ALLOCATED(fco2_bb)) THEN
     3169               CALL histwrite_phy(o_flx_co2_bb,    fco2_bb)
     3170            END IF
     3171           
     3172            IF (ALLOCATED(co2_send)) THEN
     3173               CALL histwrite_phy(o_co2_send, co2_send)
     3174            END IF
     3175
     3176            ! PC
    31303177
    31313178         ELSE IF (type_trac == 'inco') THEN
     
    31513198           ENDDO !--iq
    31523199           !--CO2 net fluxes
    3153            CALL histwrite_phy(o_flx_co2_land,  fco2_land)
    3154            CALL histwrite_phy(o_flx_co2_ocean, fco2_ocean)
    3155            CALL histwrite_phy(o_flx_co2_ocean_cor, fco2_ocean_cor)
    3156            CALL histwrite_phy(o_flx_co2_land_cor, fco2_land_cor)
    3157            CALL histwrite_phy(o_flx_co2_ff,    fco2_ff)
    3158            CALL histwrite_phy(o_flx_co2_bb,    fco2_bb)
    3159 
     3200           ! << PC
     3201           IF (ALLOCATED(fco2_land)) THEN
     3202              CALL histwrite_phy(o_flx_co2_land,  fco2_land)
     3203            END IF
     3204           
     3205            IF (ALLOCATED(fco2_ocean)) THEN
     3206               CALL histwrite_phy(o_flx_co2_ocean, fco2_ocean)
     3207            ELSE
     3208               CALL histwrite_phy(o_flx_co2_ocean, zzero)
     3209            END IF
     3210           
     3211            IF (ALLOCATED(fco2_ocean_cor)) THEN
     3212               CALL histwrite_phy(o_flx_co2_ocean_cor, fco2_ocean_cor)
     3213            END IF
     3214           
     3215            IF (ALLOCATED(fco2_land_cor)) THEN
     3216               CALL histwrite_phy(o_flx_co2_land_cor, fco2_land_cor)
     3217            END IF
     3218           
     3219            IF (ALLOCATED(fco2_ff)) THEN
     3220               CALL histwrite_phy(o_flx_co2_ff,    fco2_ff)
     3221            END IF
     3222           
     3223            IF (ALLOCATED(fco2_bb)) THEN
     3224               CALL histwrite_phy(o_flx_co2_bb,    fco2_bb)
     3225            END IF
     3226         ! >> PC           
    31603227         ELSE IF (ANY(type_trac==['lmdz','coag'])) THEN
    31613228           itr = 0
     
    33333400    ENDDO
    33343401
     3402    ! << PC
     3403    ! Clean up
     3404    IF (ALLOCATED(zzero)) DEALLOCATE(zzero)
     3405    ! >> PC   
     3406
    33353407    IF (vars_defined) THEN
    33363408       ! On synchronise les fichiers pour IOIPSL
Note: See TracChangeset for help on using the changeset viewer.