Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

Use case #9 using the CLI

Jānis Gailis edited this page Sep 27, 2016 · 51 revisions

This page describes how use case #9 workflow can be executed using the ECT CLI.
For all CLI commands see CLI command overview.

1. Data product selection

ect ds list -n ozone
ect ds list -n cloud

ect ws init
ect res open cl07 esacci.CLOUD.mon.L3C.CLD_PRODUCTS.MODIS.Terra.MODIS_TERRA.1-0.r1 2007
ect res open oz07 esacci.OZONE.mon.L3.NP.multi-sensor.multi-platform.MERGED.fv0002.r1 2007

The ect res load command automatically downloads the data, if it not already available on the local computer. This process, called syncing, can be invoked manually, too:

ect ds sync esacci.CLOUD.mon.L3C.CLD_PRODUCTS.MODIS.Terra.MODIS_TERRA.1-0.r1 2007
ect ds sync esacci.OZONE.mon.L3.NP.multi-sensor.multi-platform.MERGED.fv0002.r1 2007

To select particular geophysical quantities to work with, use the 'select_var' operation:

ect res set cc_tot ect.ops.select.select_var ds=cl07 var=cc_total
ect res set oz_tot ect.ops.select.select_var ds=oz07 var=O3_du_tot

2. Co-Registration

ect op list --tag geom

will list all commands that have a tag that matches 'geom'.

3.

ect op info ect.ops.coregistration.coregister

will print help and list all parameters of operation ect.ops.coregistration.coregister.

4.

ect res set cl07cr ect.ops.coregistration.coregister ds_master=cc_tot ds_slave=oz_tot

5.

n.a.

6. to 8. Spatial Filtering

according to 2. to 4.

9.

n.a

10. to 12. Temporal Filtering

according to 2. to 4.

13.

n.a.

14. to 17. Time Series Plot

ect op list -t plot
ect op help ect.ops.timeseriesplot

ect run --write tsplot.png ect.ops.timeseriesplot cloud2007ga.aerosol_optical_depth cloud2007.cloud_cover lat=13 lon=42 multiple_datasets=true

An alternative way would be to assign the timeseries plot in a first step to a resource name and plot it in a second step.

ect res set tsplot ect.ops.timeseriesplot ds=aero2007.aerosol_optical_depth,cloud2007ga.cloud_cover lat=13 lon=42 multiple_datasets=true
ect res write tsplot tsplot.png

18. to 22. Product-Moment Correlation (Pearson)

ect op list --tag compare
ect op help ect.ops.pearson
ect run --write pearson.png ect.ops.pearson ds1=aero2007.aerosol_optical_depth ds2=cloud2007ga.cloud_cover

23. to 27. Spatial Filtering

ect op list --tag filter
ect op help ect.ops.spatial_filter
ect res set aero2007_sub ect.ops.spatial_filter ds=aero2007.aerosol_optical_depth region=POLYGON((......))
ect res set cloud2007_sub ect.ops.spatial_filter ds=cloud2007ga.cloud_cover region=POLYGON((......))

28. to 32. Animated Map

ect op list --tag animation
ect op help ect.ops.animated_map
ect run --write animation.gif ect.ops.animated_map ds=aero2007_sub,cloud2007_sub multiple_datasets=true

33. to 37. Product-Moment Correlation (Pearson)

ect run --write correlation_map.png, correlation.txt ect.ops.pearson ds1=aero2007_sub ds2=cloud2007_sub mode=grid_map

Here the alternative pattern would be:

ect res set correlation ect.ops.pearson ds1=aero2007_sub ds2=cloud2007_sub mode=grid_map
ect res write correlation map=correlation_map.png
ect res write correlation stat=correlation_statistics.txt