diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index d514756257..2cfa6bd2bc 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -10,9 +10,13 @@ module SFMainMod use FatesInterfaceTypesMod , only : hlm_masterproc ! 1= master process, 0=not master process use EDTypesMod , only : numWaterMem use FatesGlobals , only : fates_log - - use FatesInterfaceTypesMod , only : bc_in_type - + use FatesInterfaceTypesMod, only : hlm_spitfire_mode + use FatesInterfaceTypesMod, only : hlm_sf_nofire_def + use FatesInterfaceTypesMod, only : hlm_sf_scalar_lightning_def + use FatesInterfaceTypesMod, only : hlm_sf_successful_ignitions_def + use FatesInterfaceTypesMod, only : hlm_sf_anthro_ignitions_def + use FatesInterfaceTypesMod, only : bc_in_type + use EDPftvarcon , only : EDPftvarcon_inst use EDTypesMod , only : element_pos @@ -41,9 +45,6 @@ module SFMainMod use PRTGenericMod, only : SetState use FatesInterfaceTypesMod , only : numpft - use CNFireFactoryMod, only: no_fire, scalar_lightning, & - lightning_from_data, successful_ignitions, anthro_ignitions - implicit none private @@ -75,7 +76,7 @@ module SFMainMod ! ============================================================================ subroutine fire_model( currentSite, bc_in) - use FatesInterfaceTypesMod, only : hlm_spitfire_mode + type(ed_site_type) , intent(inout), target :: currentSite type(bc_in_type) , intent(in) :: bc_in @@ -95,7 +96,7 @@ subroutine fire_model( currentSite, bc_in) write(fates_log(),*) 'spitfire_mode', hlm_spitfire_mode endif - if( hlm_spitfire_mode > no_fire )then + if( hlm_spitfire_mode > hlm_sf_nofire_def )then call fire_danger_index(currentSite, bc_in) call wind_effect(currentSite, bc_in) call charecteristics_of_fuel(currentSite) @@ -698,7 +699,7 @@ subroutine area_burnt_intensity ( currentSite, bc_in ) ! Equation 7 from Venevsky et al GCB 2002 (modification of equation 8 in Thonicke et al. 2010) ! FDI 0.1 = low, 0.3 moderate, 0.75 high, and 1 = extreme ignition potential for alpha 0.000337 - if (hlm_spitfire_mode == successful_ignitions) then + if (hlm_spitfire_mode == hlm_sf_successful_ignitions_def) then currentSite%FDI = 1.0_r8 ! READING "SUCCESSFUL IGNITION" DATA ! force ignition potential to be extreme cloud_to_ground_strikes = 1.0_r8 ! cloud_to_ground = 1 = use 100% incoming observed ignitions @@ -709,7 +710,7 @@ subroutine area_burnt_intensity ( currentSite, bc_in ) !NF = number of lighting strikes per day per km2 scaled by cloud to ground strikes iofp = currentSite%oldest_patch%patchno - if (hlm_spitfire_mode == scalar_lightning) then + if (hlm_spitfire_mode == hlm_sf_scalar_lightning_def ) then currentSite%NF = ED_val_nignitions * years_per_day * cloud_to_ground_strikes else ! use external daily lightning ignition data currentSite%NF = bc_in%lightning24(iofp) * cloud_to_ground_strikes @@ -720,7 +721,7 @@ subroutine area_burnt_intensity ( currentSite, bc_in ) ! Calculate anthropogenic ignitions according to Li et al. (2012) ! Add to ignitions by lightning - if (hlm_spitfire_mode == anthro_ignitions) then + if (hlm_spitfire_mode == hlm_sf_anthro_ignitions_def) then ! anthropogenic ignitions (count/km2/day) ! = ignitions/person/month * 6.8 * population_density **0.43 /approximate days per month anthro_ign_count = pot_hmn_ign_counts_alpha * 6.8_r8 * bc_in%pop_density(iofp)**0.43_r8 / 30._r8 diff --git a/main/FatesInterfaceMod.F90 b/main/FatesInterfaceMod.F90 index f67387e1a5..c627d4b602 100644 --- a/main/FatesInterfaceMod.F90 +++ b/main/FatesInterfaceMod.F90 @@ -1000,6 +1000,10 @@ subroutine set_fates_ctrlparms(tag,ival,rval,cval) hlm_use_vertsoilc = unset_int hlm_parteh_mode = unset_int hlm_spitfire_mode = unset_int + hlm_sf_nofire_def = unset_int + hlm_sf_scalar_lightning_def = unset_int + hlm_sf_successful_ignitions_def = unset_int + hlm_sf_anthro_ignitions_def = unset_int hlm_use_planthydro = unset_int hlm_use_lu_harvest = unset_int hlm_num_lu_harvest_cats = unset_int @@ -1222,7 +1226,33 @@ subroutine set_fates_ctrlparms(tag,ival,rval,cval) end if call endrun(msg=errMsg(sourcefile, __LINE__)) end if + if(hlm_sf_nofire_def .eq. unset_int) then + if (fates_global_verbose()) then + write(fates_log(), *) 'definition of no-fire mode unset: hlm_sf_nofire_def, exiting' + end if + call endrun(msg=errMsg(sourcefile, __LINE__)) + end if + if(hlm_sf_scalar_lightning_def .eq. unset_int) then + if (fates_global_verbose()) then + write(fates_log(), *) 'definition of scalar lightning mode unset: hlm_sf_scalltng_def, exiting' + end if + call endrun(msg=errMsg(sourcefile, __LINE__)) + end if + if(hlm_sf_successful_ignitions_def .eq. unset_int) then + if (fates_global_verbose()) then + write(fates_log(), *) 'definition of successful ignition mode unset: hlm_sf_successful, exiting' + end if + call endrun(msg=errMsg(sourcefile, __LINE__)) + end if + if(hlm_sf_anthro_ignitions_def .eq. unset_int) then + if (fates_global_verbose()) then + write(fates_log(), *) 'definition of anthro-ignition mode unset: hlm_sf_anthig_def, exiting' + end if + call endrun(msg=errMsg(sourcefile, __LINE__)) + end if + + if(hlm_use_fixed_biogeog.eq.unset_int) then if(fates_global_verbose()) then write(fates_log(), *) 'switch for fixed biogeog unset: him_use_fixed_biogeog, exiting' @@ -1320,8 +1350,33 @@ subroutine set_fates_ctrlparms(tag,ival,rval,cval) hlm_spitfire_mode = ival if (fates_global_verbose()) then write(fates_log(),*) 'Transfering hlm_spitfire_mode =',ival,' to FATES' + end if + + case('sf_nofire_def') + hlm_sf_nofire_def = ival + if (fates_global_verbose()) then + write(fates_log(),*) 'Transfering hlm_sf_nofire_def =',ival,' to FATES' + end if + + case('sf_scalar_lightning_def') + hlm_sf_scalar_lightning_def = ival + if (fates_global_verbose()) then + write(fates_log(),*) 'Transfering hlm_sf_scalar_lightning_def =',ival,' to FATES' end if + case('sf_successful_ignitions_def') + hlm_sf_successful_ignitions_def = ival + if (fates_global_verbose()) then + write(fates_log(),*) 'Transfering hlm_sf_successful_ignition_def =',ival,' to FATES' + end if + + case('sf_anthro_ignitions_def') + hlm_sf_anthro_ignitions_def = ival + if (fates_global_verbose()) then + write(fates_log(),*) 'Transfering hlm_sf_anthro_ignition_def =',ival,' to FATES' + end if + + case('use_fixed_biogeog') hlm_use_fixed_biogeog = ival if (fates_global_verbose()) then diff --git a/main/FatesInterfaceTypesMod.F90 b/main/FatesInterfaceTypesMod.F90 index 7146cc2272..547e095fa7 100644 --- a/main/FatesInterfaceTypesMod.F90 +++ b/main/FatesInterfaceTypesMod.F90 @@ -103,6 +103,13 @@ module FatesInterfaceTypesMod ! harvest_rates in dynHarvestMod ! bc_in%hlm_harvest_rates and bc_in%hlm_harvest_catnames + + integer, public :: hlm_sf_nofire_def ! Definition of a no-fire case for hlm_spitfire_mode + integer, public :: hlm_sf_scalar_lightning_def ! Definition of a scalar-lightning case for hlm_spitfire_mode + integer, public :: hlm_sf_successful_ignitions_def ! Definition of a successful-ignition dataset case for hlm_spitfire_mode + integer, public :: hlm_sf_anthro_ignitions_def ! Definition of an anthropogenic-ignition dataset case for hlm_spitfire_mode + + integer, public :: hlm_use_logging ! This flag signals whether or not to use ! the logging module ! If hlm_use_lu_harvest is zero,