Skip to content

Update to XML file structure used for patching parameter files via "BatchPatchParams.py"#916

Merged
glemieux merged 7 commits into
NGEET:masterfrom
rgknox:update_batchpatch
Oct 31, 2022
Merged

Update to XML file structure used for patching parameter files via "BatchPatchParams.py"#916
glemieux merged 7 commits into
NGEET:masterfrom
rgknox:update_batchpatch

Conversation

@rgknox

@rgknox rgknox commented Oct 6, 2022

Copy link
Copy Markdown
Contributor

Description:

This set of changes updates the format of the the parameter file patching system. The key change is that the xml patch files now have a new specifier that flags which PFTs should be changed. In the old system, it was assumed that the user had to write in all of the parameters for all PFTs that should be used, instead of just the ones that are of interest.

To be clear, this refers to the use of the routine tools/BatchPatchParams.py and the XML files that work with it.

The file parameter_files/patch_default_bciopt224.xml is updated and can still be used a a template for other users.

Old format:

<all>
  <notes> This is a note. </notes>
  <base_file> input_filename.cdl </base_file>
  <new_file> output_filename.cdl </new_file>
  <pft_list> 1,2,3 </pft_list>
  <parameters>
      <fates_pft_param_x>  999, 888, 777 </fates_pft_param_x>
      <fates_param_y>  999 </fates_param_y>
  </parameters>
</all>

New Format:

<all>
  <notes> This is a note. </notes>
  <base_file> input_filename.cdl </base_file>
  <new_file> output_filename.cdl </new_file>
  <pft_trim_list> 1,2,3 </pft_trim_list>
  <parameters>
    <pft_group ids="1">
      <fates_pft_param_x>  999 </fates_pft_param_x>
   </pft_group>
    <pft_group ids="2">
      <fates_pft_param_x>  888 </fates_pft_param_x>
   </pft_group>
    <pft_group ids="3">
      <fates_pft_param_x>  777 </fates_pft_param_x>
   </pft_group>
   <non_pft_group>
      <fates_param_y>  999 </fates_param_y>
   </non_pft_group>
  </parameters>
</all>

Collaborators:

@jenniferholm

Expectation of Answer Changes:

none

Checklist:

  • My change requires a change to the documentation.
  • I have updated the in-code documentation .AND. (the technical note .OR. the wiki) accordingly.
  • I have read the CONTRIBUTING document.
  • FATES PASS/FAIL regression tests were run
  • If answers were expected to change, evaluation was performed and provided

Test Results:

CTSM (or) E3SM (specify which) test hash-tag:

CTSM (or) E3SM (specify which) baseline hash-tag:

FATES baseline hash-tag:

Test Output:

@glemieux glemieux added the type: tools This PR adds or updates support tools. No regression testing necessary. label Oct 11, 2022
@rgknox rgknox mentioned this pull request Oct 17, 2022
5 tasks
Comment thread tools/BatchPatchParams.py
new_cdl = xmlroot.find('new_file').text

pftparams = xmlroot.find('pft_list').text.replace(" ","")
pftparams = xmlroot.find('pft_trim_list').text.replace(" ","")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Out of curiosity, what made you decide to change this variable name?

@glemieux glemieux merged commit 8ef6a1e into NGEET:master Oct 31, 2022
@rgknox rgknox deleted the update_batchpatch branch October 31, 2023 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: tools This PR adds or updates support tools. No regression testing necessary.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants