2,367 questions
1
vote
0
answers
37
views
Error "InvalidVersion: Invalid version: 'unknown'" when triying to load netcdf files using xarray
I'm trying to load some .nc files this way:
ds = xr.open_dataset('path/to/file.nc')
At first I get no error message, but when I try to operate or simply visualize the data I get this really long ...
0
votes
0
answers
43
views
Global climate data averaging
I am kind of new to CDO, and I am trying to create a global time series of percentage of areas under higher rainfall (prcp > 100 mm) for the period 1979-2025. Can anyone help me review my code if I ...
1
vote
1
answer
56
views
Grouping daily climate data by meteorological season in Python
I have downloaded some netCDF files that contain daily data. Each file contains 365 days, so one year. This is the data structure of the first file is included below.
I want to write a function to ...
1
vote
1
answer
116
views
HTTPError: 400 Client Error: Bad Request for url. Plot an Ensemble of CMIP6 Climate Projections — C3S Training
I am following the code from this tutorial.
https://ecmwf-projects.github.io/copernicus-training-c3s/projections-cmip6.html
When I type:
# DOWNLOAD DATA FOR HISTORICAL PERIOD
c = cdsapi.Client(url=...
0
votes
0
answers
148
views
Convert NETCDF files into TIF files
I’m creating a Python program that converts NetCDF files into GeoTIFFs, allowing the user to select the variable and time step using a Tkinter interface.
The conversion works, but I’m having a ...
0
votes
0
answers
74
views
Adding global attributes to existing netCDF file in Xarray
I have netCDF files of oceanographic data processed in Python, that I'd like to update the global attributes of (i.e., add the same attributes to a bunch of files). Tried doing it in Xarray per their ...
0
votes
1
answer
124
views
How can I concatenate 10 netcdf files along the time axis, while also retaining the attributes of each individual file
I am trying to concatenate 10 netCDF files that are output files from a software named Ichthyop. Each of the files is a result of a lagrangian simulation of particles drifting in the Eastern ...
0
votes
1
answer
64
views
Extreme trends in GSL (Growing Season Length) due to missing years in ERA5-Land based calculation
I calculated the Growing Season Length (GSL) index for the 1950–2023 period in Turkey using ERA5-Land daily mean temperature data. According to the definition:
First, find the first occurrence of at ...
0
votes
0
answers
71
views
Convert wrfout to netcdf
I use Python version 3.9.18 to reading wrfout files (name like: wrfout_d02_2020-01-01_00:00:00) and get T2, Q2, PSFC, U10, V10, ACSWDNB variables and combine all days in the month to a output netcdf ...
0
votes
0
answers
104
views
Xarray apply function to every element of dataset
I currently have to do some calculations on a netcdf dataset. For this, I have to apply a function to each non-NaN element.
Here is my current approach:
import xarray as xr
def calc_things(wind_speed)...
0
votes
0
answers
58
views
Reduce memory usage in CDO collgrid command
I have 78 netcdf files each around 17MB, with shape (time=1, x=2048, y=2048) to be merged spatially. The single timestep is shared for all 78 files. The collgrid merge command below was able to ...
2
votes
1
answer
186
views
Reading netCDF file with data not on a grid
I am trying to convert portions of a netCDF (.nc) file into a .csv and I am having some issues when I try and combine the portions I separated out into one matrix. This is the first time I have ever ...
2
votes
2
answers
183
views
How to extract OPeNDAP data for a single location in R?
I am trying to download vegetation index data for a single point location, and I want it to be automated in R so I can do this for multiple points in different runs. So I found the opendap.catalog ...
0
votes
0
answers
95
views
Error in saving a very large xarray dataset to zarr in python
I have global daily radiation data for 19 years. It is divided into one netCDF file for every day (so around 7000 files). I am loading all the files together as a single xarray dataset. This takes ...
0
votes
0
answers
57
views
MetPy "interpolate_to_isosurface" results in "IndexError: Unlabeled multi-dimensional array cannot be used for indexing: pressure_level"
I need help on the usage of MetPy's interpolate_to_isosurface function (link).
My goal was to interpolate a gridded meteorological dataset, such that its vertical coordinate is transformed from ...