File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 22"""Debug script to investigate tile lookup failures."""
33
44import sys
5+ import platform
56import numpy as np
67
78def test_tile (registry , year , lon , lat ):
@@ -50,6 +51,9 @@ def main():
5051 print ("=" * 60 )
5152 print ("TILE LOOKUP DEBUG SCRIPT" )
5253 print ("=" * 60 )
54+ print (f"Platform: { platform .system ()} { platform .release ()} " )
55+ print (f"Python: { sys .version } " )
56+ print (f"NumPy: { np .__version__ } " )
5357
5458 # Target tile that's failing
5559 target_year = 2024
@@ -70,6 +74,17 @@ def main():
7074 print (f"Embeddings registry: { len (gdf )} rows" )
7175 print (f"Landmasks registry: { len (ldf ) if ldf is not None else 'None' } rows" )
7276
77+ # Check for negative lon_i values (potential Windows issue)
78+ neg_lon_tiles = gdf [gdf ['lon_i' ] < 0 ]
79+ print (f"Tiles with negative lon_i: { len (neg_lon_tiles )} " )
80+ if len (neg_lon_tiles ) > 0 :
81+ print (f" Sample negative lon_i values: { sorted (neg_lon_tiles ['lon_i' ].unique ())[:10 ]} " )
82+ # Check if -15 exists
83+ lon_minus_15 = gdf [gdf ['lon_i' ] == - 15 ]
84+ print (f" Tiles with lon_i == -15: { len (lon_minus_15 )} " )
85+ lon_minus_5 = gdf [gdf ['lon_i' ] == - 5 ]
86+ print (f" Tiles with lon_i == -5: { len (lon_minus_5 )} " )
87+
7388 # Check columns
7489 print ("\n --- Registry Columns ---" )
7590 print (f"Embeddings columns: { list (gdf .columns )} " )
You can’t perform that action at this time.
0 commit comments