py-eddy-tracker icon indicating copy to clipboard operation
py-eddy-tracker copied to clipboard

g.add.uv() on adt data from cmems getting an error

Open Mrvy29 opened this issue 3 years ago • 12 comments

Hi there!

I've successfully identified eddies using the module for file downloaded in NRT from the FTP server of cmems. specifically using SEALEVEL_EUR_PHY_L4_NRT_OBSERVATIONS_008_060 product. But at this stage i am trying to identify eddies in an older data set of adt, downloaded from cmems as well but for a multiyear analysis and am getting the following error while trying to compute the uv from adt : No matching definition for argument type(s) array(float64, 1d, C), array(float64, 1d, C), array(float64, 2d, F), bool, float64, bool, int64.

Any ideas on how to solve this issue? here's an example of the dataset that does work (converted to table )

time latitude nv longitude crs lat_bnds lon_bnds sla err_sla ugosa err_ugosa vgosa err_vgosa adt ugos vgos flag_ice
2022-08-29 00:00:00 19.9375 0 -30.0625 -2147483647 19.875 -30.125 0.0718 0.009600000000000001 -0.0182 0.0466 0.0175 0.049600000000000005 0.3912 -0.0245 0.008 0.0
2022-08-29 00:00:00 19.9375 0 -29.9375 -2147483647 19.875 -30.0 0.0731 0.0088 -0.030500000000000003 0.0432 0.0217 0.0495 0.392 -0.0408 0.0132 0.0
2022-08-29 00:00:00 19.9375 0 -29.8125 -2147483647 19.875 -29.875 0.0746 0.0083 -0.0292 0.039400000000000004 0.023200000000000002 0.0489 0.3931 -0.0424 0.0143 0.0
2022-08-29 00:00:00 19.9375 0 -29.6875 -2147483647 19.875 -29.75 0.07590000000000001 0.0083 -0.0292 0.0393 0.0161 0.050100000000000006 0.39380000000000004 -0.045000000000000005 0.0054 0.0
2022-08-29 00:00:00 19.9375 0 -29.5625 -2147483647 19.875 -29.625 0.0771 0.009000000000000001 -0.0262 0.041800000000000004 0.025400000000000002 0.050300000000000004 0.394 -0.0446 0.013300000000000001 0.0

and an example of the longer dataset where it gets an error

time latitude longitude adt crs
2000-01-01 00:00:00 31.1875 32.5625 0.060000000000000005 -2147483647
2000-01-01 00:00:00 31.1875 32.6875 0.053200000000000004 -2147483647
2000-01-01 00:00:00 31.1875 32.8125 0.0451 -2147483647
2000-01-01 00:00:00 31.1875 32.9375 0.040400000000000005 -2147483647
2000-01-01 00:00:00 31.1875 33.0625 0.0426 -2147483647

I really appreciate the help and the work put into this !

Merav

Mrvy29 avatar Aug 29 '22 10:08 Mrvy29

Could you provide full traceback oy your error?

AntSimi avatar Aug 29 '22 13:08 AntSimi

Hi AntSimi/py-eddy-tracker Yes sure , here it is:

TypeError                                 Traceback (most recent call last)

 1 g.add_uv_lagerloef('adt')



/usr/local/lib/python3.7/dist-packages/py_eddy_tracker/dataset/grid.py
<https://localhost:8080/#> in add_uv_lagerloef(self, grid_height,
uname, vname, schema)   1733    1734     def add_uv_lagerloef(self,
grid_height, uname="u", vname="v", schema=15):
-> 1735         self.add_uv(grid_height, uname, vname)   1736
latmax = 5   1737         _, (i_start, i_end) =
self.nearest_grd_indice((0, 0), (-latmax, latmax))


/usr/local/lib/python3.7/dist-packages/py_eddy_tracker/dataset/grid.py
<https://localhost:8080/#> in add_uv(self, grid_height, uname, vname,
stencil_halfwidth)   1839         mode = "wrap" if self.is_circular()
else "reflect"   1840         self.vars[vname] = (
-> 1841             self.compute_stencil(data, mode=mode,
stencil_halfwidth=stencil_halfwidth)   1842             * gof   1843
      )


