Opened 5 years ago
Last modified 19 months ago
#242 assigned Defect
richardson not working -- bad h
Reported by: | daliaga | Owned by: | igpis |
---|---|---|---|
Priority: | major | Milestone: | FLEXPART_WRF_3.4_FPbase_9 |
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)
Change History (11)
comment:1 follow-up: ↓ 4 Changed 5 years 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
comment:2 Changed 5 years ago by pesei
See also #222 - might be related.
comment:3 Changed 5 years 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 5 years 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 5 years 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 5 years 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
comment:7 Changed 5 years ago by harish
Thank you @daliaga
Your suggestion is very helpful. Indeed the case 2 is the case with me.
Cheers!
comment:8 Changed 19 months ago by pesei
- Milestone set to FLEXPART_WRF_3.4_FPbase_9
Assigning this to igpis for eventual inclusion in future release
comment:9 Changed 19 months ago by pesei
- Owner changed from pesei to igpis
- Status changed from accepted to assigned
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.