0

I have opendap Link which contains 62 zip files and this each zip files contains one netcdf files with names like "GCP-GridFEDv2022.2_1959.zip" for each year. Now I don't want to download it's of size nearly 500gb. Therefore, I want to access it using the remotely using opendap python or netcdf. But I am unable to do it.

I want to extract the variable called "CO2/TOTAL" from each zip file and to make a area average of it.

Here the code that I tried.

import xarray as xr
from pydap.client import open_url
from pydap.cas.urs import setup_session

dap_url="http://opendap.uea.ac.uk:8080/opendap/hyrax/greenocean/GridFED/GridFEDv2022.2/contents.html"
data=xr.open_dataset(dap_url);

This chunk of code landing me on an error showing netcdf file not found. Looking forward to an easy solution code.

Expecting:

To load each datafiles remotely. Then extract the "CO2/TOTAL" from each files.

Thanks in advance.

Shubho
  • 1
  • 1
  • As of [https://docs.xarray.dev/en/stable/generated/xarray.open_dataset.html](https://docs.xarray.dev/en/stable/generated/xarray.open_dataset.html) you can only open data sets from the url and not a zipped one. You need to unzip them before opening. – Benjamin T. Schwertfeger Mar 26 '23 at 16:59

0 Answers0