-
Notifications
You must be signed in to change notification settings - Fork 64
Detect invalid horizontal dimensions (loop variables) in metadata for host and schemes #659
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
Merged
climbfuji
merged 8 commits into
NCAR:develop
from
climbfuji:bugfix/detect_invalid_loop_vars_in_metadata
May 22, 2025
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
b549ee2
In scripts/metadata_table.py: When parsing variables, check that hori…
f9c9f0a
Add tests for detecting invalid horizontal dimensions (loop variables…
6f224af
Clean up debugging code in test/unit_tests/test_metadata_scheme_file.py
f97b966
Fix bad horizontal dimensions in capgen_test/make_ddt.meta, capgen_te…
2e4a4bb
Fix additional invalid horizontal dimensions in sample_files/test_bad…
3b1a4ea
Fix more invalid horizontal dimensions in test_prebuild/test_track_va…
9866591
Fix invalid horizontal dimension in test_prebuild/test_unit_conv/*
436531c
Comment out test for blocked data from ccpp_prebuild tests, no longer…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module mismatch_hdim_mod | ||
|
||
use ccpp_kinds, only: kind_phys | ||
|
||
!> \section arg_table_mismatch_hdim_mod Argument Table | ||
!! \htmlinclude arg_table_mismatch_hdim_mod.html | ||
real(kind_phys) :: ps1 | ||
real(kind_phys), allocatable :: xbox(:,:) | ||
real(kind_phys), allocatable :: switch(:,:) | ||
|
||
end module mismatch_hdim_mod |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
[ccpp-table-properties] | ||
name = mismatch_hdim_mod | ||
type = module | ||
[ccpp-arg-table] | ||
name = mismatch_hdim_mod | ||
type = module | ||
[ ps1 ] | ||
standard_name = play_station | ||
state_variable = true | ||
type = real | kind = kind_phys | ||
units = Pa | ||
dimensions = () | ||
[ xbox ] | ||
standard_name = xbox | ||
state_variable = true | ||
type = real | kind = kind_phys | ||
units = m s-1 | ||
dimensions = (horizontal_loop_extent, vertical_layer_dimension) | ||
[ switch ] | ||
standard_name = nintendo_switch | ||
long_name = Incompatible junk | ||
state_variable = true | ||
type = real | kind = kind_phys | ||
units = m s-1 | ||
dimensions = (horizontal_loop_being:horizontal_loop_end, vertical_layer_dimension) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
! Test parameterization with no vertical level | ||
! | ||
|
||
MODULE mismatch_hdim | ||
|
||
USE ccpp_kinds, ONLY: kind_phys | ||
|
||
IMPLICIT NONE | ||
PRIVATE | ||
|
||
PUBLIC :: mismatch_hdim_init | ||
PUBLIC :: mismatch_hdim_run | ||
|
||
CONTAINS | ||
|
||
!> \section arg_table_mismatch_hdim_run Argument Table | ||
!! \htmlinclude arg_table_mismatch_hdim_run.html | ||
!! | ||
subroutine mismatch_hdim_run(tsfc, errmsg, errflg) | ||
|
||
real(kind_phys), intent(inout) :: tsfc(:) | ||
character(len=512), intent(out) :: errmsg | ||
integer, intent(out) :: errflg | ||
|
||
errmsg = '' | ||
errflg = 0 | ||
|
||
tsfc = tsfc-1.0_kind_phys | ||
|
||
END SUBROUTINE mismatch_hdim_run | ||
|
||
!> \section arg_table_mismatch_hdim_init Argument Table | ||
!! \htmlinclude arg_table_mismatch_hdim_init.html | ||
!! | ||
subroutine mismatch_hdim_init (tsfc, errmsg, errflg) | ||
|
||
real(kind_phys), intent(inout) :: tsfc(:) | ||
character(len=512), intent(out) :: errmsg | ||
integer, intent(out) :: errflg | ||
|
||
tsfc = tsfc+1.0_kind_phys | ||
|
||
errmsg = '' | ||
errflg = 0 | ||
|
||
end subroutine mismatch_hdim_init | ||
|
||
END MODULE mismatch_hdim |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
[ccpp-table-properties] | ||
name = mismatch_hdim | ||
type = scheme | ||
|
||
######################################################################## | ||
[ccpp-arg-table] | ||
name = mismatch_hdim_run | ||
type = scheme | ||
[ tsfc ] | ||
standard_name = temperature_at_surface | ||
units = K | ||
dimensions = (horizontal_dimension) | ||
type = real | ||
kind = kind_phys | ||
intent = inout | ||
[ errmsg ] | ||
standard_name = ccpp_error_message | ||
long_name = Error message for error handling in CCPP | ||
units = none | ||
dimensions = () | ||
type = character | ||
kind = len=512 | ||
intent = out | ||
[ errflg ] | ||
standard_name = ccpp_error_code | ||
long_name = Error flag for error handling in CCPP | ||
units = 1 | ||
dimensions = () | ||
type = integer | ||
intent = out | ||
[ccpp-arg-table] | ||
name = mismatch_hdim_init | ||
type = scheme | ||
[ tsfc ] | ||
standard_name = temperature_at_surface | ||
units = K | ||
dimensions = (horizontal_loop_extent) | ||
type = real | ||
kind = kind_phys | ||
intent = inout | ||
[ errmsg ] | ||
standard_name = ccpp_error_message | ||
long_name = Error message for error handling in CCPP | ||
units = none | ||
dimensions = () | ||
type = character | ||
kind = len=512 | ||
intent = out | ||
[ errflg ] | ||
standard_name = ccpp_error_code | ||
long_name = Error flag for error handling in CCPP | ||
units = 1 | ||
dimensions = () | ||
type = integer | ||
intent = out |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.