
library('s2dverification')
# The line below should go inside the function Cluster
#library('fpc')
# 
# Here you should source as well Cluster and SeaIceModes
source('/home/nevensf/gitrep/s2dverification/R/Load.R')
source('/home/nevensf/gitrep/s2dverification/R/Cluster.R')
source('/home/nevensf/gitrep/s2dverification/R/SeaIceModes.R')

print(' ')
print('The start of SeaIceModes')
print(' ')
bubi=SeaIceModes('siv','i00v',obs=NULL,'19790101',10,12,detrended=TRUE,areasfile='/home/nevensf/tmp_mask/virginie/area.regions1.N3.2_O1L42.csv')
print(' ')
print('The structure of bubi')
print(' ')
print(str(bubi))

##pam will be considered as a first relative of kmeans only after kmeans is full functional
##print(' ')
##print('Like the K-means analysis with K=4. but using medoids instead controids')
##print(' ')
##print(pam.results<-pam(bubi,4))
##this is also potentially useful funcation related to pam : pmak.results<-pamk(bubi))

#Now that you have built a generic call to Load, the next step would be to move the call to kmeans inside Clusters and add a call to Clusters inside SeaIceModes and start expanding the code to compute the timeseries of occurrences

