fre.pp.configure_script_xml module

Primary Usage: fre-bronx-to-canopy -x XML -e EXP -p PLATFORM -t TARGET

The Bronx-to-Canopy XML converter overwrites 3 files: - rose-suite.conf - app/remap-pp-components/rose-app.conf - app/regrid-xy/rose-app.conf

fre.pp.configure_script_xml.chunk_from_legacy(legacy_chunk)

Return ISO8601 duration given Bronx-style chunk

Arguments:
  1. legacy_chunk[str]: The Bronx chunk

fre.pp.configure_script_xml.duration_to_seconds(duration)

Returns the conversion of a chunk duration to seconds

Arguments:
  1. duration[str]: The original chunk duration

fre.pp.configure_script_xml.frelist_xpath(xml, platform, target, experiment, xpath)
Returns filepaths of FRE XML elements that use X-path notation

using Bronx’s ‘frelist’ command via subprocess module

Arguments:
  1. args[str]: Argparse user-input arguments

  2. xpath[str]: X-path (XML) notation required by ‘frelist’

fre.pp.configure_script_xml.freq_from_legacy(legacy_freq)

Return ISO8601 duration given Bronx-style frequencies

Arguments:
  1. legacy_freq[str]: The Bronx frequency

fre.pp.configure_script_xml.main(xml, platform, target, experiment, do_analysis, historydir, refinedir, ppdir, do_refinediag, pp_start, pp_stop, validate, verbose, quiet, dual)

The meat of the converter

Arguments:
  1. args[argparse Namespace]: Arguments given at the command line

Tasks:
  1. Generate key-value pairs for the rose-suite.conf.

  2. Generate content for the regrid-xy app

  3. Generate content for the remap-pp-components app