660 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
-3
votes
0
answers
29
views
How can I handle climate model evaluation between CMIP6 and CHIRPS, ERA5 in python colab [closed]
I initially exported CHIRPS and CMIP6 rainfall from Google Earth Engine as CSV for downstream analysis in Python/Colab. However, I am observing inconsistencies likely related to calendar handling, ...
1
vote
1
answer
53
views
Assign values from array 1 to array 2 with different grid based on nearest lonlat coordinate in Python
I have two NetCDF4 files with different grids and dimensions (but both approximately cover the same area, see images below). One has information on land-use, the other on topography.
I now want to ...
0
votes
1
answer
41
views
Assign new dimension to xarray.Dataset using existing coordinates
I have an xarray.Dataset that looks like this, which is available here: https://psl.noaa.gov/thredds/dodsC/Datasets/NARR/Dailies/monolevel/acpcp.1979.nc:
<xarray.Dataset>
Dimensions: ...
1
vote
1
answer
190
views
How to select from xarray.Dataset without hardcoding the name of the dimension?
When selecting data from an xarray.Dataset type, the examples they provide all include hardcoding the name of the dimension like so:
ds = ds.sel(state_name='California')
TLDR; How can you select from ...
1
vote
1
answer
66
views
Slicing netCDF4 dataset based on specific time interval using xarray
I have a netCDF4 dataset for the following datatime which is stored in _date_times variable:-
<xarray.DataArray 'Time' (Time: 21)> Size: 168B
array(['2025-01-30T00:00:00.000000000', '2025-01-...
-1
votes
1
answer
173
views
Export to netcdf / .nc file from a pandas DataFrame
I want to multiple data extract from cmip6 model data and save as netcdf file by using the following scripts:
import pandas as pd
import xarray as xr
from netCDF4 import Dataset
nc_file = (r"...
-1
votes
1
answer
129
views
Error at HDF5 layer using NCO trying to convert netcdf3 to 4
So i tried this
ncks -C -v expver in.nc expver.nc
ncks -5 -C -x -v expver in.nc in_5.nc
ncrename -d latitude,lat -d longitude,lon -d valid_time,time
-v latitude,lat -v longitude,lon -v ...
-1
votes
1
answer
133
views
MTG Lightning AFA data plot
I am attempting to plot the MTG LI level 2 data (AFA), but I am encountering difficulties. The code I have written is as follows:
import xarray as xr
import matplotlib.pyplot as plt
import cartopy.crs ...
0
votes
1
answer
82
views
Deleting a dimension with NCO
I used NCO's ncrename to rename longitude, Latitude and valid_time to long,lat, and time. So that I can run the data through a different package that only excepts the mentioned names ( Climate Indices)...
0
votes
2
answers
278
views
Issue with renaming netCDF dimensions with NCO's ncrename [closed]
I used NCO's ncrename to rename longitude, Latitude and valid_time to long,lat, and time. So that I can run the data through a different package that only accepts the mentioned names.
the original ...
-2
votes
1
answer
108
views
Which keyword to use for extracting data from netCDF file
The header of a netCDF file reads:
netcdf gpw_v4_population_density_rev11_2pt5_min {
dimensions:
longitude = 8640 ;
latitude = 4320 ;
raster = UNLIMITED ; // (20 currently)
...
2
votes
3
answers
233
views
Sum of corresponding values from different arrays of the same size with Python
I'm rather new to Python so it's quite possible that my question has already been asked on the net but when I find things that seem relevant, I don't always know how to use them in my code (especially ...
-1
votes
1
answer
147
views
plotting wind direction from netcdf file using quiver
I am doing data visualization from netcdf file (weather data), i want to plot the wind direction as well
but it is not working:
ucomp=getvar(ncfile,'U10',timeidx=i)
vcomp=getvar(ncfile,'...
0
votes
0
answers
59
views
netCDF polygons conversion to fixed-sized raster image
I'm trying to convert data from netCDF files; the data contains polygons and values for methane concentrations.
from matplotlib.patches import Polygon
import cartopy.crs as ccrs
import cartopy.feature ...
0
votes
2
answers
99
views
How can I debug my NCO/Meteocean-API code to obtain atmospheric data?
I am currently trying to utilize the meteocean-api in Python to download and use NORA3 data. This uses the nco package in the background to work with the files. I downloaded it, and all of its ...