Skip to content
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

Cleaned up and improved generalization of mpas_isobaric_diagnostics code #1184

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

theweathermanda
Copy link
Contributor

This pull request includes a series of modifications that clean up the existing isobaric diagnostics interpolation code.

The existing isobaric diagnostics procedure comprises a number of variables at individual, specific pressure levels (e.g., temperature_200hPa) and thus includes a significant amount of hard-coding, making it more tedious for users to modify.

This modified version reduces (but does not eliminate) the need for hard-coding by prescribing a list of isobaric levels to which the variables are commonly interpolated, leading to variables of the form, e.g., temperature_isobaric. These variables are also connected to an isobaric diagnostic variable package and namelist config options (config_isobaric = .true.) to make it easier for users to toggle on their calculations at runtime.

Note: These additions of variable packages and namelist config options for the diagnostics procedures will be also applied in upcoming pull requests that include significant modifications and additions to the existing PV diagnostics package. The modified PV diagnostics package will also include features that extend the modified isobaric diagnostics code included here.

The specific changes included in this pull request are:

  • Adding an isobaric package definition to Registry.xml

  • Adding a config_isobaric namelist option to Registry_diagnostics.xml

  • Connecting the package variables to the namelist config option in a new script, mpas_atm_diagnostics_packages.F, which is called in mpas_atm_core_interface.F

  • Updating Registry_isobaric.xml to remove the existing highly specific variables (e.g., temperature_200hPa) and replacing them with more generalizable variables that include dimensions of multiple isobaric levels (e.g., temperature_isobaric)

  • Updating Registry.xml to reflect these changed variables in the default diagnostics output stream

  • Updating mpas_isobaric_diagnostics.F with code that performs the interpolation of the new generalizable variables and removal of the interpolation of the former specific variables

  • Adding halo groups 'isobaric:pressure_p' and 'isobaric:vorticity' to mpas_atm_halos.F and removing the previous halo field exchanges from mpas_isobaric_diagnostics.F to reflect the new MPAS halo structure

  • Updating mpas_atm_diagnostics_manager.F to include calls to the new halo exchange procedure and configs input arguments to the isobaric subroutine calls

  • Updating mpas_atm_core.F to include the halo exchange input arguments to mpas_atm_diag_compute()

 This commit pertains to a series of modifications that clean up
  to currently existing isobaric diagnostics interpolation. The
  existing diagnostics comprise a number of variables at individual
  pressure levels (e.g., temperature_200hPa) and thus require a significant
  amount of hard-coding.

  This modified version reduces (but does not eliminate) the need for
  hard-coding by prescribing a list of isobaric levels to which the
  variables are commonly interpolated, leading to variables of the form
  e.g., temperature_isobaric. These variables are also connected to a
  diagnostic package and namelist config option (config_isobaric = .true.)
  to make it easier for users to toggle on their calculation at runtime.

  The specific changes include:

  - Adding an isobaric package to Registry.xml

  - Adding the config_isobaric namelist option to Registry_diagnostics.xml

  - Connecting the package variables to the namelist config option in a new script,
    mpas_atm_diagnostics_packages.F, which is called in mpas_atm_core_interface.F

  - Updating Registry_isobaric.xml to remove the highly specific variables and
    replace them with more generalizable variables, such as temperature_isobaric

  - Updating Registry.xml to change the default diagnostics stream variables

  - Updating mpas_isobaric_diagnostics.F with the interpolation of the new
    generalizable variables and removal of the old variables

  - Adding halo groups 'isobaric:pressure_p' and 'isobaric:vorticity' to
    mpas_atm_halos.F and removing the previous halo field exchanges from
    mpas_isobaric_diagnostics.F

  - Updating mpas_atm_diagnostics_manager.F to include the halo exchange
    and config input arguments to the isobaric subroutine calls

  - Updating mpas_atm_core.F to include the halo exchange input arguments
    to mpas_atm_diag_compute()
Added package associations to `mslp` and `meanT_500_300`
Further cleaned up the script by defining subroutines for each interpolation procedure (cell centers on mass levels, vertices on mass levels, and cell centers on w levels) and for the temperature and dewpoint calculations.
Fixed division by 100. for garbage cell. Pressure is already in hPa.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants