Questions tagged [netcdf]

NetCDF (Network Common Data Form) is a set of software libraries and self-describing, machine-independent data formats that support the creation, access, and sharing of array-oriented scientific data.

Filter by
Sorted by
Tagged with
1 vote
1 answer
11 views

Creating separate rasters from a NetCDF with multiple time steps

I have a NetCDF of daily precipitation, where I need each time step as a separate ASCII file. I can import the NetCDF into ArcMap using the "Make NetCDF Raster Layer". When I try running the ...
  • 61
0 votes
1 answer
23 views

Xarray computing of a new variable on the basis of the existing one

I have netcdf file with calculated average temperature (°F). My goal is to create new data variable within the same file with cooling / heating degree days using that average. This format is totally ...
0 votes
0 answers
15 views

Zonal stat of imd rainfall .nc file for polygons within shapefile using PyQGIS

How to extract imd rainfall data for polygons(district level) within a shapefile?. Used PyQGIS , solution (given below) wherein output for each day of all polygons is exported as .csv file. Had to ...
0 votes
0 answers
10 views

Viewing SST NetCDF file in QGIS 3.22.6

I am trying to load and view a sea surface temperature Netcdf file from NOAA into QGIS 3.22.6. I downloaded the mean monthly sst data from here: https://psl.noaa.gov/data/gridded/data.noaa.oisst.v2....
  • 123
0 votes
1 answer
25 views

NetCDF stretched along Y (latitude) axis

I'm working with NOAA temperature NetCDF files and trying limit area of interest to the US area only using bounding box. In Jupyter Notebook I wrote few lines to do it and on the plot everything looks ...
0 votes
0 answers
8 views

Projection issue of processed NetCDF data: hemisphere extents cut off

I downloaded global climate data in a NetCDF format, with the following extent: 0.0,-90.0 360.0,90.0 (so, basically the western hemisphere was on the right, see photo below). I did some processing to ...
  • 1
0 votes
0 answers
11 views

Spatial reference <Undefined> for raster from NetCDF file on ArcMap

