nansencenter / openwind

A python package for estimating high resolution wind from SAR images
41 stars 25 forks source link

SARWind with Sentinel-1 may cause memory error if file is not small... #18

Closed mortenwh closed 7 years ago

mortenwh commented 8 years ago

There is a quite serious memory problem in openwind that needs to solved before it can work optimally with sentinel-1 data.

knutfrode commented 8 years ago

Could you add some more description of the problem?

mortenwh commented 8 years ago

Not sure what more I can say... It stopped for me in line 248 in sar_wind.py:

    /home/vagrant/miniconda/lib/python2.7/site-packages/openwind/sar_wind.pyc in _get_wind_direction_array(self, aux_wind, eResampleAlg, *args, **kwargs)
        246         if u_array is None:
        247             raise Exception('Could not read wind vectors')
    --> 248         return np.degrees(np.arctan2(-u_array, -v_array)), \
        249                 wind_direction_time, \
        250                 np.sqrt(np.power(u_array, 2) + np.power(v_array, 2))

    MemoryError: 

    In [3]: 

This is in the method were the model wind field is reprojected to return wind directions defined on the SAR grid.

knutfrode commented 8 years ago

But how do you know it is a memory problem? Not obvious from the error message?

mortenwh commented 8 years ago

But it says MemoryError?

knutfrode commented 8 years ago

Ah, I did not see that, only the first part of your comment is shown, and the three dots at the end for expanding does not work. I had to click "edit" on your message to see all.

mortenwh commented 8 years ago

aha - ok, is it better now?

knutfrode commented 8 years ago

Yes, now the whole comment is expanded.

mortenwh commented 7 years ago

Duplicate with #25