Skip to content

Add packages for hydrometeors in the init_atmosphere core#1467

Draft
mgduda wants to merge 2 commits into
MPAS-Dev:developfrom
mgduda:init_atmosphere/hydrometeor_packages
Draft

Add packages for hydrometeors in the init_atmosphere core#1467
mgduda wants to merge 2 commits into
MPAS-Dev:developfrom
mgduda:init_atmosphere/hydrometeor_packages

Conversation

@mgduda
Copy link
Copy Markdown
Contributor

@mgduda mgduda commented Jun 5, 2026

This PR 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.

mgduda added 2 commits June 4, 2026 18:10
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant