Skip to content

smooth_cg_topo=T requires soil elevation data#1580

Merged
davegill merged 6 commits intowrf-model:release-v4.3.2from
davegill:smooth_topo
Nov 29, 2021
Merged

smooth_cg_topo=T requires soil elevation data#1580
davegill merged 6 commits intowrf-model:release-v4.3.2from
davegill:smooth_topo

Conversation

@davegill
Copy link
Contributor

@davegill davegill commented Nov 5, 2021

TYPE: bug fix

KEYWORDS: ERA5, smooth_cg_topo, elevation data

SOURCE: internal

DESCRIPTION OF CHANGES:
Problem:
If a user does not include all of the correct ERA5 invariant files, then there could be
no soil elevation field coming from the metgrid program. Without that field, the flag
flag_soilhgt is not set. Then the real program will not generate any topo differences along
the lateral boundary (when requested with smooth_cg_topo = T). This is a quiet failure,
and difficult to track down.

Solution:
If the user asks to smooth the lateral boundary topo on d01, AND the user has no input
soil elevation data from the first-guess model, then this is now a fatal error.

LIST OF MODIFIED FILES:
modified: dyn_em/module_initialize_real.F

TESTS CONDUCTED:

  1. The original intent of the option still works - smoothed topo on d01 along the outer few rows and columns.
    The first figure shows the change in topography. The second figure below shows which grid cells are
    impacted. Basically, these two figures show that topography smoothing still is available.

Screen Shot 2021-11-05 at 11 27 03 AM

Screen Shot 2021-11-05 at 11 45 57 AM

  1. By artificially setting the metgrid flags in a debugging mode within the real program, we can successfully
    emulate missing soil elevation data by setting flag_soilhgt = 0. Whether or not we artificially set the value,
    there is now a controlled stop to the real program.
-------------- FATAL CALLED ---------------
FATAL CALLED FROM FILE:  <stdin>  LINE:     766
 --- ERROR: NML option smooth_cg_topo=T, but no first guess soil elevation data
-------------------------------------------
  1. All jenkins tests are PASS.

RELEASE NOTE: A fatal error in the real program is now issued when a user requests lateral boundary topography smoothing, but lacks the first-guess soil elevation data to do the weighted averaging of topography. Previously, this discrepancy was ignored, and the d01 high-resolution elevation data was quietly left undisturbed.

TYPE: bug fix

KEYWORDS: ERA5, smooth_cg_topo, elevation data

SOURCE: internal

DESCRIPTION OF CHANGES:
Problem:
If a user does not include all of the correct ERA5 invariant files, then there could be
no soil elevation field coming from the metgrid program. Without that field, the flag
`flag_soilhgt` is not set. The real program will not generate any topo differences along
the lateral boundary (when requested with smooth_cg_topo = T). This is a quite failure,
and dificult to track down.

Solution:
If the user asks to smooth the lateral boundary topo on d01, AND the user has no input
soil elevation data from the first-guess model, then this is now a fatal error.

LIST OF MODIFIED FILES:
modified:   dyn_em/module_initialize_real.F

TESTS CONDUCTED:
1. With artificial settings of the metgrid flags, we can successfully emulate missing
soil elevation data. There is a controlled stop to the real program.
2. All jenkins tests are PASS.

RELEASE NOTE: A fatal error in the real program is now issued when a user requests lateral boundary topography smoothing, but lacks the first-guess soil elevation data to do the weighted averaging of topography. Previously, this discrepancy was ignored, and the d01 high-resolution elevation data was quietly left undisturbed.
@davegill
Copy link
Contributor Author

davegill commented Nov 5, 2021

jenkins is OK

Please find result of the WRF regression test cases in the attachment. This build is for Commit ID: fdb4bd3dd5056f9ebca85138afb7e66ba6e71c40, requested by: davegill for PR: https://github.com/wrf-model/WRF/pull/1580. For any query please send e-mail to David Gill.

    Test Type              | Expected  | Received |  Failed
    = = = = = = = = = = = = = = = = = = = = = = = =  = = = =
    Number of Tests        : 19           17
    Number of Builds       : 48           45
    Number of Simulations  : 160           155        0
    Number of Comparisons  : 101           100        0

    Failed Simulations are: 
    None
    Which comparisons are not bit-for-bit: 
    None

