/////////////////////////////////////////////////////////////////////////////////////// /// \file cropoutput.h /// \brief Output module for the land use and management information /// /// \author Joe Siltberg /// $Date: 2020-06-12 17:25:52 +0200 (ven, 12 jun 2020) $ /// /////////////////////////////////////////////////////////////////////////////////////// #ifndef LPJ_GUESS_MISC_OUTPUT_H #define LPJ_GUESS_MISC_OUTPUT_H #include "guess.h" #include "outputmodule.h" #include "outputchannel.h" #include "gutil.h" namespace GuessOutput { // Definitions for separate output files per NATURAL and FOREST stand (when // instruction file parameter printseparatestands == true, printseparatestands // is set to false in LandcoverInput::init() when input land cover // fraction data file has data for > 50 gridcells) /// Output module for the most commonly needed output files class MiscOutput : public OutputModule { public: MiscOutput(); ~MiscOutput(); // implemented functions inherited from OutputModule // (see documentation in OutputModule) void init(); void outannual(Gridcell& gridcell); void outdaily(Gridcell& gridcell); private: /// Upper limit for files in multiple stand printout static const int MAXNUMBER_STANDS = 1000; /// Upper limit for files in multiple pft printout static const int MAXNUMBER_PFTS = 100; /// Upper limit for files in multiple soil layer printout static const int MAXNUMBER_LYRS = 20; /// Printout of first stand from first historic year static const bool PRINTFIRSTSTANDFROM1901 = true; /// Defines all output tables void openlocalfiles(Gridcell& gridcell); void define_output_tables(); void define_cmip6_and_crescendo_output_tables(); void closelocalfiles(Gridcell& gridcell); // Output file names ... xtring file_yield, file_yield1, file_yield2, file_sdate1, file_sdate2, file_hdate1, file_hdate2, file_lgp, file_phu, file_fphu, file_fhi, file_irrigation, file_seasonality, file_mco2, file_cflux_cropland, file_cflux_pasture, file_cflux_natural, file_cflux_forest, file_cpool_cropland, file_cpool_pasture, file_cpool_natural, file_cpool_forest, file_nflux_cropland, file_nflux_pasture, file_nflux_natural, file_nflux_forest, file_npool_cropland, file_npool_pasture, file_npool_natural, file_npool_forest, file_anpp_cropland, file_anpp_pasture, file_anpp_natural, file_anpp_forest, file_cmass_cropland, file_cmass_pasture, file_cmass_natural, file_cmass_forest, file_dens_natural, file_dens_forest; // daily xtring file_daily_lai, file_daily_npp, file_daily_nmass, file_daily_cmass, file_daily_cton, file_daily_ndemand, file_daily_cmass_leaf, file_daily_nmass_leaf, file_daily_cmass_root, file_daily_nmass_root, file_daily_cmass_stem, file_daily_nmass_stem, file_daily_cmass_storage, file_daily_nmass_storage, file_daily_n_input_soil, file_daily_avail_nmass_soil, file_daily_upper_wcont, file_daily_lower_wcont, file_daily_irrigation, file_daily_temp, file_daily_prec, file_daily_rad, file_daily_cmass_dead_leaf, file_daily_nmass_dead_leaf, file_daily_fphu, file_daily_nminleach, file_daily_norgleach, file_daily_nuptake, file_daily_ds, file_daily_stem, file_daily_leaf, file_daily_root, file_daily_storage; // CMIP6 xtring file_baresoilFrac_yearly, file_residualFrac_yearly, file_cLitter_yearly, file_cLitterLut_yearly, file_cProduct_yearly, file_cProductLut_yearly, file_cropFrac_yearly, file_cSoil_yearly, file_cSoilLut_yearly, file_cVeg_yearly, file_cVegLut_yearly, file_fracInLut_yearly, file_fracLut_yearly, file_fracOutLut_yearly, file_grassFrac_yearly, file_pastureFrac_yearly, file_shrubFrac_yearly, file_treeFrac_yearly, file_vegFrac_yearly, file_burntFractionAll_yearly, file_burntFractionAll_monthly, file_cLand_monthly, file_cLand1_monthly, file_cLand_yearly, file_cFlux_yearly, file_cLitterCwd_monthly, file_cLitterSubSurf_monthly, file_cLitterSurf_monthly, file_cOther_monthly, file_cropFracC3_monthly, file_cropFracC4_monthly, file_cSoil_monthly, file_cStem_monthly, file_cTotFireLut_monthly, file_cWood_monthly, file_evspsblpot_monthly, file_fAnthDisturb_monthly, file_fBNF_monthly, file_fCLandToOcean_monthly, file_fDeforestToAtmos_monthly, file_fDeforestToProduct_monthly, file_fFireAll_monthly, file_fFireNat_monthly, file_fHarvestToAtmos_monthly, file_fLitterFire_monthly, file_fLuc_monthly, file_fLulccAtmLut_monthly, file_fLulccProductLut_monthly, file_fLulccResidueLut_monthly, file_fNAnthDisturb_monthly, file_fNdep_monthly, file_fNfert_monthly, file_fNgas_monthly, file_fNgasFire_monthly, file_fNgasNonFire_monthly, file_fNLandToOcean_monthly, file_fNleach_monthly, file_fNLitterSoil_monthly, file_fNloss_monthly, file_fNnetmin_monthly, file_fNProduct_monthly, file_fNup_monthly, file_fNVegLitter_monthly, file_fProductDecomp_monthly, file_fProductDecompLut_monthly, file_fracLut_monthly, file_fVegFire_monthly, file_gppGrass_monthly, file_gppLut_monthly, file_gppTree_monthly, file_grassFracC3_monthly, file_grassFracC4_monthly, file_irrLut_monthly, file_laiLut_monthly, file_mrroLut_monthly, file_mrsll_monthly, file_mrsol_monthly, file_mrsoLut_monthly, file_mrsosLut_monthly, file_necbLut_monthly, file_nep_monthly, file_netAtmosLandCO2Flux_monthly, file_nLand_monthly, file_nLeaf_monthly, file_nLitter_monthly, file_nLitterCwd_monthly, file_nLitterSubSurf_monthly, file_nLitterSurf_monthly, file_nMineral_monthly, file_nMineralNH4_monthly, file_nMineralNO3_monthly, file_fN2O_monthly, file_fNOx_monthly, file_nOther_monthly, file_nppGrass_monthly, file_nppLut_monthly, file_nppTree_monthly, file_nProduct_monthly, file_nRoot_monthly, file_nSoil_monthly, file_nStem_monthly, file_nwdFracLut_monthly, file_nVeg_monthly, file_pastureFracC3_monthly, file_pastureFracC4_monthly, file_prCrop_monthly, file_raGrass_monthly, file_raLeaf_monthly, file_raLut_monthly, file_raOther_monthly, file_raRoot_monthly, file_raStem_monthly, file_raTree_monthly, file_rhLitter_monthly, file_rhLut_monthly, file_rhSoil_monthly, file_treeFracBdlDcd_monthly, file_treeFracBdlEvg_monthly, file_treeFracNdlDcd_monthly, file_treeFracNdlEvg_monthly, file_vegFrac_monthly, file_vegHeightTree_monthly, file_baresoilFrac_monthly, file_cCwd_monthly, file_cLeaf_monthly, file_cLitter_monthly, file_cLitterAbove_monthly, file_cLitterBelow_monthly, file_cProduct_monthly, file_cRoot_monthly, file_cropFrac_monthly, file_cSoilFast_monthly, file_cSoilMedium_monthly, file_cSoilSlow_monthly, file_cVeg_monthly, file_fCO2antt_monthly, file_evspsblsoi_monthly, file_fCO2nat_monthly, file_evspsblveg_monthly, file_evspsbl_monthly, file_fFire_monthly, file_fGrazing_monthly, file_fHarvest_monthly, file_fLitterSoil_monthly, file_fVegLitter_monthly, file_fVegOther_monthly, file_gpp_monthly, file_grassFrac_monthly, file_lai_monthly, file_landCoverFrac_monthly, file_mrro_monthly, file_mrros_monthly, file_mrso_monthly, file_mrsos_monthly, file_nbp_monthly, file_npp_monthly, file_pastureFrac_monthly, file_prveg_monthly, file_ra_monthly, file_residualFrac_monthly, file_rGrowth_monthly, file_rh_monthly, file_rMaint_monthly, file_shrubFrac_monthly, file_tran_monthly, file_treeFrac_monthly, file_tsl_monthly, file_ec_daily, file_et_daily, file_evspsblpot_daily, file_lai_daily, file_mrsll_daily, file_mrso_daily, file_mrsol_daily, file_mrsos_daily, file_mrro_daily, file_prCrop_daily, file_tran_daily, file_tsl_daily, file_prveg_daily; // Output tables Table out_yield, out_yield1, out_yield2, out_sdate1, out_sdate2, out_hdate1, out_hdate2, out_lgp, out_phu, out_fhi, out_fphu, out_irrigation, out_seasonality, out_mco2, out_cflux_cropland, out_cflux_pasture, out_cflux_natural, out_cflux_forest, out_cpool_cropland, out_cpool_pasture, out_cpool_natural, out_cpool_forest, out_nflux_cropland, out_nflux_pasture, out_nflux_natural, out_nflux_forest, out_npool_cropland, out_npool_pasture, out_npool_natural, out_npool_forest, out_anpp_cropland, out_anpp_pasture, out_anpp_natural, out_anpp_forest, out_cmass_cropland, out_cmass_pasture, out_cmass_natural, out_cmass_forest, out_dens_natural, out_dens_forest; Table out_anpp_stand_natural[MAXNUMBER_STANDS]; Table out_cmass_stand_natural[MAXNUMBER_STANDS]; Table out_anpp_stand_forest[MAXNUMBER_STANDS]; Table out_cmass_stand_forest[MAXNUMBER_STANDS]; // IFS input Table ifs_input; // CRESCENDO tables Table cresc_tas, cresc_pr, cresc_irri, cresc_rsds, cresc_mrso, cresc_mrro, cresc_evapotrans, cresc_evspsblveg, cresc_evspsblsoi, cresc_tran, cresc_snd, cresc_cVeg, cresc_nVeg, cresc_cLitter, cresc_nLitter, cresc_cSoil, cresc_nSoil, cresc_cProduct, cresc_nProduct, cresc_gpp, cresc_npp, cresc_rh, cresc_ra, cresc_fFire, cresc_fLuc, cresc_nbp, cresc_fReprEst, cresc_fSeed, cresc_fHarv, cresc_harvcrop, cresc_harvgraz, cresc_prod, cresc_fNdep, cresc_fBNF, cresc_fNup, cresc_fNnetmin, cresc_fNleach, cresc_fCleach, cresc_fNgas, cresc_fNgasFire, cresc_fN2O, cresc_fNOx, cresc_fNloss, cresc_fVegLitter, cresc_fNVegLitter, cresc_fLitterSoil, cresc_fNLitterSoil, cresc_cLeaf, cresc_cRoot, cresc_cWood, cresc_cCwd, cresc_nLeaf, cresc_nRoot, cresc_nWood, cresc_nCwd, cresc_burntArea, cresc_dlai, cresc_tsl, cresc_msl, cresc_lai, cresc_lcf, cresc_fapar, cresc_vH, cresc_tD, cresc_cton_veg; #ifdef CRESCENDO_FACE // CRESCENDO FACE daily tables Table face_co2, face_ppt, face_ndep, face_par, face_at, face_st, face_sw, face_et, face_t, face_es, face_ec, face_ro, face_drain, face_nep, face_gpp, face_npp, face_reco, face_rauto, face_rleaf, face_rwood, face_rroot, face_rgrow, face_rhet, face_rsoil, face_rother, face_cl, face_cw, face_cfr, face_tnc, face_cflit, face_cflita, face_cflitb, face_cclitb, face_csoil, face_gl, face_gw, face_gr, face_cllfall, face_crlin, face_cwin, face_lai, face_lma, face_ncon, face_ncan, face_nwood, face_nfr, face_nstor, face_nlit, face_nrlit, face_ndw, face_nsoil, face_npoolm, face_npoolo, face_nfix, face_nlitin, face_nwlin, face_nrlin, face_nup, face_ngmin, face_nmin, face_nvol, face_nleach, face_ngl, face_ngw, face_ngr; #endif // CMIP6 tables Table cmip6_acLitter, cmip6_acProduct, cmip6_acSoil, cmip6_acVeg, cmip6_acropFrac, cmip6_apastureFrac, cmip6_agrassFrac, cmip6_ashrubFrac, cmip6_atreeFrac, cmip6_avegFrac, cmip6_abaresoilFrac, cmip6_aresidualFrac, cmip6_aburntFractionAll_yearly, cmip6_aburntFractionAll_monthly, cmip6_treeFrac, cmip6_grassFrac, cmip6_shrubFrac, cmip6_cropFrac, cmip6_pastureFrac, cmip6_vegFrac, cmip6_baresoilFrac, cmip6_residualFrac, cmip6_landCoverFrac, cmip6_cropFracC3, cmip6_cropFracC4, cmip6_grassFracC3, cmip6_grassFracC4, cmip6_pastureFracC3, cmip6_pastureFracC4, cmip6_cVeg, cmip6_cLeaf, cmip6_cRoot, cmip6_cStem, cmip6_cOther, cmip6_nVeg, cmip6_nLeaf, cmip6_nRoot, cmip6_nStem, cmip6_nOther, cmip6_cLitter, cmip6_cLitterCwd, cmip6_cLitterSurf, cmip6_cLitterSubSurf, cmip6_nLitter, cmip6_nLitterCwd, cmip6_nLitterSurf, cmip6_nLitterSubSurf, cmip6_cSoil, cmip6_nSoil, cmip6_cSoilFast, cmip6_cSoilMedium, cmip6_cSoilSlow, cmip6_cWood, cmip6_cCwd, cmip6_cLitterAbove, cmip6_cLitterBelow, cmip6_cProduct, cmip6_cLand, cmip6_cLand1, cmip6_cyLand, cmip6_cyFlux, cmip6_nProduct, cmip6_nLand, cmip6_nMinNH4, cmip6_nMinNO3, cmip6_nMineral, cmip6_fN2O, cmip6_fNOx, cmip6_nbp, cmip6_netAtmosLandCO2Flux, cmip6_nep, cmip6_gpp, cmip6_gppGrass, cmip6_gppTree, cmip6_npp, cmip6_nppGrass, cmip6_nppTree, cmip6_ra, cmip6_raLeaf, cmip6_raRoot, cmip6_raStem, cmip6_raOther, cmip6_rGrowth, cmip6_rMaint, cmip6_raGrass, cmip6_raTree, cmip6_rh, cmip6_rhSoil, cmip6_rhLitter, cmip6_fVegLitter, cmip6_fVegOther, cmip6_fNVegLitter, cmip6_fLitterSoil, cmip6_fNLitterSoil, cmip6_fFireNat, cmip6_fFire, cmip6_fVegFire, cmip6_fLitterFire, cmip6_fFireAll, cmip6_fCLandToOcean, cmip6_fNLandToOcean, cmip6_fAnthDisturb, cmip6_fNAnthDisturb, cmip6_fHarvest, cmip6_fHarvestToAtmos, cmip6_fDeforestToAtmos, cmip6_fDeforestToProduct, cmip6_fProductDecomp, cmip6_fNProduct, cmip6_fGrazing, cmip6_fco2antt, cmip6_fco2nat, cmip6_fNloss, cmip6_fBNF, cmip6_fNfert, cmip6_fNup, cmip6_fNnetmin, cmip6_fNleach, cmip6_fNgas, cmip6_fNdep, cmip6_fNgasFire, cmip6_fNgasNonFire, cmip6_dlai, cmip6_lai, cmip6_mrso, cmip6_vegHeightTree, cmip6_tsl, cmip6_dtsl, cmip6_mrsll, cmip6_dmrsll, cmip6_mrsos, cmip6_mrsol, cmip6_dmrso, cmip6_dmrsol, cmip6_dmrsos, cmip6_dmrro, cmip6_evspsblveg, cmip6_evspsbl, cmip6_prveg, cmip6_dprveg, cmip6_dec, cmip6_evspsblsoi, cmip6_evspsblpot, cmip6_devspsblpot, cmip6_tran, cmip6_dtran, cmip6_det, cmip6_mrro, cmip6_mrros, cmip6_dprCrop, cmip6_prCrop, cmip6_treeFracBdlDcd, cmip6_treeFracBdlEvg, cmip6_treeFracNdlDcd, cmip6_treeFracNdlEvg, cmip6_fluc, cmip6_cTotFireLut, cmip6_fLulccAtmLut, cmip6_fLulccProductLut, cmip6_fLulccResidueLut, cmip6_fProductDecompLut, cmip6_mfracLut, cmip6_fracLut, cmip6_fracOutLut, cmip6_fracInLut, cmip6_gppLut, cmip6_irrLut, cmip6_laiLut, cmip6_mrroLut, cmip6_mrsoLut, cmip6_mrsosLut, cmip6_necbLut, cmip6_nppLut, cmip6_nwdFracLut, cmip6_raLut, cmip6_rhLut, cmip6_cSoilLut, cmip6_cVegLut, cmip6_cLitterLut, cmip6_cProductLut; //daily Table out_daily_lai, out_daily_npp, out_daily_cton, out_daily_nmass, out_daily_cmass, out_daily_ndemand, out_daily_cmass_leaf, out_daily_nmass_leaf, out_daily_cmass_root, out_daily_nmass_root, out_daily_cmass_stem, out_daily_nmass_stem, out_daily_cmass_storage, out_daily_nmass_storage, out_daily_n_input_soil, out_daily_cmass_dead_leaf, out_daily_nmass_dead_leaf, out_daily_fphu, out_daily_avail_nmass_soil, out_daily_upper_wcont, out_daily_lower_wcont, out_daily_irrigation, out_daily_temp, out_daily_prec, out_daily_rad, out_daily_nminleach, out_daily_norgleach, out_daily_nuptake, out_daily_ds, out_daily_stem, out_daily_leaf, out_daily_root, out_daily_storage; Table out_mlambda; }; } #endif // LPJ_GUESS_MISC_OUTPUT_H