Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory Error for FES2022 #565

Open
AryanAdhau opened this issue Jan 21, 2025 · 8 comments
Open

Memory Error for FES2022 #565

AryanAdhau opened this issue Jan 21, 2025 · 8 comments

Comments

@AryanAdhau
Copy link

Hii,
I followed all the steps to setup the FES2022. However, I am getting this error while checking in the prompt and also in the CoastSat script. Sometimes it also shows 'handlers' not defined. Please help with this. Thanks.

MemoryError: Unable to allocate 223. MiB for an array with shape (5401, 10801) and data type float32.

@phillipjws
Copy link

Hello,

See the script in #559, it suggests how to trim the loading area. The reason you are running into the memory error is due to it loading the global model, if you use the script, in the other issue, adjusting the paths to reflect your setup, it should resolve the memory error. Just ensure you also write a new fes2022.yml with the updated paths to your new trimmed files.

@kvos
Copy link
Owner

kvos commented Jan 21, 2025

exactly try that script that @phillipjws is developing, it should solve the RAM allocation error

@AryanAdhau
Copy link
Author

AryanAdhau commented Jan 21, 2025

Thank you @phillipjws and @kvos, I tried with your amazing script but now I have an Index Error:
too many indices for array: array is 1-dimensional, but 2 were indexed.

May I also know what exact geojson file should be used there? Is it sitename_output_lines.geojson?

@phillipjws
Copy link

@AryanAdhau You should be using a geojson containing the area you're interested in. This can be quite large and I've found the easiest way to make mine is with geojson.io. The area I'm interested in is the coast of Canada, and so I made a polygon containing the entire country and anywhere that I may want to use CoastSat.

@AryanAdhau
Copy link
Author

Thank you so much @phillipjws! This works.

@AryanAdhau
Copy link
Author

AryanAdhau commented Jan 22, 2025

Hii @phillipjws and @kvos , I was trying to obtain the tidal level time series for the date range 01/01/2024 to 01/12/2024. The script performs computation but the plot is empty.

Image

Image

Is it something wrong with my pyfes or handlers config because the data exists but does not show in the plot.

I also tried to check output values with
result = SDS_slope.compute_tide(centroid, date_range, timestep, ocean_tide, load_tide) print(result)

the result was like this:

fes2022_computation.txt

@phillipjws
Copy link

@AryanAdhau My guess is that the point is too close to land, and so for interpolation the model is using a point on land which would explain why it isn't getting any results. Use coordinates for the centroid variable and put it ~1-5km further away from the shoreline. Could also be that the longitude is in the range (-180, 180) when it needs to be (0, 360).

@AryanAdhau
Copy link
Author

Thanks, @phillipjws, this is working. The problem was with the longitude range.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants