Changeset 6319


Ignore:
Timestamp:
2019-11-08T13:00:52+01:00 (4 years ago)
Author:
josefine.ghattas
Message:

Improvment for the ESM CO2 configuration:

  • Separate variable fco2_lu into 3 parts: fco2_lu, fco2_wh and fco2_ha
  • Move calculation of co2_flux from dt_sechiba time-step to daily time-step (in the part for do_slow)
  • Removed co2_flux and fco2_lu from stomate_intialize argument list. These variables were never used in the intialization phase.
  • Add co2_flux, and fco2_wh, fco2_ha to restart file
  • Corrected output unit for nee to be consistent with LMDZ and stomate output variables. It is now in kgC/m2/s.
  • Corrected output for znetco2
  • Added fCO2_fWoodharvest and fCO2_fHarvest as new possible tracers in LMDZ (intersurf).
  • Added diagnostic output for fCO2_fWoodharvest and fCO2_fHarvest
  1. Cadule
Location:
branches/ORCHIDEE_2_2/ORCHIDEE
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • branches/ORCHIDEE_2_2/ORCHIDEE/src_sechiba/intersurf.f90

    r6289 r6319  
    195195    REAL(r_std),DIMENSION (kjpindex)                      :: zcoastal      !! Work array to keep coastalflow (m^3/dt) 
    196196    REAL(r_std),DIMENSION (kjpindex)                      :: zriver        !! Work array to keep riverflow (m^3/dt) 
    197     REAL(r_std),DIMENSION (kjpindex)                      :: znetco2       !! Work array to keep netco2flux (gC/m2/dt_sechiba) 
    198     REAL(r_std),DIMENSION (kjpindex)                      :: zcarblu       !! Work array to keep fco2_land_use (gC/m2/one_day) 
    199197    REAL(r_std),DIMENSION (kjpindex)                      :: ztsol_rad     !! Work array to keep tsol_rad 
    200198    REAL(r_std),DIMENSION (kjpindex)                      :: zvevapp       !! Work array to keep vevapp 
     
    342340         zcoastal,     zriver,       ztsol_rad,     zvevapp,     zqsurf,        & 
    343341         zz0m,         zz0h,         zalbedo,      zfluxsens,     zfluxlat,     & 
    344          zemis,        znetco2,      zcarblu,      ztemp_sol_new, zcdrag) 
     342         zemis,        ztemp_sol_new,zcdrag) 
     343 
    345344     
    346345    IF (printlev_loc >= 3) WRITE(numout,*) 'After call to sechiba_initialize' 
     
    500499    REAL(r_std),DIMENSION (kjpindex)                      :: zcoastal      !! Work array to keep coastalflow (m^3/dt) 
    501500    REAL(r_std),DIMENSION (kjpindex)                      :: zriver        !! Work array to keep riverflow (m^3/dt) 
    502     REAL(r_std),DIMENSION (kjpindex)                      :: znetco2       !! Work array to keep netco2flux (gC/m2/dt_sechiba) 
     501    REAL(r_std),DIMENSION (kjpindex)                      :: znetco2       !! Work array to keep netco2flux (gC/m2/one_day) 
    503502    REAL(r_std),DIMENSION (kjpindex)                      :: zcarblu       !! Work array to keep fco2_land_use (gC/m2/one_day) 
     503    REAL(r_std),DIMENSION (kjpindex)                      :: zcarbwh       !! Work array to keep fco2_wh (gC/m2/one_day) 
     504    REAL(r_std),DIMENSION (kjpindex)                      :: zcarbha       !! Work array to keep fco2_ha (gC/m2/one_day) 
    504505    REAL(r_std),DIMENSION (kjpindex)                      :: ztsol_rad     !! Work array to keep tsol_rad 
    505506    REAL(r_std),DIMENSION (kjpindex)                      :: zvevapp       !! Work array to keep vevapp 
     
    571572         zcdrag, zpetAcoef, zpeqAcoef, zpetBcoef, zpeqBcoef, & 
    572573         zprecip_rain ,zprecip_snow,  zlwdown, zswnet, zswdown, zcoszang, zpb, & 
    573          zvevapp, zfluxsens, zfluxlat, zcoastal, zriver, znetco2, zcarblu, & 
     574         zvevapp, zfluxsens, zfluxlat, zcoastal, zriver, & 
     575         znetco2, zcarblu, zcarbwh, zcarbha, & 
    574576         ztsol_rad, ztemp_sol_new, zqsurf, zalbedo, zemis, zz0m, zz0h,& 
    575577         zveget, zlai, zheight, & 
     
    624626    CALL xios_orchidee_send_field("swdown",zswdown) 
    625627    CALL xios_orchidee_send_field("pb",zpb) 
    626     CALL xios_orchidee_send_field("zcarblu",zcarblu/1e3/one_day)    ! gC/m2/one_day -> kgC/m2/s 
    627     CALL xios_orchidee_send_field("znetco2",znetco2/1e3/dt_sechiba) ! gC/m2/dt_sechiba -> kgC/m2/s 
     628    CALL xios_orchidee_send_field("znetco2",znetco2/1.e3/one_day)    ! gC/m2/one_day -> kgC/m2/s 
     629    CALL xios_orchidee_send_field("zcarblu",zcarblu/1.e3/one_day)    ! gC/m2/one_day -> kgC/m2/s 
     630    CALL xios_orchidee_send_field("zcarbwh",zcarbwh/1.e3/one_day)    ! gC/m2/one_day -> kgC/m2/s 
     631    CALL xios_orchidee_send_field("zcarbha",zcarbha/1.e3/one_day)    ! gC/m2/one_day -> kgC/m2/s 
    628632 
    629633     
     
    880884    REAL(r_std),DIMENSION (kjpindex)                      :: zcoastal      !! Work array to keep coastal flow 
    881885    REAL(r_std),DIMENSION (kjpindex)                      :: zriver        !! Work array to keep river out flow 
    882     REAL(r_std),DIMENSION (kjpindex)                      :: znetco2       !! Work array to keep netco2flux (gC/m2/dt_sechiba)  
    883     REAL(r_std),DIMENSION (kjpindex)                      :: zcarblu       !! Work array to keep fco2_land_use (gC/m2/one_day) 
    884886    REAL(r_std),DIMENSION (kjpindex)                      :: ztsol_rad     !! Work array to keep tsol_rad 
    885887    REAL(r_std),DIMENSION (kjpindex)                      :: zvevapp       !! Work array to keep vevapp 
     
    11141116         zcoastal,     zriver,       ztsol_rad,     zvevapp,     zqsurf,        & 
    11151117         zz0m,          zz0h,        zalbedo,      zfluxsens,     zfluxlat,    zemis,         & 
    1116          znetco2,      zcarblu,      ztemp_sol_new, zcdrag) 
     1118         ztemp_sol_new, zcdrag) 
     1119 
    11171120     
    11181121    IF ( printlev_loc>=3 ) WRITE(numout,*) 'After call to sechiba_initialize' 
     
    13341337    REAL(r_std),DIMENSION (kjpindex)                      :: zcoastal      !! Work array to keep coastal flow 
    13351338    REAL(r_std),DIMENSION (kjpindex)                      :: zriver        !! Work array to keep river out flow 
    1336     REAL(r_std),DIMENSION (kjpindex)                      :: znetco2       !! Work array to keep netco2flux (gC/m2/dt_sechiba) 
     1339    REAL(r_std),DIMENSION (kjpindex)                      :: znetco2       !! Work array to keep netco2flux (gC/m2/one_day) 
    13371340    REAL(r_std),DIMENSION (kjpindex)                      :: zcarblu       !! Work array to keep fco2_land_use (gC/m2/one_day) 
     1341    REAL(r_std),DIMENSION (kjpindex)                      :: zcarbwh       !! Work array to keep fco2_wh (gC/m2/one_day) 
     1342    REAL(r_std),DIMENSION (kjpindex)                      :: zcarbha       !! Work array to keep fco2_ha (gC/m2/one_day) 
    13381343    REAL(r_std),DIMENSION (kjpindex)                      :: ztsol_rad     !! Work array to keep tsol_rad 
    13391344    REAL(r_std),DIMENSION (kjpindex)                      :: zvevapp       !! Work array to keep vevapp 
     
    14481453         zcdrag, petAcoef, peqAcoef, petBcoef, peqBcoef, & 
    14491454         zprecip_rain ,zprecip_snow,  lwdown, swnet, swdown, zcoszang, pb, & 
    1450          zvevapp, zfluxsens, zfluxlat, zcoastal, zriver, znetco2, zcarblu, & 
     1455         zvevapp, zfluxsens, zfluxlat, zcoastal, zriver, & 
     1456         znetco2, zcarblu, zcarbwh, zcarbha, & 
    14511457         ztsol_rad, ztemp_sol_new, zqsurf, zalbedo, zemis, zz0m, zz0h, & 
    14521458         zveget, zlai, zheight, & 
     
    14881494             SELECT CASE(TRIM(field_in_names_loc(i))) 
    14891495             CASE("fCO2_nep") 
    1490                 ! Transform from gC/m2/dt_sechiba into kgC/m2/s 
    1491                 fields_in(ik,i) = znetco2(ik)/1e3/dt_sechiba 
     1496                ! Transform from gC/m2/one_day into kgC/m2/s 
     1497                fields_in(ik,i) = znetco2(ik)/1.e3/one_day 
    14921498             CASE("fCO2_fLuc") 
    14931499                ! Transform from gC/m2/one_day into kgC/m2/s 
    1494                 fields_in(ik,i) = zcarblu(ik)/1e3/one_day  
     1500                fields_in(ik,i) = zcarblu(ik)/1.e3/one_day  
     1501             CASE("fCO2_fWoodharvest") 
     1502                ! Transform from gC/m2/one_day into kgC/m2/s 
     1503                fields_in(ik,i) = zcarbwh(ik)/1.e3/one_day 
     1504             CASE("fCO2_fHarvest") 
     1505                ! Transform from gC/m2/one_day into kgC/m2/s 
     1506                fields_in(ik,i) = zcarbha(ik)/1.e3/one_day 
    14951507             CASE("fCO2_nbp") 
    1496                 fields_in(ik,i) = znetco2(ik)/1e3/dt_sechiba + zcarblu(ik)/1e3/one_day  
     1508                fields_in(ik,i) = znetco2(ik)/1.e3/one_day + zcarblu(ik)/1.e3/one_day + zcarbwh(ik)/1.e3/one_day + zcarbha(ik)/1.e3/one_day 
    14971509             CASE DEFAULT 
    14981510                CALL ipslerr_p (3,'intersurf_main_gathered', & 
     
    15291541    CALL xios_orchidee_send_field("riverflow_cpl",riverflow_cpl) 
    15301542    CALL xios_orchidee_send_field("coastalflow_cpl",coastalflow_cpl) 
    1531     CALL xios_orchidee_send_field("zcarblu",zcarblu/1e3/one_day)    ! gC/m2/one_day -> kgC/m2/s 
    1532     CALL xios_orchidee_send_field("znetco2",znetco2/1e3/dt_sechiba) ! gC/m2/dt_sechiba -> kgC/m2/s 
     1543    CALL xios_orchidee_send_field("znetco2",znetco2/1.e3/one_day)    ! gC/m2/one_day -> kgC/m2/s 
     1544    CALL xios_orchidee_send_field("zcarblu",zcarblu/1.e3/one_day)    ! gC/m2/one_day -> kgC/m2/s 
     1545    CALL xios_orchidee_send_field("zcarbwh",zcarbwh/1.e3/one_day)    ! gC/m2/one_day -> kgC/m2/s 
     1546    CALL xios_orchidee_send_field("zcarbha",zcarbha/1.e3/one_day)    ! gC/m2/one_day -> kgC/m2/s 
     1547 
    15331548     
    15341549    IF ( .NOT. almaoutput ) THEN 
  • branches/ORCHIDEE_2_2/ORCHIDEE/src_sechiba/ioipslctrl.f90

    r5847 r6319  
    555555 
    556556          IF ( ok_stomate ) THEN 
    557              CALL histdef(hist_id, 'nee', 'Net Ecosystem Exchange', 'gC/m^2/s', & 
     557             CALL histdef(hist_id, 'nee', 'Net Ecosystem Exchange', 'kgC/m^2/s', & 
    558558                  & iim,jjm, hori_id, nvm, 1, nvm, vegax_id, 32, fluxop_scinsec(4), dt,dw) 
    559559             CALL histdef(hist_id, 'maint_resp', 'Maintenance respiration', 'gC/m^2/s', & 
     
    15161516 
    15171517             IF ( ok_stomate ) THEN 
    1518                 CALL histdef(hist2_id, 'nee', 'Net Ecosystem Exchange', 'gC/m^2/s', & 
     1518                CALL histdef(hist2_id, 'nee', 'Net Ecosystem Exchange', 'kgC/m^2/s', & 
    15191519                     & iim,jjm, hori_id2, nvm, 1, nvm, vegax_id2, 32, fluxop_scinsec2(6), dt,dw2) 
    15201520                CALL histdef(hist2_id, 'maint_resp', 'Maintenance respiration', 'gC/m^2/s', & 
  • branches/ORCHIDEE_2_2/ORCHIDEE/src_sechiba/sechiba.f90

    r6160 r6319  
    210210  REAL(r_std), ALLOCATABLE, SAVE, DIMENSION (:,:)  :: evap_bare_lim_ns !! Bare soil stress 
    211211!$OMP THREADPRIVATE(evap_bare_lim_ns) 
    212   REAL(r_std), ALLOCATABLE, SAVE, DIMENSION (:,:)  :: co2_flux       !! CO2 flux (gC/m**2 of average ground/dt_sechiba) 
     212  REAL(r_std), ALLOCATABLE, SAVE, DIMENSION (:,:)  :: co2_flux       !! CO2 flux (gC/m**2 of average ground/one_day) 
    213213!$OMP THREADPRIVATE(co2_flux) 
    214214  REAL(r_std), ALLOCATABLE, SAVE, DIMENSION (:,:)  :: co2_to_bm      !! virtual CO2 flux (gC/m**2 of average ground/s) 
     
    324324       coastalflow,  riverflow,    tsol_rad,     vevapp,       qsurf_out, & 
    325325       z0m_out,      z0h_out,      albedo,       fluxsens,     fluxlat,      emis_out,  & 
    326        netco2flux,   fco2_lu,      temp_sol_new, tq_cdrag) 
     326       temp_sol_new, tq_cdrag) 
    327327 
    328328!! 0.1 Input variables 
     
    406406                                                                                  !! @tex $(W m^{-2})$ @endtex 
    407407    REAL(r_std),DIMENSION (kjpindex), INTENT (out)           :: emis_out          !! Emissivity (unitless) 
    408     REAL(r_std),DIMENSION (kjpindex), INTENT (out)           :: netco2flux        !! Sum CO2 flux over PFTs  
    409                                                                                   !! (gC/m2/dt_sechiba) 
    410     REAL(r_std),DIMENSION (kjpindex), INTENT (out)           :: fco2_lu           !! Land Cover Change CO2 flux  
    411                                                                                   !! (gC/m2/one_day ) 
    412408    REAL(r_std),DIMENSION (kjpindex), INTENT (out)           :: temp_sol_new      !! New ground temperature (K) 
    413409 
     
    439435                              frac_nobio,    njsc,         veget_max,      fraclut,           & 
    440436                              nwdfraclut,    tot_bare_soil,totfrac_nobio,  qsintmax,          & 
    441                               co2_flux,      co2_to_bm,    fco2_lu,        temp_growth) 
    442  
    443  
    444     netco2flux(:) = zero 
    445     DO jv = 2,nvm 
    446        netco2flux(:) = netco2flux(:) + co2_flux(:,jv)*veget_max(:,jv) 
    447     ENDDO 
     437                              co2_to_bm, temp_growth) 
    448438     
    449439    !! 1.4 Initialize diffusion coefficients 
     
    550540!! :: temp_sol_new and :: fluxlat), surface characteristics (:: z0_out, :: emis_out,  
    551541!! :: tq_cdrag and :: albedo) and land use related CO2 fluxes (:: netco2flux and  
    552 !! :: fco2_lu)             
     542!! :: fco2_lu, :: fco2_wh, ::fco2_ha)             
    553543!! 
    554544!! REFERENCE(S) :  
     
    567557       & tq_cdrag, petAcoef, peqAcoef, petBcoef, peqBcoef, & 
    568558       & precip_rain, precip_snow, lwdown, swnet, swdown, coszang, pb, & 
    569        & vevapp, fluxsens, fluxlat, coastalflow, riverflow, netco2flux, fco2_lu, & 
     559       & vevapp, fluxsens, fluxlat, coastalflow, riverflow, & 
     560       & netco2flux, fco2_lu, fco2_wh, fco2_ha, & 
    570561       & tsol_rad, temp_sol_new, qsurf_out, albedo, emis_out, z0m_out, z0h_out,& 
    571562       & veget_out, lai_out, height_out, & 
     
    663654    REAL(r_std),DIMENSION (kjpindex), INTENT (out)           :: netco2flux        !! Sum CO2 flux over PFTs  
    664655                                                                                  !! (gC/m2/dt_sechiba) 
    665     REAL(r_std),DIMENSION (kjpindex), INTENT (out)           :: fco2_lu           !! Land Cover Change CO2 flux  
    666                                                                                   !! (gC/m2/one_day) 
     656    REAL(r_std),DIMENSION (kjpindex), INTENT (out)           :: fco2_lu           !! Land Cover Change CO2 flux (gC/m2/one_day) 
     657    REAL(r_std),DIMENSION (kjpindex), INTENT (out)           :: fco2_wh           !! Wood harvest CO2 flux (gC/m2/one_day) 
     658    REAL(r_std),DIMENSION (kjpindex), INTENT (out)           :: fco2_ha           !! Crop harvest CO2 flux (gC/m2/one_day) 
    667659    REAL(r_std),DIMENSION (kjpindex,nvm), INTENT (out)       :: veget_out         !! Fraction of vegetation type (unitless, 0-1) 
    668660    REAL(r_std),DIMENSION (kjpindex,nvm), INTENT (out)       :: lai_out           !! Leaf area index (m^2 m^{-2})  
     
    792784         lai, frac_age, height, veget, frac_nobio, veget_max, totfrac_nobio, qsintmax, & 
    793785         rest_id, hist_id, hist2_id, rest_id_stom, hist_id_stom, hist_id_stom_IPCC, & 
    794          co2_flux, fco2_lu, co2_to_bm, temp_growth, tot_bare_soil) 
     786         co2_flux, fco2_lu, fco2_wh, fco2_ha, co2_to_bm, temp_growth, tot_bare_soil) 
     787 
    795788 
    796789    !! 9.2 Compute global CO2 flux 
    797790    netco2flux(:) = zero 
    798791    DO jv = 2,nvm 
    799        netco2flux(:) = netco2flux(:) + co2_flux(:,jv)*veget_max(:,jv) 
     792      netco2flux(:) = netco2flux(:) + co2_flux(:,jv)*(1-totfrac_nobio) 
    800793    ENDDO 
    801794  
     
    960953    ENDDO 
    961954    CALL xios_orchidee_send_field("gpptree",histvar/dt_sechiba) 
    962  
    963     CALL xios_orchidee_send_field("nee",co2_flux/dt_sechiba) 
     955    CALL xios_orchidee_send_field("nee",co2_flux/1.e3/one_day) 
    964956    CALL xios_orchidee_send_field("drysoil_frac",drysoil_frac) 
    965957    CALL xios_orchidee_send_field("vevapflo",vevapflo/dt_sechiba) 
     
    11331125        
    11341126       IF ( ok_stomate ) THEN 
    1135           CALL histwrite_p(hist_id, 'nee', kjit, co2_flux, kjpindex*nvm, indexveg)     
     1127          CALL histwrite_p(hist_id, 'nee', kjit, co2_flux/1.e3/one_day, kjpindex*nvm, indexveg)     
    11361128       ENDIF 
    11371129 
     
    12421234          CALL histwrite_p(hist2_id, 'cimean', kjit, cimean, kjpindex*nvm, indexveg)     
    12431235           
    1244           IF ( ok_stomate ) THEN 
    1245              CALL histwrite_p(hist2_id, 'nee', kjit, co2_flux, kjpindex*nvm, indexveg)     
     1236          IF ( ok_stomate ) THEN  
     1237             CALL histwrite_p(hist2_id, 'nee', kjit, co2_flux/1.e3/one_day, kjpindex*nvm, indexveg)     
    12461238          ENDIF 
    12471239       ELSE 
  • branches/ORCHIDEE_2_2/ORCHIDEE/src_sechiba/slowproc.f90

    r6145 r6319  
    248248                                  frac_nobio,    njsc,         veget_max,      fraclut,           & 
    249249                                  nwdfraclut,    tot_bare_soil,totfrac_nobio,  qsintmax,          & 
    250                                   co2_flux,      co2_to_bm,    fco2_lu,      temp_growth) 
     250                                  co2_to_bm,     temp_growth) 
    251251 
    252252!! 0.1 Input variables 
     
    267267     
    268268!! 0.2 Output variables  
    269     REAL(r_std), DIMENSION (kjpindex,nvm), INTENT(out)     :: co2_flux       !! CO2 flux per average ground area (gC m^{-2} dt_stomate^{-1}) 
    270269    REAL(r_std), DIMENSION (kjpindex,nvm), INTENT(out)     :: co2_to_bm      !! Virtual gpp per average ground area (gC m^{-2} dt_stomate^{-1}) 
    271     REAL(r_std),DIMENSION (kjpindex), INTENT (out)         :: fco2_lu        !! CO2 flux from land-use (without forest management) (gC m^{-2} dt_stomate^{-1}) 
    272270    REAL(r_std),DIMENSION (kjpindex), INTENT (out)         :: temp_growth    !! Growth temperature (°C) - Is equal to t2m_month  
    273271    INTEGER(i_std), DIMENSION(kjpindex), INTENT(out)       :: njsc           !! Index of the dominant soil textural class in the grid cell (1-nscm, unitless) 
     
    322320             contfrac,       totfrac_nobio,          clayfraction, temp_air,          & 
    323321             lai,            veget,                  veget_max,                       & 
    324              co2_flux,       co2_to_bm,              fco2_lu,                         & 
    325              deadleaf_cover, assim_param,            temp_growth ) 
     322             co2_to_bm,      deadleaf_cover,         assim_param,  temp_growth ) 
    326323    ELSE 
    327324       !! ok_stomate is not activated 
    328325       !! Define the CO2 fluxes to zero (no carbone cycle) 
    329        co2_flux(:,:) = zero 
    330326       co2_to_bm(:,:) = zero 
    331327    ENDIF 
     
    383379!! RECENT CHANGE(S): None 
    384380!! 
    385 !! MAIN OUTPUT VARIABLE(S):  ::co2_flux, ::fco2_lu, ::lai, ::height, ::veget, ::frac_nobio,   
     381!! MAIN OUTPUT VARIABLE(S):  ::co2_flux, ::fco2_lu,::fco2_wh, ::fco2_ha, ::lai, ::height, ::veget, ::frac_nobio,   
    386382!! ::veget_max, ::woodharvest, ::totfrac_nobio, ::soiltype, ::assim_param, ::deadleaf_cover, ::qsintmax, 
    387383!! and resp_maint, resp_hetero, resp_growth, npp that are calculated and stored 
     
    405401       lai, frac_age, height, veget, frac_nobio, veget_max, totfrac_nobio, qsintmax, & 
    406402       rest_id, hist_id, hist2_id, rest_id_stom, hist_id_stom, hist_id_stom_IPCC, & 
    407        co2_flux, fco2_lu, co2_to_bm, temp_growth, tot_bare_soil) 
     403       co2_flux, fco2_lu, fco2_wh, fco2_ha, & 
     404       co2_to_bm, temp_growth, tot_bare_soil) 
    408405   
    409406!! INTERFACE DESCRIPTION 
     
    439436!! 0.2 Output variables  
    440437    REAL(r_std), DIMENSION (kjpindex,nvm), INTENT(out)  :: co2_flux            !! CO2 flux per average ground area (gC m^{-2} dt_stomate^{-1}) 
     438    REAL(r_std),DIMENSION (kjpindex), INTENT (out)      :: fco2_lu             !! CO2 flux from land-use (without forest management) (gC m^{-2} dt_stomate^{-1}) 
     439    REAL(r_std),DIMENSION (kjpindex), INTENT (out)      :: fco2_wh             !! CO2 Flux to Atmosphere from Wood Harvesting (gC m^{-2} dt_stomate^{-1}) 
     440    REAL(r_std),DIMENSION (kjpindex), INTENT (out)      :: fco2_ha             !! CO2 Flux to Atmosphere from Crop Harvesting (gC m^{-2} dt_stomate^{-1}) 
    441441    REAL(r_std), DIMENSION (kjpindex,nvm), INTENT(out)  :: co2_to_bm           !! virtual gpp flux per average ground area (gC m^{-2} dt_stomate^{-1}) 
    442     REAL(r_std),DIMENSION (kjpindex), INTENT (out)      :: fco2_lu             !! CO2 flux from land-use (without forest management) (gC m^{-2} dt_stomate^{-1}) 
    443442    REAL(r_std),DIMENSION (kjpindex), INTENT (out)      :: temp_growth         !! Growth temperature (°C) - Is equal to t2m_month  
    444443    REAL(r_std), DIMENSION (kjpindex), INTENT(out)      :: tot_bare_soil       !! Total evaporating bare soil fraction in the mesh 
     
    550549            veget_max_new, woodharvest, totfrac_nobio_new, fraclut, & 
    551550            rest_id_stom, hist_id_stom, hist_id_stom_IPCC, & 
    552             co2_flux, fco2_lu, resp_maint,resp_hetero,resp_growth,co2_to_bm,temp_growth) 
     551            co2_flux, fco2_lu, fco2_wh, fco2_ha, & 
     552            resp_maint, resp_hetero, resp_growth, co2_to_bm, temp_growth) 
     553 
    553554 
    554555       !! 4.2 Output the respiration terms and the net primary 
     
    615616       !! Define the CO2 flux from the grid point to zero (no carbone cycle) 
    616617       co2_flux(:,:) = zero 
     618       fco2_lu(:) = zero 
     619       fco2_wh(:) = zero 
     620       fco2_ha(:) = zero 
    617621       co2_to_bm(:,:) = zero 
    618622    ENDIF 
  • branches/ORCHIDEE_2_2/ORCHIDEE/src_stomate/stomate.f90

    r6160 r6319  
    430430                                                                         !! dimension(#pixels,0:100) 
    431431!$OMP THREADPRIVATE(flux100) 
     432  REAL(r_std),ALLOCATABLE,SAVE,DIMENSION(:,:)    :: co2_flux             !! CO2 flux between atmosphere and biosphere 
     433                                                                         !! @tex $(gC m^{-2} one_day^{-1})$ @endtex 
     434!$OMP THREADPRIVATE(co2_flux) 
    432435  REAL(r_std),ALLOCATABLE,SAVE,DIMENSION(:)      :: fco2_lu              !! CO2 flux between atmosphere and biosphere from land-use  
    433436                                                                         !! (without forest management) 
    434437                                                                         !! @tex $(gC m^{-2} one_day^{-1})$ @endtex 
    435438!$OMP THREADPRIVATE(fco2_lu) 
     439  REAL(r_std),ALLOCATABLE,SAVE,DIMENSION(:)      :: fco2_wh              !! CO2 Flux to Atmosphere from Wood Harvesting (positive from atm to land) 
     440                                                                         !! @tex $(gC m^{-2} one_day^{-1})$ @endtex 
     441!$OMP THREADPRIVATE(fco2_wh) 
     442  REAL(r_std),ALLOCATABLE,SAVE,DIMENSION(:)      :: fco2_ha              !! CO2 Flux to Atmosphere from Crop Harvesting (positive from atm to land) 
     443                                                                         !! @tex $(gC m^{-2} one_day^{-1})$ @endtex 
     444!$OMP THREADPRIVATE(fco2_ha) 
     445 
    436446  REAL(r_std),ALLOCATABLE,SAVE,DIMENSION(:)      :: convflux             !! Release during first year following land cover change  
    437447                                                                         !! (paper, burned, etc...)  
     
    630640         contfrac,       totfrac_nobio,     clay,         temp_air,          & 
    631641         lai,            veget,             veget_max,                       & 
    632          co2_flux,       co2_to_bm_radia,   fco2_lu_out,  deadleaf_cover,  assim_param, temp_growth ) 
     642         co2_to_bm_radia,deadleaf_cover,    assim_param,  temp_growth ) 
     643 
    633644 
    634645    IMPLICIT NONE 
     
    656667 
    657668    !! 0.2 Output variables 
    658     REAL(r_std),DIMENSION(kjpindex,nvm),INTENT(out) :: co2_flux          !! CO2 flux between atmosphere and biosphere 
     669 
    659670    REAL(r_std),DIMENSION(kjpindex,nvm),INTENT(out) :: co2_to_bm_radia   !! virtual gpp flux between atmosphere and biosphere 
    660     REAL(r_std),DIMENSION(kjpindex),INTENT(out)     :: fco2_lu_out       !! CO2 flux between atmosphere and biosphere from land-use (without forest management)   
    661671    REAL(r_std),DIMENSION(kjpindex),INTENT(out)     :: deadleaf_cover    !! Fraction of soil covered by dead leaves (unitless) 
    662672    REAL(r_std),DIMENSION(kjpindex,nvm,npco2),INTENT(out) :: assim_param !! min+max+opt temperatures (K) & vmax for photosynthesis   
     
    764774     
    765775    !! 1.4.3.1 Read initial values for STOMATE's variables from the _restart_ file 
    766     co2_flux(:,:) = zero 
    767776 
    768777    ! Get values from _restart_ file. Note that only ::kjpindex, ::index, ::lalo  
     
    795804         litterpart, litter, dead_leaves, & 
    796805         carbon, lignin_struc,turnover_time,& 
    797          fco2_lu,& 
     806         co2_flux, fco2_lu, fco2_wh, fco2_ha, & 
    798807         prod10,prod100,flux10, flux100, & 
    799808         convflux, cflux_prod10, cflux_prod100, & 
     
    807816         MatrixV, VectorU, previous_stock, current_stock, assim_param) 
    808817     
    809     ! Copy module variable fco2_lu into local variable to allow it to be in the argument output list of the subroutine 
    810     fco2_lu_out(:)=fco2_lu(:) 
    811  
    812818    !! 1.4.5 Check time step 
    813819        
     
    11601166!! 
    11611167!! MAIN OUTPUT VARIABLE(S): deadleaf_cover, assim_param, lai, height, veget,  
    1162 !! veget_max, resp_maint,  
    1163 !! resp_hetero,resp_growth, co2_flux, fco2_lu_out. 
     1168!! veget_max, resp_maint, resp_hetero, resp_growth,  
     1169!! co2_flux_out, fco2_lu_out, fco2_wh_out, fco2_ha_out. 
    11641170!! 
    11651171!! REFERENCES   :  
     
    11831189       &  veget_max_new, woodharvest, totfrac_nobio_new, fraclut, & 
    11841190       &  rest_id_stom, hist_id_stom, hist_id_stom_IPCC, & 
    1185        &  co2_flux, fco2_lu_out, resp_maint,resp_hetero,resp_growth,co2_to_bm_radia,temp_growth) 
     1191       &  co2_flux_out, fco2_lu_out, fco2_wh_out, fco2_ha_out, & 
     1192       &  resp_maint, resp_hetero, resp_growth, co2_to_bm_radia, temp_growth) 
    11861193     
    11871194    IMPLICIT NONE 
     
    12361243    !! 0.2 Output variables 
    12371244 
    1238     REAL(r_std),DIMENSION(kjpindex,nvm),INTENT(out) :: co2_flux          !! CO2 flux between atmosphere and biosphere per  
     1245    REAL(r_std),DIMENSION(kjpindex,nvm),INTENT(out) :: co2_flux_out      !! CO2 flux between atmosphere and biosphere per  
    12391246                                                                         !! average ground area  
    12401247                                                                         !! @tex $(gC m^{-2} dt_sechiba^{-1})$ @endtex   
    12411248    REAL(r_std),DIMENSION(kjpindex),INTENT(out)     :: fco2_lu_out       !! CO2 flux between atmosphere and biosphere from  
    1242                                                                          !! land-use (without forest management)   
    1243                                                                          !! @tex $(gC m^{-2} dt_stomate^{-1})$ @endtex   
     1249                                                                         !! land-use (without forest management) (gC/m2/dt_stomate) 
     1250    REAL(r_std),DIMENSION(kjpindex),INTENT(out)     :: fco2_wh_out       !! CO2 Flux to Atmosphere from Wood Harvesting (gC/m2/dt_stomate) 
     1251    REAL(r_std),DIMENSION(kjpindex),INTENT(out)     :: fco2_ha_out       !! CO2 Flux to Atmosphere from Crop Harvesting (gC/m2/dt_stomate) 
    12441252    REAL(r_std),DIMENSION(kjpindex,nvm),INTENT(out) :: resp_maint        !! Maitenance component of autotrophic respiration in  
    12451253                                                                         !! @tex $(gC m^{-2} dt_stomate^{-1})$ @endtex  
     
    15991607            &             Tseason, Tmin_spring_time, begin_leaves, onset_date) 
    16001608        
     1609 
    16011610       !! 5.3.2 Calculate the total CO2 flux from land use change 
    1602        fco2_lu(:) = convflux(:) & 
    1603             &             + cflux_prod10(:)  & 
    1604             &             + cflux_prod100(:) & 
    1605             &             + harvest_above(:) & 
    1606             &             + convflux_harvest(:) & 
    1607             &             + cflux_prod10_harvest(:)  & 
    1608             &             + cflux_prod100_harvest(:) 
     1611 
     1612       ! CO2 from land-use change 
     1613       fco2_lu(:) = convflux(:) + cflux_prod10(:) + cflux_prod100(:)  
     1614 
     1615       ! CO2 from wood harvest 
     1616       fco2_wh(:) = convflux_harvest(:) + cflux_prod10_harvest(:) + cflux_prod100_harvest(:) 
    16091617        
     1618       ! CO2 from harvest 
     1619       fco2_ha(:) = harvest_above(:)  
     1620               
    16101621       !! 5.4 Calculate veget and veget_max 
    16111622       veget_max(:,:) = zero  
     
    17581769       CALL xios_orchidee_send_field("rhSoil",SUM(resp_hetero_soil*veget_cov_max,dim=2)/1e3) 
    17591770       CALL xios_orchidee_send_field("rhLitter",SUM(resp_hetero_litter*veget_cov_max,dim=2)/1e3) 
    1760         
    1761  
     1771 
     1772       ! Calculate co2_flux as (-1)*nep_daily*veget_cov_max.  
     1773       ! This variable will be used for the coupling to LMDZ for ESM configuration. 
     1774       co2_flux(:,:) = (resp_hetero_d(:,:) + resp_maint_d(:,:) + resp_growth_d(:,:) & 
     1775            + co2_fire(:,:) -  gpp_daily(:,:))*veget_cov_max 
     1776       
    17621777       IF ( hist_id_stom_IPCC > 0 ) THEN 
    17631778          vartmp(:) = SUM(nep_daily*veget_cov_max,dim=2)/1e3/one_day*contfrac 
     
    18461861  !! 6. Outputs from Stomate 
    18471862 
    1848     ! co2_flux receives a value from STOMATE only if STOMATE is activated. 
    1849     ! Otherwise, the calling hydrological module must do this itself. 
    1850  
    18511863    !! 6.1 Respiration and fluxes 
    18521864    resp_maint(:,:) = resp_maint_radia(:,:)*veget_cov_max(:,:) 
     
    18561868    resp_hetero(:,:) = resp_hetero_radia(:,:)*veget_cov_max(:,:) 
    18571869     
    1858     !! 6.2 Derived CO2 fluxes 
    1859     ! CO2 flux in gC m^{-2} s^{-1} (positive towards the atmosphere) is sum of: 
    1860     ! (1) heterotrophic respiration from ground + (2) maintenance respiration  
    1861     ! from the plants + (3) growth respiration from the plants + (4) co2  
    1862     ! emissions from fire - (5) co2 taken up in the DGVM to establish  
    1863     ! saplings - (6) co2 taken up by photosyntyhesis 
    1864     ! co2_to_bm is not included here as it is already encounted in the gpp 
    1865     co2_flux(:,:) = resp_hetero(:,:) + resp_maint(:,:) + resp_growth(:,:) & 
    1866          & + co2_fire(:,:)*veget_cov_max(:,:)*dt_sechiba/one_day & 
    1867          & - gpp(:,:) 
    1868      
    18691870    temp_growth(:)=t2m_month(:)-tp_00  
    18701871 
    1871     ! Copy module variable fco2_lu into local variable to allow it to be in the argument output list of the subroutine 
     1872 
     1873    ! Copy module variables into local variables to allow them to be in the argument output list of the subroutine 
     1874    co2_flux_out(:,:)=co2_flux(:,:) 
    18721875    fco2_lu_out(:)=fco2_lu(:) 
     1876    fco2_wh_out(:)=fco2_wh(:) 
     1877    fco2_ha_out(:)=fco2_ha(:) 
    18731878 
    18741879 
     
    21232128         litterpart, litter, dead_leaves, & 
    21242129         carbon, lignin_struc,turnover_time,& 
    2125          fco2_lu,& 
     2130         co2_flux, fco2_lu, fco2_wh, fco2_ha, & 
    21262131         prod10,prod100,flux10, flux100, & 
    21272132         convflux, cflux_prod10, cflux_prod100, & 
     
    30803085    ENDIF 
    30813086 
     3087    ALLOCATE (co2_flux(kjpindex,nvm), stat=ier) 
     3088    l_error = l_error .OR. (ier /= 0) 
     3089    IF (l_error) THEN 
     3090       WRITE(numout,*) 'Memory allocation error for co2_flux. We stop. We need kjpindex words',kjpindex,nvm 
     3091       STOP 'stomate_init' 
     3092    ENDIF 
     3093 
    30823094    ALLOCATE (fco2_lu(kjpindex), stat=ier) 
    30833095    l_error = l_error .OR. (ier /= 0) 
    30843096    IF (l_error) THEN 
    30853097       WRITE(numout,*) 'Memory allocation error for fco2_lu. We stop. We need kjpindex words',kjpindex 
     3098       STOP 'stomate_init' 
     3099    ENDIF 
     3100 
     3101    ALLOCATE (fco2_wh(kjpindex), stat=ier) 
     3102    l_error = l_error .OR. (ier /= 0) 
     3103    IF (l_error) THEN 
     3104       WRITE(numout,*) 'Memory allocation error for fco2_wh. We stop. We need kjpindex words',kjpindex 
     3105       STOP 'stomate_init' 
     3106    ENDIF 
     3107 
     3108    ALLOCATE (fco2_ha(kjpindex), stat=ier) 
     3109    l_error = l_error .OR. (ier /= 0) 
     3110    IF (l_error) THEN 
     3111       WRITE(numout,*) 'Memory allocation error for fco2_ha. We stop. We need kjpindex words',kjpindex 
    30863112       STOP 'stomate_init' 
    30873113    ENDIF 
     
    35943620    IF ( ALLOCATED (horip11_index)) DEALLOCATE (horip11_index) 
    35953621    IF ( ALLOCATED (horip101_index)) DEALLOCATE (horip101_index) 
     3622    IF ( ALLOCATED (co2_flux)) DEALLOCATE (co2_flux) 
    35963623    IF ( ALLOCATED (fco2_lu)) DEALLOCATE (fco2_lu) 
     3624    IF ( ALLOCATED (fco2_wh)) DEALLOCATE (fco2_wh) 
     3625    IF ( ALLOCATED (fco2_ha)) DEALLOCATE (fco2_ha) 
    35973626    IF ( ALLOCATED (prod10)) DEALLOCATE (prod10) 
    35983627    IF ( ALLOCATED (prod100)) DEALLOCATE (prod100) 
  • branches/ORCHIDEE_2_2/ORCHIDEE/src_stomate/stomate_io.f90

    r6160 r6319  
    8080       &  litterpart, litter, dead_leaves, & 
    8181       &  carbon, lignin_struc,turnover_time, & 
    82        &  fco2_lu, & 
     82       &  co2_flux, fco2_lu, fco2_wh, fco2_ha, & 
    8383       &  prod10,prod100,flux10, flux100, & 
    8484       &  convflux, cflux_prod10, cflux_prod100, & 
     
    327327    ! products remaining in the 10/100 year-turnover pool after the annual release for each compartment 
    328328    ! (10 or 100 + 1 : input from year of land cover change) 
     329    REAL(r_std),DIMENSION(npts, nvm),INTENT(out)                           :: co2_flux 
    329330    REAL(r_std),DIMENSION(npts),INTENT(out)                                :: fco2_lu 
     331    REAL(r_std),DIMENSION(npts),INTENT(out)                                :: fco2_wh 
     332    REAL(r_std),DIMENSION(npts),INTENT(out)                                :: fco2_ha 
    330333    REAL(r_std),DIMENSION(npts,0:10),INTENT(out)                           :: prod10 
    331334    REAL(r_std),DIMENSION(npts,0:100),INTENT(out)                          :: prod100 
     
    10341037    !- 
    10351038    ! Read from restart file or set to zero if the variables or restart file were not found 
     1039 
     1040    var_name = 'co2_flux' 
     1041    CALL restget_p (rest_id_stomate, var_name, nbp_glo, nvm, 1, itime, & 
     1042         .TRUE., co2_flux, 'gather', nbp_glo, index_g) 
     1043    IF (ALL(co2_flux(:,:) == val_exp)) co2_flux(:,:) = zero 
     1044 
    10361045    var_name = 'fco2_lu' 
    10371046    CALL restget_p (rest_id_stomate, var_name, nbp_glo, 1, 1, itime, & 
    10381047         .TRUE., fco2_lu, 'gather', nbp_glo, index_g) 
    10391048    IF (ALL(fco2_lu(:) == val_exp)) fco2_lu(:) = zero 
     1049 
     1050    var_name = 'fco2_wh' 
     1051    CALL restget_p (rest_id_stomate, var_name, nbp_glo, 1, 1, itime, & 
     1052         .TRUE., fco2_wh, 'gather', nbp_glo, index_g) 
     1053    IF (ALL(fco2_wh(:) == val_exp)) fco2_wh(:) = zero 
     1054 
     1055    var_name = 'fco2_ha' 
     1056    CALL restget_p (rest_id_stomate, var_name, nbp_glo, 1, 1, itime, & 
     1057         .TRUE., fco2_ha, 'gather', nbp_glo, index_g) 
     1058    IF (ALL(fco2_ha(:) == val_exp)) fco2_ha(:) = zero 
     1059 
    10401060        
    10411061    IF (vegetmap_reset) THEN 
     
    13321352       &  litterpart, litter, dead_leaves, & 
    13331353       &  carbon, lignin_struc, turnover_time, & 
    1334        &  fco2_lu, & 
     1354       &  co2_flux, fco2_lu, fco2_wh, fco2_ha, & 
    13351355       &  prod10,prod100 ,flux10, flux100, & 
    13361356       &  convflux, cflux_prod10, cflux_prod100, &  
     
    15701590    ! products remaining in the 10/100 year-turnover pool after the annual release for each compartment 
    15711591    ! (10 or 100 + 1 : input from year of land cover change) 
     1592    REAL(r_std),DIMENSION(npts,nvm),INTENT(in)                            :: co2_flux 
    15721593    REAL(r_std),DIMENSION(npts),INTENT(in)                                :: fco2_lu 
     1594    REAL(r_std),DIMENSION(npts),INTENT(in)                                :: fco2_wh 
     1595    REAL(r_std),DIMENSION(npts),INTENT(in)                                :: fco2_ha 
    15731596    REAL(r_std),DIMENSION(npts,0:10),INTENT(in)                           :: prod10 
    15741597    REAL(r_std),DIMENSION(npts,0:100),INTENT(in)                          :: prod100 
     
    20742097    ! 18 land cover change 
    20752098    !- 
     2099    var_name = 'co2_flux' 
     2100    CALL restput_p (rest_id_stomate, var_name, nbp_glo, nvm, 1, itime, & 
     2101         &                co2_flux, 'scatter', nbp_glo, index_g) 
    20762102    var_name = 'fco2_lu' 
    20772103    CALL restput_p (rest_id_stomate, var_name, nbp_glo, 1, 1, itime, & 
    20782104         &                fco2_lu, 'scatter', nbp_glo, index_g) 
     2105    var_name = 'fco2_wh' 
     2106    CALL restput_p (rest_id_stomate, var_name, nbp_glo, 1, 1, itime, & 
     2107         &                fco2_wh, 'scatter', nbp_glo, index_g) 
     2108    var_name = 'fco2_ha' 
     2109    CALL restput_p (rest_id_stomate, var_name, nbp_glo, 1, 1, itime, & 
     2110         &                fco2_ha, 'scatter', nbp_glo, index_g) 
     2111 
    20792112    var_name = 'prod10' 
    20802113    CALL restput_p (rest_id_stomate, var_name, nbp_glo, 11, 1, itime, & 
  • branches/ORCHIDEE_2_2/ORCHIDEE/src_xml/field_def_orchidee.xml

    r6160 r6319  
    128128    <field id="gppcrop" name="gppCrop" long_name="Gross Primary Production on crop tiles" unit="kgC/m^2/s" > this/1000 </field> 
    129129    <field id="gpptree" name="gppTree" long_name="Gross Primary Production on tree tiles" unit="kgC/m^2/s" > this/1000 </field> 
    130     <field id="nee" name="nee" long_name="Net Ecosystem Exchange" unit="gC/m^2/s" grid_ref="grid_nvm"/> 
     130    <field id="nee" name="nee" long_name="Net Ecosystem Exchange" unit="kgC/m^2/s" grid_ref="grid_nvm"/> 
    131131    <field id="maint_resp" name="maint_resp" long_name="Maintenance respiration per PFT" unit="gC/m^2/s" grid_ref="grid_nvm"/> 
    132132    <field id="hetero_resp" name="hetero_resp" long_name="Heterotrophic respiration per PFT" unit="gC/m^2/s" grid_ref="grid_nvm"/> 
     
    360360    <field id="mrro_lut" name="mrroLut" long_name="Total runoff from land use tile" unit="kg m-2 s-1" grid_ref="grid_nlut"/> 
    361361    <field id="gpplut" name="gppLut" long_name="Gross primary productivity on Landuse tiles" unit="kgC m-2 s-1" grid_ref="grid_nlut" /> 
     362    <field id="znetco2" name="znetco2" long_name="Sum CO2 flux over PFTs (variable in interface to LMDZ)" unit="kgC m-2 s-1" /> 
    362363    <field id="zcarblu" name="zcarblu" long_name="Land Cover Change CO2 flux (variable in interface to LMDZ)" unit="kgC m-2 s-1" /> 
    363     <field id="znetco2" name="znetco2" long_name="Sum CO2 flux over PFTs (variable in interface to LMDZ)" unit="kgC m-2 s-1" /> 
     364    <field id="zcarbwh" name="zcarbwh" long_name="Wood harvest CO2 flux (variable in interface to LMDZ)" unit="kgC m-2 s-1" /> 
     365    <field id="zcarbha" name="zcarbha" long_name="Crop harvesting CO2 flux (variable in interface to LMDZ)" unit="kgC m-2 s-1" /> 
    364366  </field_group> 
    365367 
  • branches/ORCHIDEE_2_2/ORCHIDEE/src_xml/file_def_orchidee.xml

    r6160 r6319  
    342342    <field field_ref="wilt" grid_ref="grid_nslm_out" level="11"/> 
    343343    <field field_ref="fldcapacity" grid_ref="grid_nslm_out" level="11"/> 
     344    <field field_ref="znetco2" level="11" /> 
     345    <field field_ref="zcarblu" level="11" /> 
     346    <field field_ref="zcarbwh" level="11" /> 
     347    <field field_ref="zcarbha" level="11" /> 
    344348    <field field_ref="frac_snow_veg"  level="12"/> 
    345349    <field field_ref="frac_snow_nobio" grid_ref="grid_nnobio_out"  level="12"/> 
     
    348352    <field field_ref="snowtemp_read_current" grid_ref="grid_nsnow_out"  level="12"/> 
    349353    <field field_ref="mask_snow_interp_out" grid_ref="grid_nsnow_out"  level="12"/> 
    350     <field field_ref="zcarblu" level="12" /> 
    351     <field field_ref="znetco2" level="12" /> 
    352354   </field_group> 
    353355  </file> 
     
    562564    <field field_ref="snowdepth"  level="11"/> 
    563565    <field field_ref="mc" grid_ref="grid_nslm_nstm_out" level="0"/>   <!-- mc is a 4 dimensional variable --> 
    564    </field_group> 
     566    <field field_ref="znetco2" level="11" /> 
     567    <field field_ref="zcarblu" level="11" /> 
     568    <field field_ref="zcarbwh" level="11" /> 
     569    <field field_ref="zcarbha" level="11" /> 
     570    </field_group> 
    565571  </file> 
    566572 
Note: See TracChangeset for help on using the changeset viewer.