Questions tagged [nco]

NCO is the acronym standing for netCDF Operators, a collection of standalone operators that manipulate data stored in netCDF-accessible formats, including HDF4 and HDF5. It is frequently used on NCAR, NASA, NOAA, and model climate and weather datasets.

NCO is the acronym standing for netCDF Operators, a collection of standalone programs that manipulate data stored in netCDF-accessible formats, including HDF4 and HDF5. It is frequently used on NCAR, NASA, NOAA, and model climate and weather datasets.

References

245 questions
5
votes
3 answers

Overwriting specific cells in netcdf

Is there a netcdf operator (from nco or any python netcdf library) which can be used to overwrite specific cells in a netcdf file? I want to change the values of a small region in a netcdf file containing global climate data. thanks!
user308827
  • 21,227
  • 87
  • 254
  • 417
4
votes
1 answer

How to extract a single variable using NCO. Associated variable problem

I am trying extract to a single variable kd_490 from a NetCDF file (over thredds) using NCO. My code is below: ncks -v kd_490 -d lat,40.0,70.0 -d lon,-20.0,15.0…
Robert Wilson
  • 3,192
  • 11
  • 19
4
votes
3 answers

Merging multiple Netcdf files according to the vertical level

I have 34 netCDF (nc) files containing latitude, longitude, and the data in every file. Every filename containing a number which corresponds to the Pressure level in hPa (starts from 1 to 34 for respective pressure level from (1000 hPa to 0.4 hPa).…
Krishnaap
  • 297
  • 3
  • 18
4
votes
2 answers

Convert NetCDF depth from Float to Double

I have a couple hundred NetCDF files that I want to process through a geospatial analysis tool, however the tool requires the depth variable to be a double, and it is currently a float. I have found the below article convert all the variables and…
Laura808
  • 41
  • 1
  • 3
4
votes
2 answers

add a new counter index variable to a netcdf file that increases with time

I want to add a new variable to an existing netcdf file which simply increases linearly with the time variable of file, that is to say, on the first time slice the variable has the number 1 everywhere, on the second timeslice it is set to 2, etc. I…
ClimateUnboxed
  • 7,106
  • 3
  • 41
  • 86
4
votes
2 answers

How to identify each file of origin when concatinating many netcdf files with ncrcat?

I am concatenating 1000s of nc-files (outputs from simulations) to allow me to handle them more easily in Matlab. To do this I use ncrcat. The files have different sizes, and the time variable is not unique between files. The concatenate works…
4
votes
1 answer

How to concatenate multiple netCDF files with varying dimension sizes?

I have 20 netCDF files containing oceanographic CTD data. Each file contains the same dimension and variable names, however they differ in the size of the vertical coordinate (ie. CTD profiles inshore have a smaller depth range than profiles…
Jimbo
  • 67
  • 6
4
votes
1 answer

Circular lat/lon crop of a NetCDF file with Python

I'm working on a project which imports raw binary radar data from the National Weather Service ftp site to a server. Using an the Weather and Climate Toolkit data-export tool, I convert the data into a netCDF file. The following is the result of a…
WXMan
  • 310
  • 1
  • 12
4
votes
2 answers

How to concatenate monthly TRMM netCDF files into a single netCDF file using NCO or R on windows 7?

I have downloaded TRMM monthly precipitation rate in netCDF format from 1998 -2016, so approximately more than 200 files.The names of these files are 3B43.19980101.7.HDF.nc 3B43.19980201.7.HDF.nc 3B43.19980301.7.HDF.nc , and so on. I would like…
marie_r
  • 67
  • 1
  • 7
4
votes
2 answers

Truncating netCDF

I have a netCDF file of monthly surface air temperature from 1850-2005. How can I truncate the file in unix so that the new file has a time dimension from 1855 - 2005? And vice versa, truncating the file so that it is instead for 1850-2000?
Ali
  • 43
  • 3
4
votes
5 answers

Combine multiple NetCDF files into timeseries multidimensional array python

I am using data from multiple netcdf files (in a folder on my computer). Each file holds data for the entire USA, for a time period of 5 years. Locations are referenced based on the index of an x and y coordinate. I am trying to create a time series…
LCook
  • 97
  • 1
  • 1
  • 7
3
votes
1 answer

Mask out Islands and contour colors outside Greenland (Python)

I have this code below that plots the near air surface temperature of greenland, but, I need to mask out the colors outside Greenland and also the islands outside the main island of Greenland. Below is my code: import numpy as np import…
meteo_96
  • 289
  • 2
  • 11
3
votes
2 answers

Conda can't import module that's been installed

Others have asked about this, but my situation seems slightly different, and none of the suggestions they received worked for me (e.g. here, here, here). I'm using Anaconda Navigator on Windows, and trying to use the "nco" package. I installed it…
3
votes
1 answer

NetCDF spatially merging to global data

Currently I use global precipitation (ppt) and potential evapotranspiration (pet) data to calculate SPEI. As I have limited hardware resources, I divided global ppt and ppt data into 32 parts, each file covering 45x45deg and contains 756 data -…
user97103
  • 235
  • 1
  • 7
3
votes
2 answers

Compressing a netCDF file with the pynco package

I'm interested in compressing a NetCDF file in python using the pynco package. From the command line, I would usually use: nccopy -d 3 input_file.nc output_file.nc In python, I have tried the following: from nco import…
Ben
  • 143
  • 6
1
2
3
16 17