markpayneatwork / ClimateOperators

An R package containing wrappers to the Climate Data Operators (CDO) and the NetCDF Operators (NCO)
GNU General Public License v3.0
27 stars 6 forks source link

problem with cdo installation #2

Closed maaba5 closed 3 years ago

maaba5 commented 3 years ago

Hi, after cdo installation using(devtools::install_github("markpayneatwork/ClimateOperators"). when I checked the version of cdo, I received this error:

cdo("--version") Error in system2("cdo", cmd.args, stdout = TRUE) : '"cdo"' not found [1] "Error in system2(\"cdo\", cmd.args, stdout = TRUE) : '\"cdo\"' not found\n" attr(,"class") [1] "try-error" attr(,"condition") <simpleError in system2("cdo", cmd.args, stdout = TRUE): '"cdo"' not found> attr(,"cdo.command") [1] "cdo --version"

any help?

thank yoyu

markpayneatwork commented 3 years ago

Hi,

There are a couple of potential explanations

Which platform are you running on?

Thanks,

Mark

maaba5 commented 3 years ago

thank you I solved this problem. I have two more question: 1- can we convert grib file to netcdf with this R package? 2-can we remap grid file using cdo remapbil ?

thank you

markpayneatwork commented 3 years ago

Hi,

The package is ajust a wrapper to the CDO set of tools, so whatever CDO can do, can be setup using this package. CDO supports grib files and remapping, so the answer should be yes to both questions. See the CDO documentation here:

https://code.mpimet.mpg.de/projects/cdo/

Best wishes,

Mark

maaba5 commented 3 years ago

Hi Mark thank you for you answer, I didn't understand how to use this line:(cdo -f nc copy file.grib2 file.nc) in R using climateOperator package? Any help? thank you

markpayneatwork commented 3 years ago

This would generate the command that you list, and run it: cdo("-f nc copy file.grib2 file.nc")