#!/usr/bin/python """ A trivial example of using the the python modisClient that steps through most of the available functionality in the same way as one would use the Matlab version. N.B. It is not necessary to go through all these steps each time. If you know enough to formulate the data request go straight for the full call... """ from modisWSDL import * #get the address of the client: client=setClient( ) #get the list of products: prodList = modisClient( client ) printList( prodList ) #get the list of bands for a product: bandList = modisClient( client, product='MOD15A2' ) printList( bandList ) #get the list of valid dates: dateList = modisClient( client, product='MOD15A2', band='Lai_1km', lat=52, lon=0 ) printList( dateList ) #get some data: m = modisClient( client, product='MOD15A2', band='Lai_1km', lat=52, lon=-2, startDate=2006100, endDate=2006180 ) #get the corresponding QA: modisGetQA( m, 'FparLai_QC', client=client ) #scale data to physical units: m.applyScale() #filter the data: m.filterQA( range(0,2**16,2), fill=-1 ) #print the entire structure: printModisData( m )