Project

General

Profile

CDO in python multilink

Added by Abinesh Ganapathy 3 months ago

Hello,

I don't have much experience in python-cdo. I want to run the following CDO script in python, which has multiple linkages.
I am trying but couldn't succeed in this. Kindly help me convert the following script into python-cdo format.

cdo -O -z zip_1 -mergetime -apply,-selname,HQprecipitation,lat,lon,precipitationCal,time,time_bnds [ 3B-DAY.MS.MRG.3IMERG.2019*.nc4 ] output.nc4

Replies (2)

RE: CDO in python multilink - Added by Karin Meier-Fleischer 3 months ago

Try

from cdo import Cdo
cdo = Cdo()

cdo.mergetime(input='-apply,-selname,HQprecipitation,lat,lon,precipitationCal,time,time_bnds [ 3B-DAY.MS.MRG.3IMERG.2019*.nc4 ]', 
              options='-O -z zip_1', 
              output='output.nc4')

Have a llok at https://code.mpimet.mpg.de/attachments/download/27273/python_cdo_introduction.pdf

RE: CDO in python multilink - Added by Abinesh Ganapathy 3 months ago

Thanks a lot for responding and sharing the manual. Your solution worked for me perfectly.

    (1-2/2)