Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create aggregrated antecedent weather available for use in wildfire-feedback cheatgrass loop #412

Closed
kpalmqui opened this issue Dec 5, 2019 · 7 comments
Assignees

Comments

@kpalmqui
Copy link
Member

kpalmqui commented Dec 5, 2019

In addition to fire probability based on cheatgrass biomass (see #324), we would like antecedent weather in the previous three years to be utilized for additional adjustment of the fire probability that is calculated based on cheatgrass biomass.

@menglandjohns and I are still working on the logic and code implementation for this (more details to follow), but we would like @chaukap to begin working on the code that creates the aggregated antecedent weather variables of interest. These variables were identified in Pilliod et al. 2017:
Pilliod et al. 2017.pdf

For each year, we want:

  1. Mean spring (April-June) preciptitation in the three previous years.
  2. Winter (October-March) precipitation in the previous year.
  3. Spring (April-June) precipitation in the current year.

Using these variables, we will need to essentially check to see if the following are true:

  1. Is mean spring precipitation in the previous three years higher than average?
  2. Is winter precipitation in the previous year higher than average?
  3. Is spring precipitation in the current year lower than average?

Because of these comparison to "average" conditions, we will also need running means for the above variables.

For year 1, we have no previous weather data to go on, so this implementation should be skipped. For years 2-3, I suggest we utilize the spring precipitation in the previous year and mean spring precipitation in the previous two years, respectively.

Much more detail to come here as we finalize:

  1. How to adjust wildfire probabilities based on weather (after adjustment based on cheatgrass biomass)
  2. The rules for determining whether previous weather or this year's weather is higher or lower than average.

@chaukap let me know if you have initial questions and feel free to break this down into smaller issues if you would like.

@chaukap
Copy link
Contributor

chaukap commented Jan 10, 2020

I've been thinking though this issue and I believe the cleanest solution would be to create a new struct for the cheatgrass information:

struct cheatgrassPrecipitation {
  double[3] previousSpringPrecipitation;
  double winterPrecipitation;

  double meanSpringPrecipitation;
  double meanWinterPrecipitation;
}

That way all of the information is together.

While we are at it, I think it would also be a good idea to create a header file for Mortality called ST_mortality.h. We would put all of the globally accessible functions and variables there, and no longer need to redeclare or extern anything from mortality.

@kpalmqui how does that sound?

@kpalmqui
Copy link
Member Author

@chaukap I think making a new struct for cheatgrass makes sense.

However, while the header file for Mortality seems like a good idea, shouldn't this be implemented in a different milestone/development branch?

@chaukap
Copy link
Contributor

chaukap commented Jan 13, 2020

@kpalmqui It would be a little messy to create the header file so I agree. I'll get to work on this issue right away.

@chaukap
Copy link
Contributor

chaukap commented Jan 13, 2020

@kpalmqui When you say "last winter" do you mean the previous year's October-December precipitation plus the current year's January-March precipitation, or do you mean the October-December precipitation from 2 years ago and the January-March precipitation from 1 year ago?

I'm assuming the first but I want to be sure.

@kpalmqui
Copy link
Member Author

@chaukap thanks for following up about this. The Pilliod et al. 2017 study characterized a year as: October-September (see attached Figure).

Screen Shot 2020-01-14 at 11 34 22 AM

Thus, with regard to your question it is actually the second: October-December precipitation from 2 years ago and the January-March precipitation from 1 year ago

chaukap pushed a commit that referenced this issue Jan 14, 2020
(issue #412)
The new struct CheatgrassPrecip stores all of the information needed to
determine cheatgrass-driven wildfire occurances.
The function _updateCheatgrassPrecip should be called once a year to
update the fields in the struct, and memory allocation is handled with
initCheatgrassPrecip and freeMortalityMemory.

I still need to incoprorate the new struct into gridded mode, but
non-gridded mode is ready to utilize the variables.
chaukap pushed a commit that referenced this issue Jan 14, 2020
(issue #412)
The cheatgrass precipitation information is now cell-specific and loads
into the mortality module when load_cell is called.
chaukap referenced this issue Jan 17, 2020
I added the parameter "year" to the function documentation of _updateCheatgrassPrecip and consolidated a few long winded comments.
@chaukap
Copy link
Contributor

chaukap commented Jan 17, 2020

@kpalmqui Following commit 4f1a375 I believe all of the information you requested is available. Here's a summary of what I've done:

  • Created a new struct, CheatgrassPrecip, to hold the information
  • Instantiated the struct in ST_mortality.c as cheatgrassPrecip.
  • Created a function for updating all fields of cheatgrassPrecip called _updateCheatgrassPrecip(int year)
  • Incorporated this feature into gridded mode.

_updateCheatgrassPrecip(int year) is called at the top of mort_EndOfYear(). This means that all of the information is up to date before any decisions are made about disturbances.

To access the information:

  • cheatgrassPrecip->prevSprings[i] accesses the Spring precipitation from the previous 3 Springs. prevSprings[0] refers to last year and prevSprings[2] refers to 3 years ago.
  • cheatgrassPrecip->lastWinter refers to last Winter's precipitation.
  • cheatgrassPrecip->currentSpring refers to this Spring's precipitation.
  • cheatgrassPrecip->springMean refers to the running average of Spring precipitation. The average begins to a accumulate in year 2.
  • cheatgrassPrecip->winterMean refers to the running average of Winter precipitation. The average begins to accumulate in year 3.

Testing

You can test my implementation using the print statement I left below the call to _updateCheatgrassPrecip(int year). It will give you a year-by-year print out of the information like this:
Screen Shot 2020-01-17 at 10 13 50 AM

If there's anything else you need let me know!

chaukap pushed a commit that referenced this issue Jan 17, 2020
I felt like the documentation needed a few more things to feel complete. (issue #412)
@chaukap
Copy link
Contributor

chaukap commented Feb 12, 2020

The antecedent weather is available to the wildfire code and therefore this issue is complete. If any modifications to the weather data need to be made I will open a new branch.

@chaukap chaukap closed this as completed Feb 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants