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

Clean up NaN and zeroing of fire variables in Patch and Cohort Dynamics #575

Closed
jkshuman opened this issue Sep 12, 2019 · 5 comments · Fixed by #717
Closed

Clean up NaN and zeroing of fire variables in Patch and Cohort Dynamics #575

jkshuman opened this issue Sep 12, 2019 · 5 comments · Fixed by #717

Comments

@jkshuman
Copy link
Contributor

Need to clean up Nan and zeroing of fire variables in Patch and Cohort Dynamics per issue #231
Opening this as a separate issue due to the number of fire variables that need to be assessed in

! FIRE
currentPatch%litter_moisture(:) = 0.0_r8 ! litter moisture
currentPatch%fuel_eff_moist = 0.0_r8 ! average fuel moisture content of the ground fuel
! (incl. live grasses. omits 1000hr fuels)
currentPatch%livegrass = 0.0_r8 ! total ag grass biomass in patch. 1=c3 grass, 2=c4 grass. gc/m2
currentPatch%sum_fuel = 0.0_r8 ! total ground fuel related to ros (omits 1000hr fuels). gc/m2
currentPatch%fuel_bulkd = 0.0_r8 ! average fuel bulk density of the ground fuel
! (incl. live grasses. omits 1000hr fuels). kgc/m3
currentPatch%fuel_sav = 0.0_r8 ! average surface area to volume ratio of the ground fuel
! (incl. live grasses. omits 1000hr fuels).
currentPatch%fuel_mef = 0.0_r8 ! average moisture of extinction factor of the ground fuel
! (incl. live grasses. omits 1000hr fuels).
currentPatch%ros_front = 0.0_r8 ! average rate of forward spread of each fire in the patch. m/min.
currentPatch%effect_wspeed = 0.0_r8 ! dailywind modified by fraction of relative grass and tree cover. m/min.
currentPatch%tau_l = 0.0_r8 ! mins p&r(1986)
currentPatch%fuel_frac(:) = 0.0_r8 ! fraction of each litter class in the sum_fuel
!- for purposes of calculating weighted averages.
currentPatch%tfc_ros = 0.0_r8 ! used in fi calc
currentPatch%fi = 0._r8 ! average fire intensity of flaming front during day.
! backward ros plays no role. kj/m/s or kw/m.
currentPatch%fire = 999 ! sr decide_fire.1=fire hot enough to proceed. 0=stop everything- no fires today
currentPatch%fd = 0.0_r8 ! fire duration (mins)
currentPatch%ros_back = 0.0_r8 ! backward ros (m/min)
currentPatch%ab = 0.0_r8 ! area burnt daily m2
currentPatch%nf = 0.0_r8 ! number of fires initiated daily
currentPatch%sh = 0.0_r8 ! average scorch height for the patch(m)
currentPatch%frac_burnt = 0.0_r8 ! fraction burnt in each timestep.
currentPatch%burnt_frac_litter(:) = 0.0_r8
currentPatch%btran_ft(:) = 0.0_r8

tagging @jkshuman to do this

@jkshuman
Copy link
Contributor Author

@rgknox @glemieux Do you think this is an ok way to tackle this #231 , by whittling things down, or do you want to achieve this is one fell swoop? I feel it will be a bit slow, since you need to asses what is happening to the variable and where it's used...I can do this rather quickly for the fire variables, hence this issue.

@jkshuman
Copy link
Contributor Author

@jkshuman @rgknox @glemieux remember #562 and bad fire behavior in the clean-up of these nan_cohort and zero_cohort

@ckoven
Copy link
Contributor

ckoven commented Dec 17, 2020

Hi All -- in my cleaning out of fire code I cam across this issue, and thought that, while the fire code is all fresh in my head, now would be a good time to nan these values and also remove some apparently unnecessary zeroing that is happening in the fire code. So I've now done so and it looks good and behaves well. does anyone care whether I add that to the existing fire PR versus make a new one with just this change to ensure b4b-ness on it?

@jkshuman
Copy link
Contributor Author

Thanks @ckoven. You are on a fire tornado roll.

@ckoven
Copy link
Contributor

ckoven commented Dec 17, 2020

commit ea97d55 addresses this. haven't added it to #717 yet but can either do that or a make separate PR to ensure b4b-ness.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants