insarlab / MintPy

Miami InSAR time-series software in Python
https://mintpy.readthedocs.io
Other
604 stars 259 forks source link

Spatial subset not working for ARIA data #469

Closed rzinke closed 3 years ago

rzinke commented 3 years ago

Description of the problem I have a stack of ARIA interferograms I am tyring to process. I am trying to subset the data set according to an area of interest, so I specify the lat/lon bounds using mintpy.subset.lalo. However, when I process the data set, it processes the entire spatial extent, leading to frequent memory overloads. Does MintPy support spatial subsetting for ARIA data?

*Loading data

Running load_data.py -t smallbaselineapp.cfg Parameters.txt --enforce produces the following output:

...
mintpy.load.lookupYFile    = auto  #[path of latitude /row   /y coordinate file], not required for geocoded data
mintpy.load.lookupXFile    = auto  #[path of longitude/column/x coordinate file], not required for geocoded data
mintpy.load.incAngleFile   = auto  #[path of incidence angle file], optional but recommend
mintpy.load.azAngleFile    = auto  #[path of azimuth   angle file], optional
mintpy.load.shadowMaskFile = auto  #[path of shadow mask file], optional but recommend
mintpy.load.waterMaskFile  = auto  #[path of water  mask file], optional but recommend
mintpy.load.bperpFile      = auto  #[path pattern of 2D perpendicular baseline file], optional
##---------subset (optional):
## if both yx and lalo are specified, use lalo option unless a) no lookup file AND b) dataset is in radar coord
mintpy.subset.yx           = auto    #[y0:y1,x0:x1 / no], auto for no
mintpy.subset.lalo         = 36.0:44.1,86.5:91.5    #[lat0:lat1,lon0:lon1 / no], auto for no

########## 2. modify_network
## reference: Yunjun et al. (2019, section 4.2 and 5.3.1); Chaussard et al. (2015, GRL)
## 1) Coherence-based network modification = (threshold + MST) by default
## It calculates a average coherence value for each interferogram using spatial coherence and input mask (with AOI)
## Then it finds a minimum spanning tree (MST) network with inverse of average coherence as weight (keepMinSpanTree)
(MintPy) [rzinke@sar A1_ML3_ERA5_Topo_PxMask]$ load_data.py -t smallbaselineApp.cfg Parameters41A.txt --enforce
processor : isce
SAR platform/sensor : unknown from project name "None"
--------------------------------------------------
prepare metadata files for isce products
/u/sarh0/rzinke/tools/MintPy/mintpy/load_data.py:588: UserWarning: No input metadata file found: auto
  warnings.warn('No input metadata file found: {}'.format(inpsDict['mintpy.load.metaFile']))
WARNING: mintpy.subset.lalo is not supported if 1) no lookup file AND    2) radar/unkonwn coded dataset
        ignore it and continue.
--------------------------------------------------
searching interferometric pairs info
input data files:
WARNING: No reqired ['unwrapPhase', 'azimuthOffset'] data files found!
--------------------------------------------------
searching geometry files info
input data files:
WARNING: No reqired height data files found!
--------------------------------------------------
updateMode : True
compression: None

Does the message

WARNING: mintpy.subset.lalo is not supported if 1) no lookup file AND    2) radar/unkonwn coded dataset
        ignore it and continue.

indicate that a lookup file is needed for ARIA data to be spatially subset?

yunjunz commented 3 years ago

Hi @rzinke, for ARIA products, you should run prep_aria.py directly for metadata preparation and data writing, without load_data.py.

yunjunz commented 3 years ago

Yes, the spatial subsetting of ARIA products is implemented recently, via template file only. And no lookup table is required for ARIA data because it's geocoded already. The command below should work:

prep_aria.py -t Parameters41A.txt

As a side point, the overlap between prep_aria.py and load_data.py is indeed confusing. We should call prep_aria.py inside load_data.py, instead of inside smallbaselineApp.py, so that preparia appears to be the same as the other prep* scripts on the user side. Will do it in another PR I suppose.