Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…VegetationSimulator into open-source-main
  • Loading branch information
wagnerds committed Aug 3, 2023
2 parents 3866b81 + 362c129 commit 2beb1ef
Show file tree
Hide file tree
Showing 14 changed files with 188 additions and 77 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
<body>
<h1>What is FVS?</h1>
<p>The Forest Vegetation Simulator (FVS) is a family of individual-tree, distance-independent, forest growth simulation models. If is a system of highly integrated analytical tools that is based upon a body of scientific research and experience. Since the development of the first model for northern Idaho in 1973, FVS has evolved into a collection of 'variants' which represent different geographic areas across the county. FVS can simulate a wide range of silvicultural treatments for most major forest tree species, forest types, and stand conditions.</p>
<p>The FVS Staff of the <a href="https://www.fs.usda.gov/forestmanagement/aboutus/fmsc.shtml">Forest Management Service Center FMSC</a> in Fort Collins, Colorado, maintains, supports, develops and provides training for FVS.</p>
<p>Detailed information such as our workflow policies, and directions on building FVS in various environments can be found on our <a href="https://github.com/USDAForestService/ForestVegetationSimulator/wiki">Wiki</a>.</p>
<p>More information, such as training materials, videos, and documents can be found on <a href="https://www.fs.usda.gov/fvs/index.shtml">our website</a>.</p>
<p>Throughout its history, FVS has had numerous contributors, authors, and developer. The following list is not intended to be all encompassing, but rather simply identifies the currently active contributors.
<p>The Forest Vegetation Simulator (FVS) is a family of individual-tree, distance-independent, forest growth simulation models. It is a system of highly integrated analytical tools that is based upon a body of scientific research and experience. Since the development of the first model for northern Idaho in 1973, FVS has evolved into a collection of 'variants' which represent different geographic areas across the county. FVS can simulate a wide range of silvicultural treatments for most major forest tree species, forest types, and stand conditions.</p>
<p>The FVS Staff of the <a href="https://www.fs.usda.gov/forestmanagement/aboutus/fmsc.shtml">Forest Management Service Center (FMSC)</a> in Fort Collins, Colorado, maintains, supports, develops, and provides training for FVS.</p>
<p>Detailed information, such as our workflow policies and directions on building FVS in various environments, can be found on our <a href="https://github.com/USDAForestService/ForestVegetationSimulator/wiki">Wiki</a>.</p>
<p>More information, such as training materials, videos, and documents, can be found on <a href="https://www.fs.usda.gov/fvs/index.shtml">our website</a>.</p>
<p>Throughout its history, FVS has had many contributors, authors, and developers. The following list is not intended to be all encompassing, but rather simply identifies the currently active contributors.
</p>
<ul>
<li>Michael VanDyck - FVS Staff Lead and Product Owner
<li>Daniel Wagner - FVS Programmer and Repository Maintainer
<li>Lance David - FVS Senior Programmer
<li>Erin Smith-Mateja - FVS Forest Biometrician and Training Coordinator
<li>Erin Smith-Mateja - FVS Forest Biometrician
<li>Mark Castle - FVS Forest Biometrician
<li>Michael Shettles - FVS Forest Biometrician and Interface Support
<li>Nick Crookston - Forest Research Consultand
<li>Matt Diskin - FVS Forest Biometrician
<li>Nick Crookston - Forest Research Consultant
<li>Don Robinson - Ecologist and Canadian Variant (BC, ON) Development
<li>Daniel Wagner - FVS Programmer and Repository Maintainer
</ul>
</body>


