Changeset 519 for codes/icosagcm/trunk/src/explicit_scheme.f90
- Timestamp:
- 12/24/16 02:33:07 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
codes/icosagcm/trunk/src/explicit_scheme.f90
r487 r519 26 26 REAL(rstd),POINTER :: u(:,:) , um1(:,:), um2(:,:), du(:,:) 27 27 REAL(rstd),POINTER :: rhodz(:,:), mass(:,:), massm1(:,:), massm2(:,:), dmass(:,:) 28 REAL(rstd),POINTER :: theta_rhodz(:,: ) , theta_rhodzm1(:,:), theta_rhodzm2(:,:), dtheta_rhodz(:,:)28 REAL(rstd),POINTER :: theta_rhodz(:,:,:) , theta_rhodzm1(:,:,:), theta_rhodzm2(:,:,:), dtheta_rhodz(:,:,:) 29 29 REAL(rstd),POINTER :: hflux(:,:),wflux(:,:),hfluxt(:,:),wfluxt(:,:) 30 30 LOGICAL :: fluxt_zero(ndomain) ! set to .TRUE. to start accumulating fluxes in time 31 31 INTEGER :: it,stage 32 33 CALL legacy_to_DEC(f_ps, f_u) 32 34 DO stage=1,nb_stage 33 35 ! CALL checksum(f_ps) … … 53 55 END SELECT 54 56 END DO 57 CALL DEC_to_legacy(f_ps, f_u) 55 58 56 59 CONTAINS … … 142 145 um1(ij+u_lup,l)=u(ij+u_lup,l) 143 146 um1(ij+u_ldown,l)=u(ij+u_ldown,l) 144 theta_rhodzm1(ij,l )=theta_rhodz(ij,l)147 theta_rhodzm1(ij,l,1)=theta_rhodz(ij,l,1) 145 148 ENDDO 146 149 ENDDO … … 153 156 u(ij+u_lup,l)=um1(ij+u_lup,l)+tau*du(ij+u_lup,l) 154 157 u(ij+u_ldown,l)=um1(ij+u_ldown,l)+tau*du(ij+u_ldown,l) 155 theta_rhodz(ij,l )=theta_rhodzm1(ij,l)+tau*dtheta_rhodz(ij,l)158 theta_rhodz(ij,l,1)=theta_rhodzm1(ij,l,1)+tau*dtheta_rhodz(ij,l,1) 156 159 ENDDO 157 160 ENDDO … … 188 191 189 192 IF (stage==1) THEN 190 psm1(:)=ps(:) ; um1(:,:)=u(:,:) ; theta_rhodzm1(:,: )=theta_rhodz(:,:)193 psm1(:)=ps(:) ; um1(:,:)=u(:,:) ; theta_rhodzm1(:,:,:)=theta_rhodz(:,:,:) 191 194 ps(:)=psm1(:)+tau*dps(:) 192 195 u(:,:)=um1(:,:)+tau*du(:,:) 193 theta_rhodz(:,: )=theta_rhodzm1(:,:)+tau*dtheta_rhodz(:,:)196 theta_rhodz(:,:,:)=theta_rhodzm1(:,:,:)+tau*dtheta_rhodz(:,:,:) 194 197 195 198 ELSE IF (stage==2) THEN … … 197 200 ps(:)=psm1(:)+tau*dps(:) 198 201 u(:,:)=um1(:,:)+tau*du(:,:) 199 theta_rhodz(:,: )=theta_rhodzm1(:,:)+tau*dtheta_rhodz(:,:)200 201 psm2(:)=psm1(:) ; theta_rhodzm2(:,: )=theta_rhodzm1(:,:) ; um2(:,:)=um1(:,:)202 psm1(:)=ps(:) ; theta_rhodzm1(:,: )=theta_rhodz(:,:) ; um1(:,:)=u(:,:)202 theta_rhodz(:,:,:)=theta_rhodzm1(:,:,:)+tau*dtheta_rhodz(:,:,:) 203 204 psm2(:)=psm1(:) ; theta_rhodzm2(:,:,:)=theta_rhodzm1(:,:,:) ; um2(:,:)=um1(:,:) 205 psm1(:)=ps(:) ; theta_rhodzm1(:,:,:)=theta_rhodz(:,:,:) ; um1(:,:)=u(:,:) 203 206 204 207 ELSE … … 206 209 ps(:)=psm2(:)+2*tau*dps(:) 207 210 u(:,:)=um2(:,:)+2*tau*du(:,:) 208 theta_rhodz(:,: )=theta_rhodzm2(:,:)+2*tau*dtheta_rhodz(:,:)209 210 psm2(:)=psm1(:) ; theta_rhodzm2(:,: )=theta_rhodzm1(:,:) ; um2(:,:)=um1(:,:)211 psm1(:)=ps(:) ; theta_rhodzm1(:,: )=theta_rhodz(:,:) ; um1(:,:)=u(:,:)211 theta_rhodz(:,:,:)=theta_rhodzm2(:,:,:)+2*tau*dtheta_rhodz(:,:,:) 212 213 psm2(:)=psm1(:) ; theta_rhodzm2(:,:,:)=theta_rhodzm1(:,:,:) ; um2(:,:)=um1(:,:) 214 psm1(:)=ps(:) ; theta_rhodzm1(:,:,:)=theta_rhodz(:,:,:) ; um1(:,:)=u(:,:) 212 215 213 216 ENDIF
Note: See TracChangeset
for help on using the changeset viewer.