ESA.surface.svd_region_flux
index
/home/lfeng/otool/ESA/surface/svd_region_flux.py

Functions for doing composition of regional Basis functions (i.e, error)
 
 
Authors: L. Feng, Edinburgh University
History: v0.9, 2012.06.28
History: v0.95, 2013.02.24
 
 
Functions:
===========================================
1. do_region_err_svd: decomposition of regional error

 
Modules
       
ESA.util.flux_regrid
numpy.linalg
numpy
pylab
numpy.random
ESA.surface.spatial_cor

 
Functions
       
do_region_err_svd(grd_lon, grd_lat, reg_map, reg_err, cor_length, threshold=0.1, scale=1.0, dist_threshold=4.0, maxsel=20, **keywords)
SVD error map over region to several  sub-regions defined by (nsb_lon, nsb_lat)
 
Inputs:
 
--------------------------------------
1. grd_lon:<array, (nlon)>: longitude
2. grd_lat:<array, (nlat)>: latitude
3. reg_map:<array, (nlon, nlat)>: ratio  map defining one region. 
4. reg_err:<array, (nlon, nlat)>: err (or BF) defined over given region
5. cor_length <float>: length of the correlation 
6. threshold:<float>: all grid boxes with flux (err) below this threshold will be treated as one single region 
7. scale:<float>: scaling factor applied to this region 
8. dist_threshold:<float>: Max distance/cor_length where correlation will be considered 
9. maxsel:<int>: the maximum number of eigen vector to be kept 
 
Returns:
--------------------------------------------
1. flux:<array, (nlon, nlat, neig)>: new regions masked with sub-region number 
2. new_map_lst:<list, t:array>: the layer map with each layer for each sub-regions