@davegill
Copy link
Contributor Author

davegill commented Nov 5, 2021

@dudhia
Jimy,
This mod would have fixed Andrew's ERA5 troubles.

@dudhia
Copy link
Collaborator

dudhia commented Nov 5, 2021 via email

@davegill
Copy link
Contributor Author

davegill commented Nov 6, 2021

@dudhia
Jimy,
Correct.
For a real.exe run with any number of domains, the option is to blend the first-guess topo to the outer-most rows and column of d01 with the high-res topo (from geogrid)

@davegill davegill changed the title User option smooth_cg_topo=T requires soil elevation data smooth_cg_topo=T requires soil elevation data Nov 7, 2021
@davegill
Copy link
Contributor Author

davegill commented Nov 8, 2021

@kkeene44
Kelly,
No good deed goes unpunished. Here is the PR related to the topo smoothing.

  1. Any suggestions for the user message
  2. A review would be appreciated

@weiwangncar
Copy link
Collaborator

@davegill Here is a suggestion: How about 'but found no (incoming?) terrain field from driving data in metgrid files (field name SOILHGT)'? I'm trying to use words that may 'click' with users...

@weiwangncar
Copy link
Collaborator

@kkeene44 Is there a place on our web or UG that we can add a note about invariant fields for dataset like ERA5?

@kkeene44
Copy link
Collaborator

kkeene44 commented Nov 8, 2021

@weiwangncar Yes, I can add something at least in the UG. I already have an FAQ about it on the forum, and our website points to the FAQs, but not everyone looks there.

Copy link
Collaborator

@smileMchen smileMchen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am OK with this PR.

@davegill
Copy link
Contributor Author

@kkeene44
Kelly,
I have addressed (I think) your suggestions for the the user facing messages. Would you please review this PR.

@davegill davegill merged commit eeb3f2b into wrf-model:release-v4.3.2 Nov 29, 2021
vlakshmanan-scala pushed a commit to scala-computing/WRF that referenced this pull request Apr 4, 2024
…1580)

TYPE: bug fix

KEYWORDS: ERA5, smooth_cg_topo, elevation data

SOURCE: internal

DESCRIPTION OF CHANGES:
Problem:
If a user does not include all of the correct ERA5 invariant files, then there could be
no soil elevation field coming from the metgrid program. Without that field, the flag
`flag_soilhgt` is not set. Then the real program will not generate any topo differences along
the lateral boundary (when requested with smooth_cg_topo = T). This is a quiet failure,
and difficult to track down.

Solution:
If the user asks to smooth the lateral boundary topo on d01, AND the user has no input
soil elevation data from the first-guess model, then this is now a fatal error.

LIST OF MODIFIED FILES:
modified:   dyn_em/module_initialize_real.F

TESTS CONDUCTED:
1. The original intent of the option still works - smoothed topo on d01 along the outer few rows and columns.
The first figure shows the change in topography. The second figure below shows which grid cells are
impacted. Basically, these two figures show that topography smoothing still is available.
<img width="1296" alt="Screen Shot 2021-11-05 at 11 27 03 AM" src="https://user-images.githubusercontent.com/12666234/140584624-40a71752-d718-44d3-8c3a-05f6fd710ee1.png">

<img width="1295" alt="Screen Shot 2021-11-05 at 11 45 57 AM" src="https://user-images.githubusercontent.com/12666234/140584653-f3546331-1c95-4ea3-a324-5f3a6e0cb3ee.png">

2. By artificially setting the metgrid flags in a debugging mode within the real program, we can successfully 
emulate missing soil elevation data by setting flag_soilhgt = 0. Whether or not we artificially set the value,
there is now a controlled stop to the real program.
```
-------------- FATAL CALLED ---------------
FATAL CALLED FROM FILE:  <stdin>  LINE:     766
 --- ERROR: NML option smooth_cg_topo=T, but no first guess soil elevation data
-------------------------------------------
```
3. All jenkins tests are PASS.

RELEASE NOTE: A fatal error in the real program is now issued when a user requests lateral boundary topography smoothing, but lacks the first-guess soil elevation data to do the weighted averaging of topography. Previously, this discrepancy was ignored, and the d01 high-resolution elevation data was quietly left undisturbed. We have seen this problem when a user chooses to initialize the model with ERA5 data, but when insufficient time invariant files are used.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants