FMSC-Measurements / CruiseProcessing

2 stars 1 forks source link

Update volume library #31

Closed BenCamps closed 5 months ago

BenCamps commented 5 months ago

Volume Library Release Notes

  1. Add the following two equations to R6 equation list. Forest VolumeEquation 03 - GP A16CURW351 12 - Siuslaw NVBM240351

  2. Replace the R3 equations with the following list 300FW2W122 300FW2W202 NVB0000015 NVBM240119 NVBM330093 NVB0000746 300DVEW060 300DVEW106 300DVEW800

  3. Replace the vollib function from VOLLIBCS to VOLLIBCSNVB Here is the example of vollib import in C# [DllImport("vollib.dll")]//, CallingConvention = CallingConvention.StdCall)] static extern void VOLLIBCSNVB(ref int regn, StringBuilder forst, StringBuilder voleq, ref float mtopp, ref float mtops, ref float stump, ref float dbhob, ref float drcob, StringBuilder httype, ref float httot, ref int htlog, ref float ht1prd, ref float ht2prd, ref float upsht1, ref float upsht2, ref float upsd1, ref float upsd2, ref int htref, ref float avgz1, ref float avgz2, ref int fclass, ref float dbtbh, ref float btr, float[] vol, float[,] logvol, float[,] logdia, float[] loglen, float[] bohlt, ref int tlogs, ref float nologp, ref float nologs, ref int cutflg, ref int bfpflg, ref int cupflg, ref int cdpflg, ref int spflg, StringBuilder conspec, StringBuilder prod, ref int httfll, StringBuilder live, ref int ba, ref int si, StringBuilder ctype, ref int errflg, ref int pmtflg, ref MRules mRules, ref int dist, ref float brkht, ref float brkhtd, ref int fiaspcd, float[] drybio, float[] grnbio, ref float cr, ref float cull, ref int decaycd, int ll1, int ll2, int ll3, int ll4, int ll5, int ll6, int ll7, int charLen);

Here is the example of call VOLLIBCSNVB: VOLLIBCSNVB(ref REGN, FORST, VOLEQ, ref MTOPP, ref MTOPS, ref STUMP, ref DBHOB, ref DRCOB, HTTYPE, ref HTTOT, ref HTLOG, ref HT1PRD, ref HT2PRD, ref UPSHT1, ref UPSHT2, ref UPSD1, ref UPSD2, ref HTREF, ref AVGZ1, ref AVGZ2, ref FCLASS, ref DBTBH, ref BTR, VOL, LOGVOL, LOGDIA, LOGLEN, BOLHT, ref TLOGS, ref NOLOGP, ref NOLOGS, ref CUTFLG, ref BFPFLG, ref CUPFLG, ref CDPFLG, ref SPFLG, CONSPEC, PROD, ref HTTFLL, LIVE, ref BA, ref SI, CTYPE, ref ERRFLAG, ref PMTFLG, ref mRules, ref IDIST, ref BRKHT, ref BRKHTD, ref FIASPCD, DRYBIO, GRNBIO, ref CR, ref CULL, ref DECAYCD, strlen, strlen, strlen, strlen, strlen, strlen, strlen, charLen);

The variables BRKHT, BRKHTD, FIASPCD, DRYBIO, GRNBIO, CR, CULL, DECAYCD are new. They are: float BRKHT, BRKHTD, CR, CULL int FIASPCD, DECAYCD float[] DRYBIO, GRNBIO

Before call VOLLIBCSNVB, they need to be initialized as: BRKHT = 0; BRKHTD = 0; CR = 0; CULL = 0; DECAYCD = 0; FIASPCD = int.Parse(VOLEQ.ToString().Substring(7,3)) DRYBIO = new float[15] GRNBIO = new float[15]

  1. The attached is the new vollib.dll with version number 20240401. The change should not affect results with old volume equation.
BenCamps commented 5 months ago

Yingfang supplied a newer vollib.dll with version of 20240410

BenCamps commented 5 months ago

R3 equations supplied by Yingfang updated to include some of the already existing species