NCAR / NCAR/DART

bug: the ncep error module crashes for obs with pressures < 1 mb if debug flags on

Open
#608 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug pmp
Dominant language
Fortran
Stars
263
Forks
182
Avg merge
11d 12h
Merged PRs (30d)
7

Description

🐛 the ncep error module crashes for obs at pressures < 1 mb if debug flags on

Describe the bug
  1. check out the ncep_errors branch
  2. copy over the main branch observations/obs_converters/obs_error/ncep_obs_err_mod.f90
  3. build developer_tests/obs_converters/obs_error/work/obs_ncep_error_test WITH DEBUGGING FLAGS!!
  4. with the original ncep obs_error_mod.f90 it crashes when the pressure is < 1.0 when taking log(0)
  5. check out the ncep_obs_err_mod.f90 from this branch
  6. with the fixed ncep_obs_err_mod it doesn't crash
Error Message

it crashes when taking the log of 0 if debugging flags are on. it silently computes log(0) == 0 with the optimized flags which is why this probably hasn't been caught before. that happens to return a valid value, so this hasn't been a numerical problem. but if you turn on debugging flags to debug something else, you crash here instead.

Version of DART

the bug is on the main branch (and all others)

Have you modified the DART code?

Yes, the fixes are on the ncep_errors branch

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with observations/obs_converters/obs_error/ncep_obs_err_mod.f90 and compare it with the version on the ncep_errors branch. Build developer_tests/obs_converters/obs_error/work/obs_ncep_error_test with debugging flags and reproduce the case using observation pressures below 1 mb. Done means the test no longer crashes in that case.

Written by the indexing model from the issue text.

Assessment

Tech stack
fortran
Domain
data
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.