Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix for zero pressure for total ozone causing Inf in enkf_obsmod.f90 #625

Closed
jswhit opened this issue Sep 20, 2023 · 1 comment
Closed

Comments

@jswhit
Copy link
Contributor

jswhit commented Sep 20, 2023

Russ discovered this problem and here is a quote from his email

"Jim Jung compiled NOAA-EMC/GSI in debug mode. enkf.x seg faulted. We traced the problem back to the log pressure line shown below from src/enkf/enkf_obsmod.f90

! calculate locations of obs that passed initial screening in cartesian coords.
allocate(obloc(3,nobstot))
allocate(oblnp(nobstot)) ! log(p) at ob locations.
allocate(corrlengthsq(nobstot),lnsigl(nobstot),obtimel(nobstot))
lnsigl=1.e10
do nob=1,nobstot
oblnp(nob) = -log(obpress(nob)) ! distance measured in log(p) units

Total column ozone observations (e.g., omi, ompstc8) have a Reference_Pressure of 0.0 written to the netcdf diagnostic file. -log(0.0) is Infinity.

Looking at src/gsi/setupoz.f90, the 0.0 Reference_Pressure written to the ozone diagnostic file originates from the ozinfo file. This file has a pressure column. 0.000 is specified for total column ozone observations. It's not clear what Reference_Pressure actually means for a total column variable. This may be why we use 0.000 in the ozinfo file."

and my response

"If obs space localization is used ( modelspace_vloc=F) then the reference pressure is used as the ob location in the vertical for localization. If modelspace_vloc=T, I don't think it is used at all. The vertical location of a vertical integral is not a well defined quantity, so it's not clear what it should be set to. I agree it should be reset to a positive value if it's zero though, to avoid generating an infinite value."

RussTreadon-NOAA pushed a commit that referenced this issue Sep 22, 2023
The fix involves setting the pressure to 0.001Pa for ozone obs that have
zero pressure (to avoid Inf when log(p) calculated), and turning off
ob-space vertical localization. Has no effect on current operational
setup which uses model-space vertical localization (modelspace_vloc=T).

---------

Co-authored-by: jswhit2 <[email protected]>
@RussTreadon-NOAA
Copy link
Contributor

PR #626 merged. Closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants