NOAA-GFDL / MDTF-diagnostics

Analysis framework and collection of process-oriented diagnostics for weather and climate simulations
https://mdtf-diagnostics.readthedocs.io/en/main/
Other
64 stars 100 forks source link

finish refactor of ppParser object #574

Closed jtmims closed 5 months ago

jtmims commented 6 months ago

Before the update, the MDTF was grabbing necessary information from a set filename template (i.e): self.filename_template = ('{realm}.{time_range}.{variable_id}.{frequency}.nc' )

In an update, I converted this function into a base class (ppParserBase) that can be spun out depending on what DRS the user is using (i.e. ppParserGFDL) . Currently, the MDTF is acting in the former manner as it is implemented with the line: entries = [e.cat_entry for e in list(map(util.catalog.ppParser['ppParser' + 'GFDL'], file_list))]

A final form of the refactor needs to be decided with templates for the varying DRS's. In the best case, this type of filename parsing might be able to be bypassed entirely. For example, the following might be needed to be included in the .jsonc file passed to the MDTF by the command-line: "filename_template" : "{realm}.{time_range}.{variable_id}.{frequency}.nc"

jtmims commented 5 months ago

Issues was fixed in #587