ACCESS-NRI / amami

Apache License 2.0
0 stars 0 forks source link

Expected usage types? #16

Open truth-quark opened 5 months ago

truth-quark commented 5 months ago

Is there any indication around all of the methods amami is going to be used in practice?

  1. Run from the command line (manually & in scripts)
  2. Called as a library API?

Option #2 seems plausible if um2nc is called from a workflow tool or other code.

atteggiani commented 5 months ago

amami is supposed to be used only as a CLI program (manually and within scripts), not as a Python API.

truth-quark commented 5 months ago

amami is supposed to be used only as a CLI program (manually and within scripts), not as a Python API.

Is there a particular reason for this?

What if someone wants to integrate um2nc functionality into a workflow manager like airflow or luigi?

atteggiani commented 5 months ago

What if someone wants to integrate um2nc functionality into a workflow manager like airflow or luigi?

I am not familiar with airflow or luigi workflow managers.

In any case, the purpose of amami is to allow users to perform some defined tasks (such as converting a UM fieldsfile in netCDF with the um2nc subcommand) that are useful (and not necessarily straightforward) within the climate community.

amami uses some Python APIs to manipulate data internally (mainly xarray, iris and mule). If users want to perform more specific or complex tasks, they can use these APIs directly with their own scripts (potentially using any wokflow manager if they want).

For the moment I don't think we should support usage as an API. Then, in the future, if there is request for such a feature, we will implement it.