Changing Terrain Height, LU_INDEX and LANDMASK

Topics related to running an idealized case
Post Reply
n1o1o3n
Posts: 28
Joined: Tue Nov 13, 2018 12:48 pm
Location: Japan
Contact:

Changing Terrain Height, LU_INDEX and LANDMASK

Post by n1o1o3n » Sun Sep 29, 2019 5:05 am

Hi,

I am trying to run the WRF idealized case (em_les), using real topo data.

In modification of the code, I successfully input my own terrain height and landuse data, judging from the wrfout.
However I could not find how to change the LANDMASK (I guess it is grid%landx?).

I modified the code to change grid%landx into 1 or 2 depending on the real landmask, but LANDMASK in the wrfout doesn't reflect my change.


Does anyone know the solution?

Thank you in advance.

kwerner
Posts: 2328
Joined: Wed Feb 14, 2018 9:21 pm

Re: Changing Terrain Height, LU_INDEX and LANDMASK

Post by kwerner » Wed Oct 02, 2019 8:56 pm

Hi,

Can you attach the namelist.input file you're using, along with the code you have modified. Please also let me know which version of the code you modified.

Thanks!
NCAR/MMM

n1o1o3n
Posts: 28
Joined: Tue Nov 13, 2018 12:48 pm
Location: Japan
Contact:

Re: Changing Terrain Height, LU_INDEX and LANDMASK

Post by n1o1o3n » Thu Oct 10, 2019 1:27 pm

Dear kwerner,

Thank you for your response.
I am using WRFv4.1.2 and please refer to the attached namelist and modified codes below.

module_initialize_ideal.F

Code: Select all

   CASE (les)

open (567,file="LAND.txt")
    do
       read(567,*,end=556) i,j,grid%ht(i,j),grid%lu_index(i,j),grid%xland(i,j)
    end do
556  close (567)

    mminlu2 = ' '
    mminlu2(1:4) = 'USGS'
    CALL nl_set_mminlu(1, mminlu2)
!    CALL nl_set_mminlu(1, '    ')
    CALL nl_set_iswater(1,16)

Code: Select all

  CASE (les)
!  DO j=jts,jte
!  DO i=its,ite
!    grid%ht(i,j) = 0.
!  ENDDO
!  ENDDO

  xs=ide/2 -3
  xs=ids   -3
  xe=xs + 6
  ys=jde/2 -3
  ye=ys + 6
  mtn_ht = 500
#ifdef MTN
!  DO j=max(ys,jds),min(ye,jde-1)
!  DO i=max(xs,ids),min(xe,ide-1)
!     grid%ht(i,j) = mtn_ht * 0.25 * &
!               ( 1. + COS ( 2*pi/(xe-xs) * ( i-xs ) + pi ) ) * &
!               ( 1. + COS ( 2*pi/(ye-ys) * ( j-ys ) + pi ) )
!  ENDDO
!  ENDDO
!#endif
!#ifdef EW_RIDGE
!  DO j=max(ys,jds),min(ye,jde-1)
!  DO i=ids,ide
!     grid%ht(i,j) = mtn_ht * 0.50 * &
!               ( 1. + COS ( 2*pi/(ye-ys) * ( j-ys ) + pi ) )
!  ENDDO
!  ENDDO
#endif
#ifdef NS_RIDGE
!  DO j=jds,jde
!  DO i=max(xs,ids),min(xe,ide-1)
!     grid%ht(i,j) = mtn_ht * 0.50 * &
!               ( 1. + COS ( 2*pi/(xe-xs) * ( i-xs ) + pi ) )
!  ENDDO
!  ENDDO
#endif
  DO j=jts,jte
  DO i=its,ite
    grid%phb(i,1,j) = g * grid%ht(i,j)
    grid%ph0(i,1,j) = g * grid%ht(i,j)
  ENDDO
  ENDDO

  END SELECT ideal_terrain


Thanks!
Attachments
namelist.input.txt
(5.07 KiB) Downloaded 52 times

kwerner
Posts: 2328
Joined: Wed Feb 14, 2018 9:21 pm

Re: Changing Terrain Height, LU_INDEX and LANDMASK

Post by kwerner » Thu Oct 10, 2019 3:16 pm

Hi,
Thanks for sending those! I would like to simply compare the original module_initialize_real.F file to the modified code. Can you attach the full modified file? That would make it a bit more easy for me.

Thanks!
NCAR/MMM

n1o1o3n
Posts: 28
Joined: Tue Nov 13, 2018 12:48 pm
Location: Japan
Contact:

Re: Changing Terrain Height, LU_INDEX and LANDMASK

Post by n1o1o3n » Fri Oct 11, 2019 11:03 am

Dear kwerner,

