Add packages for hydrometeors in the init_atmosphere core#1467
Draft
mgduda wants to merge 2 commits into
Draft
Conversation
…module This commit adds a new private subroutine, mpas_split_string_new, to the init_atm_core_interface module. The purpose of this subroutine is essentially the same as the mpas_split_string routine in the mpas_string_utils module, but the maximum length of any substring does not need to be assumed in mpas_split_string_new, whereas the mpas_split_string subroutine requires the caller to declare a pointer to an array of strings of a specific length. Eventually, this routine could be migrated to mpas_string_utils and used as a replacement for mpas_split_string.
This commit defines new packages for hydrometeors, one package per hydrometeor, in the init_atmosphere core, and it provides two means of activating these packages. 1) If the new namelist option config_active_hydrometeors is set to 'detect_automatically', packages will be set up by scanning through the fields in the initial intermediate file, with packages being activated only for those hydrometeors that are present in the file. 2) Alternatively, and to avoid the need to scan through all fields in the initial intermediate file, config_active_hydrometeors may be set to to a semicolon-separated list of zero or more hydrometeor names (e.g., 'qc;qr'). Packages for those specified hydrometeors will be active, and the packages for all unspecified hydrometeors will be inactive. A new subroutine, setup_hydrometeor_packages, handles the details of the hydrometeor package setup, and this routine is called from init_atm_setup_packages only if config_init_case is 7 or 9, and if met_stage_out is true.
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.
This PR defines new packages for hydrometeors, one package per hydrometeor, in the
init_atmospherecore, and it provides two means of activating these packages.If the new namelist option
config_active_hydrometeorsis set to'detect_automatically', packages will be set up by scanning through the fields in the initial intermediate file, with packages being activated only for those hydrometeors that are present in the file.Alternatively, and to avoid the need to scan through all fields in the initial intermediate file,
config_active_hydrometeorsmay be set to to a semicolon-separated list of zero or more hydrometeor names (e.g.,'qc;qr'). Packages for those specified hydrometeors will be active, and the packages for all unspecified hydrometeors will be inactive.A new subroutine,
setup_hydrometeor_packages, handles the details of the hydrometeor package setup, and this routine is called frominit_atm_setup_packagesonly ifconfig_init_caseis 7 or 9, and ifmet_stage_outis true.