New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 531 for trunk/NEMO/OPA_SRC/SBC – NEMO

Changeset 531 for trunk/NEMO/OPA_SRC/SBC


Ignore:
Timestamp:
2006-10-19T14:55:25+02:00 (18 years ago)
Author:
opalod
Message:

nemo_v1_update_75 : CT : enables bit comparison between single and multiple processor runs adding nbit_cmp namelist parameter

Location:
trunk/NEMO/OPA_SRC/SBC
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMO/OPA_SRC/SBC/flxfwb.F90

    r474 r531  
    280280         IF(lwp) WRITE(numout,*) '               ln_fwb = .FALSE. is recommanded' 
    281281      ENDIF 
     282 
     283      IF( nbit_cmp == 1 .AND. ln_fwb ) THEN 
     284         CALL ctl_stop( ' Reproductibility tests (nbit_cmp=1) require ln_fwb = .false.' ) 
     285      END IF 
    282286 
    283287      !                                        ! ============================== 
  • trunk/NEMO/OPA_SRC/SBC/ocesbc.F90

    r473 r531  
    673673             END DO 
    674674          END DO 
    675            
    676           ! compute the emp flux such as its integration on the whole domain and at each time be zero 
    677           zsumemp = 0.e0 
    678           zsurf = 0.e0 
    679           DO jj = 1, jpj 
    680              DO ji = 1, jpi 
    681                 zsumemp = zsumemp + emp(ji,jj) * tmask(ji,jj,1) * tmask_i(ji,jj) 
    682                 zsurf =  zsurf + tmask(ji,jj,1) * tmask_i(ji,jj) 
     675 
     676          ! Compute the emp flux such as its integration on the whole domain at each time is zero 
     677          IF( nbench /= 1 .AND. nbit_cmp /= 1 ) THEN 
     678             zsumemp = 0.e0   ;   zsurf = 0.e0 
     679             DO jj = 1, jpj 
     680                DO ji = 1, jpi 
     681                   zsumemp = zsumemp + emp(ji,jj) * tmask(ji,jj,1) * tmask_i(ji,jj) 
     682                   zsurf =  zsurf + tmask(ji,jj,1) * tmask_i(ji,jj) 
     683                END DO 
    683684             END DO 
    684           END DO 
    685  
    686           IF( lk_mpp )   CALL mpp_sum( zsumemp  )       ! sum over the global domain 
    687           IF( lk_mpp )   CALL mpp_sum( zsurf    )       ! sum over the global domain 
    688  
    689           IF( nbench /= 0 ) THEN 
    690              ! Benchmark GYRE configuration (to allow the bit to bit comparison between Mpp/Mono case) 
    691              zsumemp = 0.e0 
    692           ELSE 
     685 
     686             IF( lk_mpp )   CALL mpp_sum( zsumemp  )       ! sum over the global domain 
     687             IF( lk_mpp )   CALL mpp_sum( zsurf    )       ! sum over the global domain 
     688 
    693689             ! Default GYRE configuration 
    694690             zsumemp = zsumemp / zsurf 
     691          ELSE 
     692             ! Benchmark GYRE configuration (to allow the bit to bit comparison between Mpp/Mono case) 
     693             zsumemp = 0.e0   ;    zsurf = 0.e0 
    695694          ENDIF 
    696695 
     
    857856      aplus  = 0.e0 
    858857      aminus = 0.e0 
    859       DO jj = 1, jpj 
    860          DO ji = 1, jpi 
    861             zwei   = e1t(ji,jj) * e2t(ji,jj) * tmask_i(ji,jj) 
    862             aplus  = aplus  + zerpplus (ji,jj) * zwei 
    863             aminus = aminus - zerpminus(ji,jj) * zwei 
     858       
     859      IF( nbit_cmp == 1) THEN 
     860          
     861         IF(ln_ctl)   THEN 
     862            WRITE(charout,FMT="('oce_sbc_dmp : a+ = ',D23.16, ' a- = ',D23.16)") aplus, aminus 
     863            CALL prt_ctl_info(charout) 
     864         ENDIF 
     865         erp(:,:) = 0.e0 
     866 
     867      ELSE 
     868 
     869         DO jj = 1, jpj 
     870            DO ji = 1, jpi 
     871               zwei   = e1t(ji,jj) * e2t(ji,jj) * tmask_i(ji,jj) 
     872               aplus  = aplus  + zerpplus (ji,jj) * zwei 
     873               aminus = aminus - zerpminus(ji,jj) * zwei 
     874            END DO 
    864875         END DO 
    865       END DO 
    866       IF( lk_mpp )   CALL mpp_sum( aplus  )   ! sums over the global domain 
    867       IF( lk_mpp )   CALL mpp_sum( aminus ) 
    868  
    869       IF(ln_ctl)   THEN 
    870          WRITE(charout,FMT="('oce_sbc_dmp : a+ = ',D23.16, ' a- = ',D23.16)") aplus, aminus 
    871          CALL prt_ctl_info(charout) 
    872       ENDIF 
    873  
    874       zadefi = MIN( aplus, aminus ) 
    875       IF( zadefi == 0.e0 ) THEN  
    876          erp(:,:) = 0.e0 
    877       ELSE 
    878          erp(:,:) = zadefi * ( zerpplus(:,:) / aplus + zerpminus(:,:) / aminus ) 
    879       ENDIF 
     876         IF( lk_mpp )   CALL mpp_sum( aplus  )   ! sums over the global domain 
     877         IF( lk_mpp )   CALL mpp_sum( aminus ) 
     878 
     879         IF(ln_ctl)   THEN 
     880            WRITE(charout,FMT="('oce_sbc_dmp : a+ = ',D23.16, ' a- = ',D23.16)") aplus, aminus 
     881            CALL prt_ctl_info(charout) 
     882         ENDIF 
     883 
     884         zadefi = MIN( aplus, aminus ) 
     885         IF( zadefi == 0.e0 ) THEN  
     886            erp(:,:) = 0.e0 
     887         ELSE 
     888            erp(:,:) = zadefi * ( zerpplus(:,:) / aplus + zerpminus(:,:) / aminus ) 
     889         ENDIF 
     890 
     891      END IF 
    880892#else 
    881893      ! Rigid-lid (emp=emps=E-P-R+Erp) 
Note: See TracChangeset for help on using the changeset viewer.