https://user-images.githubusercontent.com/100228553/179036261-bfcc668b-976a-48a3-9b6e-4e193c17e948.mp4
https://user-images.githubusercontent.com/100228553/179036261-bfcc668b-976a-48a3-9b6e-4e193c17e948.mp4
13 changes: 12 additions & 1 deletion base/errgro.f
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ SUBROUTINE ERRGRO (LRETRN,IERRN)
GO TO( 1000,1200,1300,1400,1500,1600,1700,1800,1900,2000
> ,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000
> ,3100,3200,3300,3400,3500,3600,3700,3800,3900,4000
> ,4100,4200,4300,4400,4500,4600,4700,4800,4900), IERRN
> ,4100,4200,4300,4400,4500,4600,4700,4800,4900,5000),
> IERRN
1000 CONTINUE
C ERROR NUMBER 1
WRITE (JOSTND,1110) PREF,IRECNT
Expand Down Expand Up @@ -315,6 +316,16 @@ SUBROUTINE ERRGRO (LRETRN,IERRN)
& 'CONTAINS INVALID SPECIAL CHARACTERS. PROJECTION TERMINATED.')
IF (ICCODE .LT. 3) ICCODE=3
GO TO 9000

C ERROR NUMBER 40
5000 CONTINUE
WRITE(JOSTND,5010) PREF

5010 FORMAT(/A11,'FVS40 WARNING: TREE RECORD REPRESENTING GREATER ',
& 'THAN 1000 TPA ENCOUNTERED. MAY CAUSE MATHEMATICAL ERRORS.')
IF (ICCODE .LT. 2) ICCODE=1

GO TO 9000

9000 CONTINUE
IF (LRETRN) RETURN
Expand Down
13 changes: 13 additions & 0 deletions base/notre.f
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,19 @@ SUBROUTINE NOTRE
C ASSIGN PROB; ADJUST FOR NON-STOCKABLE POINTS.
C----------
PROB(I)=P*GROSPC
C
C IT WAS FOUND THAT INDIVIDUAL TREE RECORD TPA VALUES GREATER
C THAN 1000 CAN CAUSE MATHEMATICAL ERROR IN CALCULATION OF
C FFE POTENTIAL FLAME LENGTH CALCULATION SPECIFICALLY (FMPOFL.F).
C
IF (P .GT. 1000.0) THEN
CALL ERRGRO (.TRUE.,40)
WRITE(JOSTND,32) IDTREE(I),I,ISP(I),DBH(I),PROB(I)
32 FORMAT(/,
& '******** FVS40 WARNING: TREE_ID=',I6,' TREE INDEX=',
& I4,' SPECIES=',I3,' DIAMETER=',F5.1,' TPA=',F8.2)
ENDIF

C----------
C CALL WESTERN ROOT DISEASE MODEL VER. 3.0 SUBROUTINE TO ASSIGN TPA
C VALUES TO WESTERN ROOT DISEASE PROB VARIABLES
Expand Down
39 changes: 39 additions & 0 deletions changeNotes/2023.06.20_ldavid.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
Subject: New error (FVS40) - single record TPA exceeds 1000

Name: Lance David

Date: 06/20/2023

Variants affected: All

Description: When processing some input data sets, first noticed with FIA,
expanded TPA values for a single tree record can be extremely
high. This extreme TPA value can result in mathematical errors
first found in the calulation of potential flame length in FFE.
This error is actually handled by FVS as a warning and the
label "ERROR" is only used so that it will be reported by the
interface and obvious to the user in the event a terminal error
does occur. This error has two lines so that the offending tree
record can be identified and required first line be written by
errgro.f and second line written by notre.f where sample design
expansion factor(s) are applied to inventory tree records. The
error message written to main output file looks like this:

******** FVS40 ERROR: TREE RECORD REPRESENTING GREATER THAN
1000 TPA ENCOUNTERD. MAY CAUSE MATHEMATICAL ERRORS.

******** FVS40 ERROR: TREE_ID= 5 TREE INDEX= 5
SPECIES= 31 DIAMETER= 0.1 TPA=13320.00

Impact on users: Users will be notified when tree records individually
representing greater than 1000 TPA are encountered. This will
be helpful if a matematical error does occur later in the
projection. Otherwise, the user may ignore the message but
should consider that 1000 trees or more behaving identially
in a projection is appropriate.


Files:
base\errgro.f - Added FVS40 error.

