Changeset 37 for branches/petra/src/interpol_rain.f90
- Timestamp:
- Apr 22, 2015, 3:42:35 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/petra/src/interpol_rain.f90
r24 r37 1 1 !********************************************************************** 2 ! Copyright 1998 ,1999,2000,2001,2002,2005,2007,2008,2009,2010*2 ! Copyright 1998-2015 * 3 3 ! Andreas Stohl, Petra Seibert, A. Frank, Gerhard Wotawa, * 4 4 ! Caroline Forster, Sabine Eckhardt, John Burkhart, Harald Sodemann * … … 20 20 !********************************************************************** 21 21 22 subroutine interpol_rain(yy1,yy2,yy3,nxmax,nymax,nzmax,nx, & 23 ny,memind,xt,yt,level,itime1,itime2,itime,yint1,yint2,yint3) 22 subroutine interpol_rain(yy1,yy2,yy3,nxmax,nymax,nzmax,nx,ny, & 23 memind,xt,yt,level,itime1,itime2,itime,yint1,yint2,yint3, & 24 icbot,ictop) 24 25 ! i i i i i i i 25 26 !i i i i i i i i o o o … … 40 41 ! * 41 42 ! 30 August 1996 * 43 !**************************************************************************** 44 ! Petra Seibert, 2011/2012-2015: 45 ! Add interpolation of cloud bottom and cloud thickness 46 ! for fix to SE's new wet scavenging scheme 42 47 ! * 43 48 !**************************************************************************** … … 66 71 ! * 67 72 !**************************************************************************** 73 74 use com_mod, only: icloudbot, icloudthck 75 use par_mod, only: icmv 68 76 69 77 implicit none 70 78 71 79 integer :: nx,ny,nxmax,nymax,nzmax,memind(2),m,ix,jy,ixp,jyp 72 integer :: itime,itime1,itime2,level,indexh 80 integer :: itime,itime1,itime2,level,indexh,ip1,ip2,ip3,ip4 81 integer :: icbot,icthck,ictop,ipsum 73 82 real :: yy1(0:nxmax-1,0:nymax-1,nzmax,2) 74 83 real :: yy2(0:nxmax-1,0:nymax-1,nzmax,2) 75 84 real :: yy3(0:nxmax-1,0:nymax-1,nzmax,2) 76 real :: ddx,ddy,rddx,rddy,dt1,dt2,dt,y1(2),y2(2),y3(2) 85 real :: ddx,ddy,rddx,rddy,dt1,dt2,dt,y1(2),y2(2),y3(2),cbot(2),cthck(2) 77 86 real :: xt,yt,yint1,yint2,yint3,p1,p2,p3,p4 78 79 87 80 88 … … 112 120 !*********************** 113 121 122 memind_loop: & 114 123 do m=1,2 124 115 125 indexh=memind(m) 116 126 … … 127 137 + p3*yy3(ix ,jyp,level,indexh) & 128 138 + p4*yy3(ixp,jyp,level,indexh) 129 end do 139 140 141 ! PS clouds: 142 ip1=1 143 ip2=1 144 ip3=1 145 ip4=1 146 if (icloudbot(ix ,jy ,indexh) .eq. icmv) ip1=0 147 if (icloudbot(ixp,jy ,indexh) .eq. icmv) ip2=0 148 if (icloudbot(ix ,jyp,indexh) .eq. icmv) ip3=0 149 if (icloudbot(ixp,jyp,indexh) .eq. icmv) ip4=0 150 ipsum = ip1+ip2+ip3+ip4 151 if (ipsum .eq. 0) then 152 cbot(m)=icmv 153 else 154 cbot(m)=(ip1*p1*icloudbot(ix ,jy ,indexh) & 155 + ip2*p2*icloudbot(ixp,jy ,indexh) & 156 + ip3*p3*icloudbot(ix ,jyp,indexh) & 157 + ip4*p4*icloudbot(ixp,jyp,indexh)) / ipsum 158 endif 159 160 ip1=1 161 ip2=1 162 ip3=1 163 ip4=1 164 if (icloudthck(ix ,jy ,indexh) .eq. icmv) ip1=0 165 if (icloudthck(ixp,jy ,indexh) .eq. icmv) ip2=0 166 if (icloudthck(ix ,jyp,indexh) .eq. icmv) ip3=0 167 if (icloudthck(ixp,jyp,indexh) .eq. icmv) ip4=0 168 ipsum = ip1+ip2+ip3+ip4 169 if (ipsum .eq. 0) then 170 cthck(m)=icmv 171 else 172 cthck(m)=(ip1*p1*icloudthck(ix ,jy ,indexh) & 173 + ip2*p2*icloudthck(ixp,jy ,indexh) & 174 + ip3*p3*icloudthck(ix ,jyp,indexh) & 175 + ip4*p4*icloudthck(ixp,jyp,indexh)) / ipsum 176 endif 177 ! PS end clouds 178 179 enddo memind_loop 130 180 131 181 … … 142 192 yint3=(y3(1)*dt2+y3(2)*dt1)/dt 143 193 194 ! PS clouds: 195 icbot = nint( (cbot(1)*dt2 + cbot(2)*dt1)/dt ) 196 if (nint(cbot(1)) .eq. icmv) icbot=cbot(2) 197 if (nint(cbot(2)) .eq. icmv) icbot=cbot(1) 198 199 icthck = nint( (cthck(1)*dt2 + cthck(2)*dt1)/dt ) 200 if (nint(cthck(1)) .eq. icmv) icthck=cthck(2) 201 if (nint(cthck(2)) .eq. icmv) icthck=cthck(1) 202 203 if (icbot .ne. icmv .and. icthck .ne. icmv) then 204 ictop = icbot + icthck ! convert cloud thickness to cloud top 205 else 206 icbot=icmv 207 ictop=icmv 208 endif 209 ! PS end clouds 210 144 211 145 212 end subroutine interpol_rain
Note: See TracChangeset
for help on using the changeset viewer.