As for the modified code, please refer to the attached.

Thank you!
Last edited by n1o1o3n on Sat Oct 19, 2019 7:02 pm, edited 1 time in total.

kwerner
Posts: 2328
Joined: Wed Feb 14, 2018 9:21 pm

Re: Changing Terrain Height, LU_INDEX and LANDMASK

Post by kwerner » Fri Oct 18, 2019 12:31 pm

Thanks! The idealized seabreeze case actually has land data included. I would recommend looking through the module_initialize_ideal.F file at how the code is configured for the seabreeze case, and try to copy that same strategy for les. And yes, it does look like you will need xland. I don't think you have anything soil-related turned on, so you may not need to bother with anything having to do with soil.
NCAR/MMM

n1o1o3n
Posts: 28
Joined: Tue Nov 13, 2018 12:48 pm
Location: Japan
Contact:

Re: Changing Terrain Height, LU_INDEX and LANDMASK

Post by n1o1o3n » Sat Oct 19, 2019 10:02 am

Dear kwerner,

Thank you for your comment!
If my understanding is correct, LANDMASK, SEAMASK, or xland is related to Z0 calculation based on Charnock's equation. So, I would like to input real landmask information into the idealized les simulation. Do you mean that my configuration doesn't calculate Z0 based on landmask information or doesn't take landmask into account for the simulation?
If so, can you please indicate the way to include real land information for, at least, momentum flux calculation?

kwerner
Posts: 2328
Joined: Wed Feb 14, 2018 9:21 pm

Re: Changing Terrain Height, LU_INDEX and LANDMASK

Post by kwerner » Tue Oct 22, 2019 7:38 pm

Hi,
n1o1o3n wrote:
Sat Oct 19, 2019 10:02 am
Do you mean that my configuration doesn't calculate Z0 based on landmask information or doesn't take landmask into account for the simulation?
I'm confused by your question. Perhaps I caused confusion with my previous response. I *think* your question may have stemmed from my comment "And yes, it does look like you will need xland." That was simply a reply to a previous comment you made (back on Sept 28):
"I could not find how to change the LANDMASK (I guess it is grid%landx?)"

So I was saying that yes, it does look like that's probably the variable you need to play around with. Unfortunately we don't have the exact code to do what you're interested in, nor am I aware of anyone who has done it before for the LES case. The closest thing available is the code for the seabreeze case, which does use real land input, in the module_initialize_ideal.F file. The code has several different parts, which then break down into the individual cases. To include LANDMASK, you essentially want to do what was done for the seabreeze case in each of these parts - but you'll put that code into the LES case parts of the code. If you have very specific landmask data you'd like to use, you will need to play around with the code a bit more.
NCAR/MMM

n1o1o3n
Posts: 28
Joined: Tue Nov 13, 2018 12:48 pm
Location: Japan
Contact:

Re: Changing Terrain Height, LU_INDEX and LANDMASK

Post by n1o1o3n » Mon Oct 28, 2019 10:43 am

Hi kwerner,

Apologies for the confusion.

I asked the following question;
"Do you mean that my configuration doesn't calculate Z0 based on landmask information or doesn't take landmask into account for the simulation?"
because I was really interested in your comment;
"I don't think you have anything soil-related turned on"
The reason why I was trying to input xland data was that I wanted to see wind speed offshore, which is affected by Z0 calculated in Charnock equation.
So I thought I needed to input xland data indicating if the grid point is onshore or offshore.


And as for the solution, I cound not find any difference in my wrfout when I used codes for the seabreeze case, although I don't know how to check even if WRF correctly imported xland data by my code.


Best regards

kwerner
Posts: 2328
Joined: Wed Feb 14, 2018 9:21 pm

Re: Changing Terrain Height, LU_INDEX and LANDMASK

Post by kwerner » Thu Oct 31, 2019 9:58 pm

Hi,
I would recommend trying to put some print statements into your code to determine whether the model is using the new part of the code. You can ask it to print out values for particular variables at particular points.
NCAR/MMM

n1o1o3n
Posts: 28
Joined: Tue Nov 13, 2018 12:48 pm
Location: Japan
Contact:

Re: Changing Terrain Height, LU_INDEX and LANDMASK

Post by n1o1o3n » Fri Nov 01, 2019 12:17 am

Hi!

I will try it shortly.
To clarify, is the xland value used for the sfclay scheme, if I successfully import the variable from real terrain into the model?

kwerner
Posts: 2328
Joined: Wed Feb 14, 2018 9:21 pm

Re: Changing Terrain Height, LU_INDEX and LANDMASK

Post by kwerner » Thu Nov 14, 2019 12:25 am

I believe it should be.
NCAR/MMM

Post Reply

Return to “Idealized Cases”