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 3028 for branches/2011/dev_LOCEAN_2011/NEMOGCM/NEMO/TOP_SRC/C14b/trcsms_c14b.F90 – NEMO

Ignore:
Timestamp:
2011-10-31T09:42:39+01:00 (12 years ago)
Author:
cetlod
Message:

branch dev_LOCEAN_2011 : minor changes in TOP component relative to the management of additional diagnostics

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2011/dev_LOCEAN_2011/NEMOGCM/NEMO/TOP_SRC/C14b/trcsms_c14b.F90

    r2977 r3028  
    9696      USE wrk_nemo, ONLY:   wrk_in_use, wrk_not_released 
    9797      USE wrk_nemo, ONLY:   zatmbc14 => wrk_2d_1 
    98       USE wrk_nemo, ONLY:   zw3d     => wrk_3d_1 
     98      USE wrk_nemo, ONLY:   zdecay   => wrk_3d_1 
    9999      ! 
    100100      INTEGER, INTENT(in) ::   kt    ! ocean time-step index 
     
    251251            ! cumulation of surface flux at each time step 
    252252            qint_c14(ji,jj) = qint_c14(ji,jj) + qtr_c14(ji,jj) * rdt 
    253  
    254             !                                        ! Save 2D diagnostics 
    255             IF( .NOT.lk_iomput .AND. ln_diatrc ) THEN 
    256                trc2d(ji,jj,jp_c14b0_2d    ) = qtr_c14 (ji,jj) 
    257                trc2d(ji,jj,jp_c14b0_2d + 1) = qint_c14(ji,jj) 
    258             ENDIF  
    259253            ! 
    260254         END DO 
     
    266260            DO ji = 1, jpi 
    267261#if defined key_degrad 
    268                ztra = trn(ji,jj,jk,jpc14) * ( 1. - EXP( -xlambda * rdt * facvol(ji,jj,jk) ) ) 
     262               zdecay(ji,jj,jk) = trn(ji,jj,jk,jpc14) * ( 1. - EXP( -xlambda * rdt * facvol(ji,jj,jk) ) ) 
    269263#else 
    270                ztra = trn(ji,jj,jk,jpc14) * xaccum 
     264               zdecay(ji,jj,jk) = trn(ji,jj,jk,jpc14) * xaccum 
    271265#endif 
    272                tra(ji,jj,jk,jpc14) = tra(ji,jj,jk,jpc14) - ztra / rdt 
    273                !                                     ! save 3D diag : radioactive decay 
    274                IF( ln_diatrc ) THEN 
    275                   IF( lk_iomput ) THEN   ;   zw3d(ji,jj,jk)               = ztra 
    276                   ELSE                   ;   trc3d(ji,jj,jk,jp_c14b0_3d ) = ztra 
    277                   ENDIF 
    278                ENDIF 
     266               tra(ji,jj,jk,jpc14) = tra(ji,jj,jk,jpc14) - zdecay(ji,jj,jk) / rdt 
    279267               ! 
    280268            END DO 
     
    282270      END DO 
    283271 
    284       IF( lk_iomput ) THEN 
    285          CALL iom_put( "qtrC14b"  , qtr_c14  ) 
    286          CALL iom_put( "qintC14b" , qint_c14 ) 
    287          CALL iom_put( "fdecay"   , zw3d     ) 
     272      IF( ln_diatrc ) THEN 
     273         IF( lk_iomput ) THEN 
     274            CALL iom_put( "qtrC14b"  , qtr_c14  ) 
     275            CALL iom_put( "qintC14b" , qint_c14 ) 
     276            CALL iom_put( "fdecay"   , zdecay   ) 
     277          ELSE 
     278            trc2d(:,:  ,jp_c14b0_2d     ) = qtr_c14 (:,:) 
     279            trc2d(:,:  ,jp_c14b0_2d + 1 ) = qint_c14(:,:) 
     280            trc3d(:,:,:,jp_c14b0_3d     ) = zdecay  (:,:,:) 
     281          ENDIF 
    288282      ENDIF 
    289283 
Note: See TracChangeset for help on using the changeset viewer.