hunter-stanke / rFIA

rFIA

Home Page:https://rfia.netlify.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

When using states = 'ENTIRE', inMemory = FALSE, estimates fail

lwrogers-uw opened this issue · comments

After acquiring data and loading it for the entire USA, estimates fail including volume, biomass, etc.:

Get the entire USA

usa <- getFIA(states = 'ENTIRE', dir=dataDir, load = FALSE)

Load previously downloaded FIA data

usa <- readFIA(dir=dataDir, inMemory = FALSE, states = 'ENTIRE')

Get the volume over time

volume(usa)

fails:
Error in readFIA(dir = db$dir, common = db$common, tables = reqTables, :
Data unavailable for: ENTIRE . States not found in specified directory.

Sorry for the late response here.

We worked this out previously, but for completeness, the issue arises from specifying inMemory = FALSE in the call to readFIA when attempting to read ENTIRE. Our larger-than-RAM methods are designed to work with combinations of state subsets, and as ENTIRE is simply a merged version of all state subsets (e.g., TREE table is merged into a single csv), we can't use inMemory=TRUE.

I've added a more informative warning to readFIA that will explain the above - great catch!