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

Fix instances of unbalanced quotes in init_atmosphere and atmosphere registries #1195

Merged

Conversation

mgduda
Copy link
Contributor

@mgduda mgduda commented Jun 27, 2024

This PR fixes several instances of unbalanced quotes in the init_atmosphere and atmosphere Registy.xml files.

@mgduda mgduda requested a review from gdicker1 June 27, 2024 15:08
@mgduda mgduda requested review from weiwangncar and removed request for gdicker1 June 27, 2024 15:10
Copy link
Collaborator

@gdicker1 gdicker1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are great catches and I'm surprised something didn't break from this before. I think we are losing some emphasis-markers (around ice-friendly and water-friendly), but they also don't fit the terse language we seem to prefer in the Registries. Approved!

@mgduda
Copy link
Contributor Author

mgduda commented Jun 27, 2024

I'll update the commit message and PR description (but no changes to diffs) with a few more details. The registry-generated code is different in ways that I'm testing more carefully. For example, we previously had generated code like this for rnifampten:

      call mpas_add_att(r2Ptr % attLists(1) % attList, 'long_name', 'tendency of ')
      call mpas_add_att(r2Ptr % attLists(1) % attList, 'ice-friendly"', '')
      call mpas_add_att(r2Ptr % attLists(1) % attList, 'aerosol', '')
      call mpas_add_att(r2Ptr % attLists(1) % attList, 'number', '')
      call mpas_add_att(r2Ptr % attLists(1) % attList, 'concentration', '')
      call mpas_add_att(r2Ptr % attLists(1) % attList, 'due', '')
      call mpas_add_att(r2Ptr % attLists(1) % attList, 'to', '')
      call mpas_add_att(r2Ptr % attLists(1) % attList, 'microphysics"', '')

whereas we now get

      call mpas_add_att(r2Ptr % attLists(1) % attList, 'long_name', 'tendency of ice-friendly aerosol number concentration due to &
&microphysics')

The latter is clearly correct while the badly nested quotes led to the former incorrect code.

@mgduda mgduda force-pushed the atmosphere/fix_registry_syntax_errs branch from cd16baf to 6435c15 Compare June 27, 2024 15:49
…egistries

This commit fixes several instances of unbalanced or badly nested quotes in
the init_atmosphere and atmosphere Registry.xml files. These changes result
in different registry-generated code. For example, the generated code for
rnifampten attributes looked like:

      call mpas_add_att(r2Ptr % attLists(1) % attList, 'long_name', 'tendency of ')
      call mpas_add_att(r2Ptr % attLists(1) % attList, 'ice-friendly"', '')
      call mpas_add_att(r2Ptr % attLists(1) % attList, 'aerosol', '')
      call mpas_add_att(r2Ptr % attLists(1) % attList, 'number', '')
      call mpas_add_att(r2Ptr % attLists(1) % attList, 'concentration', '')
      call mpas_add_att(r2Ptr % attLists(1) % attList, 'due', '')
      call mpas_add_att(r2Ptr % attLists(1) % attList, 'to', '')
      call mpas_add_att(r2Ptr % attLists(1) % attList, 'microphysics"', '')

before the changes in this commit, whereas it now looks like:

      call mpas_add_att(r2Ptr % attLists(1) % attList, 'long_name', 'tendency of ice-friendly aerosol number concentration due to &
&microphysics')

The latter is clearly correct while the badly nested quotes led to the former
incorrect code.
@mgduda mgduda force-pushed the atmosphere/fix_registry_syntax_errs branch from 6435c15 to 8263af9 Compare June 27, 2024 17:18
@mgduda
Copy link
Contributor Author

mgduda commented Jun 27, 2024

The last force-push just corrects a typo in the commit message.

mgduda added a commit that referenced this pull request Jun 27, 2024
…0 (PR #1195)

This merge fixes several instances of unbalanced quotes in the init_atmosphere
and atmosphere Registy.xml files.

* atmosphere/fix_registry_syntax_errs:
  Fix instances of unbalanced quotes in init_atmosphere and atmosphere registries
@mgduda mgduda merged commit ff258d0 into MPAS-Dev:release-v8.2.0 Jun 27, 2024
@mgduda mgduda deleted the atmosphere/fix_registry_syntax_errs branch June 27, 2024 17:21
mgduda added a commit that referenced this pull request Jun 27, 2024
…0 (PR #1195)

This merge fixes several instances of unbalanced or badly nested quotes in
the init_atmosphere and atmosphere Registry.xml files. These changes result
in different registry-generated code. For example, the generated code for
rnifampten attributes looked like

      call mpas_add_att(r2Ptr % attLists(1) % attList, 'long_name', 'tendency of ')
      call mpas_add_att(r2Ptr % attLists(1) % attList, 'ice-friendly"', '')
      call mpas_add_att(r2Ptr % attLists(1) % attList, 'aerosol', '')
      call mpas_add_att(r2Ptr % attLists(1) % attList, 'number', '')
      call mpas_add_att(r2Ptr % attLists(1) % attList, 'concentration', '')
      call mpas_add_att(r2Ptr % attLists(1) % attList, 'due', '')
      call mpas_add_att(r2Ptr % attLists(1) % attList, 'to', '')
      call mpas_add_att(r2Ptr % attLists(1) % attList, 'microphysics"', '')

before the changes in this merge, whereas it now looks like

      call mpas_add_att(r2Ptr % attLists(1) % attList, 'long_name', 'tendency of ice-friendly aerosol number concentration due to &
&microphysics')

The new generated code is correct, while the previously generated code was
clearly incorrect.

* atmosphere/fix_registry_syntax_errs:
  Fix instances of incorrect quotes in init_atmosphere and atmosphere registries
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.

3 participants