base\notre.f - Added second line of FVS40 error which identifies tree record
2 changes: 1 addition & 1 deletion common/INCLUDESVN.F77
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
C COMMON
C----------
C
DATA SVN/"FS2023.2"/
DATA SVN/"FS2023.3"/
C
C-----END SEGMENT
15 changes: 12 additions & 3 deletions ec/forkod.f
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ SUBROUTINE FORKOD
C GP WAS IN THE AREA OF INTEREST BUT NO DATA WERE AVAILABLE;
C THUS IT IS MAPPED TO THE WENATCHEE FOR PROCESSING.
C 613 = MT BAKER - SNOQUALMIE (MAPPED TO WENATCHEE)
C 621 = COLVILLE NF (MAPPED TO OKANOGAN - TONASKET RD) 04/2023 DW
C
C NOTE: GIFFORD PINCHOT GETS IGL=2 AND MT BAKER/SNOQUALMIE GETS IGL=3.
C THIS IS SO FOREST SPECIFIC HT-DBH EQNS CAN BE INDEXED IN
Expand All @@ -41,10 +42,10 @@ SUBROUTINE FORKOD
C 8130 = YAKAMA NATION RESERVATION (MAPPED TO 613 SNOQUALMIE)
C 8131 = SPOKANE RESERVATION (MAPPED TO 617 WENATCHEE)

INTEGER JFOR(7),KFOR(7),NUMFOR,I
INTEGER JFOR(8),KFOR(8),NUMFOR,I
LOGICAL USEIGL, FORFOUND
DATA JFOR/606,608,617,699,603,613, 0 /, NUMFOR /6/
DATA KFOR/4*1,2,3,1/
DATA JFOR/606,608,617,699,603,613,621,0 /, NUMFOR /7/
DATA KFOR/4*1,2,3,1,1/

USEIGL = .TRUE.
FORFOUND = .FALSE.
Expand Down Expand Up @@ -116,6 +117,14 @@ SUBROUTINE FORKOD
IFOR=3
IGL=3
USEIGL = .FALSE.
CASE (7)
WRITE(JOSTND,23)
23 FORMAT(/,'********',T12,'COLVILLE NF (621) BEING ',
& 'MAPPED TO OKANOGAN (TONASKET RD) (699)',
& 'FOR FURTHER PROCESSING.')
IFOR=4
IGL=1
USEIGL = .FALSE.
END SELECT


Expand Down
12 changes: 11 additions & 1 deletion fire/vbase/fmpofl.f
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,9 @@ SUBROUTINE FMPOFL_FMPTRH(IYR,MXI,PRB,FLM1,FLM2,PTR1,PTR2)
> FLM1,FLM2,AVHT,SSUM,P,PTR1,PTR2,CRIT,AVCBHT

DOUBLE PRECISION Z,PT1,PT2,Q,PDF

LOGICAL CHKFLG

PTR1=0.
PTR2=0.
AVCBHT=-1.
Expand Down Expand Up @@ -535,7 +538,14 @@ SUBROUTINE FMPOFL_FMPTRH(IYR,MXI,PRB,FLM1,FLM2,PTR1,PTR2)
DO II=1,MXI
I=INDX(II)
CALL RANN(RAN)
IF (PRB(I).GT.1000. .OR. RAN .GT. EXP(-PRB(I)*PSIZE)) THEN
CHKFLG = .FALSE.
IF (PRB(I).GT.1000.) THEN
CHKFLG = .TRUE.
ELSE IF (RAN .GT. EXP(-PRB(I)*PSIZE)) THEN
CHKFLG = .TRUE.
ENDIF

IF (CHKFLG) THEN
NYES=NYES+1
YES(NYES)=I

Expand Down
2 changes: 2 additions & 0 deletions sn/dgf.f
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,8 @@ SUBROUTINE DGF(DIAM)
KUPHD= 1
C
ENDIF

DG5 = 0
C----------
C BEGIN SPECIES LOOP. ASSIGN VARIABLES WHICH ARE SPECIES
C DEPENDENT
Expand Down
2 changes: 2 additions & 0 deletions tests/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ US : $(addsuffix .test,$(USDirs))

