Closed Jichao96 closed 11 months ago
👋 Thanks for opening your first issue here! Please filled out the template with as much details as possible. We appreciate that you took the time to contribute! Make sure you read our contributing guidelines.
This metadata has been introduced for a while now for hyp3. I recommend deleting all existing *.rsc files next to your tif files and running mintpy again.
If the error still persists, could you run the printout prep_hyp3.py command and fill out the detailed template content, so that I may be able to reproduce your error using the Ridgecrest example dataset?
If you are using OpenSARLab Jupyter notebook to prepare your Hyp3 stacks for Mintpy, you should remove the line below from the processing cell that crops the scene:
gdal.Warp(str(clip), str(clip), dstSRS='EPSG:4326', dstNodata=0)
@saeid-aminjafari do you have any idea for the same problem in mintpy processing using Jupiter notebook? @yunjunz I am using gamma interferograms from ASF. I didn't see any .rsc files in that.
This problem is reproduced by a student in the EarthScope 2023 course. The solution from @saeid-aminjafari works.
Description of the problem
It seems that when defining the meta, there is no 'UTM_ZONE'
Full script that generated the error
Full error message
Traceback (most recent call last): File "/root/tools/miniconda3/envs/insarenv/bin/smallbaselineApp.py", line 8, in
sys.exit(main())
^^^^^^
File "/root/tools/MintPy/src/mintpy/cli/smallbaselineApp.py", line 208, in main
run_smallbaselineApp(inps)
File "/root/tools/MintPy/src/mintpy/smallbaselineApp.py", line 1117, in run_smallbaselineApp
app.run(steps=inps.runSteps)
File "/root/tools/MintPy/src/mintpy/smallbaselineApp.py", line 874, in run
self.run_load_data(sname)
File "/root/tools/MintPy/src/mintpy/smallbaselineApp.py", line 176, in run_load_data
mintpy.cli.load_data.main(iargs)
File "/root/tools/MintPy/src/mintpy/cli/load_data.py", line 123, in main
load_data(inps)
File "/root/tools/MintPy/src/mintpy/load_data.py", line 784, in load_data
prepare_metadata(iDict)
File "/root/tools/MintPy/src/mintpy/load_data.py", line 633, in prepare_metadata
prep_module.main(iargs)
File "/root/tools/MintPy/src/mintpy/cli/prep_hyp3.py", line 94, in main
prep_hyp3(inps)
File "/root/tools/MintPy/src/mintpy/prep_hyp3.py", line 121, in prep_hyp3
meta = add_hyp3_metadata(fname, meta, is_ifg=is_ifg)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/tools/MintPy/src/mintpy/prep_hyp3.py", line 61, in add_hyp3_metadata
N, W = ut.utm2latlon(meta, W, N)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/tools/MintPy/src/mintpy/utils/utils0.py", line 319, in utm2latlon
zone_num = int(meta['UTM_ZONE'][:-1])