I have one NetCDF file (region.nc) that I want to multiply to multiple NetCDF files such as the one in the picture using -mul from CDO.:

The output should be new NetCDF files resulting from the multiplication. I am using Python, seeking a solution within the CDO operator:

from cdo import *   
cdo = Cdo()
  • This is the file for wsgmax.nc: wsgmax.nc

  • This is region.nc content:

  • @Felipe D. this is specifically what I want
    – Sui
    Commented Oct 21, 2021 at 11:57
  • netcdf files can have many, many variables in them. What variable in region.nc do you want to multiply by which variables in wsgmax.....nc? And are they all conformant?
    – Dave X
    Commented Oct 22, 2021 at 13:23
  • @DaveX I want to multiply the variable ['wsgmax10m'] in the wsgmax.nc file, this file is in hdf so it has other variables depending on it, which makes the multiplication get a lot of error regarding the other variables for example this is the wsgmax.nc structure (I edited the question to have the wsgmax.nc structure and also the region.nc structure. region.nc has (Band1(lat=1646, lon=1831)) variable
    – Sui
    Commented Oct 22, 2021 at 16:31


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.