Changeset 1725 for trunk/LMDZ.GENERIC/libf/phystd/optci.F90
- Timestamp:
- Jul 21, 2017, 5:30:44 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.GENERIC/libf/phystd/optci.F90
r1715 r1725 64 64 real*8 KCOEF(4) 65 65 integer NVAR(L_LEVELS) 66 67 ! temporary variables to reduce memory access time to gasi 68 real*8 tmpk(2,2) 69 real*8 tmpkvar(2,2,2) 66 70 67 71 ! temporary variables for multiple aerosol calculation … … 235 239 236 240 if(L_REFVAR.eq.1)then ! added by RW for special no variable case 237 KCOEF(1) = GASI(MT(K),MP(K),1,NW,NG) 238 KCOEF(2) = GASI(MT(K),MP(K)+1,1,NW,NG) 239 KCOEF(3) = GASI(MT(K)+1,MP(K)+1,1,NW,NG) 240 KCOEF(4) = GASI(MT(K)+1,MP(K),1,NW,NG) 241 242 ! JVO 2017 : added tmpk because the repeated calls to gasi/v increased dramatically 243 ! the execution time of optci/v -> ~ factor 2 on the whole radiative 244 ! transfer on the tested simulations ! 245 246 tmpk = GASI(MT(K):MT(K)+1,MP(K):MP(K)+1,1,NW,NG) 247 248 KCOEF(1) = tmpk(1,1) ! KCOEF(1) = GASI(MT(K),MP(K),1,NW,NG) 249 KCOEF(2) = tmpk(1,2) ! KCOEF(2) = GASI(MT(K),MP(K)+1,1,NW,NG) 250 KCOEF(3) = tmpk(2,2) ! KCOEF(3) = GASI(MT(K)+1,MP(K)+1,1,NW,NG) 251 KCOEF(4) = tmpk(2,1) ! KCOEF(4) = GASI(MT(K)+1,MP(K),1,NW,NG) 252 241 253 else 242 254 243 KCOEF(1) = GASI(MT(K),MP(K),NVAR(K),NW,NG) + WRATIO(K)* & 244 (GASI(MT(K),MP(K),NVAR(K)+1,NW,NG) - & 245 GASI(MT(K),MP(K),NVAR(K),NW,NG)) 246 247 KCOEF(2) = GASI(MT(K),MP(K)+1,NVAR(K),NW,NG) + WRATIO(K)* & 248 (GASI(MT(K),MP(K)+1,NVAR(K)+1,NW,NG) - & 249 GASI(MT(K),MP(K)+1,NVAR(K),NW,NG)) 250 251 KCOEF(3) = GASI(MT(K)+1,MP(K)+1,NVAR(K),NW,NG) + WRATIO(K)* & 252 (GASI(MT(K)+1,MP(K)+1,NVAR(K)+1,NW,NG) - & 253 GASI(MT(K)+1,MP(K)+1,NVAR(K),NW,NG)) 254 255 KCOEF(4) = GASI(MT(K)+1,MP(K),NVAR(K),NW,NG) + WRATIO(K)* & 256 (GASI(MT(K)+1,MP(K),NVAR(K)+1,NW,NG) - & 257 GASI(MT(K)+1,MP(K),NVAR(K),NW,NG)) 255 tmpkvar = GASI(MT(K):MT(K)+1,MP(K):MP(K)+1,NVAR(K):NVAR(K)+1,NW,NG) 256 257 KCOEF(1) = tmpkvar(1,1,1) + WRATIO(K) * & 258 ( tmpkvar(1,1,2)-tmpkvar(1,1,1) ) 259 260 KCOEF(2) = tmpkvar(1,2,1) + WRATIO(K) * & 261 ( tmpkvar(1,2,2)-tmpkvar(1,2,1) ) 262 263 KCOEF(3) = tmpkvar(2,2,1) + WRATIO(K) * & 264 ( tmpkvar(2,2,2)-tmpkvar(2,2,1) ) 265 266 KCOEF(4) = tmpkvar(2,1,1) + WRATIO(K) * & 267 ( tmpkvar(2,1,2)-tmpkvar(2,1,1) ) 258 268 259 269 endif
Note: See TracChangeset
for help on using the changeset viewer.