NCAR / ADF

A unified collection of python scripts used to generate standard plots from CAM outputs.
Creative Commons Attribution 4.0 International
34 stars 29 forks source link

Future upgrades to derived variable calculations #273

Open nusbaume opened 8 months ago

nusbaume commented 8 months ago

New feature type

New infrastructure or infrastructure enhancement

What is this new feature?

There are several improvements that could be made to the current method of calculating derived variables in the ADF that would be worth tackling at some point. These include:

  1. Allowing the full derived variable equation to be included in the variable defaults file. That equation string could then theoretically be parsed to do the actual calculations needed without a user having to add additional python code to the ADF whenever they want to add a new derived variable.

  2. Allow the derived variables to be calculated for each separate time series file set that contains the necessary data (e.g. monthly and daily time series files).

  3. Allow the user to decide if already generated time series files of derived variables should be overwritten.

  4. Generate the new derived variable time series file(s) without producing extra copies of any other time series variables.

  5. Provide correct metadata in the time series file for each new derived variable.

  6. Replace the use of os.system with subprocess.call or a similar subprocess class method.

Any other improvements or ideas related to derived quantities that people have can be added to this issue as well. Please feel free!

Assistance required?

No, I will make a PR when the feature is ready

Extra info

Much of the credit for finding these future improvments belongs to @brianpm, based off his Github post here: https://github.com/NCAR/ADF/pull/240#issuecomment-1867075511