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

correctly disable or enable spit fire #22

Closed
rgknox opened this issue Feb 25, 2016 · 3 comments
Closed

correctly disable or enable spit fire #22

rgknox opened this issue Feb 25, 2016 · 3 comments

Comments

@rgknox
Copy link
Contributor

rgknox commented Feb 25, 2016

Summary of Issue:

In issue #16 we identified that the clm-ed build process was not able to set use_ed_spit_fire correctly in the lnd_in namelist. A PR was applied that made this possible, and added regression test functionality for the false case edNoFire. The main case edTest, has true.

In issue #16 we also identified that this namelist variable is not really used, and a hard-coded parameter (temporary_SF_switch) over-rides use_ed_spit_fire.

Expected behavior and actual behavior:

Expected behavior:
setting use_ed_spit_fire to true and false should turn on and off spit_fire.

Actual behavior:
the hard-coded value disables use_ed_spit_fire

Proposed Changes?

  1. if the spit-fire code is trusted for normal use: the hard-coded parameter should be removed and we decide if we want use_ed_spit_fire = .true. as the default usage
  2. if the spit-fire code is still experimental: the hard-coded parameter should be removed, the default should be moved to .false., the edTests regression tests should use use_ed_spit_fire = false, and we should have supplemental regression tests with true?
  3. if the spit-fire code is not working at all and under-development: I suppose same as 2), but add its regression test to the known fails.

What is the changeset ID of the code, and the machine you are using:

63a2773

have you modified the code? If so, it must be committed and available for testing:

this functionality is consistent from the original trunk, through 63a2773

Screen output or output files showing the error message and context:

subroutine fire_model( currentSite, atm2lnd_inst, temperature_inst)

use clm_varctl,   only : use_ed_spit_fire

type(ed_site_type)     , intent(inout), target :: currentSite
type(atm2lnd_type)     , intent(in)    :: atm2lnd_inst
type(temperature_type) , intent(in)    :: temperature_inst

type (ed_patch_type), pointer :: currentPatch

integer temporary_SF_switch

!zero fire things
currentPatch => currentSite%youngest_patch
temporary_SF_switch = 0
do while(associated(currentPatch))
   currentPatch%frac_burnt = 0.0_r8
   currentPatch%AB         = 0.0_r8
   currentPatch%fire       = 0
   currentPatch => currentPatch%older
enddo

if(write_SF==1)then
   write(iulog,*) 'use_ed_spit_fire',use_ed_spit_fire
endif

if(use_ed_spit_fire.and.temporary_SF_switch==1)then
   call fire_danger_index(currentSite, temperature_inst, atm2lnd_inst)
   call wind_effect(currentSite, atm2lnd_inst)
   call charecteristics_of_fuel(currentSite)
   call rate_of_spread(currentSite)
   call ground_fuel_consumption(currentSite)
   call fire_intensity(currentSite)
   call area_burnt(currentSite)
   call crown_scorching(currentSite)
   call crown_damage(currentSite)
   call cambial_damage_kill(currentSite)
   call post_fire_mortality(currentSite)
end if

end subroutine fire_model

@rgknox rgknox changed the title correctly disable or enable use_ed_spit_fire correctly disable or enable spit fire Feb 25, 2016
@rosiealice
Copy link
Contributor

I think option 2 is perhaps most sensible...

On 24 February 2016 at 17:43, Ryan Knox [email protected] wrote:

Summary of Issue:

In issue #16 #16 we identified
that the clm-ed build process was not able to set use_ed_spit_fire
correctly in the lnd_in namelist. A PR was applied that made this possible,
and added regression test functionality for the false case edNoFire. The
main case edTest, has true.

In issue #16 #16 we also
identified that this namelist variable is not really used, and a hard-coded
parameter (temporary_SF_switch) over-rides use_ed_spit_fire.
Expected behavior and actual behavior:

Expected behavior:

setting use_ed_spit_fire to true and false should turn on and off
spit_fire.

Actual behavior:
the hard-coded value disables use_ed_spit_fire
Proposed Changes?

  1. if the spit-fire code is trusted for normal use: the hard-coded
    parameter should be removed and we decide if we want use_ed_spit_fire =
    .true. as the default usage
  2. if the spit-fire code is still experimental: the hard-coded parameter
    should be removed, the default should be moved to .false., the edTests
    regression tests should use use_ed_spit_fire = false, and we should have
    supplemental regression tests with true?
  3. if the spit-fire code is not working at all and under-development: I
    suppose same as 2), but add its regression test to the known fails.
    What is the changeset ID of the code, and the machine you are using:

63a2773
have you modified the code? If so, it must be committed and available for
testing:

this functionality is consistent from the original trunk, through 63a2773
Screen output or output files showing the error message and context:

subroutine fire_model( currentSite, atm2lnd_inst, temperature_inst)

use clm_varctl, only : use_ed_spit_fire

type(ed_site_type) , intent(inout), target :: currentSite
type(atm2lnd_type) , intent(in) :: atm2lnd_inst
type(temperature_type) , intent(in) :: temperature_inst

type (ed_patch_type), pointer :: currentPatch

integer temporary_SF_switch

!zero fire things
currentPatch => currentSite%youngest_patch
temporary_SF_switch = 0
do while(associated(currentPatch))
currentPatch%frac_burnt = 0.0_r8
currentPatch%AB = 0.0_r8
currentPatch%fire = 0
currentPatch => currentPatch%older
enddo

if(write_SF==1)then
write(iulog,*) 'use_ed_spit_fire',use_ed_spit_fire
endif

if(use_ed_spit_fire.and.temporary_SF_switch==1)then
call fire_danger_index(currentSite, temperature_inst, atm2lnd_inst)
call wind_effect(currentSite, atm2lnd_inst)
call charecteristics_of_fuel(currentSite)
call rate_of_spread(currentSite)
call ground_fuel_consumption(currentSite)
call fire_intensity(currentSite)
call area_burnt(currentSite)
call crown_scorching(currentSite)
call crown_damage(currentSite)
call cambial_damage_kill(currentSite)
call post_fire_mortality(currentSite)
end if

end subroutine fire_model


Reply to this email directly or view it on GitHub
#22.


Dr Rosie A. Fisher

Terrestrial Sciences Section
Climate and Global Dynamics
National Center for Atmospheric Research
1850 Table Mesa Drive
Boulder, Colorado, 80305
USA.
+1 303-497-1706

http://www.cgd.ucar.edu/staff/rfisher/

@rgknox
Copy link
Contributor Author

rgknox commented Feb 25, 2016

ok, thanks Rosie. This enhancement should be pretty simple.

@rosiealice
Copy link
Contributor

I have just made a pull request, I think, with this set of SPITFIRE changes in. It took us a little while to figure out where we were and what we were doing, so I'm quite unsure about whether I did the right set of things or not. This was a little more complicated than the 'zero order' type of change I was hoping to make since we added a bunch of test suite and namelist default changes. Hopefully our next set of changes to SPITFIRE will be less complex!

@bandre-ucar bandre-ucar removed their assignment Apr 6, 2018
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

3 participants