Opened 6 months ago

Last modified 3 months ago

#242 accepted Defect

richardson not working -- bad h

Reported by: daliaga Owned by: pesei
Priority: major Milestone:
Component: FP coding/compilation Version: FLEXPART-WRF
Keywords: richardson bad h Cc:

Description (last modified by pesei)

I'm using FLEXPART-WRF_v3.3.2 with input data obtained from WRF-ARW.
I keep getting the following error:

richardson not working -- bad h = -2.87909937

where the negative h usually varies a bit. After this the programs aborts. I delved into the code and found out that this is due to FLEXPART getting a negative value for the Boundary layer height. How can Flexpart think that h is negative? what can be the source of this problem?

As a workaround, I chose
SFC_OPTION = 1

but then I got

#### FLEXPART MODEL ERROR! SFC_OPTION =           1

I went into the code again and find out that this option aborts the program since SFC_OPTION = 1 is no longer supported:

write(*,*) ' #### Reading from WRF no longer supported.'
write(*,*) ' #### ---------------------------------'

I modified the code so that it will not abort, but im wondering why this option is no longer supported

Attachments (2)

output43519254.txt (49.9 KB) - added by daliaga 6 months ago.
log file
flex_input.txt (8.1 KB) - added by daliaga 6 months ago.
input file

Download all attachments as: .zip

Change History (9)

comment:1 follow-up: Changed 6 months ago by pesei

  • Component changed from FP other to FP coding/compilation
  • Description modified (diff)
  • Owner set to pesei
  • Status changed from new to accepted

Can you please give a few more details? How long into the integration happens this? Which part of the globe? Day or night? Which resolution / nest level? Maybe post your input file.

comment:2 Changed 6 months ago by pesei

See also #222 - might be related.

Changed 6 months ago by daliaga

log file

Changed 6 months ago by daliaga

input file

comment:3 Changed 6 months ago by daliaga

Thank you for the reply. Here I add more details:

  • How long into the integration happens this?

It has happened on multiple runs with the same domain but different times. It can happen at any point on the simulation

  • Which part of the globe?

South America with the center around lat: -17 and lon: -68.

  • Day or night?

I think that it happens mostly during the night but i would need to verify. In the example im uploading, it happened during the night.

  • Which resolution / nest level?

highest resolution is ~1km and lowest ~27km with 4 nested grids

  • Maybe post your input file.

I'm posting the input file along with the log file

Thanks for your time.

comment:4 in reply to: ↑ 1 Changed 4 months ago by daliaga

Replying to pesei:

Can you please give a few more details? How long into the integration happens this? Which part of the globe? Day or night? Which resolution / nest level? Maybe post your input file.

Hi! I was wondering if there is anyways that I can further help with the understanding of this issue. I could provide more info about the runs or try to figure out whats going on ( i would need some advice on what to look for).

Thanks in advance!

comment:5 Changed 3 months ago by harish

I am also having same error using the sample Wrfdata provided on the FLEXPART web-site. Please let me know what more information I can provide to resolve the issue.

comment:6 Changed 3 months ago by daliaga

Hey Harish,
I managed to understand the problem. Its has to do with the WRF input files. Either:

1 - The surface pressure < pressure(zlevel=1)
or
2 - pressure(zlevel=i)<pressure(zlevel=i+1)

The relevant code is in richardson.f90 (where the error is found) and readwind.f90, readwind_nests.f90 (where the parameters are read). If its case 1, then I think u can solve it by uncommenting the following lines in readwind.f90, readwind_nests.f90:

! for the mexico city grid 3 simulation, the surface and
! level 1 pressures are not as consistent as one would like,
! with the problems occuring near the domain boundaries.
! so do the following
! -- calculate surface pressure from lowest level pressure, temp, height
! -- use wrf pressures (pph array) wherever possible
! (avoid using surface pressure and the akz/bkz, akm/bkm)

do j = 0, nymin1
do i = 0, nxmin1

duma = ps(i,j,1,n)
dumdz = 0.5*(zzh(i,j,kbgn+1,n) - zzh(i,j,kbgn,n))
tv = tth(i,j,kbgn,n)*(1.+0.61*qvh(i,j,kbgn,n))
ps(i,j,1,n) = pph(i,j,kbgn,n)*exp( dumdz*ga/(r_air*tv) )

end do
end do

If its case 2 then you could try a hacky solution in richardson.f90 by forcing z>0. e.g.:

if (z<=0) z = 80

cheers

Last edited 3 months ago by daliaga (previous) (diff)

comment:7 Changed 3 months ago by harish

Thank you @daliaga
Your suggestion is very helpful. Indeed the case 2 is the case with me.
Cheers!

Note: See TracTickets for help on using tickets.
hosted by ZAMG