Skip to content

Commit 4d9e3c3

Browse files
committed
2 parents fa0f9e8 + 83b9f48 commit 4d9e3c3

24 files changed

Lines changed: 1016 additions & 614 deletions

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.tif filter=lfs diff=lfs merge=lfs -text

.gitignore

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
1-
2-
.RData
3-
.Rhistory
4-
.Rproj.user/*
5-
BuildfvsOL.R
6-
ForestVegetationSimulator-Interface.Rproj
7-
fvsOL/.Rhistory
8-
fvsOL/LaunchFVS.R
9-
build_fvsOL.R
10-
fvsOL/data/fvsOnlineHelpRender.RData
11-
fvsOL/data/prms.RData
12-
fvsOL/launch.R
13-
fvsOL/NAMESPACE
14-
rFVS/NAMESPACE
15-
rFVS/rFVSmadeTag
16-
fvsOL/fvsOLmadeTag
17-
fvsOL/man/*
18-
rFVS/man/*
19-
*.gz
20-
.Rproj.user
1+
2+
fvsOL/inst/extdata/.Rhistory
3+
.RData
4+
.Rhistory
5+
.Rproj.user/*
6+
BuildfvsOL.R
7+
ForestVegetationSimulator-Interface.Rproj
8+
fvsOL/.Rhistory
9+
fvsOL/LaunchFVS.R
10+
build_fvsOL.R
11+
fvsOL/data/fvsOnlineHelpRender.RData
12+
fvsOL/data/prms.RData
13+
fvsOL/launch.R
14+
fvsOL/NAMESPACE
15+
rFVS/NAMESPACE
16+
rFVS/rFVSmadeTag
17+
fvsOL/fvsOLmadeTag
18+
fvsOL/man/*
19+
rFVS/man/*
20+
*.gz
21+
.Rproj.user
22+

fvsOL/DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: fvsOL
22
Title: Forest Vegetation Simulator
3-
Version: 2025.07.01
3+
Version: 2025.09.30
44
Authors@R: c(person("Nicholas", "Crookston", email = "ncrookston.fs@gmail.com",
55
role = c("aut")),
66
person("FVS", "Staff", email = "sm.fs.fvs-support@usda.gov",
@@ -12,7 +12,7 @@ Depends:
1212
ggplot2 (>= 3.3.3), parallel (>= 4.0.0), RSQLite (>= 2.2.4), plyr (>= 1.8.6), dplyr (>= 1.0.4),
1313
colourpicker (>= 1.1.0), rgl (>= 0.105.0), leaflet (>= 2.0.4.1), zip (>= 2.1.1), openxlsx (>= 4.2.3),
1414
shinyFiles (>= 0.9.3)
15-
Suggests: rgdal (>= 1.5-23), nlme (>= 3.1-140)
15+
Suggests: nlme (>= 3.1-140)
1616
License: MIT
1717
Roxygen: list(markdown = TRUE)
1818
RoxygenNote: 7.3.2

fvsOL/R/componentWins.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ keyword.dbs.SQLIn.Win <- function(title, prms, globals, input, output)
100100
tags$style(type="text/css",
101101
"#freeEditCols{font-family:monospace;font-size:90%;width:95%;}"),
102102
tags$p(id="freeEditCols",
103-
HTML(paste0("&nbsp;",paste0("....+....",1:8,collapse="")))),
103+
HTML(paste0("&nbsp;",paste0("....+....",1:12,collapse="")))),
104104
tags$style(type="text/css",
105105
"#freeEdit{font-family:monospace;font-size:90%;width:95%;}"),
106106
tags$textarea(id="freeEdit", rows=10, globals$currentCmdDefs["freeEdit"]),
@@ -138,7 +138,7 @@ keyword.dbs.SQLOut.Win <- function(title, prms, globals, input, output)
138138
tags$style(type="text/css",
139139
"#freeEditCols{font-family:monospace;font-size:90%;width:95%;}"),
140140
tags$p(id="freeEditCols",
141-
HTML(paste0("&nbsp;",paste0("....+....",1:8,collapse="")))),
141+
HTML(paste0("&nbsp;",paste0("....+....",1:12,collapse="")))),
142142
tags$style(type="text/css",
143143
"#freeEdit{font-family:monospace;font-size:90%;width:95%;}"),
144144
tags$textarea(id="freeEdit", rows=10, globals$currentCmdDefs["freeEdit"]),

fvsOL/R/externalCallable.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ extnAddComponentKwds <- function(prjDir=getwd(),runUUID,cmps,groups=NULL,stands=
413413
#' @param autoOut a vector of character strings corresponding to the automatic
414414
#' output selections to be set (not the svs ones), where these values "turn on"
415415
#' the corresponding selections and existing selections are not changed (if NULL
416-
#' no changes are made): "Treelists", "Carbon", "Fire", "Dead", "CanProfile",
416+
#' no changes are made): "Treelists", "autoFIAVBC", "Carbon", "Fire", "Dead", "CanProfile",
417417
#' "SnagDet", "StrClass", "CalibStats", "Climate", "Econ", "DM_Sz_Sum",
418418
#' "RD_Sum", "RD_Det", "RD_Beetle", "InvStats", "Regen", "KeepTextTables"
419419
#' @param svsOut a vector of two character strings where the first is the
@@ -449,7 +449,7 @@ extnSetRunOptions <- function(prjDir=getwd(),runUUID,autoOut=NULL,svsOut=NULL,
449449
if (attr(class(fvsRun),"package") != "fvsOL") stop("Don't recognize the loaded object")
450450
if (!is.null(autoOut))
451451
{
452-
autoSets = c(autoTreelists = "Treelists", autoCarbon = "Carbon",
452+
autoSets = c(autoTreelists = "Treelists", autoFIAVBC = "FIAVBC Outputs", autoCarbon = "Carbon",
453453
autoFire = "Fire", autoDead = "Dead", autoCanProfile = "CanProfile",
454454
autoSnagDet = "SnagDet", autoStrClass = "StrClass",
455455
autoCalibStats = "CalibStats", autoClimate = "Climate",

fvsOL/R/fvsOutUtilities.R

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,12 @@ filterRows <- function (dat, title, groups, stdid, mgtid, year, species, dbhclas
118118

119119
setupSummary <- function(asum,composite=FALSE)
120120
{
121-
std=if (length(grep("SCuFt$",colnames(asum))))
122-
c("Tpa","MCuFt","SCuFt","SBdFt") else c("Tpa","TCuFt","MCuFt","BdFt")
121+
std=if (length(grep("SCuFt$",colnames(asum))) &&
122+
length(grep("TCuFt$",colnames(asum))))
123+
c("Tpa","TCuFt","MCuFt","SCuFt","BdFt")
124+
else if (length(grep("SCuFt$",colnames(asum))))
125+
c("Tpa","MCuFt","SCuFt","SBdFt")
126+
else c("Tpa","TCuFt","MCuFt","BdFt")
123127
rstd=paste("R",std,sep="")
124128
stdden = c("BA","SDI","CCF","TopHt","QMD")
125129
stddenAT = paste0("AT",stdden)

fvsOL/R/fvsRunUtilities.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -781,7 +781,8 @@ mkModMCats <- function(globals)
781781
catsel=list(
782782
"Volume Modifiers" = c(
783783
"Adjust merchantability limits" = "merch_vol",
784-
"Add Volume Defect" = "keyword.base.Defect"),
784+
"Add Volume Defect" = "keyword.base.Defect",
785+
"Use FIA Cubic Volume Equations (FIAVBC)" = "fia_method"),
785786
"Mortality Modifiers" = c(
786787
"Adjust mortality rates" = "keyword.base.FixMort",
787788
"Adjust maximum SDI" = "keyword.base.SDIMax",

fvsOL/R/mkInputElements.R

Lines changed: 48 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ mkCheckBox <- function (pkey, pmt, choices, fpvs)
110110
mkSelectInput <- function (inputId, label, choices, fpvs,
111111
type="list", valpair=FALSE)
112112
{
113+
llast <- FALSE
113114
choices = trim(scan(text=choices,what=" ",sep="\n",quiet=TRUE))
114115
sel = grep ("^>",choices)
115116
if (length(sel)) choices[sel] = trim(substring(choices[sel],2))
@@ -127,10 +128,17 @@ cat ("in mkSelectInput type=",type," fpvs=",fpvs," sel=",sel,"\n")
127128
names(mklist) = choices
128129

129130
if (length(sel) && edt==0)
130-
{
131-
if (sel==length(choices)) sel <- sel-1
131+
{
132+
if (sel==length(choices)){
133+
sel <- sel - 1
134+
llast <- TRUE
135+
}
132136
if (!valpair) sel = match(as.character(sel),mklist)
133-
if (is.na(sel)) sel <- "0" else as.character(if (valpair) sel <- sel else sel <- sel-2)
137+
if (is.na(sel)) sel <- "0" else as.character(if (valpair) sel <- sel else {
138+
if (llast) sel <- sel - 1
139+
else sel <- sel - 2
140+
})
141+
#if (is.na(sel)) sel <- "0" else as.character(if (valpair) sel <- sel else if(sel == length(choices)) sel <- sel-1 else sel <- sel-2)
134142
}
135143
if(!length(sel) && edt==0) sel="0"
136144
if(!length(sel) && edt==1 && !valpair) sel=mklist[1]
@@ -464,25 +472,34 @@ mkVarList <- function (globals)
464472
"Age: Age at beginning of an FVS cycle"="Age",
465473
"AgeCmp: Estimated average age for the dominant size class"="AgeCmp",
466474
"Aspect: Aspect in degrees"="Aspect",
475+
"BAbvBio: Before thin above ground biomass" = "BAbvBio",
476+
"BAbvCrb: Before thin above ground carbon" = "BAbvCrb",
467477
"BaDBH: Before thin quadractic mean DBH"="BaDBH",
468478
"BBA: Before thin basal area"="BBA",
469-
"BBdFt: Before thin board foot (western variants) sawtimber (eastern variants) volume"="BBdFt",
479+
"BBdFt: Before thin board foot volume"="BBdFt",
470480
"BCanCov: Before thin percent canopy cover (StrClass keyword required)"="BCanCov",
471481
"BCCF: Before thin CCF"="BCCF",
472482
"BDBHwtBA: Before thin average DBH weighted by stand basal area"="BDBHwtBA",
473-
"BHTWTBA: Before thin average height weighted by stand basal area"="BHTWTBA",
483+
"BHTWTBA: Before thin average height weighted by stand basal area (Lorey's Height)"="BHTWTBA",
484+
"BFolBio: Before thin foliage biomass" = "BFolBio",
485+
"BFolCrb: Before thin foliage carbon" = "BfolCrb",
474486
"BMaxHS: Before thin height of tallest tree in uppermost stratum (StrClass keyword required)"="BMaxHS",
475-
"BMCuFt: Before thin merchantable (western variants) sawtimber (eastern variants) cubic foot volume"="BMCuFt",
487+
"BMCuFt: Before thin merchantable cubic foot volume"="BMCuFt",
488+
"BMerBio: Before thin merchantable biomass" = "BMerBio",
489+
"BMerCrb: Before thin merchantable carbon" = "BMerCrb",
476490
"BMinHS: Before thin height of shortest tree in uppermost stratum (StrClass keyword required)"="BMinHS",
477491
"BNumSS: Before thin number of valid strata (StrClass keyword required)"="BNumSS",
478492
"BRDen: Before thin relative density (Curtis 1982)"="BRDen",
479493
"BRDen2: Before thin relative density, SILVAH (Marquis and Ernst 1992)"="BRDen2",
480494
"BSClass: Before thin stand structural classification (StrClass keyword required)"="BSClass",
495+
"BSawBio: Before thin sawlog biomass" = "BSawBio",
496+
"BSawCrb: Before thin sawlog carbon" = "BSawCrb",
497+
"BSCuFt: Before thin sawlog cubic foot volume"="BSCuFt",
481498
"BSDI: Before thin stand density index"="BSDI",
482499
"BSDI2: Before thin stand density index (based on Zeide 1983)"="BSDI2",
483500
"BSDIMax: Before thin maximum stand density index"="BSDIMax",
484501
"BStrDbh: Before thin dbh of the stand uppermost stratum (StrClass keyword required)"="BStrDbh",
485-
"BTCuFt: Before thin total (western variants) or merchantable (pulpwood + sawtimber, eastern variants) cubic foot volume"="BTCuFt",
502+
"BTCuFt: Before thin total cubic foot volume"="BTCuFt",
486503
"BTopHt: Before thin top height"="BTopHt",
487504
"BTPA: Before thin trees/acre"="BTPA",
488505
"CEndYear: Year at end of cycle"="CEndYear",
@@ -512,28 +529,46 @@ mkVarList <- function (globals)
512529
"Yes: The constant 1"="Yes",
513530
"AADBH: After thin average DBH"="AADBH",
514531
"ABA: After thin basal area"="ABA",
515-
"ABdFt: After thin board foot (western variants) sawtimber (eastern variants) volume"="ABdFt",
532+
"ABdFt: After thin board foot volume"="ABdFt",
533+
"AAbvBio: After thin above ground biomass" = "AAbvBio",
534+
"AAbvCrb: After thin above ground carbon" = "AAbvCrb",
516535
"ACanCov: After thin percent canopy cover (StrClass keyword required)"="ACanCov",
517536
"ACCF: After thin CCF"="ACCF",
518537
"ADBHwtBA: After thin average DBH weighted by stand basal area"="ADBHwtBA",
519-
"AHTWTBA: After thin average height weighted by stand basal area"="AHTWTBA",
538+
"AFolBio: After thin foliar biomass" = "AFolBio",
539+
"AFolCrb: After thin foliar carbon" = "AFolCrb",
540+
"AHTWTBA: After thin average height weighted by stand basal area (Lorey's Height)"="AHTWTBA",
520541
"AMaxHS: After thin height of tallest tree in uppermost stratum (StrClass keyword required)"="AMaxHS",
521-
"AMCuFt: After thin merchantable (western variants) sawtimber (eastern variants) cubic foot volume"="AMCuFt",
542+
"AMerBio: After thin merchantable biomass" = "AMerBio",
543+
"AMerCrb: After thin merchantable carbon" = "AMerCrb",
544+
"AMCuFt: After thin merchantable cubic foot volume"="AMCuFt",
522545
"AMinHS: After thin height of shortest tree in uppermost stratum (StrClass keyword required)"="AMinHS",
523546
"ANumSS: After thin number of valid strata (StrClass keyword required)"="ANumSS",
524547
"ARDEN: After thin relative density (Curtis 1982)"="ARDEN",
525548
"ARDen2: After thin relative density, SILVAH (Marquis and Ernst 1992)"="ARDen2",
526549
"ASClass: After thin stand structural classification (StrClass keyword required)"="ASClass",
550+
"ASawBio: After thin sawlog biomass" = "ASawBio",
551+
"ASawCrb: After thin sawlog carbon" = "ASawCrb",
552+
"ASCuFt: After thin sawlog cubic foot volume" = "ASCuFt",
527553
"ASDI: After thin stand density index"="ASDI",
528554
"ASDI2: After thin stand density index (based on Zeide 1983)"="ASDI2",
529555
"ASDIMax: After thin maximum stand density index"="ASDIMax",
530556
"AStrDbh: After thin dbh of the stand uppermost stratum (StrClass keyword required)"="AStrDbh",
531-
"ATCuFt: After thin total (western variants) or merchantable (pulpwood + sawtimber, eastern variants) cubic foot volume"="ATCuFt",
557+
"ATCuFt: After thin total cubic foot volume"="ATCuFt",
532558
"ATopHt: After thin top height"="ATopHt",
533559
"ATPA: After thin trees/acre"="ATPA",
534560
"Cut: Cutting flag: 0 if no cutting, 1 otherwise"="Cut",
561+
"RAbvBio: Removed above ground biomass" = "RAbvBio",
562+
"RAbvCrb: Removed above ground carbon" = "RAbvCrb",
535563
"RBdFt: Removed board feet volume"="RBdFt",
536-
"RMCuFt: Removed merch cubic feet volume"="RMCuFt",
564+
"RFolBio: Removed Foliar biomass" = "RFolBio",
565+
"RFolCrb: Removed Foliar carbon" = "RFolCrb",
566+
"RMCuFt: Removed merchantible cubic feet volume"="RMCuFt",
567+
"RMerBio: Removed merchantable biomass" = "RMerBio",
568+
"RMerCrb: Removed merchantable carbon" = "RMerCrb",
569+
"RSawBio: Removed sawlog biomass" = "RSawBio",
570+
"RSawCrb: Removed sawlog carbon" = "RSawCrb",
571+
"RSCuFt: Removed sawlog cubic foot volume" = "RSCuFt",
537572
"RTCuFt: Removed total cubic feet volume"="RTCuFt",
538573
"RTPA: Removed trees/acre"="RTPA",
539574
"ACC: Accreation form last cycle"="ACC",
@@ -681,7 +716,7 @@ mkFreeformEltList <- function (globals,input,prms,title,kwds)
681716
tags$style(type="text/css",
682717
"#freeEditCols{font-family:monospace;font-size:90%;width:95%;}"),
683718
tags$p(id="freeEditCols",
684-
HTML(paste0("&nbsp;",paste0("....+....",1:8,collapse="")))),
719+
HTML(paste0("&nbsp;",paste0("....+....",1:12,collapse="")))),
685720
tags$style(type="text/css",
686721
"#freeEdit{font-family:monospace;font-size:90%;width:100%;cursor:auto;}"),
687722
tags$script(paste0('$(document).ready(function(){ $("textarea").on("focus",',

0 commit comments

Comments
 (0)