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

ccpp_prebuild: Update CCPP metadata for error flag variable and constant one #428

Merged
merged 18 commits into from
Jan 26, 2022

Conversation

climbfuji
Copy link
Collaborator

@climbfuji climbfuji commented Jan 16, 2022

Merge feature/capgen into main and correct standard name and unit of CCPP metadata for error flag variable in the prebuild scripts, as well as the unit of ccpp_constant_one in the prebuild scripts.

Merging feature/capgen into main removes a workaround in the capgen metadata parser (parse checker) that was used in main only. Without the workaround, a mismatch of the unit of ccpp_constant_one is now an error.

Also: capgen.py uses ccpp_error_code with unit 1 instead of ccpp_error_flag with unit flag. This PR changes the ccpp_prebuild.py side to follow what capgen is doing.

User interface changes?: No (for the ccpp-framework side), yes for existing schemes in NCAR ccpp-physics main. Need to update standard name and unit of the CCPP error flag variable

Fixes #397.

Testing:
test removed: none
unit/system tests: capgen tests (tests/run_test.sh) pass
regression testing: see ufs-community/ufs-weather-model#1013

Associated PRs:

#428
NCAR/ccpp-physics#828
NOAA-EMC/fv3atm#467
ufs-community/ufs-weather-model#1013

climbfuji and others added 14 commits November 6, 2021 19:57
…pgen_20211105

Merge main into feature capgen 2021/11/05
…ntains

Do not require label on end subroutine statement
…ines_contains

Fix capgen Fortran parser to recognize nested subroutines/functions
…_main_20220109

Update feature/capgen from main 2022/01/09
…_update

feature/capgen: ccpp_error_message unit update
…build scripts, correct unit for ccpp_constant_one in ccpp_prebuild scripts
Copy link
Collaborator

@gold2718 gold2718 left a comment

Choose a reason for hiding this comment

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

Looks good including a couple of items that need to be ported back to feature/capgen (I think).

Comment on lines +52 to +55
'ccpp_error_code' : Var(local_name = 'ierr',
standard_name = 'ccpp_error_code',
long_name = 'error code for error handling in CCPP',
units = '1',
Copy link
Collaborator

Choose a reason for hiding this comment

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

This needs to get back to feature/capgen, right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, that's right. Next formal update of feature/capgen from main. This is the prebuild side of things, not used by capgen.

Comment on lines +21 to +24
_API_LOGGING = init_log('metadata_parser')
_DUMMY_RUN_ENV = CCPPFrameworkEnv(_API_LOGGING, ndict={'host_files':'',
'scheme_files':'',
'suites':''})
Copy link
Collaborator

Choose a reason for hiding this comment

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

This can come back to feature/capgen

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Same here, prebuild script. Will come back with the next update of feature/capgen from main.

climbfuji and others added 2 commits January 17, 2022 10:17
…ata_and_subroutine

Add system test for doxygen comments between metadata hooks and CCPP entry point (subroutine)
@climbfuji climbfuji merged commit a55457f into NCAR:main Jan 26, 2022
mkavulich added a commit to mkavulich/ccpp-doc that referenced this pull request Mar 9, 2022
@climbfuji climbfuji deleted the ccpp_error_code_in_prebuild branch June 27, 2022 03:01
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.

Update unit of errmsg in metavar.py (and/or metadata_parser.py, ccpp-physics, fv3atm, scm) (4 hours)
3 participants