Commit c7e771d7 authored by Sabine's avatar Sabine
Browse files

interpolate the rain only in space and not in time

parent b85b0209
...@@ -122,20 +122,23 @@ subroutine get_wetscav(itime,ltsample,loutnext,jpart,ks,grfraction,inc_count,blc ...@@ -122,20 +122,23 @@ subroutine get_wetscav(itime,ltsample,loutnext,jpart,ks,grfraction,inc_count,blc
jy=int(ytra1(jpart)) jy=int(ytra1(jpart))
endif endif
! Interpolate large scale precipitation, convective precipitation and ! Interpolate large scale precipitation, convective precipitation and
! total cloud cover ! total cloud cover
! Note that interpolated time refers to itime-0.5*ltsample [PS] ! Note that interpolated time refers to itime-0.5*ltsample [PS]
!******************************************************************** !********************************************************************
interp_time=nint(itime-0.5*ltsample) interp_time=nint(itime-0.5*ltsample)
n=memind(2)
if (abs(memtime(1)-interp_time).lt.abs(memtime(2)-interp_time)) &
n=memind(1)
if (ngrid.eq.0) then if (ngrid.eq.0) then
call interpol_rain(lsprec,convprec,tcc,nxmax,nymax, & call interpol_rain(lsprec,convprec,tcc,nxmax,nymax, &
1,nx,ny,memind,real(xtra1(jpart)),real(ytra1(jpart)),1, & 1,nx,ny,n,real(xtra1(jpart)),real(ytra1(jpart)),1, &
memtime(1),memtime(2),interp_time,lsp,convp,cc) memtime(1),memtime(2),interp_time,lsp,convp,cc)
else else
call interpol_rain_nests(lsprecn,convprecn,tccn, & call interpol_rain_nests(lsprecn,convprecn,tccn, &
nxmaxn,nymaxn,1,maxnests,ngrid,nxn,nyn,memind,xtn,ytn,1, & nxmaxn,nymaxn,1,maxnests,ngrid,nxn,nyn,n,xtn,ytn,1, &
memtime(1),memtime(2),interp_time,lsp,convp,cc) memtime(1),memtime(2),interp_time,lsp,convp,cc)
endif endif
...@@ -152,9 +155,6 @@ subroutine get_wetscav(itime,ltsample,loutnext,jpart,ks,grfraction,inc_count,blc ...@@ -152,9 +155,6 @@ subroutine get_wetscav(itime,ltsample,loutnext,jpart,ks,grfraction,inc_count,blc
end do end do
!26 continue !26 continue
n=memind(2)
if (abs(memtime(1)-interp_time).lt.abs(memtime(2)-interp_time)) &
n=memind(1)
if (ngrid.eq.0) then if (ngrid.eq.0) then
clouds_v=clouds(ix,jy,hz,n) clouds_v=clouds(ix,jy,hz,n)
...@@ -227,7 +227,6 @@ subroutine get_wetscav(itime,ltsample,loutnext,jpart,ks,grfraction,inc_count,blc ...@@ -227,7 +227,6 @@ subroutine get_wetscav(itime,ltsample,loutnext,jpart,ks,grfraction,inc_count,blc
act_temp=tt(ix,jy,hz,n) act_temp=tt(ix,jy,hz,n)
endif endif
!*********************** !***********************
! BELOW CLOUD SCAVENGING ! BELOW CLOUD SCAVENGING
!*********************** !***********************
...@@ -338,6 +337,7 @@ subroutine get_wetscav(itime,ltsample,loutnext,jpart,ks,grfraction,inc_count,blc ...@@ -338,6 +337,7 @@ subroutine get_wetscav(itime,ltsample,loutnext,jpart,ks,grfraction,inc_count,blc
endif ! positive in-cloud scavenging parameters given in Species file endif ! positive in-cloud scavenging parameters given in Species file
endif !incloud endif !incloud
20 continue 20 continue
end subroutine get_wetscav end subroutine get_wetscav
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
!********************************************************************** !**********************************************************************
subroutine interpol_rain(yy1,yy2,yy3,nxmax,nymax,nzmax,nx, & subroutine interpol_rain(yy1,yy2,yy3,nxmax,nymax,nzmax,nx, &
ny,memind,xt,yt,level,itime1,itime2,itime,yint1,yint2,yint3) ny,iwftouse,xt,yt,level,itime1,itime2,itime,yint1,yint2,yint3)
! i i i i i i i ! i i i i i i i
!i i i i i i i i o o o !i i i i i i i i o o o
!**************************************************************************** !****************************************************************************
...@@ -76,6 +76,7 @@ subroutine interpol_rain(yy1,yy2,yy3,nxmax,nymax,nzmax,nx, & ...@@ -76,6 +76,7 @@ subroutine interpol_rain(yy1,yy2,yy3,nxmax,nymax,nzmax,nx, &
real :: yy3(0:nxmax-1,0:nymax-1,nzmax,numwfmem) real :: yy3(0:nxmax-1,0:nymax-1,nzmax,numwfmem)
real :: ddx,ddy,rddx,rddy,dt1,dt2,dt,y1(2),y2(2),y3(2) real :: ddx,ddy,rddx,rddy,dt1,dt2,dt,y1(2),y2(2),y3(2)
real :: xt,yt,yint1,yint2,yint3,p1,p2,p3,p4 real :: xt,yt,yint1,yint2,yint3,p1,p2,p3,p4
integer :: iwftouse
...@@ -112,36 +113,38 @@ subroutine interpol_rain(yy1,yy2,yy3,nxmax,nymax,nzmax,nx, & ...@@ -112,36 +113,38 @@ subroutine interpol_rain(yy1,yy2,yy3,nxmax,nymax,nzmax,nx, &
! Loop over 2 time steps ! Loop over 2 time steps
!*********************** !***********************
do m=1,2 ! do m=1,2
indexh=memind(m) indexh=iwftouse
y1(1)=p1*yy1(ix ,jy ,level,indexh) &
y1(m)=p1*yy1(ix ,jy ,level,indexh) &
+ p2*yy1(ixp,jy ,level,indexh) & + p2*yy1(ixp,jy ,level,indexh) &
+ p3*yy1(ix ,jyp,level,indexh) & + p3*yy1(ix ,jyp,level,indexh) &
+ p4*yy1(ixp,jyp,level,indexh) + p4*yy1(ixp,jyp,level,indexh)
y2(m)=p1*yy2(ix ,jy ,level,indexh) & y2(1)=p1*yy2(ix ,jy ,level,indexh) &
+ p2*yy2(ixp,jy ,level,indexh) & + p2*yy2(ixp,jy ,level,indexh) &
+ p3*yy2(ix ,jyp,level,indexh) & + p3*yy2(ix ,jyp,level,indexh) &
+ p4*yy2(ixp,jyp,level,indexh) + p4*yy2(ixp,jyp,level,indexh)
y3(m)=p1*yy3(ix ,jy ,level,indexh) & y3(1)=p1*yy3(ix ,jy ,level,indexh) &
+ p2*yy3(ixp,jy ,level,indexh) & + p2*yy3(ixp,jy ,level,indexh) &
+ p3*yy3(ix ,jyp,level,indexh) & + p3*yy3(ix ,jyp,level,indexh) &
+ p4*yy3(ixp,jyp,level,indexh) + p4*yy3(ixp,jyp,level,indexh)
end do ! end do
!************************************ !************************************
! 2.) Temporal interpolation (linear) ! 2.) Temporal interpolation (linear) - skip to be consistent with clouds
!************************************ !************************************
dt1=real(itime-itime1) ! dt1=real(itime-itime1)
dt2=real(itime2-itime) ! dt2=real(itime2-itime)
dt=dt1+dt2 ! dt=dt1+dt2
yint1=(y1(1)*dt2+y1(2)*dt1)/dt ! yint1=(y1(1)*dt2+y1(2)*dt1)/dt
yint2=(y2(1)*dt2+y2(2)*dt1)/dt ! yint2=(y2(1)*dt2+y2(2)*dt1)/dt
yint3=(y3(1)*dt2+y3(2)*dt1)/dt ! yint3=(y3(1)*dt2+y3(2)*dt1)/dt
yint1=y1(1)
yint2=y2(1)
yint3=y3(1)
end subroutine interpol_rain end subroutine interpol_rain
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