This repository has been archived by the owner on Aug 29, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
Reasons for CLI
Marco Zühlke edited this page Aug 30, 2016
·
15 revisions
Every now and the we ask our self the question. Do we (or better: does the user) need a CLI for the CCI Toolbox ? This page should summarize all argument pro and contra a CLI.
ect set aero2007 load name=AEROSOL_ATSR2_ORAC_L3_V3.02_MONTHLY time_range=2007
ect set cloud2007 extract name=CLOUD_L3S_MERGED_PHASE1_V1.0 time_range=2007
ect set cloud2007ga ect.ops.coregister master=aero2007 slave=cloud2007 method=nearest
ect set movie ect.ops.animated_map ds=aero2007,cloud2007ga mode=multiple
ect save movie file=movie.gif
ect set correlation ect.ops.pearson ds1=aero2007_sub ds2=cloud2007_sub mode=grid_map
ect save correlation.map file=grid_correlation.png
ect save correlation.stat file=correlation_statistics.txt
The alternative solution to having a CLI would be to use python for all user interaction. Instead of allowing the user to interact with the CCI Toolbox from the command line he first would have to launch a python (ectpython) REPL to interact with.
ectpython
aero2007 = ect.load(name=AEROSOL_ATSR2_ORAC_L3_V3.02_MONTHLY, time_range=2007)
cloud2007 = ect.load(name=CLOUD_L3S_MERGED_PHASE1_V1.0, time_range=2007)
cloud2007ga = ect.ops.coregister(master=aero2007, slave=cloud2007, method=nearest)
movie = ect.ops.animated_map(ds=[aero2007,cloud2007ga], mode=multiple)
ect.save(movie,file=movie.gif)
correlation = ect.ops.pearson(ds1=aero2007_sub, ds2=cloud2007_sub, mode=grid_map)
ect.save(correlation.map, file=grid_correlation.png)
ect.save(correlation.stat, file=correlation_statistics.txt)