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 1298 – NEMO

Changeset 1298


Ignore:
Timestamp:
2009-02-09T09:48:20+01:00 (15 years ago)
Author:
cetlod
Message:

correction of minor bug in PISCES model ( mpi case ), see ticket:327

Location:
trunk/NEMO/TOP_SRC/PISCES
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMO/TOP_SRC/PISCES/p4zflx.F90

    r1152 r1298  
    2424   USE p4zche 
    2525 
     26   USE lib_mpp 
     27 
    2628   IMPLICIT NONE 
    2729   PRIVATE 
     
    3436 
    3537   REAL(wp) :: & 
    36      tco2flx = 0.            !: Total flux of carbon per year 
     38     tco2flx                 !: Total flux of carbon per year 
    3739 
    3840   !!* Substitution 
     
    184186 
    185187      IF( MOD( kt, nspyr ) == 0 ) THEN 
     188        IF( lk_mpp ) CALL mpp_sum( tco2flx )   ! sum over the global domain 
     189 
    186190        WRITE(numout,*) ' Atmospheric pCO2    :' 
    187191        WRITE(numout,*) '-------------------- : ',kt,'  ',atcco2 
    188192        WRITE(numout,*) '(ppm)' 
    189193        WRITE(numout,*) 'Total Flux of Carbon :' 
    190         WRITE(numout,*) '-------------------- : ',tco2flx * 12./1E15 
     194        WRITE(numout,*) '-------------------- : ',tco2flx * 12. / 1e15 
    191195        WRITE(numout,*) '(GtC/an)' 
    192196        tco2flx = 0. 
     
    227231      ENDIF 
    228232 
     233      ! Initialization of total Flux of Carbon 
     234      tco2flx = 0. 
     235 
    229236   END SUBROUTINE p4z_flx_init 
    230237 
  • trunk/NEMO/TOP_SRC/PISCES/p4zprod.F90

    r1263 r1298  
    4747      texcret2                   ,  &  !: 1 - excret2         
    4848      rpis180                    ,  &  !: rpi / 180 
    49       tpp = 0.                         !: Total primary production 
     49      tpp                              !: Total primary production 
    5050 
    5151   !!* Substitution 
     
    233233      END DO 
    234234 
    235 !     Computation of the fractionnal day length 
    236 !     ----------------------------------------- 
    237 !      zstrn(:,:) = strn(:,:) 
    238235 
    239236      WHERE( zstrn(:,:) < 1.e0 ) zstrn(:,:) = 24. 
    240237      zstrn(:,:) = 24. / zstrn(:,:) 
    241 !      DO jj = 1, jpj 
    242 !         DO ji = 1, jpi 
    243 ! 
    244 !      Computation of the maximum light intensity 
    245 !      ------------------------------------------ 
    246 !            IF( zstrn(ji,jj) < 1.e0 )   zstrn(ji,jj) = 24. 
    247 !            zstrn(ji,jj) = 24. / zstrn(ji,jj) 
    248 !         END DO 
    249 !      END DO 
    250238 
    251239!CDIR NOVERRCHK 
     
    257245 
    258246               IF( etot(ji,jj,jk) > 1.E-3 ) THEN 
    259 !     Computation of the various production terms for nanophyto. 
    260 !     ---------------------------------------------------------- 
     247                  !     Computation of the various production terms for nanophyto. 
    261248                  zetot2 = enano(ji,jj,jk) * zstrn(ji,jj) 
    262249                  zmax = MAX( 0.1, xlimphy(ji,jj,jk) ) 
     
    290277            DO ji = 1, jpi 
    291278               IF( etot(ji,jj,jk) > 1.E-3 ) THEN 
    292 !       Computation of the various production terms for diatoms 
    293 !       ------------------------------------------------------- 
     279                  !  Computation of the various production terms for diatoms 
    294280                  zetot2 = ediat(ji,jj,jk) * zstrn(ji,jj) 
    295281                  zmax = MAX( 0.1, xlimdia(ji,jj,jk) ) 
     
    319305      ! 
    320306 
    321 ! 
    322 !   Update the arrays TRA which contain the biological sources and sinks 
    323 !   -------------------------------------------------------------------- 
    324  
     307      !   Update the arrays TRA which contain the biological sources and sinks 
    325308      DO jk = 1, jpkm1 
    326309         DO jj = 1, jpj 
     
    361344             zvol = zvol * facvol(ji,jj,jk) 
    362345#endif 
    363              tpp  = tpp + ( zprorca(ji,jj,jk) + zprorcad(ji,jj,jk) ) * zvol 
     346             tpp  = tpp + ( zprorca(ji,jj,jk) + zprorcad(ji,jj,jk) ) & 
     347                          * zvol * tmask(ji,jj,jk) * tmask_i(ji,jj) 
    364348          END DO 
    365349        END DO 
    366350      END DO 
    367351 
    368       IF( lk_mpp ) CALL mpp_sum( tpp ) 
    369352 
    370353      IF( MOD( kt, nspyr ) == 0 ) THEN 
     354        IF( lk_mpp ) CALL mpp_sum( tpp ) 
    371355        WRITE(numout,*) 'Total PP :' 
    372356        WRITE(numout,*) '-------------------- : ',tpp * 12. / 1.E12 
     
    377361#if defined key_trc_dia3d 
    378362      zrfact2 = 1.e3 * rfact2r 
    379 !   Supplementary diagnostics 
    380 !   ------------------------- 
     363      !   Supplementary diagnostics 
    381364      trc3d(:,:,:,jp_pcs0_3d + 3)  = etot(:,:,:) 
    382365      trc3d(:,:,:,jp_pcs0_3d + 4)  = zprorca(:,:,:)  * zrfact2 
     
    437420      texcret   = 1.0 - excret 
    438421      texcret2  = 1.0 - excret2 
     422      tpp       = 0. 
    439423 
    440424   END SUBROUTINE p4z_prod_init 
Note: See TracChangeset for help on using the changeset viewer.