Introduction
This post presents a processing chain for creating map layouts and export media from the calculations of Vertical Water Balance (VWB) in the previous post.
Prerequisites
You must have completed the VWB processing in the previous post.
Vertical Water Balance
Project module
The project module file (projVWB.py) is available in the Project package projects.
from geoimagine.kartturmain.readXMLprocesses import ReadXMLProcesses, RunProcesses
if __name__ == "__main__":
verbose = True
projFN = '/Volume/and/path/to/VWB_TRMM-vs-FAOrefevap_YYYYMMDD.txt'
projFN ='doc/VWB/VWB_TRMM-vs-FAOrefevap_YYYYMMDD.txt'
projFN ='doc/Layout/VWB_TRMM-vs-FAOrefevap-layout_YYYYMMDD.txt'
procLL = ReadXMLProcesses(projFN,verbose)
RunProcesses(procLL,verbose)
Process Chain
The project file links to an ASCII text file that contains a list of the xml files to execute. The layout and export processes are under the folder Layout.
projFN ='doc/Layout/VWB_TRMM-vs-FAOrefevap-layout_YYYYMMDD.txt'
As the path to the project file does not start with a slash “\”, the path must be relative to the project module itself. The project package available on Karttur’s GitHub page contains the path and the files required for running the process chain.
The project file links to an ASCII text file that contains a list of the xml files to execute. The layout and export processes are under the folder Layout.
{% capture text-capture %}
{% raw %}
```
###################################
###################################
### VWB ###
###################################
###################################
#Uncomment the processes you want to run by removing the "#"
###################################
### Layout ###
###################################
## Create scaling for VWB data ##
#VWB-0001_createscaling.xml
## Create the VWB palettes ##
#VWB-0002_createpalettes.xml
# Create legends for VWB ##
#VWB-0003_createlegends.xml
## Create VWB movieclock ##
#VWB-0004_addmovieclock.xml
## Export legends for VWB ##
VWB-0005_exportlegend.xml
###################################
### Export media ###
###################################
## Export png images ##
#VWB-0900_ExporttoByte_M.xml
#VWB-0910_ExporttoByte_timespanA_1998-2017.xml
## Create TRMM movieframes (1998 to 2017)
## For fully automated processing you need to set parameter "asscript" to False
## If you set the parameter "asscript" to True (= default), you have to execute the shell script file reported by the process ##
#VWB-0950_movieframes_M.xml
## Create movieclock, the process creates two shell scripts that must by run ##
#VWB-0960_movieclock_M.xml
```
Layout
If you want to create color maps/images and animations for presenting the VWB data you must create the required layout (see post on TRMM layout for more details).
Set scaling
Layout exports require scaling the original data to byte (0 - 255) range. Details on the scaling are given in the posts on layout of SMAP and TRMM. The xml on createscaling below calls the scaling definition process createscaling and sets the scaling of both the monthly and annual VWB layers, and all the layers produced as part of the trend analysis.
<?xml version='1.0' encoding='utf-8'?>
<scaling>
<userproj userid = 'karttur' projectid = 'karttur' tractid= 'karttur' siteid = '*' plotid = '*' system = 'system'></userproj>
<!-- Create scaling -->
<!-- VWB monthly -->
<process processid = 'createscaling' version = '1.3'>
<overwrite>True</overwrite>
<parameters power = '0.75' scalefac='0.8' mirror0='True'></parameters>
<comp id = '1' source = "trmm-vwb" product = "3b43" folder = "vwb" band = "trmm-fao-vwb" prefix = "trmm-fao-vwb" suffix = "v7-f-m"></comp>
<comp id = '2' source = "trmm-vwb" product = "3b43" folder = "vwb" band = "trmm-fao-vwb-surplus" prefix = "trmm-fao-vwb-surplus" suffix = "v7-f-m"></comp>
<comp id = '3' source = "trmm-vwb" product = "3b43" folder = "vwb" band = "trmm-fao-vwb-deficit" prefix = "trmm-fao-vwb-deficit" suffix = "v7-f-m"></comp>
</process>
<!-- VWB annual -->
<process processid = 'createscaling' version = '1.3'>
<overwrite>True</overwrite>
<parameters power = '0.75' scalefac='0.15' mirror0='True'></parameters>
<comp id = '1' source = "trmm-vwb" product = "3b43" folder = "vwb-A-stats" band = "avg-trmm-fao-vwb" prefix = "avg-trmm-fao-vwb" suffix = "v7-f-m"></comp>
<comp id = '2' source = "trmm-vwb" product = "3b43" folder = "vwb-A-stats" band = "avg-trmm-fao-vwb-surplus" prefix = "avg-trmm-fao-vwb-surplus" suffix = "v7-f-m-A"></comp>
<comp id = '3' source = "trmm-vwb" product = "3b43" folder = "vwb-A-stats" band = "avg-trmm-fao-vwb-deficit" prefix = "avg-trmm-fao-vwb-deficit" suffix = "v7-f-m-A"></comp>
<comp id = '4' source = "trmm-vwb" product = "3b43" folder = "vwb-A-trend" band = "ols-ic-trmm-fao-vwb" prefix = "ols-ic-trmm-fao-vwb" suffix = "v7-f-m"></comp>
<comp id = '5' source = "trmm-vwb" product = "3b43" folder = "vwb-A-trend" band = "ols-ic-trmm-fao-vwb-surplus" prefix = "ols-ic-trmm-fao-vwb-surplus" suffix = "v7-f-m-A"></comp>
<comp id = '6' source = "trmm-vwb" product = "3b43" folder = "vwb-A-trend" band = "ols-ic-trmm-fao-vwb-deficit" prefix = "ols-ic-trmm-fao-vwb-deficit" suffix = "v7-f-m-A"></comp>
<comp id = '7' source = "trmm-vwb" product = "3b43" folder = "vwb-A-trend" band = "ts-ic-trmm-fao-vwb" prefix = "ts-ic-trmm-fao-vwb" suffix = "v7-f-m"></comp>
<comp id = '8' source = "trmm-vwb" product = "3b43" folder = "vwb-A-trend" band = "ts-ic-trmm-fao-vwb-surplus" prefix = "ts-ic-trmm-fao-vwb-surplus" suffix = "v7-f-m-A"></comp>
<comp id = '9' source = "trmm-vwb" product = "3b43" folder = "vwb-A-trend" band = "ts-ic-trmm-fao-vwb-deficit" prefix = "ts-ic-trmm-fao-vwb-deficit" suffix = "v7-f-m-A"></comp>
</process>
<!-- VWB annual std and rmse -->
<process processid = 'createscaling' version = '1.3'>
<overwrite>True</overwrite>
<parameters power = '0.75' scalefac='0.8' mirror0='True'></parameters>
<comp id = '1' source = "trmm-vwb" product = "3b43" folder = "vwb-A-stats" band = "std-trmm-fao-vwb" prefix = "avg-trmm-fao-vwb" suffix = "v7-f-m"></comp>
<comp id = '2' source = "trmm-vwb" product = "3b43" folder = "vwb-A-stats" band = "std-trmm-fao-vwb-surplus" prefix = "avg-trmm-fao-vwb-surplus" suffix = "v7-f-m-A"></comp>
<comp id = '3' source = "trmm-vwb" product = "3b43" folder = "vwb-A-stats" band = "std-trmm-fao-vwb-deficit" prefix = "avg-trmm-fao-vwb-deficit" suffix = "v7-f-m-A"></comp>
<comp id = '4' source = "trmm-vwb" product = "3b43" folder = "vwb-A-trend" band = "ols-rmse-trmm-fao-vwb" prefix = "avg-trmm-fao-vwb" suffix = "v7-f-m"></comp>
<comp id = '5' source = "trmm-vwb" product = "3b43" folder = "vwb-A-trend" band = "ols-rmse-trmm-fao-vwb-surplus" prefix = "avg-trmm-fao-vwb-surplus" suffix = "v7-f-m-A"></comp>
<comp id = '6' source = "trmm-vwb" product = "3b43" folder = "vwb-A-trend" band = "ols-rmse-trmm-fao-vwb-deficit" prefix = "avg-trmm-fao-vwb-deficit" suffix = "v7-f-m-A"></comp>
</process>
<!-- VWB mannkendall Z-->
<process processid = 'createscaling' version = '1.3'>
<overwrite>True</overwrite>
<parameters scalefac='40' offsetadd='125' ></parameters>
<comp id = '1' source = "trmm-vwb" product = "3b43" folder = "vwb-A-trend" band = "mk-z-trmm-fao-vwb" prefix = "mk-z-trmm-fao-vwb" suffix = "v7-f-A"></comp>
<comp id = '2' source = "trmm-vwb" product = "3b43" folder = "vwb-A-trend" band = "mk-z-trmm-fao-vwb-surplus" prefix = "mk-z-trmm-fao-vwb-surplus" suffix = "v7-f-m-A"></comp>
<comp id = '3' source = "trmm-vwb" product = "3b43" folder = "vwb-A-trend" band = "mk-z-trmm-fao-vwb-deficit" prefix = "mk-z-trmm-fao-vwb-deficit" suffix = "v7-f-m-A"></comp>
</process>
<!-- VWB r2-->
<process processid = 'createscaling' version = '1.3'>
<overwrite>True</overwrite>
<parameters scalefac='100'></parameters>
<comp id = '1' source = "trmm-vwb" product = "3b43" folder = "vwb-A-trend" band = "ols-r2-trmm-fao-vwb" prefix = "ols-r2-trmm-fao-vwb" suffix = "v7-f-A"></comp>
<comp id = '2' source = "trmm-vwb" product = "3b43" folder = "vwb-A-trend" band = "ols-r2-trmm-fao-vwb-surplus" prefix = "ols-r2-trmm-fao-vwb-surplus" suffix = "v7-f-m-A"></comp>
<comp id = '3' source = "trmm-vwb" product = "3b43" folder = "vwb-A-trend" band = "ols-r2-trmm-fao-vwb-deficit" prefix = "ols-r2-trmm-fao-vwb-deficit" suffix = "v7-f-m-A"></comp>
</process>
<!-- VWB slope mm/year-->
<process processid = 'createscaling' version = '1.3'>
<overwrite>True</overwrite>
<parameters mirror0='True' power='0.75' scalefac='2'></parameters>
<comp id = '1' source = "trmm-vwb" product = "3b43" folder = "vwb-A-trend" band = "ts-mdsl-trmm-fao-vwb" prefix = "ts-mdsl-trmm-fao-vwb" suffix = "v7-f-m-A"></comp>
<comp id = '2' source = "trmm-vwb" product = "3b43" folder = "vwb-A-trend" band = "ts-losl-trmm-fao-vwb" prefix = "ts-losl-ttrmm-fao-vwb" suffix = "v7-f-m-A"></comp>
<comp id = '3' source = "trmm-vwb" product = "3b43" folder = "vwb-A-trend" band = "ts-hisl-trmm-fao-vwb" prefix = "ts-hisl-ttrmm-fao-vwb" suffix = "v7-f-m-A"></comp>
<comp id = '4' source = "trmm-vwb" product = "3b43" folder = "vwb-A-trend" band = "ols-sl-trmm-fao-vwb" prefix = "ols-sl-trmm-fao-vwb" suffix = "v7-f-m-A"></comp>
<comp id = '5' source = "trmm-vwb" product = "3b43" folder = "vwb-A-trend" band = "ts-mdsl-trmm-fao-vwb-deficit" prefix = "ts-mdsl-trmm-fao-vwb-deficit" suffix = "v7-f-m-A"></comp>
<comp id = '6' source = "trmm-vwb" product = "3b43" folder = "vwb-A-trend" band = "ts-losl-trmm-fao-vwb-deficit" prefix = "ts-losl-ttrmm-fao-vwb-deficit" suffix = "v7-f-m-A"></comp>
<comp id = '7' source = "trmm-vwb" product = "3b43" folder = "vwb-A-trend" band = "ts-hisl-trmm-fao-vwb-deficit" prefix = "ts-hisl-ttrmm-fao-vwb-deficit" suffix = "v7-f-m-A"></comp>
<comp id = '8' source = "trmm-vwb" product = "3b43" folder = "vwb-A-trend" band = "ols-sl-trmm-fao-vwb-deficit" prefix = "ols-sl-trmm-fao-vwb-deficit" suffix = "v7-f-m-A"></comp>
<comp id = '9' source = "trmm-vwb" product = "3b43" folder = "vwb-A-trend" band = "ts-mdsl-trmm-fao-vwb-surplus" prefix = "ts-mdsl-trmm-fao-vwb-surplus" suffix = "v7-f-m-A"></comp>
<comp id = '10' source = "trmm-vwb" product = "3b43" folder = "vwb-A-trend" band = "ts-losl-trmm-fao-vwb-surplus" prefix = "ts-losl-ttrmm-fao-vwb-surplus" suffix = "v7-f-m-A"></comp>
<comp id = '11' source = "trmm-vwb" product = "3b43" folder = "vwb-A-trend" band = "ts-hisl-trmm-fao-vwb-surplus" prefix = "ts-hisl-ttrmm-fao-vwb-surplus" suffix = "v7-f-m-A"></comp>
<comp id = '12' source = "trmm-vwb" product = "3b43" folder = "vwb-A-trend" band = "ols-sl-trmm-fao-vwb-surplus" prefix = "ols-sl-trmm-fao-vwb-surplus" suffix = "v7-f-m-A"></comp>
</process>
<!-- VWB change -->
<process processid = 'createscaling' version = '1.3'>
<overwrite>True</overwrite>
<parameters power='0.75' scalefac='0.3' mirror0='True'></parameters>
<comp id = '1' source = "trmm-vwb" product = "3b43" folder = "vwb-A-change" band = "trmm-fao-vwb-change" prefix = "trmm-fao-vwb-change" suffix = "model-v7-f-m-A"></comp>
<comp id = '2' source = "trmm-vwb" product = "3b43" folder = "vwb-A-change" band = "trmm-fao-vwb-surplus-change" prefix = "trmm-fao-vwb-surplus-change" suffix = "model-v7-f-m-A"></comp>
<comp id = '3' source = "trmm-vwb" product = "3b43" folder = "vwb-A-change" band = "trmm-fao-vwb-deficit-change" prefix = "trmm-fao-vwb-deficit-change" suffix = "model-v7-f-m-A"></comp>
</process>
<!-- VWB change -->
<process processid = 'createscaling' version = '1.3'>
<overwrite>True</overwrite>
<parameters power='0.75' scalefac='3' mirror0='True'></parameters>
<comp id = '1' source = "trmm" product = "3b43" folder = "vwb-A-change" band = "trmm-fao-vwb-delta" prefix = "trmm-fao-vwb-delta" suffix = "slope@p-v7-f-m-A"></comp>
<comp id = '2' source = "trmm" product = "3b43" folder = "vwb-A-change" band = "trmm-fao-vwb-surplus-delta" prefix = "trmm-fao-vwb-surplus-delta" suffix = "slope@p-v7-f-m-A"></comp>
<comp id = '3' source = "trmm" product = "3b43" folder = "vwb-A-change" band = "trmm-fao-vwb-deficit-delta" prefix = "trmm-fao-vwb-deficit-delta" suffix = "slope@p-v7-f-m-A"></comp>
</process>
</scaling>
Add palette
The VWB palettes below, created with the process addrasterpalette, are Karttur’s default palettes for VWB.
<
<?xml version='1.0' encoding='utf-8'?>
<palette>
<userproj userid = 'karttur' projectid = 'karttur' tractid= 'karttur' siteid = '*' plotid = '*' system = 'system'></userproj>
<!-- addrasterpalette VWB-->
<process processid = 'addrasterpalette'>
<overwrite>Y</overwrite>
<delete>N</delete>
<parameters compid= 'NA' palette = 'vwb'>
<setcolor id = '0' red = '103' green ='0' blue='31' alpha ='0' label='strongly neg' hint='strongly significant negative trend' ></setcolor>
<setcolor id = '25' red = '178' green ='24' blue='43' alpha ='0' label='neg' hint='significant negative' ></setcolor>
<setcolor id = '50' red = '214' green ='96' blue='77' alpha ='0' label='non significant' hint='non significant negative trend' ></setcolor>
<setcolor id = '75' red = '244' green ='165' blue='130' alpha ='0' label='no trend' hint='no trend' ></setcolor>
<setcolor id = '100' red = '253' green ='219' blue='199' alpha ='0' label='non significant' hint='non significant positive trend' ></setcolor>
<setcolor id = '125' red = '224' green ='224' blue='224' alpha ='0' label='max npv' hint='strongly significant positive trend' ></setcolor>
<setcolor id = '150' red = '202' green ='219' blue='253' alpha ='0' label='strongly neg' hint='strongly significant negative trend' ></setcolor>
<setcolor id = '175' red = '146' green ='197' blue='222' alpha ='0' label='neg' hint='significant negative' ></setcolor>
<setcolor id = '200' red = '67' green ='147' blue='195' alpha ='0' label='non significant' hint='non significant negative trend' ></setcolor>
<setcolor id = '225' red = '33' green ='102' blue='173' alpha ='0' label='no trend' hint='no trend' ></setcolor>
<setcolor id = '250' red = '5' green ='48' blue='97' alpha ='0' label='non significant' hint='non significant positive trend' ></setcolor>
<setcolor id = '253' red = '245' green ='237' blue='182' alpha ='0' label='unused' hint='NA' ></setcolor>
<setcolor id = '254' red = '32' green ='32' blue='32' alpha ='255' label='frame' hint='frame' ></setcolor>
<setcolor id = '255' red = '250' green ='250' blue='250' alpha ='255' label='255' hint='no data' ></setcolor>
</parameters>
</process>
<process processid = 'addrasterpalette'>
<overwrite>Y</overwrite>
<delete>N</delete>
<parameters compid= 'NA' palette = 'vwbinvert'>
<setcolor id = '250' red = '103' green ='0' blue='31' alpha ='0' label='strongly neg' hint='strongly significant negative trend' ></setcolor>
<setcolor id = '225' red = '178' green ='24' blue='43' alpha ='0' label='neg' hint='significant negative' ></setcolor>
<setcolor id = '200' red = '214' green ='96' blue='77' alpha ='0' label='non significant' hint='non significant negative trend' ></setcolor>
<setcolor id = '175' red = '244' green ='165' blue='130' alpha ='0' label='no trend' hint='no trend' ></setcolor>
<setcolor id = '150' red = '253' green ='219' blue='199' alpha ='0' label='non significant' hint='non significant positive trend' ></setcolor>
<setcolor id = '125' red = '224' green ='224' blue='224' alpha ='0' label='max npv' hint='strongly significant positive trend' ></setcolor>
<setcolor id = '100' red = '202' green ='219' blue='253' alpha ='0' label='strongly neg' hint='strongly significant negative trend' ></setcolor>
<setcolor id = '75' red = '146' green ='197' blue='222' alpha ='0' label='neg' hint='significant negative' ></setcolor>
<setcolor id = '50' red = '67' green ='147' blue='195' alpha ='0' label='non significant' hint='non significant negative trend' ></setcolor>
<setcolor id = '25' red = '33' green ='102' blue='173' alpha ='0' label='no trend' hint='no trend' ></setcolor>
<setcolor id = '0' red = '5' green ='48' blue='97' alpha ='0' label='non significant' hint='non significant positive trend' ></setcolor>
<setcolor id = '253' red = '245' green ='237' blue='182' alpha ='0' label='unused' hint='NA' ></setcolor>
<setcolor id = '254' red = '32' green ='32' blue='32' alpha ='255' label='frame' hint='frame' ></setcolor>
<setcolor id = '255' red = '250' green ='250' blue='250' alpha ='255' label='255' hint='no data' ></setcolor>
</parameters>
</process>
<process processid = 'addrasterpalette'>
<overwrite>Y</overwrite>
<delete>N</delete>
<parameters compid= 'NA' palette = 'VWBdeficit'>
<setcolor id = '0' red = '224' green ='224' blue='224' alpha ='0' label='max npv' hint='strongly significant positive trend' ></setcolor>
<setcolor id = '50' red = '253' green ='219' blue='199' alpha ='0' label='non significant' hint='non significant positive trend' ></setcolor>
<setcolor id = '100' red = '244' green ='165' blue='130' alpha ='0' label='no trend' hint='no trend' ></setcolor>
<setcolor id = '150' red = '214' green ='96' blue='77' alpha ='0' label='non significant' hint='non significant negative trend' ></setcolor>
<setcolor id = '200' red = '178' green ='24' blue='43' alpha ='0' label='neg' hint='significant negative' ></setcolor>
<setcolor id = '250' red = '103' green ='0' blue='31' alpha ='0' label='strongly neg' hint='strongly significant negative trend' ></setcolor>
<setcolor id = '253' red = '245' green ='237' blue='182' alpha ='0' label='dry (0)' hint='completely dry' ></setcolor>
<setcolor id = '254' red = '32' green ='32' blue='32' alpha ='255' label='frame' hint='frame' ></setcolor>
<setcolor id = '255' red = '0' green ='0' blue='0' alpha ='255' label='255' hint='no data' ></setcolor>
</parameters>
</process>
<process processid = 'addrasterpalette'>
<overwrite>Y</overwrite>
<delete>N</delete>
<parameters compid= 'NA' palette = 'VWBsurplus'>
<setcolor id = '0' red = '224' green ='224' blue='224' alpha ='0' label='max npv' hint='strongly significant positive trend' ></setcolor>
<setcolor id = '50' red = '202' green ='219' blue='253' alpha ='0' label='strongly neg' hint='strongly significant negative trend' ></setcolor>
<setcolor id = '100' red = '146' green ='197' blue='222' alpha ='0' label='neg' hint='significant negative' ></setcolor>
<setcolor id = '150' red = '67' green ='147' blue='195' alpha ='0' label='non significant' hint='non significant negative trend' ></setcolor>
<setcolor id = '200' red = '33' green ='102' blue='173' alpha ='0' label='no trend' hint='no trend' ></setcolor>
<setcolor id = '250' red = '5' green ='48' blue='97' alpha ='0' label='non significant' hint='non significant positive trend' ></setcolor>
<setcolor id = '253' red = '245' green ='237' blue='182' alpha ='0' label='dry (0)' hint='completely dry' ></setcolor>
<setcolor id = '254' red = '32' green ='32' blue='32' alpha ='255' label='frame' hint='frame' ></setcolor>
<setcolor id = '255' red = '0' green ='0' blue='0' alpha ='255' label='255' hint='no data' ></setcolor>
</parameters>
</process>
<process processid = 'addrasterpalette'>
<overwrite>Y</overwrite>
<delete>N</delete>
<parameters compid= 'NA' palette = 'VWBstd'>
<setcolor id = '0' red = '224' green ='224' blue='224' alpha ='0' label='max npv' hint='strongly significant positive trend' ></setcolor>
<setcolor id = '50' red = '202' green ='219' blue='253' alpha ='0' label='strongly neg' hint='strongly significant negative trend' ></setcolor>
<setcolor id = '100' red = '146' green ='197' blue='222' alpha ='0' label='neg' hint='significant negative' ></setcolor>
<setcolor id = '150' red = '67' green ='147' blue='195' alpha ='0' label='non significant' hint='non significant negative trend' ></setcolor>
<setcolor id = '200' red = '33' green ='102' blue='173' alpha ='0' label='no trend' hint='no trend' ></setcolor>
<setcolor id = '250' red = '5' green ='48' blue='97' alpha ='0' label='non significant' hint='non significant positive trend' ></setcolor>
<setcolor id = '253' red = '245' green ='237' blue='182' alpha ='0' label='dry (0)' hint='completely dry' ></setcolor>
<setcolor id = '254' red = '32' green ='32' blue='32' alpha ='255' label='frame' hint='frame' ></setcolor>
<setcolor id = '255' red = '0' green ='0' blue='0' alpha ='255' label='255' hint='no data' ></setcolor>
</parameters>
</process>
</palette>
Create legends
To create legends for use together with maps, use the process createlegend.
<?xml version='1.0' encoding='utf-8'?>
<palette>
<userproj userid = 'karttur' projectid = 'karttur' tractid= 'karttur' siteid = '*' plotid = '*' system = 'system'></userproj>
<!-- Create legend -->
<!-- NOTE THE ID IS ONLY USED IN THE SCRIPTING SO IT CAN HAVE (UNIQUE) DUMMY VALUES HERE -->
<!-- VWB monthly cmwater-->
<process processid = 'createlegend' version = '1.3'>
<overwrite>True</overwrite>
<parameters columnhead='VWB (mm/month)' precision='0'></parameters>
<comp id = '1' source = "trmm-vwb" product = "3b43" folder = "vwb" band = "trmm-fao-vwb" prefix = "trmm-fao-vwb" suffix = "v7-f-m"></comp>
<comp id = '2' source = "trmm-vwb" product = "3b43" folder = "vwb" band = "trmm-fao-vwb-surplus" prefix = "trmm-fao-vwb-surplus" suffix = "v7-f-m"></comp>
<comp id = '3' source = "trmm-vwb" product = "3b43" folder = "vwb" band = "trmm-fao-vwb-deficit" prefix = "trmm-fao-vwb-deficit" suffix = "v7-f-m"></comp>
</process>
<process processid = 'createlegend' version = '1.3'>
<overwrite>True</overwrite>
<parameters columnhead='VWB (mm/year)' precision='0'></parameters>
<comp id = '1' source = "trmm-vwb" product = "3b43" folder = "vwb-A" band = "trmm-fao-vwb" prefix = "trmm-fao-vwb" suffix = "v7-f-m"></comp>
<comp id = '2' source = "trmm-vwb" product = "3b43" folder = "vwb-A" band = "trmm-fao-vwb-surplus" prefix = "trmm-fao-vwb-surplus" suffix = "v7-f-m-A"></comp>
<comp id = '3' source = "trmm-vwb" product = "3b43" folder = "vwb-A" band = "trmm-fao-vwb-deficit" prefix = "trmm-fao-vwb-deficit" suffix = "v7-f-m-A"></comp>
</process>
</palette>
Add movieclock
You do not need to add a special movieclock for VWB, the default movieclock works fine. But if you want to create a customised movieclock, the process is addmovieclock. The only parameter that is required is the name of the movieclock, all other parameters are set to default unless explicitly given as parameters (thus the movieclock added below will be identical to the default movieclock).
<?xml version='1.0' encoding='utf-8'?>
<movieclock>
<userproj userid = 'karttur' projectid = 'karttur' tractid= 'karttur' siteid = '*' plotid = '*' system = 'system'></userproj>
<path></path>
<!-- Add movieclock -->
<process processid = 'addmovieclock'>
<overwrite>Y</overwrite>
<delete>N</delete>
<parameters name = 'vwb'>
</parameters>
</process>
</movieclock>
Export legend
Use the process exportlegend to export stand alone legends. The process produces three legends, as a Scalable Vector Graphics (.svg file), a .png file and a compressed .jpg file.
<?xml version='1.0' encoding='utf-8'?>
<palette>
<userproj userid = 'karttur' projectid = 'karttur' tractid= 'karttur' siteid = '*' plotid = '*' system = 'system'></userproj>
<!-- Create legend -->
<!-- NOTE THE ID IS ONLY USED IN THE SCRIPTING SO IT CAN HAVE (UNIQUE) DUMMY VALUES HERE -->
<!-- VWB monthly cmwater-->
<process processid = 'exportlegend' version = '1.3'>
<overwrite>True</overwrite>
<parameters columnhead='VWB (mm/month)' precision='0'></parameters>
<comp id = '1' source = "trmm-vwb" product = "3b43" folder = "vwb" band = "trmm-fao-vwb" prefix = "trmm-fao-vwb" suffix = "v7-f-m"></comp>
<comp id = '2' source = "trmm-vwb" product = "3b43" folder = "vwb" band = "trmm-fao-vwb-surplus" prefix = "trmm-fao-vwb-surplus" suffix = "v7-f-m"></comp>
<comp id = '3' source = "trmm-vwb" product = "3b43" folder = "vwb" band = "trmm-fao-vwb-deficit" prefix = "trmm-fao-vwb-deficit" suffix = "v7-f-m"></comp>
</process>
<process processid = 'createlegend' version = '1.3'>
<overwrite>True</overwrite>
<parameters columnhead='VWB (mm/year)' precision='0'></parameters>
<comp id = '1' source = "trmm-vwb" product = "3b43" folder = "vwb-A" band = "trmm-fao-vwb" prefix = "trmm-fao-vwb" suffix = "v7-f-m"></comp>
<comp id = '2' source = "trmm-vwb" product = "3b43" folder = "vwb-A" band = "trmm-fao-vwb-surplus" prefix = "trmm-fao-vwb-surplus" suffix = "v7-f-m-A"></comp>
<comp id = '3' source = "trmm-vwb" product = "3b43" folder = "vwb-A" band = "trmm-fao-vwb-deficit" prefix = "trmm-fao-vwb-deficit" suffix = "v7-f-m-A"></comp>
</process>
</palette>
Export images and create animation
With the scaling and palettes defined, you can export any of the VWB layers created above with the process exporttobyteancillary.
Export monthly images
<?xml version='1.0' encoding='utf-8'?>
<export>
<userproj userid = 'karttur' projectid = 'karttur' tractid= 'karttur-trmm' siteid = '*' plotid = '*' system = 'ancillary'></userproj>
<period startyear = "1998" endyear = "2018" endmonth ='7' endday = '31' timestep='M'></period>
<!-- Export to byte with colored palettes -->
<process processid = 'exporttobyteancillary' version = '1.3'>
<overwrite>True</overwrite>
<parameters palette= 'vwb'></parameters>
<srcpath volume = "travel" hdrfiletype = 'tif' datfiletype = 'tif'></srcpath>
<dstpath volume = "travel" hdrfiletype = 'tif' datfiletype = 'tif'></dstpath>
<srccomp>
<trmm-fao-vwb id = 'layer1' source = "trmm-vwb" product = "3b43" folder = "vwb" band = "trmm-fao-vwb" prefix = "trmm-fao-vwb" suffix = "v7-f-m">
</trmm-fao-vwb>
<trmm-fao-vwb-surplus id = 'layer2' source = "trmm-vwb" product = "3b43" folder = "vwb" band = "trmm-fao-vwb-surplus" prefix = "trmm-fao-vwb-surplus" suffix = "v7-f-m">
</trmm-fao-vwb-surplus>
<trmm-fao-vwb-deficit id = 'layer3' source = "trmm-vwb" product = "3b43" folder = "vwb" band = "trmm-fao-vwb-deficit" prefix = "trmm-fao-vwb-deficit" suffix = "v7-f-m">
</trmm-fao-vwb-deficit>
</srccomp>
</process>
</export>
Export statistical and trend results
All exports use the same process exporttobyteancillary, you just have to set the timestep and compostions to export all the statistical data, including the results of the trend analysis.
<?xml version='1.0' encoding='utf-8'?>
<export>
<userproj userid = 'karttur' projectid = 'karttur' tractid= 'karttur-trmm' siteid = '*' plotid = '*' system = 'ancillary'></userproj>
<period startyear = "1998" endyear = "2017" timestep='timespan-A'></period>
<!-- exporttobyte avg A -->
<process processid = 'exporttobyteancillary' version = '1.3'>
<overwrite>True</overwrite>
<parameters palette= 'vwb'></parameters>
<srcpath volume = "travel" hdrfiletype = 'tif' datfiletype = 'tif'></srcpath>
<dstpath volume = "travel" hdrfiletype = 'tif' datfiletype = 'tif'></dstpath>
<srccomp>
<avg-trmm-fao-vwb id = 'layer1' source = "trmm-vwb" product = "3b43" folder = "vwb-A-stats" band = "avg-trmm-fao-vwb" prefix = "avg-trmm-fao-vwb" suffix = "v7-f-m-A">
</avg-trmm-fao-vwb>
<avg-trmm-fao-vwb-surplus id = 'layer2' source = "trmm-vwb" product = "3b43" folder = "vwb-A-stats" band = "avg-trmm-fao-vwb-surplus" prefix = "avg-trmm-fao-vwb-surplus" suffix = "v7-f-m-A">
</avg-trmm-fao-vwb-surplus>
<avg-trmm-fao-vwb-deficit id = 'layer3' source = "trmm-vwb" product = "3b43" folder = "vwb-A-stats" band = "avg-trmm-fao-vwb-deficit" prefix = "avg-trmm-fao-vwb-deficit" suffix = "v7-f-m-A">
</avg-trmm-fao-vwb-deficit>
<ols-ic-trmm-fao-vwb id = 'layer4' source = "trmm-vwb" product = "3b43" folder = "vwb-A-trend" band = "ols-ic-trmm-fao-vwb" prefix = "ols-ic-trmm-fao-vwb" suffix = "v7-f-m-A">
</ols-ic-trmm-fao-vwb>
<ols-ic-trmm-fao-vwb-surplus id = 'layer5' source = "trmm-vwb" product = "3b43" folder = "vwb-A-trend" band = "ols-ic-trmm-fao-vwb-surplus" prefix = "ols-ic-trmm-fao-vwb-surplus" suffix = "v7-f-m-A">
</ols-ic-trmm-fao-vwb-surplus>
<ols-ic-trmm-fao-vwb-deficit id = 'layer6' source = "trmm-vwb" product = "3b43" folder = "vwb-A-trend" band = "ols-ic-trmm-fao-vwb-deficit" prefix = "ols-ic-trmm-fao-vwb-deficit" suffix = "v7-f-m-A">
</ols-ic-trmm-fao-vwb-deficit>
<ts-ic-trmm-fao-vwb id = 'layer7' source = "trmm-vwb" product = "3b43" folder = "vwb-A-trend" band = "ts-ic-trmm-fao-vwb" prefix = "ts-ic-trmm-fao-vwb" suffix = "v7-f-m-A">
</ts-ic-trmm-fao-vwb>
<ts-ic-trmm-fao-vwb-surplus id = 'layer8' source = "trmm-vwb" product = "3b43" folder = "vwb-A-trend" band = "ts-ic-trmm-fao-vwb-surplus" prefix = "ts-ic-trmm-fao-vwb-surplus" suffix = "v7-f-m-A">
</ts-ic-trmm-fao-vwb-surplus>
<ts-ic-trmm-fao-vwb-deficit id = 'layer9' source = "trmm-vwb" product = "3b43" folder = "vwb-A-trend" band = "ts-ic-trmm-fao-vwb-deficit" prefix = "ts-ic-trmm-fao-vwb-deficit" suffix = "v7-f-m-A">
</ts-ic-trmm-fao-vwb-deficit>
</srccomp>
</process>
<process processid = 'exporttobyteancillary' version = '1.3'>
<overwrite>True</overwrite>
<parameters palette= 'vwb'></parameters>
<srcpath volume = "travel" hdrfiletype = 'tif' datfiletype = 'tif'></srcpath>
<dstpath volume = "travel" hdrfiletype = 'tif' datfiletype = 'tif'></dstpath>
<srccomp>
<ols-sl-trmm-fao-vwb id = 'layer4' source = "trmm-vwb" product = "3b43" folder = "vwb-A-trend" band = "ols-sl-trmm-fao-vwb" prefix = "ols-sl-trmm-fao-vwb" suffix = "v7-f-m-A">
</ols-sl-trmm-fao-vwb>
<ols-sl-trmm-fao-vwb-surplus id = 'layer5' source = "trmm-vwb" product = "3b43" folder = "vwb-A-trend" band = "ols-sl-trmm-fao-vwb-surplus" prefix = "ols-sl-trmm-fao-vwb-surplus" suffix = "v7-f-m-A">
</ols-sl-trmm-fao-vwb-surplus>
<ols-sl-trmm-fao-vwb-deficit id = 'layer6' source = "trmm-vwb" product = "3b43" folder = "vwb-A-trend" band = "ols-sl-trmm-fao-vwb-deficit" prefix = "ols-sl-trmm-fao-vwb-deficit" suffix = "v7-f-m-A">
</ols-sl-trmm-fao-vwb-deficit>
<ts-mdsl-trmm-fao-vwb id = 'layer7' source = "trmm-vwb" product = "3b43" folder = "vwb-A-trend" band = "ts-mdsl-trmm-fao-vwb" prefix = "ts-mdsl-trmm-fao-vwb" suffix = "v7-f-m-A">
</ts-mdsl-trmm-fao-vwb>
<ts-mdsl-trmm-fao-vwb-surplus id = 'layer8' source = "trmm-vwb" product = "3b43" folder = "vwb-A-trend" band = "ts-mdsl-trmm-fao-vwb-surplus" prefix = "ts-mdsl-trmm-fao-vwb-surplus" suffix = "v7-f-m-A">
</ts-mdsl-trmm-fao-vwb-surplus>
<ts-mdsl-trmm-fao-vwb-deficit id = 'layer9' source = "trmm-vwb" product = "3b43" folder = "vwb-A-trend" band = "ts-mdsl-trmm-fao-vwb-deficit" prefix = "ts-mdsl-trmm-fao-vwb-deficit" suffix = "v7-f-m-A">
</ts-mdsl-trmm-fao-vwb-deficit>
<ts-losl-trmm-fao-vwb id = 'layer7' source = "trmm-vwb" product = "3b43" folder = "vwb-A-trend" band = "ts-losl-trmm-fao-vwb" prefix = "ts-losl-trmm-fao-vwb" suffix = "v7-f-m-A">
</ts-losl-trmm-fao-vwb>
<ts-losl-trmm-fao-vwb-surplus id = 'layer8' source = "trmm-vwb" product = "3b43" folder = "vwb-A-trend" band = "ts-losl-trmm-fao-vwb-surplus" prefix = "ts-losl-trmm-fao-vwb-surplus" suffix = "v7-f-m-A">
</ts-losl-trmm-fao-vwb-surplus>
<ts-losl-trmm-fao-vwb-deficit id = 'layer9' source = "trmm-vwb" product = "3b43" folder = "vwb-A-trend" band = "ts-losl-trmm-fao-vwb-deficit" prefix = "ts-losl-trmm-fao-vwb-deficit" suffix = "v7-f-m-A">
</ts-losl-trmm-fao-vwb-deficit>
<ts-hisl-trmm-fao-vwb id = 'layer7' source = "trmm-vwb" product = "3b43" folder = "vwb-A-trend" band = "ts-hisl-trmm-fao-vwb" prefix = "ts-hisl-trmm-fao-vwb" suffix = "v7-f-m-A">
</ts-hisl-trmm-fao-vwb>
<ts-hisl-trmm-fao-vwb-surplus id = 'layer8' source = "trmm-vwb" product = "3b43" folder = "vwb-A-trend" band = "ts-hisl-trmm-fao-vwb-surplus" prefix = "ts-hisl-trmm-fao-vwb-surplus" suffix = "v7-f-m-A">
</ts-hisl-trmm-fao-vwb-surplus>
<ts-hisl-trmm-fao-vwb-deficit id = 'layer9' source = "trmm-vwb" product = "3b43" folder = "vwb-A-trend" band = "ts-hisl-trmm-fao-vwb-deficit" prefix = "ts-hisl-trmm-fao-vwb-deficit" suffix = "v7-f-m-A">
</ts-hisl-trmm-fao-vwb-deficit>
</srccomp>
</process>
<!-- exporttobyte std + rmse A -->
<process processid = 'exporttobyteancillary' version = '1.3'>
<overwrite>True</overwrite>
<parameters palette= 'vwb'></parameters>
<srcpath volume = "travel" hdrfiletype = 'tif' datfiletype = 'tif'></srcpath>
<dstpath volume = "travel" hdrfiletype = 'tif' datfiletype = 'tif'></dstpath>
<srccomp>
<std-trmm-fao-vwb id = 'layer1' source = "trmm-vwb" product = "3b43" folder = "vwb-A-stats" band = "std-trmm-fao-vwb" prefix = "std-trmm-fao-vwb" suffix = "v7-f-m-A">
</std-trmm-fao-vwb>
<std-trmm-fao-vwb-surplus id = 'layer2' source = "trmm-vwb" product = "3b43" folder = "vwb-A-stats" band = "std-trmm-fao-vwb-surplus" prefix = "std-trmm-fao-vwb-surplus" suffix = "v7-f-m-A">
</std-trmm-fao-vwb-surplus>
<std-trmm-fao-vwb-deficit id = 'layer3' source = "trmm-vwb" product = "3b43" folder = "vwb-A-stats" band = "std-trmm-fao-vwb-deficit" prefix = "std-trmm-fao-vwb-deficit" suffix = "v7-f-m-A">
</std-trmm-fao-vwb-deficit>
<std-trmm-3b43v7-precip id = 'layer' source = "trmm" product = "3b43" folder = "rainfall-A-stats" band = "std-trmm-3b43v7-precip" prefix = "std-trmm-3b43v7-precip" suffix = "v7-f-A">
</std-trmm-3b43v7-precip>
<ols-rmse-trmm-fao-vwb id = 'layer4' source = "trmm-vwb" product = "3b43" folder = "vwb-A-trend" band = "ols-rmse-trmm-fao-vwb" prefix = "ols-rmse-trmm-fao-vwb" suffix = "v7-f-m-A">
</ols-rmse-trmm-fao-vwb>
<ols-rmse-trmm-fao-vwb-surplus id = 'layer5' source = "trmm-vwb" product = "3b43" folder = "vwb-A-trend" band = "ols-rmse-trmm-fao-vwb-surplus" prefix = "ols-rmse-trmm-fao-vwb-surplus" suffix = "v7-f-m-A">
</ols-rmse-trmm-fao-vwb-surplus>
<ols-rmse-trmm-fao-vwb-deficit id = 'layer6' source = "trmm-vwb" product = "3b43" folder = "vwb-A-trend" band = "ols-rmse-trmm-fao-vwb-deficit" prefix = "ols-rmse-trmm-fao-vwb-deficit" suffix = "v7-f-m-A">
</ols-rmse-trmm-fao-vwb-deficit>
</srccomp>
</process>
<!-- TRMM mannkendall Z-->
<processx processid = 'exporttobyteancillary' version = '1.3'>
<overwrite>True</overwrite>
<parameters palette= 'zhydro'></parameters>
<srcpath volume = "travel" hdrfiletype = 'tif' datfiletype = 'tif'></srcpath>
<dstpath volume = "travel" hdrfiletype = 'tif' datfiletype = 'tif'></dstpath>
<srccomp>
<mk-z-trmm-3b43v7-precip id='layer' source = "trmm" product = "3b43" folder = "rainfall-A-trend" band = "mk-z-trmm-3b43v7-precip" prefix = "mk-z-trmm-3b43v7-precip" suffix = "v7-f-A">
</mk-z-trmm-3b43v7-precip>
<ols-r2-trmm-3b43v7-precip id='layer2' source = "trmm" product = "3b43" folder = "rainfall-A-trend" band = "ols-r2-trmm-3b43v7-precip" prefix = "ols-r2-trmm-3b43v7-precip" suffix = "v7-f-A">
</ols-r2-trmm-3b43v7-precip>
</srccomp>
</processx>
<!-- VWB change -->
<process processid = 'exporttobyteancillary' version = '1.3'>
<overwrite>True</overwrite>
<parameters palette= 'vwb'></parameters>
<srcpath volume = "travel" hdrfiletype = 'tif' datfiletype = 'tif'></srcpath>
<dstpath volume = "travel" hdrfiletype = 'tif' datfiletype = 'tif'></dstpath>
<srccomp>
<trmm-fao-vwb-change id = 'layer1' source = "trmm-vwb" product = "3b43" folder = "vwb-A-change" band = "trmm-fao-vwb-change" prefix = "trmm-fao-vwb-change" suffix = "model-v7-f-m-A">
</trmm-fao-vwb-change>
<trmm-fao-vwb-delta id = 'layer3' source = "trmm-vwb" product = "3b43" folder = "vwb-A-change" band = "trmm-fao-vwb-delta" prefix = "trmm-fao-vwb-delta" suffix = "slope@p-v7-f-m-A">
</trmm-fao-vwb-delta>
</srccomp>
</process>
<process processid = 'exporttobyteancillary' version = '1.3'>
<overwrite>True</overwrite>
<parameters palette= 'vwb'></parameters>
<srcpath volume = "travel" hdrfiletype = 'tif' datfiletype = 'tif'></srcpath>
<dstpath volume = "travel" hdrfiletype = 'tif' datfiletype = 'tif'></dstpath>
<srccomp>
<trmm-fao-vwb-change id = 'layer2' source = "trmm-vwb" product = "3b43" folder = "vwb-A-change" band = "trmm-fao-vwb-change" prefix = "trmm-fao-vwb-change" suffix = "model@p-v7-f-m-A">
</trmm-fao-vwb-change>
</srccomp>
</process>
<process processid = 'exporttobyteancillary' version = '1.3'>
<overwrite>True</overwrite>
<parameters palette= 'vwb'></parameters>
<srcpath volume = "travel" hdrfiletype = 'tif' datfiletype = 'tif'></srcpath>
<dstpath volume = "travel" hdrfiletype = 'tif' datfiletype = 'tif'></dstpath>
<srccomp>
<trmm-fao-vwb-surplus-change id = 'layer1' source = "trmm-vwb" product = "3b43" folder = "vwb-A-change" band = "trmm-fao-vwb-surplus-change" prefix = "trmm-fao-vwb-surplus-change" suffix = "model-v7-f-m-A">
</trmm-fao-vwb-surplus-change>
<trmm-fao-vwb-surplus-delta id = 'layer3' source = "trmm-vwb" product = "3b43" folder = "vwb-A-change" band = "trmm-fao-vwb-surplus-delta" prefix = "trmm-fao-vwb-surplus-delta" suffix = "slope@p-v7-f-m-A">
</trmm-fao-vwb-surplus-delta>
</srccomp>
</process>
<process processid = 'exporttobyteancillary' version = '1.3'>
<overwrite>True</overwrite>
<parameters palette= 'vwb'></parameters>
<srcpath volume = "travel" hdrfiletype = 'tif' datfiletype = 'tif'></srcpath>
<dstpath volume = "travel" hdrfiletype = 'tif' datfiletype = 'tif'></dstpath>
<srccomp>
<trmm-fao-vwb-surplus-change id = 'layer2' source = "trmm-vwb" product = "3b43" folder = "vwb-A-change" band = "trmm-fao-vwb-surplus-change" prefix = "trmm-fao-vwb-surplus-change" suffix = "model@p-v7-f-m-A">
</trmm-fao-vwb-surplus-change>
</srccomp>
</process>
<process processid = 'exporttobyteancillary' version = '1.3'>
<overwrite>True</overwrite>
<parameters palette= 'vwb'></parameters>
<srcpath volume = "travel" hdrfiletype = 'tif' datfiletype = 'tif'></srcpath>
<dstpath volume = "travel" hdrfiletype = 'tif' datfiletype = 'tif'></dstpath>
<srccomp>
<trmm-fao-vwb-deficit-change id = 'layer1' source = "trmm-vwb" product = "3b43" folder = "vwb-A-change" band = "trmm-fao-vwb-deficit-change" prefix = "trmm-fao-vwb-deficit-change" suffix = "model-v7-f-m-A">
</trmm-fao-vwb-deficit-change>
<trmm-fao-vwb-deficit-delta id = 'layer3' source = "trmm-vwb" product = "3b43" folder = "vwb-A-change" band = "trmm-fao-vwb-deficit-delta" prefix = "trmm-fao-vwb-deficit-delta" suffix = "slope@p-v7-f-m-A">
</trmm-fao-vwb-deficit-delta>
</srccomp>
</process>
<process processid = 'exporttobyteancillary' version = '1.3'>
<overwrite>True</overwrite>
<parameters palette= 'vwb'></parameters>
<srcpath volume = "travel" hdrfiletype = 'tif' datfiletype = 'tif'></srcpath>
<dstpath volume = "travel" hdrfiletype = 'tif' datfiletype = 'tif'></dstpath>
<srccomp>
<trmm-fao-vwb-deficit-change id = 'layer2' source = "trmm-vwb" product = "3b43" folder = "vwb-A-change" band = "trmm-fao-vwb-deficit-change" prefix = "trmm-fao-vwb-deficit-change" suffix = "model@p-v7-f-m-A">
</trmm-fao-vwb-deficit-change>
</srccomp>
</process>
<!-- exporttobyte std + rmse A
<process processid = 'exporttobyteancillary' version = '1.3'>
<overwrite>True</overwrite>
<parameters palette= 'precipdelta'></parameters>
<srcpath volume = "travel" hdrfiletype = 'tif' datfiletype = 'tif'></srcpath>
<dstpath volume = "travel" hdrfiletype = 'tif' datfiletype = 'tif'></dstpath>
<srccomp>
<trmm-3b43v7-precip-change id = 'layer1' source = "trmm" product = "3b43" folder = "rainfall-A-change" band = "trmm-3b43v7-precip-change" prefix = "trmm-3b43v7-precip-change" suffix = "model-v7-f-A">
</trmm-3b43v7-precip-change>
<trmm-3b43v7-precip-change id = 'layer2' source = "trmm" product = "3b43" folder = "rainfall-A-change" band = "trmm-3b43v7-precip-change" prefix = "trmm-3b43v7-precip-change" suffix = "model@p-v7-f-A">
</trmm-3b43v7-precip-change>
<trmm-3b43v7-precip-delta id = 'layer3' source = "trmm" product = "3b43" folder = "rainfall-A-change" band = "trmm-3b43v7-precip-delta" prefix = "trmm-3b43v7-precip-delta" suffix = "slope@p-v7-f-A">
</trmm-3b43v7-precip-delta>
</srccomp>
</process>
-->
</export>
Create movie frames
The process movieframeancillary converts the exported images (from previous step) to movie frames. The process is basically a dimension conversion that can also create an embossed text on the fly. For the process movieframeancillary to work you must have installed imagemagick as explained in another blogpost.
To run the process fully automated you must set the parameter asscript to False, otherwise you must manually execute the shell script file reported when the process comes to an end.
Note that because the three versions of VWB (the total VWB, suplus VWB and deficit VWB) were organized to be stored in the same directory (or folder) path, you can only create one animation at the time. If you want to create animations of all three versions you must delete the “movieframe” folder between each creation.
<?xml version='1.0' encoding='utf-8'?>
<movieframe>
<userproj userid = 'karttur' projectid = 'karttur' tractid= 'karttur-trmm' siteid = '*' plotid = '*' system = 'ancillary'></userproj>
<period startyear = "1998" endyear = "2018" endmonth='07' endday='31' timestep='M'></period>
<!-- Create movie frame -->
<process processid = 'movieframeancillary' version = '1.3'>
<overwrite>True</overwrite>
<parameters name = 'vwb' width = '800' crop='800,222,0,0' emboss='KARTTUR' embossdims='720,150' embossptsize='100' asscript='True'></parameters>
<srcpath volume = "travel" hdrfiletype = 'tif' datfiletype = 'tif'></srcpath>
<dstpath volume = "travel/movieclock" hdrfiletype = 'png' datfiletype = 'png'></dstpath>
<srccomp>
<trmm-fao-vwb id = 'layer1' source = "trmm-vwb" product = "3b43" folder = "vwb" band = "trmm-fao-vwb" prefix = "trmm-fao-vwb" suffix = "v7-f-m">
</trmm-fao-vwb>
</srccomp>
</process>
<!-- Create movie frame surplus
If you want to create an animation from the VWB surplus timeseries
you must first make sure that the dstpath "movieframes" is empty,
i.e. you must first finish the movie for trmm-fao-vwb (above) and
delete all intermediate files (and only keep the final movie).
Otherwise the movie will include both trmm-fao-vwb and trmm-fao-vwb-surplus.
To create a movie form the surplus data, change processx to process below and
set process to processx for the process above.
-->
<processx processid = 'movieframeancillary' version = '1.3'>
<overwrite>False</overwrite>
<parameters name = 'vwb' width = '800' crop='800,222,0,0' emboss='KARTTUR' embossdims='720,150' embossptsize='100' asscript='True'></parameters>
<srcpath volume = "travel" hdrfiletype = 'tif' datfiletype = 'tif'></srcpath>
<dstpath volume = "travel/movieclock" hdrfiletype = 'png' datfiletype = 'png'></dstpath>
<srccomp>
<trmm-fao-vwb-surplus id = 'layer2' source = "trmm-vwb" product = "3b43" folder = "vwb" band = "trmm-fao-vwb-surplus" prefix = "trmm-fao-vwb-surplus" suffix = "v7-f-m">
</trmm-fao-vwb-surplus>
</srccomp>
</processx>
<!-- Create movie frame deficit
If you want to create an animation from the VWB defiit timeseries
you must first make sure that the dstpath "movieframes" is empty,
see above.
-->
<processx processid = 'movieframeancillary' version = '1.3'>
<overwrite>False</overwrite>
<parameters name = 'vwb' width = '800' crop='800,222,0,0' emboss='KARTTUR' embossdims='720,150' embossptsize='100' asscript='True'></parameters>
<srcpath volume = "travel" hdrfiletype = 'tif' datfiletype = 'tif'></srcpath>
<dstpath volume = "travel/movieclock" hdrfiletype = 'png' datfiletype = 'png'></dstpath>
<srccomp>
<trmm-fao-vwb-deficit id = 'layer3' source = "trmm-vwb" product = "3b43" folder = "vwb" band = "trmm-fao-vwb-deficit" prefix = "trmm-fao-vwb-deficit" suffix = "v7-f-m">
</trmm-fao-vwb-deficit>
</srccomp>
</processx>
</movieframe>
Create movie clock and animation
The process movieclockancillary first creates the movieclocks to combine with the movie frames from the previous step, and then creates the movie/animation itself. To run the process fully automated you must set the parameter asscript to False, otherwise you must manually execute the shell script files reported when the process comes to an end. By default the process will create script files so you must explicitly enter asscript="False" if you want the process to generate the complete animation on the fly.
For the process <span class=’package’movieclockancillary</span> to work you must have installed FFmpeg as explained in another blogpost.
<?xml version='1.0' encoding='utf-8'?>
<movieclock>
<userproj userid = 'karttur' projectid = 'karttur' tractid= 'karttur-trmm' siteid = '*' plotid = '*' system = 'ancillary'></userproj>
<period startyear = "1998" endyear = "2018" endmonth='07' endday='31' timestep='M'></period>
<!-- Create movie clock -->
<process processid = 'movieclockancillary' version = '1.3'>
<overwrite>False</overwrite>
<parameters name = 'trmm' width = '800' asscript='True'></parameters>
<dstpath volume = "travel/movieclock" hdrfiletype = 'png' datfiletype = 'png'></dstpath>
<dstcomp>
<trmm-fao-vwb id = 'layer1' source = "trmm-vwb" product = "3b43" folder = "vwb" band = "trmm-fao-vwb" prefix = "trmm-fao-vwb" suffix = "v7-f-m">
</trmm-fao-vwb>
</dstcomp>
</process>
<!-- Create movie clock surplus
If you want to create an animation from the VWB surplus timeseries
you must first make sure that the dstpath "movieframes" is empty,
i.e. you must first finish the movie for trmm-fao-vwb (above) and
delete all intermediate files (and only keep the final movie).
Otherwise the movie will include both trmm-fao-vwb and trmm-fao-vwb-surplus.
To create a movie form the surplus data, change processx to process below and
set process to processx for the process above.
-->
<processx processid = 'movieclockancillary' version = '1.3'>
<overwrite>False</overwrite>
<parameters name = 'trmm' width = '800' asscript='True'></parameters>
<dstpath volume = "travel/movieclock" hdrfiletype = 'png' datfiletype = 'png'></dstpath>
<dstcomp>
<trmm-fao-vwb-surplus id = 'layer2' source = "trmm-vwb" product = "3b43" folder = "vwb" band = "trmm-fao-vwb-surplus" prefix = "trmm-fao-vwb-surplus" suffix = "v7-f-m">
</trmm-fao-vwb-surplus>
</dstcomp>
</processx>
<!-- Create movie clock deficit
If you want to create an animation from the VWB defiit timeseries
you must first make sure that the dstpath "movieframes" is empty,
see above.
-->
<processx processid = 'movieclockancillary' version = '1.3'>
<overwrite>False</overwrite>
<parameters name = 'trmm' width = '800' asscript='True'></parameters>
<dstpath volume = "travel/movieclock" hdrfiletype = 'png' datfiletype = 'png'></dstpath>
<dstcomp>
<trmm-fao-vwb-deficit id = 'layer3' source = "trmm-vwb" product = "3b43" folder = "vwb" band = "trmm-fao-vwb-deficit" prefix = "trmm-fao-vwb-deficit" suffix = "v7-f-m">
</trmm-fao-vwb-deficit>
</dstcomp>
</processx>
</movieclock>