Closed Caizhiwen19901122 closed 1 year ago
@Caizhiwen19901122 when you want to create the wind rotation object from the grid, you should call it like
hgrid = Hgrid.open('./hgrid.gr3', crs='epsg:4326')
windrot = Windrot.default(hgrid=hgrid)
Note that:
Windrot
hgrid
object to the default
method, and not the Hgrid
class. Hgrid
class to open the grid file. Hgrid
is a class that inherits Gr3
class and has boundary definition capability too
When I try to obtain the windrot_geo2proj.gr3 file, an error occurs as: TypeError: init() missing 1 required positional argument: 'nodes'
The code is: from datetime import datetime from time import time import pathlib
from pyschism.forcing.nws.nws2.era5 import ERA5 from pyschism.forcing.nws.nws2.nws2 import NWS2
from pyschism.mesh.hgrid import Hgrid from pyschism.mesh.gridgr3 import Windrot from pyschism.mesh.base import Gr3
if name == 'main':