Closed ruby-vallarino closed 3 weeks ago
hi @ruby-vallarino , didn't realise that link was restricted. So you will have to get the netcdf files yourself, with involves the following steps:
fes2022.yaml
file from there and change the paths as in the instructions I provided.It's a long process so I was hoping providing the link would make it easier but I guess I will have to provide full download instructions. Try it out and let me know if it works, thanks.
Thank you very much for your prompt response and the detailed explanation, Dr. Vos.
As soon as I am able to download the information and apply the tidal correction, I will update my response. At the moment, I am waiting for the Aviso team to grant me access to the subscriptions.
Dr. Vos @kvos , I have been following the instructions you provided to perform the tidal correction. However, I am encountering difficulties in obtaining the necessary data for this correction. When running the code, I am unable to retrieve the tide data, and I am unsure of the cause. Initially, I thought the issue might be related to the download of the FES2022b files (load_tide and ocean_tide), but I have already deleted and re-downloaded them without success. I am attaching an image where you can see the problem I am experiencing. Additionally, although I'm not sure if it’s related, I have made adjustments to my laptop’s virtual memory, but the problem persists. I would appreciate any assistance you can provide to help resolve this issue. Thank you.
I too am running into this issue, I looked deeper into the nc files and found that the set I downloaded had longitude bounds of (0.0, 0.0), I assumed this was an issue with my download, but may be worth checking. Might be an issue with the files from aviso, although the handbook has this as expected. It seems to work when using the NARRA examply in example.py from fes2022, but I can't get any other locations working. Heres the script I used to check the bounds for all the files, just need to adjust the paths to match your setup if you want to check.
from netCDF4 import Dataset
import os
import numpy as np
directories = {
"ocean_tide": r"C:\Users\psteeves\coastal\ocean_tide",
"load_tide": r"C:\Users\psteeves\coastal\load_tide"
}
for dir_name, directory in directories.items():
print(f"\nChecking directory: {dir_name}")
for filename in os.listdir(directory):
if filename.endswith(".nc"):
filepath = os.path.join(directory, filename)
try:
# Open the NetCDF file and read latitude and longitude bounds
with Dataset(filepath, 'r') as nc:
lat_bounds = (np.min(nc['lat'][:]), np.max(nc['lat'][:]))
lon_bounds = (np.min(nc['lon'][:]), np.max(nc['lon'][:]))
print(f"File: {filename} | Lat: {lat_bounds} | Lon: {lon_bounds}")
except Exception as e:
print(f"Failed to read {filename}: {e}")
have you tried using longitudes between 0 and 360? instead of -180 to 180
@kvos Thank you very much for your help!!! I have successfully obtained the tide data for my study area.
Hii @kvos, I am encountering this issue. Could you please help. I am worried with this one.
maybe you have an old pyfes installation. can you run pyfes.__version__
and print the output here?
My pyfes version is 2.9.5
I needed to use
conda install pyfes
as opposed to
conda install fbriol::pyfes
Seems the version got moved to the default conda-forge channel, although this change was not updated somewhere in the documentation, seemed to resolve my issue
Thanks @phillipjws!
I tried, but it didn't work for me :/
@AryanAdhau You may also want to use pip uninstall pyfes
before you reinstall it with conda, I found sometimes pip points here which isn't the package you want to use. These were just my troubleshooting steps that seemed to resolve that issue, hopefully you get it figured out.
I needed to use
conda install pyfes
as opposed to
conda install fbriol::pyfes
Seems the version got moved to the default conda-forge channel, although this change was not updated somewhere in the documentation, seemed to resolve my issue
you're right it's been moved. I'll update the README
Hello Dr. Vos,
First of all, thank you for the recent update in "CoastSat -2.4 Tidal Correction" and for providing access to the FES2022 NetCDF files. I noticed that the files are hosted on a SharePoint link from UNSW, but it seems that access is restricted to users with institutional accounts. Unfortunately, without a UNSW account, I'm unable to download the files.
Could you kindly advise if there is an alternative way to access these files for users outside the institution? Any help or guidance on this would be greatly appreciated.
Thanks again for your excellent work.
Best regards,
Ruby