Running examples in ‘cmsaf-Ex.R’ failed
The error most likely occurred in:

> ### Name: ydaymean
> ### Title: Determine multi-year daily means.
> ### Aliases: ydaymean
> 
> ### ** Examples
> 
> ## Create an example NetCDF file with a similar structure
> ## as used by CM SAF. The file is created with the ncdf4 package.
> ## Alternatively example data can be freely downloaded here: 
> ## <https://wui.cmsaf.eu/>
> 
> library(ncdf4)
> 
> ## create some (non-realistic) example data
> 
>   lon <- seq(5,15,0.5)
>   lat <- seq(45,55,0.5)
>   time <- seq(as.Date('2005-01-01'), as.Date('2010-12-31'), 'day')
>   origin <- as.Date('1983-01-01 00:00:00')
>   time <- as.numeric(difftime(time,origin,units='hour'))
>   data <- array(250:350,dim=c(21,21,2191))
> 
> ## create example NetCDF
> 
>    x <- ncdim_def(name='lon',units='degrees_east',vals=lon)
>    y <- ncdim_def(name='lat',units='degrees_north',vals=lat)
>    t <- ncdim_def(name='time',units='hours since 1983-01-01 00:00:00',
+    vals=time,unlim=TRUE)
>    var1 <- ncvar_def('SIS','W m-2',list(x,y,t),-1,prec='short')
>    vars <- list(var1)
>    ncnew <- nc_create('CMSAF_example_file.nc',vars)
>    ncvar_put(ncnew,var1,data)
>    ncatt_put(ncnew,'lon','standard_name','longitude',prec='text')
>    ncatt_put(ncnew,'lat','standard_name','latitude',prec='text')
>    nc_close(ncnew)
> 
> ## Determine the multi-year daily mean of the example CM SAF NetCDF 
> ## file and write the output to a new file.
>    ydaymean('SIS','CMSAF_example_file.nc', 
+    'CMSAF_example_file_ydaymean.nc')
get file information 
create netcdf 

averaging day 1
averaging day 2
averaging day 3
averaging day 4
averaging day 5
averaging day 6
averaging day 7
averaging day 8
averaging day 9
averaging day 10
averaging day 11
averaging day 12
averaging day 13
averaging day 14
averaging day 15
averaging day 16
averaging day 17
averaging day 18
averaging day 19
averaging day 20
averaging day 21
averaging day 22
averaging day 23
averaging day 24
averaging day 25
averaging day 26
averaging day 27
averaging day 28
averaging day 29
averaging day 30
averaging day 31
averaging day 32
averaging day 33
averaging day 34
averaging day 35
averaging day 36
averaging day 37
averaging day 38
averaging day 39
averaging day 40
averaging day 41
averaging day 42
averaging day 43
averaging day 44
averaging day 45
averaging day 46
averaging day 47
averaging day 48
averaging day 49
averaging day 50
averaging day 51
averaging day 52
averaging day 53
averaging day 54
averaging day 55
averaging day 56
averaging day 57
averaging day 58
averaging day 59
averaging day 60
averaging day 61
averaging day 62
averaging day 63
averaging day 64
averaging day 65
averaging day 66
averaging day 67
averaging day 68
averaging day 69
averaging day 70
averaging day 71
averaging day 72
averaging day 73
averaging day 74
averaging day 75
averaging day 76
averaging day 77
averaging day 78
averaging day 79
averaging day 80
averaging day 81
averaging day 82
averaging day 83
averaging day 84
averaging day 85
averaging day 86
averaging day 87
averaging day 88
averaging day 89
averaging day 90
averaging day 91
averaging day 92
averaging day 93
averaging day 94
averaging day 95
averaging day 96
averaging day 97
averaging day 98
averaging day 99
averaging day 100
averaging day 101
averaging day 102
averaging day 103
averaging day 104
averaging day 105
averaging day 106
averaging day 107
averaging day 108
averaging day 109
averaging day 110
averaging day 111
averaging day 112
averaging day 113
averaging day 114
averaging day 115
averaging day 116
averaging day 117
averaging day 118
averaging day 119
averaging day 120
averaging day 121
averaging day 122
averaging day 123
averaging day 124
averaging day 125
averaging day 126
averaging day 127
averaging day 128
averaging day 129
averaging day 130
averaging day 131
averaging day 132
averaging day 133
averaging day 134
averaging day 135
averaging day 136
averaging day 137
averaging day 138
averaging day 139
averaging day 140
averaging day 141
averaging day 142
averaging day 143
averaging day 144
averaging day 145
averaging day 146
averaging day 147
averaging day 148
averaging day 149
averaging day 150
averaging day 151
averaging day 152
averaging day 153
averaging day 154
averaging day 155
averaging day 156
averaging day 157
averaging day 158
averaging day 159
averaging day 160
averaging day 161
averaging day 162
averaging day 163
averaging day 164
averaging day 165
averaging day 166
averaging day 167
averaging day 168
averaging day 169
averaging day 170
averaging day 171
averaging day 172
averaging day 173
averaging day 174
averaging day 175
averaging day 176
averaging day 177
averaging day 178
averaging day 179
averaging day 180
averaging day 181
averaging day 182
averaging day 183
averaging day 184
averaging day 185
averaging day 186
averaging day 187
averaging day 188
averaging day 189
averaging day 190
averaging day 191
averaging day 192
averaging day 193
averaging day 194
averaging day 195
averaging day 196
averaging day 197
averaging day 198
averaging day 199
averaging day 200
averaging day 201
averaging day 202
averaging day 203
averaging day 204
averaging day 205
averaging day 206
averaging day 207
averaging day 208
averaging day 209
averaging day 210
averaging day 211
averaging day 212
averaging day 213
averaging day 214
averaging day 215
averaging day 216
averaging day 217
averaging day 218
averaging day 219
averaging day 220
averaging day 221
averaging day 222
averaging day 223
averaging day 224
averaging day 225
averaging day 226
averaging day 227Error in R_nc4_open: Too many open files
Error in nc_open(infile) : 
  Error in nc_open trying to open file CMSAF_example_file.nc
Calls: ydaymean -> nc_open
Execution halted
Error: failed to load sRGB colorspace file
Fatal error: error during cleanup

rm: /tmp/Rtmpx82dac: Too many open files