Commit 1e6b9361 authored by DORAY's avatar DORAY
Browse files

2021 sat maps update

parent 1d003d51
......@@ -6,6 +6,7 @@ library(ncdf4)
# setwd("//begmeil/gwel_public/atlantic/analysis/cdf/")
#setwd("//iota1/satcoast-public/atlantic/analysis/cdf/")
prefin="J:/"
prefin="//iota1/satcoast-public/"
path.atlantic.Chl=paste(prefin,'atlantic/analysis/cdf/',sep='')
#setwd(path.atlantic.Chl)
......@@ -13,7 +14,8 @@ path.atlantic.Chl=paste(prefin,'atlantic/analysis/cdf/',sep='')
dossier_out="C:/ptg/WORK/Atlantic/Chloro/"
dossier_out="D:/Data/Satellite/Atlantic/Chla/"
prefout='Y:/Satellite/'
dossier_out=paste(prefout,"Atlantic/Chla/data/",sep='')
prefout='//echosonde/data/Satellite/'
dossier_out=paste(prefout,"Atlantic/Chla/Rdata/",sep='')
# de 1998 a aujourd hui --------
# Replace output file if exists?
......@@ -25,7 +27,7 @@ lastChlaFile=fic2[length(fic2)]
lastpYearChla=substr(lastChlaFile,1,4)
currYear=substr(Sys.Date(),1,4)
# Define years to process
firstYearChla=lastpYear
firstYearChla=lastpYearChla
lastYearChla=currYear
for(annee in firstYearChla:lastYearChla){
......
......@@ -27,9 +27,7 @@ conv.n2char3.f=function(nn) {
pref="J:/"
iota1="/run/user/1000/gvfs/smb-share:domain=ifr,server=iota1,share=satcoast-public,user=mdoray/"
path.atlantic=paste(iota1,'atlantic/SST/',sep='')
path.atlantic=paste(pref,'atlantic/',sep='')
iota1="//iota1/satcoast-public/"
#
path.atlantic=paste(iota1,'atlantic/',sep='')
......@@ -39,7 +37,7 @@ path.atlantic=paste(iota1,'atlantic/',sep='')
patout="C:/ptg/WORK/Atlantic/SST/"
patout="/users/mathieu/Documents/Data/SST/"
patout="D:/Data/Satellite/Atlantic/SST/pathfinder/"
patout="G:/Satellite/Data/Atlantic/SST/pathfinder/"
patout="//echosonde/data/Satellite/Data/Atlantic/SST/pathfinder/"
# 1999-0101 - 2009-1231: Pathfinder ----
......@@ -116,10 +114,10 @@ patin=paste(path.atlantic,"ostia/",annee,"/SST/",sep="")
# >2010 : Odyssea -------------
replaceFile=FALSE
pref='Y:/Satellite/'
pref='//echosonde/data/Satellite/'
patout="C:/ptg/WORK/Atlantic/SST/odyssea/"
patout="D:/Data/Satellite/Atlantic/SST/odyssea/"
patout=paste(pref,"Atlantic/SST/data/",sep='')
patout=paste(pref,"Atlantic/SST/Rdata/",sep='')
# Most recent file in output path
fic2=sort(dir(path=patout,pattern=".data"))
......
......@@ -21,6 +21,8 @@ paletteGC=rasterTheme(region=gradient.colors)
# echosonde = define path to 'data' folder on 'echosonde' drive
echosonde='/run/user/1000/gvfs/smb-share:domain=ifr,server=echosonde,share=data,user=mdoray/'
echosonde='//echosonde/data/'
echosonde='Y:/'
# donnees2 = path to 'donnees2' drive
donnees2='/run/user/1000/gvfs/smb-share:domain=ifr,server=nantes,share=donnees2,user=mdoray/'
# on external drive
......@@ -28,7 +30,6 @@ pref='G:/'
pref='/media/mathieu/IfremerMData/'
# on network
pref=echosonde
pref='X:/'
# Rasters export path
path.export.grid.sat=paste(pref,'Satellite/Atlantic/',sep='')
......@@ -106,7 +107,8 @@ lyears.Chla=unique(substr(ficnam,1,4))
#pref='/media/mathieu/IfremerMData/'
# 2.1.1. Check file list in output folder ----------
#******************************************
lofiles.chla=list.files(paste(path.export.grid.sat,'/Chla/raster/',sep=''))
lofiles.chla=list.files(
paste(path.export.grid.sat,'/Chla/raster/',sep=''))
# 2.2. Convert to SSChla raster stacks (3-days composites) -----
#******************************************
......@@ -116,6 +118,11 @@ if (exists('sschla.rasterStack')){
lidik=NULL
}
# Recreate stack from scratch if problem in export
#rm('sschla.rasterStack')
#lidik=NULL
#year=seq(1998,2021,1)
jj=seq(from=1,to=366,by=3)
year=seq(min(lyears.Chla),max(lyears.Chla))
tabmax=1000 # chla max value
......@@ -171,7 +178,9 @@ for (i in 1:length(year)) {
}
}
# concert sschla.rasterStack to brick
plot(sschla.rasterStack)
# convert sschla.rasterStack to brick
# sschla.rasterBrick=brick(sschla.rasterStack)
# 2.3. Save Chla raster stack to disk ---------
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment