Questions tagged [pynco]
9 questions
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
2
votes
1 answer
NCO/pynco: ncea can't find files from within Python
I am trying to run ncea from within python to make monthly averages from daily files over many years of data.
The command:
ncea -v analysed_sst,sea_ice_fraction /mnt/r01/data/goes-poes_ghrsst/daily/200301*.nc 200301-gp-monthly.nc
runs fine in the…

melhawaii
- 31
- 4
1
vote
1 answer
pyNCO: extract/subset/slice netcdf by dimensions (bbox) in a single command - syntax issues
With NCO I can easily create subset from netCDF file based on given coordinates, e.g.:
ncks -d latitude,40.,50. -d longitude,10.,30. in.nc out.nc
But I do not know to reproduce such command with pyNCO. Analogical syntax could…

jurajb
- 113
- 4
1
vote
0 answers
TypeError when initializing Nco object using python/pynco
I am new to using using NCO tools and their Python bindings for working with netCDF files. I have successfully installed the NCO tools and the pynco package (using pip) following the instructions here. But I am getting an error when I try to…

user1816413
- 11
- 1
0
votes
2 answers
NCO permutation command in Python
I need to permute the dimensions of my netcdf file from time,lat,lon, to lat,lon,time.
The NCO command for that purpose is : " ncpdq -a lat,lon,time input.nc input_fixed.nc"
How can I run this command using Python library 'pynco' please ?
0
votes
1 answer
How to modify netcdf file with PyNCO ncap2?
I'm trying to use NCO command ncap2 in python script for changing time units in the climatology NetCDF-file:
from nco import Nco
nco = Nco()
nco.ncap2(input='in.nc', output='out.nc', options =['-s', '\\"time@units=\\"days since 00-12-30…

dkush
- 1
0
votes
1 answer
Did I install pynco incorrectly? How to troubleshoot using NCO in python
I recently came across NCO, which I wanted to use within Python. How do I know if I've correctly installed pynco/if it is operating correctly?
I installed both nco and pynco through conda-forge/conda in my working environment (named py37), but…

pbjelly
- 1
- 1
0
votes
1 answer
NCO/pynco: ncks command unable to find/move file, file is present
I'm using pynco to run a ncks command from within a Python script. It's reporting an error when trying to perform a move within the nco_fl_mv() function:
$ C:/home/Anaconda3/Library/bin/ncks --dmn=lon,0,28,1…

James Adams
- 8,448
- 21
- 89
- 148
0
votes
1 answer
Error when issuing ncks command, unexpected bytes object instead of string
When I issue an NCO call usign pynco for ncks I am getting an error, it looks like a bytes object is being sent instead of a string, resulting in this:
pydev debugger: starting (pid: 7864)
2018-02-05 11:30:53 INFO Start time: 2018-02-05…

James Adams
- 8,448
- 21
- 89
- 148