Questions tagged [netcdf]

NetCDF (Network Common Data Form) is a binary file format for storing array-oriented scientific data. Use this tag for questions about programmatically encoding and/or decoding data to/from NetCDF files.

NetCDF (Network Common Data Form) is a binary file format for storing array-oriented scientific data.

From version 4, NetCDF files use the HDF5 format as container, and therefore can be read by HDF5 readers. Reliance on the HDF5 format also enabled easy parallel I/O and efficient compression.

References

2306 questions
0
votes
1 answer

How to delete a group variable while keeping the group structure of a netcdf in python or bash?

I have a .nc file with a group structure, one of the groups containing a variable I need to delete. Using xarray, if I want to delete the variable I can only extract its group as a new .nc file. ds = xr.load_dataset(path_test,group='/data_01/ku') ds…
benben
  • 1
0
votes
1 answer

Extract data of specific dates from NETCDF dataset

I have netcdf data which contains daily for the year 2020 with specific humidity as the variable, and an excel file that contains the date of all the cyclones that formed over the North Indian Ocean. Mostly, when we want to extract data within a…
Debashis Paul
  • 67
  • 1
  • 10
0
votes
1 answer

Extracting dates that satisfied multiple conditions using NCO/CDO or bash

I have a netcdf file containing vorticity (per sec) and winds (m/s). I want to print the dates of gridpoints that satisfy the following conditions: 1). Vorticity > 1x10^-5 per sec and winds >= 5 m/s at a gridpoint. 2). The average of vorticity and…
Lyndz
  • 347
  • 1
  • 13
  • 30
0
votes
1 answer

Extract NetCDF Variable and create New NetCDF

I need some help with manipulating NetCDF files. In total I have 10 files for 10 years respectively. Each year hast multiple (the same) variables, some of them also covering daily values. Here, I show you one example for the structure: (base)…
Thessla7
  • 17
  • 3
0
votes
2 answers

How to merge different shaped netcdf4 files?

I am storing weather forecasts as netcdf4 files. These netcdf4 files are batched following the google maps tiles principle. This means I define a zoom level (here 6) to get the extent of each tile. Based on that information I used the following code…
dl.meteo
  • 1,658
  • 15
  • 25
0
votes
1 answer

Set Geographic Coordinate System to WGS84 for netCDF Raster Data in R

I have a netCDF file containing bathymetry data that I am trying to combine on the same plot with shapefiles that are in WGS84. When I plot the netCDF data it doesn't have any coordinate system, how can I set a coordinate system for the netCDF data…
Ryan Gary
  • 71
  • 7
0
votes
0 answers

How to extract data from netCDF to CSV using simple python script?

This question is related to data extraction from NetCDF files (*.nc) to CSV, to be further used by researchers for other applications - statistical analysis along time series that are not array-like data. There are two alternatives for beginners in…
Marian
  • 87
  • 1
  • 3
  • 13
0
votes
0 answers

How to convert netcdf file into csv?

I am trying to load nc4 files into Power BI but there is no option to load nc4 format into Power BI, or instead is there any way to convert nc4 files?
0
votes
2 answers

Issues with Scipy interpolate griddata

I have a netcdf file with a spatial resolution of 0.05º and I want to regrid it to a spatial resolution of 0.01º like this other netcdf. I tried using scipy.interpolate.griddata, but I am not really getting there, I think there is something that I…
OlegRuskiy
  • 173
  • 2
  • 12
0
votes
1 answer

Python: how to convert the first dimension of a netcdf file to a dataframe?

I am quite new with NetCDF files. I am trying to analyze a dataset that contains global information of land use from 1899 to 2019. I would like to select a year and convert the information into a dataframe. This is what I am doing import xarray as…
emax
  • 6,965
  • 19
  • 74
  • 141
0
votes
2 answers

Loop over netCDF datetime format and calculate mean based on month

I have a dataset (a netCDF4 input_file) with the dimensions (504, 720, 500) where the first is a datetime value: 0 1979-01-15 1 1979-02-15 2 1979-03-15 3 1979-04-15 4 1979-05-15 ... 499 2020-08-15 500 …
B.Quaink
  • 456
  • 1
  • 4
  • 18
0
votes
1 answer

TypeError: can't convert type 'MaskedArray' to numerator/denominator

>>> i = 0 >>> j = 26 >>> sla = nc['sla'] >>> lon = nc['longitude'][:] >>> lat = nc['latitude'][:] >>> cs = ax.contourf(lon, lat, mean(sla[i:i+j])*100, levels = 25, cmap = 'bwr', transform=ccrs.PlateCarree()) Traceback (most recent call last): …
DUM
  • 1
0
votes
1 answer

How to find average value for netCDF over entire time period recorded in dataset (Python)?

I have downloaded a published netCDF file that contains various climate data globally for 120,000 years into the past. (See public .nc file contained here: https://figshare.com/articles/dataset/LateQuaternary_Environment_nc/12293345/3). There are…
g.is.stuck
  • 31
  • 9
0
votes
1 answer

Calculate mean from only one variable in pandas dataframe and netcdf

I am aiming to calculate daily climatology from a dataset, i.e. obtain the sea surface temperature (SST) for each day of the year by averaging all the years (for example, for January 1st, the average SST of all January 1st from 1982 to 2018). To do…
OlegRuskiy
  • 173
  • 2
  • 12
0
votes
1 answer

How to select data from netcdf file by specific variable value?

I am searching for an option to select data from a NetCDF file at a specific variable value. The dataset contains time, lat, and lon coordinates and a range of variables. One of these variables is a mask with specific values for Land/ open ocean/…
user17681970
  • 123
  • 1
  • 1
  • 8
1 2 3
99
100