-
Notifications
You must be signed in to change notification settings - Fork 791
Description
Describe the bug
A fire ignited from an input perimeter uses a "polygon" imprinted in the variable LFN_HIST in wrfinput_d0* to start the fire. This is different from a point or line ignition when the fire starts from a single grid point, or a line that are configured on the namelist using fire_ignition_start/end_lon/lat. When the namelist option fire_is_real_perimeter is true, it should not require setting ignition points on the namelist, as those are not used for anything.
However, in the current source code, the coordinates for real or ideal runs (i.e. in degrees or meters) are set based on the values of fire_ignition_start_*. If the user deletes these entries from the namelist, or set them to 0, it sets fire_ignition_longlat=0, which leads to the fire grid coordinates in meters.
L1063 of phys/module_fr_fire_driver.F
ideal=config_flags%fire_ignition_start_x1 .ne.0. .or. config_flags%fire_ignition_start_y1 .ne. 0.
real=config_flags%fire_ignition_start_lon1 .ne. 0. .or. config_flags%fire_ignition_start_lat1 .ne. 0.
if(ideal)call message('Using ideal ignition coordinates, m from the lower left domain corner')
if(real)call message('Using real ignition coordinates, longitude and latitude')
if(ideal.and.real)call crash('Only one of the ideal or real coordinates may be given')
fire_ignition_longlat=0 ! default, if no ignition
...
if(fire_ignition_longlat .eq. 0)then
! ideal
! ignition is in m
unit_fxlong=1.
unit_fxlat=1.
! will set fire mesh coordinates to uniform mesh below
To Reproduce
Steps to reproduce the behavior:
set these option on the namelist:
&fire
ifire = 0, 2,
fire_is_real_perim = .false.,.true.,
! fire_ignition_start_lon1 = 0, 0,
! fire_ignition_start_lat1 = 0, 0,
! fire_ignition_end_lon1 = 0, 0,
! fire_ignition_end_lat1 = 0, 0,
Expected behavior
The coordinates for the fire refined grid, fxlong and fxlat, should be geographical coordinates not the distance in meters from a point on the domain
Additional context
This can be fixed with a statement that also tests if fire_is_real_perim is true
real = config_flags%fire_ignition_start_lon1 .ne. 0. .or. &
config_flags%fire_ignition_start_lat1 .ne. 0. .or. &
fire_is_real_perim