-
Notifications
You must be signed in to change notification settings - Fork 384
MPAS MUSICA namelist option for MICM configuration #1376
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
base: develop
Are you sure you want to change the base?
Conversation
…ed logging. Registry.xml: Added a MUSICA namelist record gated by MPAS_USE_MUSICA with the `config_micm_file` option so the MICM JSON path can be provided through the standard configuration system. mpas_atm_chemistry.F: Removed the hardcoded `chapman.json`, pull the MICM file path from the configs pool, then propagate errors from `musica_init` via `mpas_log_write` to fail when initialization breaks. mpas_musica.F: Track the species description pointer and log each MICM species name from `state%species_ordering` so users can verify the runtime mapping.
|
|
||
| #ifdef MPAS_USE_MUSICA | ||
| <nml_record name="musica" in_defaults="true"> | ||
| <nml_option name="config_micm_file" type="character" default_value="" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While I agree that we should let the default value be an empty string, should we also add logic in musica_init to not try to initialize MUSICA if config_micm_file is an empty string? Otherwise, would there be another way to not call MUSICA in a particular simulation when MPAS was compiled with MUSICA=true?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Added musica_is_initialized flag (line 32)
- Added early return when config file is empty, with log message (lines 69-75)
- Added logging of the config file path (line 80)
- Set musica_is_initialized = .true. after successful init (line 93)
- Added guard in musica_step (line 114)
- Added guard in musica_finalize (line 137)
2. Added early return when config file is empty, with log message (lines 69-75) 3. Added logging of the config file path (line 80) 4. Set musica_is_initialized = .true. after successful init (line 93) 5. Added guard in musica_step (line 114) 6. Added guard in musica_finalize (line 137)
MICM configuration is now driven by a MUSICA namelist option with added logging.
Registry.xml: Added a MUSICA namelist record gated by MPAS_USE_MUSICA with the
config_micm_fileoption so the MICM JSON path can be provided through the standard configuration system.mpas_atm_chemistry.F: Removed the hardcoded
chapman.json, pull the MICM file path from the configs pool, then propagate errors frommusica_initviampas_log_writeto fail when initialization breaks. mpas_musica.F: Track the species description pointer and log each MICM species name fromstate%species_orderingso users can verify the runtime mapping.