0

I'm trying to use climate data from Copernicus using the s2dverification package. The package requires CDO (Climate Data Operator) installed in the system for data manipulation. I have CDO version 1.9.5 installed on computer (windows 10) under cygwing but when I try to Load the data it fails. I look for related issues but I found nothing. Any ideas? thanks in advance

library(s2dverification) sdates <- paste0(1993:2015,'0301')

Load(var="t2m",exp=list(list(path = "D:/Copernicus/seasonal_forecasts/cmcc_1993_2015/daily_mean/t2m/$VAR_NAME$_$START_DATE$.nc")),sdates=sdates,leadtimemax=180,storefreq="daily")

  • The load call you issued is:
  • Load(var = "t2m", exp = list(list(...)), obs = NULL, sdates = c('19930301', '19940301', ..., '20150301'), nmember = NULL, leadtimemin = 1, leadtimemax = 180,
  • latmin = -90, latmax = 90, lonmin = 0, lonmax = 360, output = "areave", grid = NULL, storefreq = "daily", ...)
  • See the full call in '$load_parameters' after Load() finishes.
  • Fetching first experimental files to work out 'var_exp' size...
  • Exploring dimensions... D:/Copernicus/seasonal_forecasts/cmcc_1993_2015/daily_mean/t2m/t2m_19930301.nc Error in .LoadDataFile(work_piece, explore_dims = TRUE, silent = silent) : Error: CDO libraries not available
ClimateUnboxed
  • 7,106
  • 3
  • 41
  • 86
JMCosta
  • 11
  • 1

2 Answers2

1

Thanks Adrian for your suggestion but I found difficulties using the linux subsystem.

At the end I found that the problem was that the Load function searchs CDO with the function Sys.which("cdo"), which looks for CDO only in the folders listed by the function Sys.getenv("PATH"). So the solution was to install CDO in one of those folders.

Thanks

JMCosta
  • 11
  • 1
  • glad you sorted it out... I would nevertheless try to sort out your subsystem issue, makes life much easier in the long run, and usually I found it fairly straightforward... – ClimateUnboxed Feb 05 '20 at 07:42
0

I think the best way to do this would be to install linux directly as a subsystem under windows 10, which is now very easy to do (no need to use cygwin any more). just search "install linux windows 10" on google and there are several blogs out there with the easy steps to follow.

you can then install cdo directly in the subsystem using

sudo apt-get install cdo

and use R within the linux subsystem as well. This is the way I did this if I need to use windows 10-based machines at workshops and training events.

ClimateUnboxed
  • 7,106
  • 3
  • 41
  • 86