I am attempting simulate thunderstorm interactions with simplistic terrain in the wrf-fire simple_hill idealized framework.

What I would like to do is simply manipulate the slope % of the simple hill (i.e. run simulations with 45% grade, 75%, etc....) however I am struggling with how to go about doing this...

When I look at the module_initialization_fire.F code I see these lines where gradient is being calculated:

! compute the terrain gradient by differencing

do j=jfts,jfte

do i=ifts,ifte

**grid%dzdxf(i,j) = (grid%zsf(i+1,j)-grid%zsf(i-1,j))/(2.*fdx)**

grid%dzdyf(i,j) = (grid%zsf(i,j+1)-grid%zsf(i,j-1))/(2.*fdy)

grid%dzdyf(i,j) = (grid%zsf(i,j+1)-grid%zsf(i,j-1))/(2.*fdy)

enddo

enddo

have_fire_grad=.true.

endif ! have_fire_grad

So it appears the developers use a finite differencing technique to calculate the gradient in the x and y directions...

But the actual gradient calculation appears to happen further down:

mtn_max = 0.

grad_max =0.

DO j=jfts,jfte

DO i=ifts,ifte

mtn_max = max(mtn_max, grid%zsf(i,j))

**grad_max = max( grad_max, sqrt(grid%dzdxf(i,j)**2+grid%dzdyf(i,j)**2))**

ENDDO

ENDDO

write(6, *)' Max terrain height on the fire mesh ',mtn_max

write(6, *)' Max terrain gradient on the fire mesh ',grad_max

I've attempted to manipulate both of these set of lines in a variety of ways but it doesn't change the slope at all.

Does anyone have a suggestion on how to manipulate these lines for my purposes, or perhaps when the mountain height is created using a COS wave equation:

DO j=jfts,jfte

DO i=ifts,ifte

mtn_x = pi + 2*pi* max(0. , min( (i - mtn_fxs)/(mtn_fxe - mtn_fxs), 1. ))

mtn_y = pi + 2*pi* max(0. , min( (j - mtn_fys)/(mtn_fye - mtn_fys), 1. ))

SELECT CASE(mtn_type)

CASE (1) ! circ/elliptic mountain

**mtn_z = mtn_ht * 0.25 * (1. + COS(mtn_x))*(1. + COS(mtn_y))**

Thanks in advance!