joelfiddes / topoMAPP

TOPOgraphy based Modelling APPlication. Tool for efficient ensemble modelling and data assimilation in complex terrain.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

interpolation of accumulated fields to original timestamp

joelfiddes opened this issue · comments

routine to interpolate to original timestamp is ignored, why? The interpolation has smoothing effect which is bad - loose peaks and troughs - perhaps this is why. This needs investigating. Effect not too significant in era5 with 1h timestep.

#could vectorise but quick anyway
lwgridAv=c()

for(i in coordMap$cells)
{
x=coordMap$xlab[i]
y=coordMap$ylab[i]

			instVec=c()
			for (j in 1: length(indat[x,y,])){
				a = indat[x,y,j]/ (step*3600)
				instVec=c(instVec,a)
			}

#lgav=accumToInstERA_simple(inDat=indat[x,y,], step=step)
lwgridAv=cbind(lwgridAv,instVec)
}

#interpolate to original timestep
lwgridAdj=c()
for(i in coordMap$cells){
lAdj=adjAccum(lwgridAv[,i])
lwgridAdj=cbind(lwgridAdj,lAdj)
}
lwgridAdj=lwgridAv