clean : $(addsuffix .clean,$(TestDirs))

clean_US : $(addsuffix .clean,$(USDirs))

%.test :
cd $(basename $@); ${MAKE} --ignore-errors

Expand Down
2 changes: 1 addition & 1 deletion vbase/initre.f
Original file line number Diff line number Diff line change
Expand Up @@ -5580,7 +5580,7 @@ SUBROUTINE INITRE
ENDIF
ENDIF
IF(LNOTBK(2)) THEN
IF(ARRAY(2).LE. -1.605 .AND. ARRAY(2).GT. -10.0)THEN
IF(ARRAY(2).LE. -1.605 .AND. ARRAY(2).GE. -10.0)THEN
SLPMSB=ARRAY(2)
ELSE
CALL KEYDMP (JOSTND,IRECNT,KEYWRD,ARRAY,KARD)
Expand Down
69 changes: 23 additions & 46 deletions vbase/revise.f
Original file line number Diff line number Diff line change
Expand Up @@ -18,140 +18,117 @@ SUBROUTINE REVISE (VAR,REV)
C SOUTHEAST ALASKA / COASTAL BRITISH COLUMBIA
C----------
CASE('AK')
REV = '20230518'

REV = '20230728'
C----------
C BLUE MOUNTAINS
C----------
CASE('BM')
REV = '20230518'

REV = '20230728'
C----------
C INLAND CALIFORNIA / SOUTHERN CASCADES
C----------
CASE('CA')
REV = '20230518'

REV = '20230728'
C----------
C CENTRAL IDAHO
C----------
CASE('CI')
REV = '20230518'

REV = '20230728'
C----------
C CENTRAL ROCKIES
C----------
CASE('CR')
REV = '20230518'

REV = '20230728'
C----------
C CENTRAL STATES
C----------
CASE('CS')
REV = '20230518'

REV = '20230728'
C----------
C EAST CASCADES
C----------
CASE('EC')
REV = '20230518'

REV = '20230728'
C----------
C EASTERN MONTANA
C----------
CASE('EM')
REV = '20230518'

REV = '20230728'
C----------
C INLAND EMPIRE (AKA NI23)
C----------
CASE('IE')
REV = '20230518'

REV = '20230728'
C----------
C KOOTENAI / KANIKSU / TALLY LAKE
C----------
CASE('KT')
REV = '20230518'

REV = '20230728'
C----------
C LAKE STATES
C----------
CASE('LS')
REV = '20230518'

REV = '20230728'
C----------
C KLAMATH MOUNTAINS
C----------
CASE('NC')
REV = '20230518'

REV = '20230728'
C----------
C NORTHEAST STATES
C----------
CASE('NE')
REV = '20230518'

REV = '20230728'
C----------
C SOUTHWEST OREGON ORGANON
C----------
CASE('OC')
REV = '20230518'

REV = '20230728'
C----------
C NORTHWEST OREGON ORGANON
C----------
CASE('OP')
REV = '20230518'

REV = '20230728'
C----------
C PACIFIC NORTHWEST
C----------
CASE('PN')
REV = '20230518'

REV = '20230728'
C----------
C SOUTHERN
C----------
CASE('SN')
REV = '20230518'

REV = '20230728'
C----------
C SOUTH CENTRAL OREGON / NORTHEAST CALIFORNIA
C----------
CASE('SO')
REV = '20230518'

REV = '20230728'
C----------
C TETONS
C----------
CASE('TT')
REV = '20230518'

REV = '20230728'
C----------
C UTAH
C----------
CASE('UT')
REV = '20230518'

REV = '20230728'
C----------
C WEST CASCADES
C----------
CASE('WC')
REV = '20230518'

REV = '20230728'
C----------
C WESTERN SIERRA NEVADA
C----------
CASE('WS')
REV = '20230518'

REV = '20230728'
C----------
C ANY OTHER VARIANT
C----------
CASE DEFAULT
REV = '20230518'

REV = '20230728'
C
END SELECT
C
Expand Down
Loading

0 comments on commit 2beb1ef

Please sign in to comment.