nansencenter / sea_ice_drift

Sea ice drift from Sentinel-1 SAR imagery using open source feature tracking
GNU General Public License v3.0
41 stars 17 forks source link

Question on SeaiceDrift #28

Open QianShisysu opened 6 months ago

QianShisysu commented 6 months ago

When I run the example of sea ice drift retrieval routine, it stops in "sid = SeaIceDrift(f1, f2)" and shows "RuntimeError: Line 147: doesn't have matching ." Has anyone also encountered this problem?

akorosov commented 6 months ago

Can you provide filenames?

QianShisysu commented 6 months ago

I run the example in the https://github.com/nansencenter/sea_ice_drift and the filename1='S1B_EW_GRDM_1SDH_20200123T120618.tif' and filename2='S1B_EW_GRDM_1SDH_20200125T114955.tif'

akorosov commented 6 months ago

I have just tried and it works. Did you download the files? Can you copy the entire stack output here?

QianShisysu commented 6 months ago

Yes, I have downloaded those SAR images. Here is the entire output: (base) sq@sq-virtual-machine:~/桌面/sea_ice_drift/examples$ python example.py Traceback (most recent call last): File "/home/sq/桌面/sea_ice_drift/examples/example.py", line 10, in sid = SeaIceDrift(filename1, filename2) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/sq/anaconda3/lib/python3.11/site-packages/sea_ice_drift-0.7.1-py3.11.egg/sea_ice_drift/seaicedrift.py", line 38, in init File "/home/sq/anaconda3/lib/python3.11/site-packages/sea_ice_drift-0.7.1-py3.11.egg/sea_ice_drift/lib.py", line 316, in get_n File "/home/sq/anaconda3/lib/python3.11/site-packages/nansat/nansat.py", line 440, in resize self.vrt = self.vrt.get_subsampled_vrt(dst_shape[1], dst_shape[0], resample_alg) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/sq/anaconda3/lib/python3.11/site-packages/nansat/vrt.py", line 1367, in get_subsampled_vrt subsamp_vrt = self.get_super_vrt() ^^^^^^^^^^^^^^^^^^^^ File "/home/sq/anaconda3/lib/python3.11/site-packages/nansat/vrt.py", line 1349, in get_super_vrt super_vrt.vrt = self.copy() ^^^^^^^^^^^ File "/home/sq/anaconda3/lib/python3.11/site-packages/nansat/vrt.py", line 881, in copy new_vrt.write_xml(new_vrt_xml) File "/home/sq/anaconda3/lib/python3.11/site-packages/nansat/vrt.py", line 1053, in write_xml self.dataset = gdal.Open(self.filename) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/sq/anaconda3/lib/python3.11/site-packages/osgeo/gdal.py", line 4716, in Open return _gdal.Open(*args) ^^^^^^^^^^^^^^^^^ RuntimeError: Line 147: doesn't have matching .