CliMA / ClimaOcean.jl

🌎 Tools for realistic regional-to-global ocean simulations, and coupled ocean + sea-ice simulations based on Oceananigans and ClimaSeaIce. Basis for the ocean and sea-ice component of CliMA's Earth system model.
https://clima.github.io/ClimaOceanDocumentation/dev/
MIT License
27 stars 7 forks source link

problem with one_degree_near_global_simulation.jl #87

Open francispoulin opened 3 months ago

francispoulin commented 3 months ago

I pointed this out on Oceananigans.jl, but when I try running this script I get an error when I try and access the data. Any idea how to resolve this error?

ERROR: LoadError: HTTP.Exceptions.StatusError(404, "GET", "/glwagner/OceananigansArtifacts.jl/raw/glw/near-global-data/lat_lon_bathymetry_and_fluxes/bathymetry_lat_lon_360_150.jld2", HTTP.Messages.Response:
"""
HTTP/1.1 404 Not Found
Server: GitHub.com
Date: Thu, 20 Jun 2024 13:59:51 GMT
Content-Type: text/html; charset=utf-8
Vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, Accept-Encoding, Accept, X-Requested-With
Cache-Control: no-cache
Strict-Transport-Security: max-age=31536000; includeSubdomains; preload
X-Frame-Options: deny
X-Content-Type-Options: nosniff
X-XSS-Protection: 0
Referrer-Policy: no-referrer-when-downgrade
Content-Security-Policy: default-src 'none'; base-uri 'self'; child-src github.com/assets-cdn/worker/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com api.githubcopilot.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com/v1/engines/github-completion/completions *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.com/assets-cdn/worker/ gist.github.com/assets-cdn/worker/
Transfer-Encoding: chunked
X-GitHub-Request-Id: BB84:868ED:A2935F:EAADE1:667435D5
glwagner commented 3 months ago

What code are you running?

@simone-silvestri is this resolved by #80 ?

simone-silvestri commented 3 months ago

That error refers to the fact that the previous bathymetry data stored in the OceananigansArtifacts.jl repo has been deleted.

On the other hand, that data is not necessary anymore. In #80 you can build a bathymetry with

bottom_height = regrid_bathymetry(grid, connected_regions_allowed = 0)

I suggest to also add the keyword argument interpolation_passes to a value > 1 to smooth the bathymetry (the more passes the smoother the bathymetry). Also note that the convention for the moment is that the bathymetry is between 0-degrees and 360-degree longitude (not -180 and 180). So construct your grid with longitude = (0, 360).

glwagner commented 3 months ago

yeah and whatever code that is being ran, should be deleted or fixed

glwagner commented 3 months ago

Also note that the convention for the moment is that the bathymetry is between 0-degrees and 360-degree longitude (not -180 and 180). So construct your grid with longitude = (0, 360).

This is a little cryptic. Can you make it so that the wrong choice throws an error? I don't understand what needs to be done.

vtamsitt commented 3 months ago

This is the same issue I ran into a while back when running GlobalOceanBioME with one_degree_near_global_simulation. I have the missing bathymetry files on my local machine if you want them temporarily @francispoulin, but likely makes more sense to update to #80 as suggested rather than run the old code. Speaking of which, @glwagner I've been holding off but with #80 merged this may be now a good time to update GlobalOceanBioME to run with the newest CliMAOcean OMIP setup? If you in think it makes sense I'll start a separate discussion about this in the GlobalOceanBioME repo.

simone-silvestri commented 3 months ago

Also note that the convention for the moment is that the bathymetry is between 0-degrees and 360-degree longitude (not -180 and 180). So construct your grid with longitude = (0, 360).

This is a little cryptic. Can you make it so that the wrong choice throws an error? I don't understand what needs to be done.

For the moment a warning in the bathymetry right suffice I'll add it to #88

This is the same issue I ran into a while back when running GlobalOceanBioME with one_degree_near_global_simulation. I have the missing bathymetry files on my local machine if you want them temporarily @francispoulin, but likely makes more sense to update to #80 as suggested rather than run the old code. Speaking of which, @glwagner I've been holding off but with #80 merged this may be now a good time to update GlobalOceanBioME to run with the newest CliMAOcean OMIP setup? If you in think it makes sense I'll start a separate discussion about this in the GlobalOceanBioME repo.

I think it would be a good moment to update GlobalOceanBioME.

glwagner commented 3 months ago

Yes you can try that! We are working on validating CATKE for realistic global stuff. The latest Oceananigans also has a two-equation closure that can be tested. One missing piece I think is a near global configuration with restoring?

simone-silvestri commented 3 months ago

I opened a draft proposal for the restoring following the discussion in issue #81.

francispoulin commented 3 months ago

Thanks everyone for the replies!

@vtamsitt , that is very kind of you to offer but I don't need it right away. If the update includes bathymetry and winds, that would definitely solve my problem.

I was doing this today to prepare for a talk on Monday. I was fortunate to have a plot of topography from a while back. Sadly, I never plotted the winds at any time.

I am very excited to run this new code as I have been learning about OceanBioME recently and it'll be great to see it used in a global setting!

francispoulin commented 2 months ago

I guess we can return to this after #81 gets resolved. I'll keep it open in the mean time, unless peopel prefer that I close it.