#ifndef GLM_CONFIG_H_ #define GLM_CONFIG_H_ #include #include "dictionary.h" #define NCCODE 199 /* number of countries 192 */ #define N_PROB 50 // filelength of probability of harvest given biomass #define NREG 33 //33 for GCAM & MAGPIE, 31 for MESSAGE, 27 for IMAGE, 18 for AIM #define NAEZ 18 #define RES 0.25 #define AGG_RES 2.0 #define NSTEP 1 // Number of years between IAM timesteps for harmonization #define NT 1 // Number of years of input/output to buffer (not really used) #define NY (size_t)(180/RES) #define NX (size_t)(360/RES) #define BOUND 2 #define AGG_NY (size_t)(180/AGG_RES) #define AGG_NX (size_t)(360/AGG_RES) #define NZ 61 //31 /* Number of z dims tracked (z is distance from managed cells) */ #define NL 61 //31 #define ZEROVALUE_CHECK 0.000000001 namespace glm { class Config { public: void load (char* caseName=NULL, const char* iniFile=NULL); int getInt (const char* name, int defaultValue=-999); char* getString (const char* name, char* defaultValue=NULL); void updateOutstat (int year); char outputDir_[256]; char outstat[2]; char* caseName_; int logging_option; int start_year; int stop_year; int run_management; int smart_flow_option; int zdis_option; int cft_option; int crop_rotations; int adjust_smart_flow_option; int MAXZ; int MAXL; int BEST_CASE; int BEST_CASE_MIN_FLOWS_T5; int TOTAL_HARVEST_SWITCH; int SECONDARY_HARVEST_SWITCH; int VIRGIN_HARVEST_SWITCH; int FORCE_HARVEST_SWITCH; double TB2BB; // total biomass to bole biomass ratio, value of 2.0 // assumes the WH numbers are bole biomass only // and we need to cut twice as much biomass char* PROB_FNAME; char* runtype; int shft_cult; bool futureRun; bool extensionRun; char* restartDataSet; char* restartManagement; char* restartTransitions; char* restartDiagnostics; bool isInitialRun; int SMART_FLOW_BUG_PRINT; int STATE_BUG_PRINT; int STATE_PRINT; int FLOW_BUG_PRINT; char* icew_input_path; char* watr_input_path; char* hyde_crop_path; char* hyde_past_path; char* hyde_othr_path; char* hyde_urbn_path; char* hyde_managed_past_path; char* hyde_rangeland_path; char* hyde_rice_path; char* future_crop_path; char* future_past_path; char* future_othr_path; char* future_urbn_path; char* extension_crop_path; char* extension_past_path; char* extension_othr_path; char* extension_urbn_path; char* updated_initial_state; char* woodharvest_file; char* fuelwood_file; char* woodharvest_nodata_file; char* future_woodharvest_file; char* future_fuelwood_file; char* cellinfo_file; char* ccodes_file; char* ccodes_map; char* cnames_file; char* contcodes_file; char* regcodes_file; char* shiftcult_map; char* shiftcult_nc; char* miami_biomass_file_vba; char* miami_biomass_file_vnppa; char* rs_forest_loss_file; char* future_pasture_fracs_file; char* protected_area_file; char* iam_flooded_file; char* iam_croptypes_file; char* iam_crpbf_file; char* iam_c3pbf_file; char* iam_c4pbf_file; char* national_flooded_file; char* iam_fert_vals_file; char* iam_irrig_vals_file; int c4a_flag; int c4p_flag; int c3p_flag; int c3n_flag; int irrig_flag; int fert_flag; char* c3_annual_file; char* c4_annual_file; char* c3_perennial_file; char* c4_perennial_file; char* n_fixing_file; char* cft_frac_file; char* irrigation_file; char* fertilizer_country_file; char* fertilizer_global_file; char* fertilizer_national_file; char* fertilizer_national_file_future; char* irrigation_national_file_future; char* tillage_national_file; char* croprotations_national_file; char* cropbiofuels_national_file; char* flooded_file; char* restart_filename; private: dictionary* ini; }; } // end glm namespace #endif // GLM_CONFIG_H_