sahrk / DGGRID

A command-line application that generates and manipulates icosahedral discrete global grids.
GNU Affero General Public License v3.0
78 stars 26 forks source link

Seqnums overflow when cast to int64 in python #77

Closed tik65536 closed 1 month ago

tik65536 commented 4 months ago

Hi Kevin ,

We have try out the latest version of dggrid from the master branch, the point grid conversion is running fine without any problems; however , when I try to cast the seqnum to int64 in Python, an invalid value warning is found. After further troubleshooting, it was found that some of the seqnums (88 cells) generated by dggrid had a value of 1.84467441e+19 , and cause overflow when cast to int64.

A screen cap and geom points are attached for your reference. Setting : ISEA7H , res 9 .

Thanks, Tik

image

[ <POINT (11.25 70.809)>, <POINT (11.248 70.781)>, <POINT (11.246 70.754)>, <POINT (11.249 70.363)>, <POINT (11.248 70.336)>, <POINT (11.246 70.309)>, <POINT (11.245 70.282)>, <POINT (11.243 70.254)>, <POINT (11.246 69.864)>, <POINT (11.249 69.465)>, <POINT (11.249 69.02)>, <POINT (11.248 68.993)>, <POINT (11.246 68.966)>, <POINT (11.249 68.576)>, <POINT (11.248 68.549)>, <POINT (11.246 68.521)>, <POINT (11.245 68.494)>, <POINT (11.25 68.132)>, <POINT (11.248 68.105)>, <POINT (11.247 68.077)>, <POINT (11.245 68.05)>, <POINT (11.249 67.661)>, <POINT (11.247 67.634)>, <POINT (11.246 67.606)>, <POINT (11.245 67.579)>, <POINT (11.249 67.217)>, <POINT (11.248 67.19)>, <POINT (11.247 67.163)>, <POINT (11.245 67.136)>, <POINT (11.25 66.774)>, <POINT (11.249 66.747)>, <POINT (11.247 66.72)>, <POINT (11.249 66.304)>, <POINT (11.248 66.276)>, <POINT (11.248 65.815)>, <POINT (11.247 65.788)>, <POINT (11.245 65.761)>, <POINT (11.249 65.373)>, <POINT (11.248 65.346)>, <POINT (11.246 65.318)>, <POINT (11.245 65.291)>, <POINT (11.25 64.93)>, <POINT (11.249 64.903)>, <POINT (11.25 64.47)>, <POINT (11.249 64.443)>, <POINT (11.248 64.415)>, <POINT (11.246 64.388)>, <POINT (11.245 64.361)>, <POINT (11.25 64)>, <POINT (11.249 63.973)>, <POINT (11.249 63.513)>, <POINT (11.248 63.486)>, <POINT (11.247 63.459)>, <POINT (11.249 63.053)>, <POINT (11.248 63.026)>, <POINT (11.247 62.999)>, <POINT (11.246 62.972)>, <POINT (11.249 62.566)>, <POINT (11.248 62.539)>, <POINT (11.247 62.512)>, <POINT (11.245 62.485)>, <POINT (11.248 62.08)>, <POINT (11.247 62.053)>, <POINT (11.246 62.026)>, <POINT (11.245 61.999)>, <POINT (11.249 61.62)>, <POINT (11.248 61.593)>, <POINT (11.247 61.566)>, <POINT (11.246 61.539)>, <POINT (11.25 61.161)>, <POINT (11.249 61.134)>, <POINT (11.248 61.107)>, <POINT (11.247 61.08)>, <POINT (11.249 60.675)>, <POINT (11.248 60.648)>, <POINT (11.249 60.171)>, <POINT (11.248 60.144)>, <POINT (11.247 60.117)>, <POINT (11.246 60.09)>, <POINT (11.25 59.712)>, <POINT (11.249 59.685)>, <POINT (11.25 59.235)>, <POINT (11.249 59.208)>, <POINT (11.248 59.181)>, <POINT (11.247 59.154)>, <POINT (11.248 58.704)>, <POINT (11.248 58.677)>, <POINT (11.247 58.65)>]

sahrk commented 4 months ago

@tik65536 I have a fix in branch z7 if you want to give it a try. I am doing some cleanup before merging into master.

sahrk commented 4 months ago

@tik65536 the fix is now in master. Please let me know if you have any more problems.