ymcmrs / ICAMS

Python based toolbox for InSAR troposphere Correction using global Atmospheric Models that considers the spatial Stochastic properties of the troposphere (ICAMS).
32 stars 9 forks source link

ValueError: ndarray is not C-contiguous #4

Closed lizellcode closed 1 year ago

lizellcode commented 1 year ago

When I use your code to do atmosphere correction, an error occurred. ----------- Step 2 -------------- Start to generate high-resolution tropospheric maps ... Variogram model: Spherical Number of bins: 50

Total number of data set: 21 Exsit number of data set: 0 Number of high-resolution maps need to be generated: 21 Date: 20141018 (1/21) Average geoid height: -28.801188924026334 Kriging wet-delay levels: [##################################################] 100.0% complete

Interpolating delay levels: [##################################################] 100.0% complete

Traceback (most recent call last): File "/home/chenisce/tools/ICAMS/icams/tropo_icams_sar.py", line 509, in main(sys.argv[:]) File "/home/chenisce/tools/ICAMS/icams/tropo_icams_sar.py", line 480, in main sar_wet00 = linearint_wet(np.vstack((lala, lolo, hh)).T) File "/home/chenisce/miniconda3/envs/isce2/lib/python3.9/site-packages/scipy/interpolate/_rgi.py", line 331, in call indices, norm_distances = self._find_indices(xi.T) File "/home/chenisce/miniconda3/envs/isce2/lib/python3.9/site-packages/scipy/interpolate/_rgi.py", line 499, in _find_indices return find_indices(self.grid, xi) File "_rgi_cython.pyx", line 95, in scipy.interpolate._rgi_cython.find_indices File "stringsource", line 660, in View.MemoryView.memoryview_cwrapper File "stringsource", line 350, in View.MemoryView.memoryview.cinit ValueError: ndarray is not C-contiguous

Could you please help to figure out? thankss

ymcmrs commented 1 year ago

Can you please present the full command line here?

From: lizellcode @.> Date: Tuesday, 13 June 2023 at 3:28 PM To: ymcmrs/ICAMS @.> Cc: Subscribed @.***> Subject: [ymcmrs/ICAMS] ValueError: ndarray is not C-contiguous (Issue #4)

When I use your code to do atmosphere correction, an error occurred. ----------- Step 2 -------------- Start to generate high-resolution tropospheric maps ... Variogram model: Spherical Number of bins: 50

Total number of data set: 21 Exsit number of data set: 0 Number of high-resolution maps need to be generated: 21 Date: 20141018 (1/21) Average geoid height: -28.801188924026334 Kriging wet-delay levels: [##################################################] 100.0% complete

Interpolating delay levels: [##################################################] 100.0% complete

Traceback (most recent call last): File "/home/chenisce/tools/ICAMS/icams/tropo_icams_sar.py", line 509, in main(sys.argv[:]) File "/home/chenisce/tools/ICAMS/icams/tropo_icams_sar.py", line 480, in main sar_wet00 = linearint_wet(np.vstack((lala, lolo, hh)).T) File "/home/chenisce/miniconda3/envs/isce2/lib/python3.9/site-packages/scipy/interpolate/_rgi.py", line 331, in call indices, norm_distances = self._find_indices(xi.T) File "/home/chenisce/miniconda3/envs/isce2/lib/python3.9/site-packages/scipy/interpolate/_rgi.py", line 499, in _find_indices return find_indices(self.grid, xi) File "_rgi_cython.pyx", line 95, in scipy.interpolate._rgi_cython.find_indices File "stringsource", line 660, in View.MemoryView.memoryview_cwrapper File "stringsource", line 350, in View.MemoryView.memoryview.cinit ValueError: ndarray is not C-contiguous

Could you please help to figure out? thankss

— Reply to this email directly, view it on GitHubhttps://github.com/ymcmrs/ICAMS/issues/4, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AFQZYFD7CPA623K63SKZ4C3XK7M43ANCNFSM6AAAAAAZEHDLJU. You are receiving this because you are subscribed to this thread.Message ID: @.***>

lizellcode commented 1 year ago

I loaded interferograms into Mintpy, and inputted the command “tropo_icams.py timeseries.h5 inputs/geometryRadar.h5 --project zenith --method sklm”. The step 1 downloaded the ERA data successfully. But the step 2 popped out the error. I noticed that you suggested to install PyKrige from your url. My conda environment had PyKrige, so I did not reinstall it. I'm not sure whether the error was caused by the different version of PyKrige or not.

ymcmrs commented 1 year ago

Yes, please try to reinstall your PyKrige, and there are several changes from the original version.

From: lizellcode @.> Date: Thursday, 15 June 2023 at 12:16 AM To: ymcmrs/ICAMS @.> Cc: Yunmeng Cao @.>, Comment @.> Subject: Re: [ymcmrs/ICAMS] ValueError: ndarray is not C-contiguous (Issue #4)

I loaded interferograms into Mintpy, and inputted the command “tropo_icams.py timeseries.h5 inputs/geometryRadar.h5 --project zenith --method sklm”. The step 1 downloaded the ERA data successfully. But the step 2 popped out the error. I noticed that you suggested to install PyKrige from your url. My conda environment had PyKrige, so I did not reinstall it. I'm not sure whether the error was caused by the different version of PyKrige or not.

— Reply to this email directly, view it on GitHubhttps://github.com/ymcmrs/ICAMS/issues/4#issuecomment-1591080124, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AFQZYFGU7LVOBN7INNW47M3XLGTTRANCNFSM6AAAAAAZEHDLJU. You are receiving this because you commented.Message ID: @.***>

lizellcode commented 1 year ago

I reinstalled PyKrige and upgraded Scipy. The code works now. Thanks a lot!