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 3320 for trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/trcsms_pisces.F90 – NEMO

Ignore:
Timestamp:
2012-03-05T17:37:52+01:00 (12 years ago)
Author:
cetlod
Message:

trunk:bugfix on trends diagnostics in the mixed-layer, see ticket#928 and ticket #930

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/trcsms_pisces.F90

    r3295 r3320  
    6060      INTEGER, INTENT( in ) ::   kt      ! ocean time-step index       
    6161      !! 
    62       INTEGER ::   jnt, jn 
     62      INTEGER ::   jnt, jn, jl 
    6363      CHARACTER (len=25) :: charout 
     64      REAL(wp), POINTER, DIMENSION(:,:,:,:)  :: ztrdpis 
    6465      !!--------------------------------------------------------------------- 
    6566      ! 
     
    6869      IF( ln_pisdmp .AND. MOD( kt - nn_dttrc, nn_pisdmp ) == 0 )   CALL trc_sms_pisces_dmp( kt )  ! Relaxation of some tracers 
    6970                                                                   CALL trc_sms_pisces_mass_conserv( kt ) ! Mass conservation checking 
     71      IF( l_trdtrc )  THEN 
     72         CALL wrk_alloc( jpi, jpj, jpk, jp_pisces, ztrdpis )  
     73         DO jn = 1, jp_pisces 
     74            jl = jn + jp_pcs0 - 1 
     75            ztrdpis(:,:,:,jn) = trn(:,:,:,jl) 
     76         ENDDO 
     77      ENDIF 
    7078 
    7179      IF( ndayflxtr /= nday_year ) THEN      ! New days 
     
    8290      ENDIF 
    8391 
     92 
    8493      DO jnt = 1, nrdttrc          ! Potential time splitting if requested 
    8594         ! 
     
    8796         CALL p4z_sed (kt, jnt)    ! compute soft tissue remineralisation 
    8897         ! 
    89          trb(:,:,:,:) = trn(:,:,:,:) 
     98         DO jn = jp_pcs0, jp_pcs1 
     99            trb(:,:,:,jn) = trn(:,:,:,jn) 
     100         ENDDO 
    90101         ! 
    91102      END DO 
     103 
     104      IF( l_trdtrc )  THEN 
     105         DO jn = 1, jp_pisces 
     106            jl = jn + jp_pcs0 - 1 
     107            ztrdpis(:,:,:,jn) = ( ztrdpis(:,:,:,jn) - trn(:,:,:,jl) ) * rfact2r 
     108         ENDDO 
     109      ENDIF 
    92110 
    93111      CALL p4z_lys( kt )             ! Compute CaCO3 saturation 
     
    101119 
    102120      IF( l_trdtrc ) THEN 
    103           DO jn = jp_pcs0, jp_pcs1 
    104             CALL trd_mod_trc( tra(:,:,:,jn), jn, jptra_trd_sms, kt )   ! save trends 
     121         DO jn = 1, jp_pisces 
     122            jl = jn + jp_pcs0 - 1 
     123             ztrdpis(:,:,:,jn) = ztrdpis(:,:,:,jn) + tra(:,:,:,jl) 
     124             CALL trd_mod_trc( ztrdpis(:,:,:,jn), jn, jptra_trd_sms, kt )   ! save trends 
    105125          END DO 
     126          CALL wrk_dealloc( jpi, jpj, jpk, jp_pisces, ztrdpis )  
    106127      END IF 
    107128 
Note: See TracChangeset for help on using the changeset viewer.