I am having problems loading a NetCDF file into a raster on ArcMap. The file is pretty regular (it's the data from a research paper) it has one variable associated with (lat,lon) coordinates. I use ...
1 vote
0 answers
55 views

How to properly save netCDF file with stars

I'm trying to save properly formatted stars object to netCDF file with no success. Here is a reproducible example of what I'm doing. library(tidyverse) library(stars) # example data ex <- tibble(...
  • 247
0 votes
0 answers
21 views

Apply function at grid cell level across layers of a raster file

I have a netcdf raster object with multiple layers (time: 30 years * 12 month = 360 steps). The raster is constituted of multiple grid-cells (say 1000). I want to linearly detrend each month ...
0 votes
1 answer
42 views

Viewing global fire weather indices NetCDF file as correct location on Earth in QGIS

I am trying to view the following Drought Code file downloaded from the Zenodo server: [https://zenodo.org/record/3540926/files/drought_code_2017.nc?download=1], but the parts of Canada and the US are ...
0 votes
0 answers
15 views

Creating NetCDF

I have to create a NetCDF file from GeoTIFFs, ETRS_1989_LAEA, EPSG:3035. I'm running the following code: import datetime as dt from datetime import date from osgeo import gdal import netCDF4 import ...
0 votes
1 answer
65 views

Create one NetCDF file from multiple NetCDF files using Python [closed]

I am downloading climate data in NetCDF format. For each variable (e.g. 'precipitation'), I need to merge 9 NetCDFs, each belonging to an unique climate model. Each NetCDF has the same size (time, lat,...
  • 151
0 votes
1 answer
34 views

NetCDF 500 metres shifted and unknown PCS

I'm trying to merge 12 GeoTIFFs monthly files (ETRS_1989_LAEA, EPSG:3035) to NetCDF as following: import datetime as dt from datetime import date from osgeo import gdal import netCDF4 import numpy ...
0 votes
1 answer
15 views

Atributes disapear when converting from tif to netCDF with gdal translate

I am using python to convert multiple tif files to netCDF. The code is the following: def tif_to_nc(input_name): # Convert TIF to netCDF inputfile = project+"process/{}.tif".format(...
1 vote
1 answer
42 views

Reading NetCDF subset R

I'm having trouble trying to read a plus 2Gb NetCDF file from https://cds.climate.copernicus.eu/cdsapp#!/dataset/satellite-land-cover?tab=form in R If I try to read the whole file R returns me a ...
  • 13
0 votes
1 answer
64 views

NetCDF file and shapefile in wildly different locations and of disproportionate sizes when projected with the same CRS on QGIS?

I am trying to map global greenhouse gas emissions data from the European Commission's Emissions Database for Global Atmospheric Research (EDGAR) and Northern Arizona University's Fossil Fuel Data ...
  • 113
1 vote
2 answers
42 views

Loading and reprojecting .nc file without projection

I am trying to extract some bands from a .nc file. I don't know the file projection (if there is one), thus I created in GRASS GIS a newLocation with no projection (just a XY Cartesian plane) and ...
1 vote
1 answer
72 views

Merging two overlapping NetCDF files

I'm not an expert on this kind of stuff. Basically I'd like to merge two .nc files, one from GOES-R G16 and the other from GOES-R G17. The files contain the same variables and refer to the same time; ...
  • 63
1 vote
0 answers
42 views

Masking netCDF data with 2D coordinates using a shapefile

I'm trying to mask netCDF data (with 2D longitude and latitude coordinates) with a shapefile. I have one method, which I can't really finish off and I don't know if I'm doing it right. import fiona ...
  • 141
0 votes
0 answers
20 views

Errors in reading multi NC files

How can I sort out the errors when I read multi nc files in Python? import netCDF4 as nc #-- list of files file_list = "/nesi/nobackup/niwa00004/yangy/DEEPWAVE/NZLAM_PLOT/DATA_OUTPUT/01JULY/met*....
0 votes
0 answers
18 views

NC file is not at the correct size and location

I'm trying to display on QGIS a .nc file of sea temperature of the Eastern Mediterranean, but it doesn't have the good size and isn't at the good place on the OpenStreetMap layer that is under (see ...
0 votes
0 answers
26 views

How to convert mask in netCDF to one polygon shp, with QGIS/GDAL polygonize or python?

I made a 0-1 mask in netCDF, with coordinates lat lon. The mask itself looks like: 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 I have succeeded to read it, ...
0 votes
0 answers
13 views

Incorporating Add Data step in ModelBuilder for ArcGIS Pro to create multidimensional raster from NetCDF file

There are functions in ArcGIS Pro to read in NetCDF files and create a single value raster but in order to create a multi-dimensional raster one needs to use Add Data and select multidimensional ...
0 votes
0 answers
58 views

NetCDF to GeoTIFF

I downloaded a set of NetCDF files of CMIP6 climate projections. Here are the specifications of my NetCDF file: dimensions(sizes): time(12), j(292), i(362), bnds(2), vertices(4) variables(dimensions): ...
0 votes
0 answers
61 views

Clipping NetCDF files with a geodataframe in Python

I have monthly estimates of PM 2.5 for 20 consecutive years stored in NetCDF files with a precision of 0.01°x0.01° (i.e. for each 0.01°x0.01° square on the world map, there is an estimate of PM 2.5). [...
0 votes
1 answer
60 views

How can I keep the time information while converting NetCDF file to dataframe?

My final objective is to perform a regression (latitude predicted by precipitation). To achieve that, I have download this dataset from Copernicus: https://surfobs.climate.copernicus.eu/dataaccess/...
1 vote
1 answer
35 views

Creating a shapefile from .csv file on QGIS to clip NetCDF files with Python

I have a .csv file containing bounding boxes of cities I want to study. I have NetCDF files I'd like to clip and I understood that, with Python, using shapefiles was the easiest way to go. I added a ...
0 votes
1 answer
135 views

R terra not reading attributes from NetCDF file

I'm trying to read precipitation data from the Global Meteorological Forcing Dataset for land surface modeling dataset (http://hydrology.princeton.edu/data.pgf.php). library(terra) pp <- rast("...
  • 11
1 vote
1 answer
38 views

Unable to get points from NetCDF even ogrinfo shows it has data

I need to extract point data to convert it to GeoJSON from a NetCDF file, the file seems ok when issuing ogrinfo ultimo.nc INFO: Open of éultimo.nc' using driver énetCDF' successful. Metadata: ...
  • 197
1 vote
0 answers
109 views

Mask NetCDF file data with multiple variables from shapefile in Python

Most of the solutions to this I've seen online only work on 3-D time series data, but my NetCDF files has more than one variable. It has a data variable named Albedo and I need to plot it using a ...
1 vote
1 answer
26 views

Projection systems mismatched

I was planning on importing a temperature file (in NetCDF format) as a raster layer. Here is the link of the temperature data (https://psl.noaa.gov/data/gridded/data.cpc.globaltemp.html). The data ...
  • 11
0 votes
0 answers
46 views

Masking a curvilinear/rotated grid netCDF with a shapefile?

Obviously it's difficult to reproduce a netCDF here on Stackexchange, especially a curvilinear/rotated grid type. So let me start with what I already know. I know how to mask a regular netCDF with ...
  • 141
1 vote
0 answers
54 views

How to give pixel resolution to NetCDF file

I am trying to create a NetCDF file in Python to dictate where to apply different rainfall time series. The dimensions of my study area are Y: 2000, X: 3000. I've tried using 1.667 and 10 for lats [:] ...
1 vote
0 answers
40 views

Saving PostGIS raster as netCDF from SQL Error

I am trying to save a raster table in PostGIS as a netCDF file. When doing so, I get the following error: rt_raster_to_gdal: Output GDAL driver does not support CreateCopy and/or VirtualIO. Reading ...
  • 43
0 votes
2 answers
255 views

Clip NetCDF files by shapefile

I have 7000 nc4 files and I need to clip netCDF files based on a shapefile, but I have a problem with rasterio. After I run this code, I got the error: #AttributeError: module 'rasterio' has no ...
  • 17
0 votes
0 answers
162 views

Read and extract variables of NetCDF file with import Dataset from s3 bucket

I access noaa-goes16 data from S3 using fsspec as follows: fs = fsspec.filesystem('s3', anon=True) files = ['s3://' + f for f in fs.glob("s3://noaa-goes16/ABI-L2-ACMC/2020/120/*/*.nc")] ...
0 votes
0 answers
19 views

"Make NetCDF Raster Layer" tool causes ArcGIS Pro to freeze

ArcGIS Pro is freezing up whenever I use the tool "Make NetCDF Raster Layer" It was working fine until I got to layer 20, any ideas? This has happened on both my personal laptop and a high ...
  • 1
0 votes
1 answer
26 views

Define raster extent

I have a raster data set I imported to ArcGIS from a netCDF file. ArcGIS doesn't read the projection or extent correctly due to issues with the input file. However, I have the correct values for these ...
  • 33
1 vote
1 answer
171 views

R Terra: Write multiple time series variables to NetCDF

I have multiple variables in a timeseries which I want to save as NetCDF. But when I combine all variables with terra::sds() the time information disappears. I tried the following: library("terra&...
  • 199
1 vote
0 answers
28 views

How to delete an island in NetCDF file using QGIS

I have a NetCDFf file (https://drive.google.com/drive/folders/10XvLZPC9vX9odkfU6aV6qBIxRe9IQvyZ?usp=sharing) The variable in the plot below is inside yelmo2d.nc --> z_srf The file contains height ...
  • 263
1 vote
1 answer
54 views

Spatially merging two netCDF raster layers into one layer while using ArcMap

I tried to merge two .nc-files into one within ArcMap. There is one file containing the specific values for North America and one containing the values for South America (see the image below). My ...
0 votes
1 answer
131 views

Converting a NetCDF with multiple variables to GeoTIFF calling GDAL_TRANSLATE function from Python

gdal_translate -a_srs EPSG:4326 NETCDF:"file_name.nc":variable_name output_file_name.tif -a_ullr -9.21200 53.28058 -8.88045 53.11338 I am working on some NetCDF files that include multiple ...
1 vote
1 answer
84 views

How to convert crs_wkt starting with GEOGCRS to a ogc_wkt string (to use rioxarray.reproject_match)

I have two xarray data arrays (1. land_data, 2. climate_data) that I want to reproject and match (rio.reproject_match()): climate_data_matched = climate_data.rio.reproject_match(land_data) Land data ...
  • 33
0 votes
2 answers
64 views

Calculate seasonal precipitation and temperature from CRU TS 4.05 in ArcGIS Pro

The Goal: To calculate the average spring (Mar-Apr-May) and summer (Jun-Jul-Aug) precipitation and temperature for a series of specific, discrete locations. These points represent sites (I'm an ...
  • 1
1 vote
1 answer
152 views

Add projection to rioxarray dataset in Python

I've downloaded a netcdf from the Climate Data Store and would like to write a CRS to it, so I can clip it for a shapefile. However, I get an error when assigning a CRS. Below my script and what is ...
  • 151
1 vote
1 answer
61 views

What is origin of term "network" in Network Common Data Form (NetCDF) format specification

I see (on Wikipedia) that the NetCDF format evolved from a specification for storing multidimensional data called the "Common Data Format". Semantically... the word "network" has a ...
0 votes
0 answers
46 views

Making NetCDF feature layer in ArcMap

I am using ArcMap 10.6. I have multiple netCDF files in a folder, where I try to iterate through them using the "Iterate Files" tool in the ModelBuilder. For each nc file, I simply want to ...
0 votes
2 answers
327 views

Converting a epoch time number to a datetime stamp in a dataframe

I worked on this a few days and got fairly far with it but I still cannot figure out how, or why, I fail to convert the epoch time stamp to a datetime. I tried several methods but I since changed the ...
  • 1,263
1 vote
0 answers
89 views

How to use raster calculator to sum multiple bands' value of a raster layer in QGIS Graphical Modeler?

I have 12 bands in a raster layer which I would like to sum up to produce a single layer. Interestingly, the raster calculator tool does the job while running it (QGIS interface)[ but fails to do so ...
2 votes
0 answers
49 views

Mapping netCDF file in the right location with different value and location files

I'm looking to work with data from the Sentinel-3 Sat of ESA. I downloaded data in a zip with multiple netCDF files. I want to open the data in QGIS in order to visualise it. I figure out that the ...
  • 37

1
2 3 4 5
13