You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add the active attribute to the vars wherever needed in the GFS_typesdef.meta file.
All the vars that are allocated in the GFS_typesdef.F90 based on if conditions were added an extra active attribute, except for phy_fctd.
In GFS_typesdef.F90:
if (Model%nctp > 0 .and. Model%cscnv) then
allocate (Tbd%phy_fctd (IM,Model%nctp))
Tbd%phy_fctd = clear_val
endif
When active = (number_of_cloud_types_CS > 0 .and. flag_for_Chikira_Sugiyama_deep_convection)
is added to phy_fctd in GFS_typesdef.meta, error message is 'Exception: Variable number_of_cloud_types_cs used in conditional for cloud_base_mass_flux not known to host model
Further inspection reveals that this is related to the upper case used in the active attribute. Somehow items = FORTRAN_CONDITIONAL_REGEX.findall(var.active.lower()) in the mkstatic.py only returns lower case strings. I have tried items = FORTRAN_CONDITIONAL_REGEX.findall(var.active), then print (items), they are still lower case string.
Currently, the active attribute needed for phy_fctd is not included yet.
Testing
All 57 regression tests passed on Hera using the intel compiler with the current updated GFS_typesdef.meta file
@XiaSun-NOAA Thanks for this PR. You will need to create a similar draft PR from within the FV3 subdirectory (i.e. for the fv3atm repository with the actual changes). Assuming you call the branch in fv3atm same as here, gfsmeta, you will need to update the ufs-weather-model .gitmodules file so that the fv3atm url points to your fork and the branch is gfsmeta.
Thanks, this looks great. I'll take a look at the changes in GFS_typedefs.F90 as soon as I can and let you know. I should be able to help you solve the problem you mentioned in the description.
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
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.
Description
Add the active attribute to the vars wherever needed in the GFS_typesdef.meta file.
All the vars that are allocated in the GFS_typesdef.F90 based on
ifconditions were added an extra active attribute, except forphy_fctd.In GFS_typesdef.F90:
When
active = (number_of_cloud_types_CS > 0 .and. flag_for_Chikira_Sugiyama_deep_convection)is added to
phy_fctdin GFS_typesdef.meta, error message is'Exception: Variable number_of_cloud_types_cs used in conditional for cloud_base_mass_flux not known to host modelFurther inspection reveals that this is related to the upper case used in the active attribute. Somehow items = FORTRAN_CONDITIONAL_REGEX.findall(var.active.lower()) in the mkstatic.py only returns lower case strings. I have tried items = FORTRAN_CONDITIONAL_REGEX.findall(var.active), then print (items), they are still lower case string.
Currently, the active attribute needed for phy_fctd is not included yet.
Testing
All 57 regression tests passed on Hera using the intel compiler with the current updated GFS_typesdef.meta file
Dependencies
NOAA-EMC/fv3atm#156