ocean-transport / pleiades_llc_recipes

Examples of analysis of MITgcm LLC simulations of NASA Pleiades supercomputer
MIT License
8 stars 2 forks source link

CLI for exporting data #3

Open rabernat opened 2 years ago

rabernat commented 2 years ago

Let's brainstorm the possible syntax we might want to have in a command line script

Export a single snapshot

$ python -m export_llc --model "llc4320" --variable "THETA" --klevel 0 --timestep 90293 --output-dir /nobackup/dbalwada/llc_export
# > /nobackup/dbalwada/llc_export/llc4320_THETA_k0_t90292.nc

Export a 3D chunk

$ python -m export_llc --model "dyamond" --variable "SALT" --klevel 0-20 --face 4 -i 200-300 -j 400-500 --timestep 90293 --output-dir /nobackup/dbalwada/llc_export
# > /nobackup/dbalwada/llc_export/dyamond_THETA_k0-20_face4_i200-300_j400-500_t90292.nc

Run from singularity.

$ singularity exec python -m export_llc ...

I suggest to use click.