Clean up #ifndef _USE_LEGACY_LAND_ in atm_land_ice_flux_exchange_mod#174
Open
mlee03 wants to merge 9 commits intoNOAA-GFDL:mainfrom
Open
Clean up #ifndef _USE_LEGACY_LAND_ in atm_land_ice_flux_exchange_mod#174mlee03 wants to merge 9 commits intoNOAA-GFDL:mainfrom
mlee03 wants to merge 9 commits intoNOAA-GFDL:mainfrom
Conversation
Member
|
@Hallberg-NOAA this needs to be tested with the ocean tests to make sure the old atmosphere code still works as expected. |
Contributor
|
Replacing "gfortran -E" with "fpp" above seems to give the same output. I see |
Contributor
Author
|
@wfcooke, duly noted. Thank you for the review! I will check the preprocessed files with both GNU and Intel preprocessors, check the SCM code, and amend the PR description afterwards |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Many lines of duplicate codes in
atm_land_ice_flux_exchange_mod, as shown below and linked here, are due to small differences in calls to FMS when the code is compiled with and without the-D_USE_LEGACY_LAND_macro.This PR removes the repetitive code by introducing a new macro defined at the top of the modulefile to be the appropriate subroutine name based on the #ifdef state of _USE_LEGACY_LAND_:
With the above definition, the example body of code changes to a much more understandable code that is easier to maintain:
The code has been hand-checked by comparing the pre-processed files with the below commands: