Ignore:
Timestamp:
11/22/12 14:54:21 (10 years ago)
Author:
dsolyga
Message:

Introduced the new subroutine moycum_index. Works the same way as moycum but make computations only on index points. Used only when scatter operation is performed. Help to reduce the computational time of ORCHIDEE. For the other models, should not change the results.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • IOIPSL/trunk/src/histcom.f90

    r1525 r1927  
    99!- 
    1010  USE stringop, ONLY : nocomma,cmpblank,findpos,find_str,strlowercase 
    11   USE mathelp,  ONLY : mathop,moycum,buildop 
     11  USE mathelp,  ONLY : mathop,moycum,moycum_index,buildop 
    1212  USE fliocom,  ONLY : flio_dom_file,flio_dom_att 
    1313  USE calendar 
     
    12061206 &    .AND.(TRIM(W_F(idf)%W_V(iv)%topp) /= "never") )THEN 
    12071207    ALLOCATE(W_F(idf)%W_V(iv)%t_bf(buff_sz)) 
    1208     W_F(idf)%W_V(iv)%t_bf(:) = 0. 
     1208    W_F(idf)%W_V(iv)%t_bf(:) = missing_val 
    12091209    IF (l_dbg) THEN 
    12101210      WRITE(ipslout,*) "histdef : 3.0 allocating time_buffer for", & 
     
    18921892  INTEGER,DIMENSION(4) :: corner,edges 
    18931893  INTEGER :: itime 
     1894  LOGICAL :: flag 
    18941895!- 
    18951896  REAL :: rtime 
     
    20522053    IF (     (TRIM(tmp_opp) /= "inst") & 
    20532054 &      .AND.(TRIM(tmp_opp) /= "once") ) THEN 
    2054       CALL moycum(tmp_opp,tsz,W_F(idf)%W_V(iv)%t_bf, & 
    2055  &           tbf_2,W_F(idf)%W_V(iv)%nb_opp) 
     2055 
     2056!- 
     2057!------ 5.1 Check if scatter operation is performed 
     2058!-       
     2059       flag = .FALSE.  
     2060       DO io = 1, nbopp_max 
     2061          IF ( INDEX(TRIM(W_F(idf)%W_V(iv)%sopp(io)),'scatter') > 0 ) THEN  
     2062             flag = .TRUE.  
     2063          END IF 
     2064       END DO 
     2065 
     2066       IF ( flag ) THEN 
     2067!- 
     2068!------ 5.2  Enter moycum_index only if a scatter operation is performed 
     2069!-          
     2070          IF (l_dbg) & 
     2071               & WRITE(ipslout,*) "histwrite: 5.2 moycum_index",nbindex,nx,ny,nz 
     2072          CALL moycum_index(tmp_opp, W_F(idf)%W_V(iv)%t_bf, & 
     2073 &             tbf_2, W_F(idf)%W_V(iv)%nb_opp, nbindex, nindex) 
     2074       ELSE 
     2075!- 
     2076!------ 5.3  Enter moycum otherwise 
     2077!- 
     2078          IF (l_dbg) & 
     2079               & WRITE(ipslout,*) "histwrite: 5.3 moycum",nbindex,nx,ny 
     2080          CALL moycum(tmp_opp,tsz,W_F(idf)%W_V(iv)%t_bf, & 
     2081               &           tbf_2,W_F(idf)%W_V(iv)%nb_opp) 
     2082       END IF 
     2083 
    20562084    ENDIF 
    20572085!- 
Note: See TracChangeset for help on using the changeset viewer.