Open Coastalsurfer opened 3 weeks ago
did you download the netcdf files and edited the fes2022.yaml file?
Yes, i downloaded the data and edited the YAML file it looks like this.
radial: cartesian: amplitude: amplitude latitude: lat longitude: lon paths: 2N2:'C:/Users/mrdde/CoastSat/Tides/fes2022b/tidemodel/fes2022b/load_tide/2n2_fes2022.nc' Eps2:'C:/Users/mrdde/CoastSat/Tides/fes2022b/tidemodel/fes2022b/load_tide/eps2_fes2022.nc' J1:''C:/Users/mrdde/CoastSat/Tides/fes2022b/tidemodel/fes2022b/load_tide/j1_fes2022.nc' K1:''C:/Users/mrdde/CoastSat/Tides/fes2022b/tidemodel/fes2022b/load_tide/k1_fes2022.nc' K2:''C:/Users/mrdde/CoastSat/Tides/fes2022b/tidemodel/fes2022b/load_tide/k2_fes2022.nc'
try removing the apostrophe from the path ' and "
I removed the quote and am still getting the same error. Originally I was having issues with the pyfes package with it not recognizing the load.config command but updated pyfes and seemed to fix that problem. My current pyfes version says 2024.6.0
that version should be correct.
I'm pretty sure it's something with the filename, as it's looking for a tidal constituent that doesn't exist, pls check all 34 files to make sure they're correct paths and names and the files exist
I have been running through the code in spyder section by section and am getting stuck on this error for the Tidal section.
import pyfes
enter the location of where you downloaded the FES2022 data
filepath = os.path.join('Tides','fes2022b','tidemodel','fes2022b') config = os.path.join(filepath, 'fes2022.yaml') handlers = pyfes.load_config(config) ocean_tide = handlers['tide'] load_tide = handlers['radial'] Traceback (most recent call last):
Cell In[2], line 5 handlers = pyfes.load_config(config)
File ~\anaconda3\envs\coastsat\lib\site-packages\pyfes\config.py:519 in load models[key] = _load_model(user_settings[key], tidal_type=key)
File ~\anaconda3\envs\coastsat\lib\site-packages\pyfes\config.py:487 in _load_model return Cartesian(**settings['cartesian']).load()
File:11 in init
File ~\anaconda3\envs\coastsat\lib\site-packages\pyfes\config.py:232 in __post_init__ raise err from None
File ~\anaconda3\envs\coastsat\lib\site-packages\pyfes\config.py:230 in __post_init__ list(map(core.constituents.parse, self.paths))
ValueError: invalid tidal constituent: 2