/usr/local/lib/python3.7/dist-packages/py_eddy_tracker/dataset/grid.py
<https://localhost:8080/#> in compute_stencil(self, data,
stencil_halfwidth, mode, vertical)   1728
self.EARTH_RADIUS,   1729             vertical=vertical,
-> 1730             stencil_halfwidth=stencil_halfwidth,   1731
 )   1732         return ma.array(g, mask=m)


/usr/local/lib/python3.7/dist-packages/numba/core/dispatcher.py
<https://localhost:8080/#> in _explain_matching_error(self, *args,
**kws)    701         msg = ("No matching definition for argument
type(s) %s"    702                % ', '.join(map(str, args)))
--> 703         raise TypeError(msg)    704     705     def
_search_new_conversions(self, *args, **kws):


TypeError: No matching definition for argument type(s) array(float64,
1d, C), array(float64, 1d, C), array(float64, 2d, F), bool, float64,
bool, int64

Thanks so much for looking into this ! Merav

Mrvy29 avatar Aug 29 '22 13:08 Mrvy29

Which version of py eddy tracker did you use?

AntSimi avatar Aug 29 '22 13:08 AntSimi

I'm using 3.6.0.

[image: Seafloor Scene Icon]

On Mon, 29 Aug 2022 at 16:54, Antoine Delepoulle @.***> wrote:

Which version of py eddy tracker did you use?

— Reply to this email directly, view it on GitHub https://github.com/AntSimi/py-eddy-tracker/issues/163#issuecomment-1230342168, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2ZPD6VQYRAXYWHEEVZBJYTV3S6J7ANCNFSM575JHMQQ . You are receiving this because you authored the thread.Message ID: @.***>

Mrvy29 avatar Aug 30 '22 06:08 Mrvy29

I think master version on git solve your problem :

AntSimi avatar Aug 30 '22 11:08 AntSimi

Sorry it didn't solve the problem !

Mrvy29 avatar Aug 31 '22 09:08 Mrvy29

It still same traceback or a new one?

AntSimi avatar Aug 31 '22 19:08 AntSimi

I didn't see at first read but you use add_uv_lagerloef, this code it's an unfinished business! any improve/pull request are welcome

AntSimi avatar Aug 31 '22 19:08 AntSimi

It’s the same trace back exactly, actually this Is not what I used , it was just a last ditch attempt, I used the add.uv. Thanks anyway!

On Wed, 31 Aug 2022 at 22:19 Antoine Delepoulle @.***> wrote:

It still same traceback or a new one?

— Reply to this email directly, view it on GitHub https://github.com/AntSimi/py-eddy-tracker/issues/163#issuecomment-1233328735, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2ZPD6WBM5DZIP2F3PQXAJTV36V4FANCNFSM575JHMQQ . You are receiving this because you authored the thread.Message ID: @.***>

--

[image: Seafloor Scene Icon]

Mrvy29 avatar Aug 31 '22 19:08 Mrvy29

Could you share input file and code used to try to reproduce error?

AntSimi avatar Aug 31 '22 19:08 AntSimi

Sure, here it is. cmems_obs-sl_eur_phy-ssh_my_allsat-l4-duacs-0.1... https://drive.google.com/file/d/1CrIl4iZnYg8pD_y6xIQ9NbnjpyZvVNwE/view?usp=drive_web

[image: Seafloor Scene Icon]

On Wed, 31 Aug 2022 at 22:53, Antoine Delepoulle @.***> wrote:

Could you share input file and code used to try to reproduce error?

— Reply to this email directly, view it on GitHub https://github.com/AntSimi/py-eddy-tracker/issues/163#issuecomment-1233357250, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2ZPD6RLOKNFYHMBZDKQU63V36ZZ7ANCNFSM575JHMQQ . You are receiving this because you authored the thread.Message ID: @.***>

Mrvy29 avatar Sep 04 '22 06:09 Mrvy29

I don't understand there is non adt field in your shared file

AntSimi avatar Sep 15 '22 07:09 AntSimi