CWorthy-ocean / roms-tools

Tools for creating input files for UCLA-ROMS simulations
https://roms-tools.readthedocs.io
Apache License 2.0
10 stars 5 forks source link

Error in loading Grid Builder nc grid #160

Open DiegoBindoni opened 3 weeks ago

DiegoBindoni commented 3 weeks ago

Good afternoon, i'm trying to load a grid crated with Grid Builder (with this tool i can have a more accurate masking of the coastline), but when i import it with Grid.from_file i obtain this error

File ~/prova.py:4 the_same_grid = Grid.from_file(filepath)

File ~/anaconda3/envs/limenet_env/lib/python3.12/site-packages/roms_tools/setup/grid.py:617 in from_file grid._coarsen()

File ~/anaconda3/envs/limenet_env/lib/python3.12/site-packages/roms_tools/setup/grid.py:249 in _coarsen ] = f"{self.ds[fine_var].attrs['long_name']} on coarsened grid"

KeyError: 'long_name'

Could you please help me solve this issue? Let me know other informations i could provide. Thanks in advance

NoraLoose commented 2 weeks ago

@DiegoBindoni thanks for raising this issue. ROMS-Tools is still in an early development and testing phase, and we haven't added support for reading grid files that were created with Grid Builder.

Can you point me to the Grid Builder tool? Then I will put this on the To Do list. Thanks!