-
Notifications
You must be signed in to change notification settings - Fork 20
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
access to (ICON model) output and input #96
Comments
Hi @felix-mue, To 1) import eurec4a
cat = eurec4a.get_intake_catalog()
datasets = list(cat.simulations.ICON.LES_CampaignDomain_control) # show all available entries of a catalog level
ds = cat.simulations.ICON.LES_CampaignDomain_control.surface_DOM01.to_dask() # lazy loading of data In addition, this will only download the data that you are actually using in your analysis (keyword: lazy loading). No need to download all the TB of output 🥳 Please try it out! Does this answer your first question? |
To 2) |
Thanks for the quick reply! |
About accessing the data: While lazy loading is great for many places, for me it would actually be helpful to have one big download of the data (maybe subset by variables). Is that available as well? |
May I ask what your application is? The latency to access the files here should be fairly low and loading the data lazily ensures that you will always access the latest version. At https://howto.eurec4a.eu/eurec4a_mip.html we show you how you can download data with wget. The paths you can find in the eurec4a catalog files, e.g. here |
A simple barrier sadly: Our code is running in matlab, not python. So I have to access the data from matlab and assumed that isn't possible with the python package. |
Sorry to hear that! Maybe it's time for a change 🥳 MATLAB supports yaml files so you could read those files and grep the links. But honestly it seems like you would need to invent the wheel again. MATLAB's python support might also be something to look into but I'd be surprised if it works well. Another issue you might face with MATLAB is that the simulations are saved in the zarr-format. It seems like MATLAB has no dedicated driver for this format yet. However, zarr is now besides HDF5 also a supported backend of netCDF and is supported by the newer libraries. You should therefore be able to load the zarr-files (after downloading them) through the netCDF library. The syntax is however a bit unusual. So, here is an example how you can download a zarr-file from the catalog and read it with the netCDF library:
Note the change of the prefix and ending of the url compared to the one given in the catalog.
Unfortunately, reading a variable from this dataset is for this particular case not working on my end. It might be that the used compressor is not supported (although it seems) or the blosc library (we use
returns the metadata and then
|
@d70-t do you have an idea what is going on here? The |
You probably need netCDF >= 4.9 and there are some steps required for setting up netCDF to run with filters. |
If you really really want a download of a subset, I'd probably recommend to just open the data with intake / xarray, then do some |
Thanks a lot to both of you! I agree, of course I'd rather not download. I just didn't see a way to access it otherwise (within matlab). I will try the cross-accessibility features @observingClouds mentioned, but I also don't have high hopes. |
I ended up downloading the data with a python script to save them as netcdf files. This is of course unfortunate, because the pythonic way of accessing this data is way more comfortable! Thanks a lot again for your help and providing the data in the first place! |
I am interested in data from the ICON model runs (in- and output), but this question could be generalised to other data as well.
The text was updated successfully, but these errors were encountered: