Export to CBM-CFS3
CBM-CFS3 is carbon budget model that is being used more often by Patchworks clients. Patchworks outputs contain all of the information that is required by CBM-CFS3, but in the past it has taken a bit of manipulation to get these data in to the correct format. The addition of a CBM-CFS3 export wizard makes this process a lot easier.
The CBM-CFS3 model requires data tables that describe initial forest conditions, growing stock volumes, and transitions that occur over time as a result of management treatments and natural processes. In other words, all the stuff that forest management models normally keep track of. Getting from one system to another should be easy, but then there is that formatting problem.
The Patchworks CBM-CFS3 export wizard helps to take care of most of the tedious technical details involve in preparing an export data set. And with a bit of upfront design work when preparing the Patchworks model, exporting to CBM-CFS3 becomes as easy as a few mouse clicks.
The wizard has a basic mode (having the most automation for conforming models), and an expert mode allowing a more custom approach to extracting growing stock and leading species values.
In basic mode the wizard proceeds through several steps to gather information on how to proceed, prompting for:
- the classifiers (theme) columns being used,
- the columns that contain the previous disturbance on the site, as well as the historically prevalent natural disturbance,
- the columns that contain conifer and hardwood growing stock curves, and
- a regular expression that extracts the species names from the growing stock curve column headings.
Once all of the parameters have been collected the wizard will begin the export process, and will save the results as a collection of CSV files within a zip file. The contents of the zip file can be extracted to a workspace where the CBM-CFS3 model will be used.
The last step of the export wizard provides an opportunity to generate a script that can be used to automate the export process. This script can be saved to serve as documentation of the parameters that were used, or for reuse to quickly generate a new export file from a different scenario.
/*
* These commands will export a CBM-CFS3 input data set according to the following recipe.
*/
param1 = new String[] {
"PLANFU",
"SI"};
param4 = new String[] {
"feature.Yield.managed.Bf",
"feature.Yield.managed.Ce",
"feature.Yield.managed.Oc",
"feature.Yield.managed.Pj",
"feature.Yield.managed.Pr",
"feature.Yield.managed.Pw",
"feature.Yield.managed.Sb",
"feature.Yield.managed.Sw",
"feature.Yield.unmanaged.Bf",
"feature.Yield.unmanaged.Ce",
"feature.Yield.unmanaged.Oc",
"feature.Yield.unmanaged.Pj",
"feature.Yield.unmanaged.Pr",
"feature.Yield.unmanaged.Pw",
"feature.Yield.unmanaged.Sb",
"feature.Yield.unmanaged.Sw"};
param5 = new String[] {
"feature.Yield.managed.Bw",
"feature.Yield.managed.Mh",
"feature.Yield.managed.Oh",
"feature.Yield.managed.Pb",
"feature.Yield.managed.Po",
"feature.Yield.managed.Yb",
"feature.Yield.unmanaged.Bw",
"feature.Yield.unmanaged.Mh",
"feature.Yield.unmanaged.Oh",
"feature.Yield.unmanaged.Pb",
"feature.Yield.unmanaged.Po",
"feature.Yield.unmanaged.Yb"};
control.exportCBM(param1, // classifiers
"'Fire'", // historic disturbance
"'Fire'", // last disturbance
param4, // conifer yield attributes
param5, // hardwood yield attributes
"feature.Yield.*managed.(.*)", // species code extraction pattern
75, // species code evaluation year
"F:/Project_3101/version_1/analysis/scenarios/V1_Spatial_roadBudget/cbmExport.zip", // output file
);