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

Cached NWM data still requires internet access #123

Open
SorooshMani-NOAA opened this issue Apr 8, 2024 · 1 comment
Open

Cached NWM data still requires internet access #123

SorooshMani-NOAA opened this issue Apr 8, 2024 · 1 comment

Comments

@SorooshMani-NOAA
Copy link
Contributor

Using ensembleperturbation we setup many SCHISM run directories. Since this can be compute intensive for large ensembles we run the ensemble generation on compute nodes (no internet). In order to avoid the issue of downloading the data from compute node, I first setup a single run to cache the data and then setup the rest on the compute node.

At first I thought this solution should work, but then I realized PySCHISM still needs to have internet because the caching kicks in for data, but still metadata is fetched from the internet every time. See:
Metadata

paginator = self.s3.get_paginator("list_objects_v2")
pages = paginator.paginate(
Bucket=self.bucket, Prefix=f"model_output/{year}"
)
self.data = []
for page in pages:
for obj in page["Contents"]:
self.data.append(obj)

and
Data
cached_file = list(self.tmpdir.glob(f'**/{filename.name}'))
if len(cached_file) == 1:

@SorooshMani-NOAA
Copy link
Contributor Author

As a short term solution I can just copy paste the downloaded data from one setup directory to another, but since I'm using automation, around pyschism I was hoping to use the built-in caching capability in this case.

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

1 participant