NCAR / NCAR/DART

bug: wrf model_interpolate .or. QTY_SURFACE_ELEVATION

Open
#1,015 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

🐛

Describe the bug
  1. Run model_mod_check interpolate QTY_SURFACE_ELEVATION with a location in m
  2. What was the expected outcome?
    successful interpolation
  3. What actually happened?
    Error code 2
Error Message
 fld 2 is missing F
member     1, ERROR with error code ::            2

Which model(s) are you working with?

wrf

Screenshots

If applicable, add screenshots to help explain your problem.

Start of the if statement:
https://github.com/NCAR/DART/blob/a32ab0341f2f3ec1107e6796c498bf636f33f370/models/wrf/model_mod.f90#L1169

if(is_vertical(location,"LEVEL")) then 
elseif(is_vertical(location,"PRESSURE")) then
elseif(is_vertical(location,"HEIGHT"))
elseif(is_vertical(location,"SURFACE") .or. obs_kind == QTY_SURFACE_ELEVATION) then
elseif(is_vertical(location,"UNDEFINED")) then
endif

This if .or. QTY_SURFACE_ELEVATION will not be entered for level, pressure, height
https://github.com/NCAR/DART/blob/a32ab0341f2f3ec1107e6796c498bf636f33f370/models/wrf/model_mod.f90#L1242

which gives you a failing model_interpolate even though the interpolation has been done for the single level.

Version of DART

Which version of DART are you using?
You can find the version using git describe --tags
v11.19.0-34-g13dec7c94

Have you modified the DART code?

Yes

Build information

Please describe:

  1. intel m
  2. GNU Fortran (MacPorts gcc13 13.3.0_2+stdlib_flag) 13.3.0

I believe this came in https://github.com/NCAR/DART/commit/49c0dd6a8b662967c2b47b07e5c7739a2966b05b#diff-e12d14ed6b47c2ee908ccf4ad30e45a718ebd9e26297e77254a978e8804d7403 same as issue #1013 not setting surf_var

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 models/wrf/model_mod.f90 at the if statement around lines 1169 and 1242, then run model_mod_check interpolate for QTY_SURFACE_ELEVATION with a location in meters. Trace the vertical-location branches and verify that the interpolation completes without error code 2 or the “fld 2 is missing F” message.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.