TNC-NMFO / NWLAND

carbon accounting model
0 stars 0 forks source link

write_caland_inputs() reg_names hardcoded #78

Open sbassett opened 2 years ago

sbassett commented 2 years ago

Currently the reg_names are hardcoded in write_caland_inputs(). The code should produce a vector of regions dynamically from the raw_data files.

The current workaround is to define the hardcoded variables in the script used to call the full run:

# regions are hardcoded in write_caland_inputs() this overrides those hardcoded values
reg_names = c("C08001", "C08003", "C08005", "C08007", "C08009", "C08011", "C08013", "C08014", "C08015", "C08017", "C08019", "C08021", "C08023", "C08025", "C08027", "C08029", "C08031", "C08033", "C08035", "C08037", "C08039", "C08041", "C08043", "C08045", "C08047", "C08049", "C08051", "C08053", "C08055", "C08057", "C08059", "C08061", "C08063", "C08065", "C08067", "C08069", "C08071", "C08073", "C08075", "C08077", "C08079", "C08081", "C08083", "C08085", "C08087", "C08089", "C08091", "C08093", "C08095", "C08097", "C08099", "C08101", "C08103", "C08105", "C08107", "C08109", "C08111", "C08113", "C08115", "C08117", "C08119", "C08121", "C08123", "C08125", "C35001", "C35003", "C35005", "C35006", "C35007", "C35009", "C35011", "C35013", "C35015", "C35017", "C35019", "C35021", "C35023", "C35025", "C35027", "C35028", "C35029", "C35031", "C35033", "C35035", "C35037", "C35039", "C35041", "C35043", "C35045", "C35047", "C35049", "C35051", "C35053", "C35055", "C35057", "C35059", "C35061")
num_reg = length(reg_names)
write_caland_inputs(...)