Problem with num_urban_layers in BEP+BEM WRFv3.6.1

Topics related to current and future physics in the WRF as well as any problems you may have.

Problem with num_urban_layers in BEP+BEM WRFv3.6.1

Postby bergOpolis » Wed Jun 03, 2015 5:59 am

Greetings,

I am trying to execute a run with the sf_urban_physics = 3 (i.e. BEP+BEM).
I am getting the following error:

Code: Select all
num_urban_layers too small, please increase to at least         5400


This seems like an incredibly large number, especially given that the trigger for this, in module_sf_bep.F, is:

Code: Select all
if(num_urban_layers.lt.nz_um*ndm*nwr_u)then
        write(*,*)'num_urban_layers too small, please increase to at least ', nz_um*ndm*nwr_u
        stop
      endif


and nz_um, ndm, and nwr_u are set as :
Code: Select all
! -----------------------------------------------------------------------
!  Dimension for the array used in the BEP module
! -----------------------------------------------------------------------

      integer ndm             ! Maximum number of street directions
      parameter (ndm=2)

      integer nz_um           ! Maximum number of vertical levels in the urban grid
      parameter(nz_um=18)

      integer nwr_u            ! Number of grid levels in the walls or roofs
      parameter (nwr_u=10)


In short, it appears that the product of nz_um*ndm*nwr_u should always be 360. Why is telling me to set the value to at least 5400? This seems very large. Of course, why use the "variables" at all if they are always the same value?

FWIW, I'm not extremely familiar with Fortran, but I thought once set, parameters don't change. Are these values (nz_um,ndm,nwr_u) being overridden somewhere or taken from some other source?
bergOpolis
 
Posts: 8
Joined: Fri Apr 11, 2014 5:46 am

Re: Problem with num_urban_layers in BEP+BEM WRFv3.6.1

Postby bergOpolis » Wed Jun 03, 2015 6:12 am

Ok. For starters I was looking in the wrong physics module. The quoted code above was from module_sf_bep.F.

In module_sf_bep_bem.F there are additional conditions:

Code: Select all
!
!New conditions for BEM
!
      if(num_urban_layers.lt.nbui_max*nz_um)then !limit for indoor temperature and indoor humidity
        write(*,*)'num_urban_layers too small, please increase to at least ', nbui_max*nz_um
        stop
      endif

      if(num_urban_layers.lt.nbui_max*nz_um*ndm)then !limit for window temperature
        write(*,*)'num_urban_layers too small, please increase to at least ', nbui_max*nz_um*ndm
        stop
      endif

      if(num_urban_layers.lt.nbui_max*ndm*ngb_u)then !limit for ground temperature below a building
        write(*,*)'num_urban_layers too small, please increase to at least ', nbui_max*ndm*ngb_u
        stop
      endif

      if(num_urban_layers.lt.(nz_um-1)*nbui_max*ndm*nf_u)then !limit for floor temperature
        write(*,*)'num_urban_layers too small, please increase to at least ', nbui_max*ndm*nf_u*(nz_um-1),num_urban_layers
        stop
      endif

      if (ndm.ne.2)then
         write(*,*) 'number of directions is not correct',ndm
         stop
      endif


I'm not sure which is dictating the 5400 layers yet, but I'll dig a little deeper.
bergOpolis
 
Posts: 8
Joined: Fri Apr 11, 2014 5:46 am

Re: Problem with num_urban_layers in BEP+BEM WRFv3.6.1

Postby alainaketh » Mon Jul 02, 2018 11:19 pm

Hello,

I ran into the same problem using V4.0 (released 8th June 2018). After reading bits here and there, I came across a post on this forum in which the following line was added to &physics:

num_urban_layers = 5400

Just like the error suggests to do. I'm not really sure how costly the simulation will be with this number of layers, but it solved the problem for me and it's running now.

Also, if you're looking for more sophisticated ways to modify the WRF configuration to include some urban datasets, have a look at this.

Hope this helps.
Hydrology Researcher, University of Bristol
alainaketh
 
Posts: 34
Joined: Fri Jun 26, 2015 12:30 pm


Return to Physics

Who is online

Users browsing this forum: No registered users and 3 guests