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 10975 for NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/TOP/C14/trcsms_c14.F90 – NEMO

Ignore:
Timestamp:
2019-05-13T18:34:33+02:00 (5 years ago)
Author:
acc
Message:

2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps : Finish converting all TOP routines and knock-on effects of these conversions. Fully SETTE tested (SETTE tests 1-6 and 9). This completes the first stage conversion of TRA and TOP but need to revisit and pass ts and tr arrays through the argument lists where appropriate.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/TOP/C14/trcsms_c14.F90

    r10966 r10975  
    3333CONTAINS 
    3434 
    35    SUBROUTINE trc_sms_c14( kt, Kmm ) 
     35   SUBROUTINE trc_sms_c14( kt, Kbb, Kmm, Krhs ) 
    3636      !!---------------------------------------------------------------------- 
    3737      !!                  ***  ROUTINE trc_sms_c14  *** 
     
    4646      !            freshwater fluxes which should not impact the C14/C ratio 
    4747      ! 
    48       !        =>   Delta-C14= ( trn(...jp_c14) -1)*1000. 
     48      !        =>   Delta-C14= ( tr(...jp_c14,Kmm) -1)*1000. 
    4949      !! 
    5050      !!---------------------------------------------------------------------- 
    5151      ! 
    52       INTEGER, INTENT(in) ::   kt    ! ocean time-step index 
    53       INTEGER, INTENT(in) ::   Kmm   ! ocean time level 
     52      INTEGER, INTENT(in) ::   kt               ! ocean time-step index 
     53      INTEGER, INTENT(in) ::   Kbb, Kmm, Krhs   ! ocean time level 
    5454      ! 
    55       INTEGER  :: ji, jj, jk         ! dummy loop indices  
     55      INTEGER  :: ji, jj, jk        ! dummy loop indices  
    5656      REAL(wp) :: zt, ztp, zsk      ! dummy variables 
    5757      REAL(wp) :: zsol              ! solubility 
     
    8282            IF( tmask(ji,jj,1) >  0. ) THEN 
    8383               ! 
    84                zt   = MIN( 40. , tsn(ji,jj,1,jp_tem) ) 
     84               zt   = MIN( 40. , ts(ji,jj,1,jp_tem,Kmm) ) 
    8585               ! 
    8686               !  Computation of solubility zsol in [mol/(L * atm)] 
     
    8888               ztp  = ( zt + 273.16 ) * 0.01 
    8989               zsk  = 0.027766 + ztp * ( -0.025888 + 0.0050578 * ztp )   ! [mol/(L * atm)] 
    90                zsol = EXP( -58.0931 + 90.5069 / ztp  + 22.2940 * LOG( ztp ) + zsk * tsn(ji,jj,1,jp_sal) ) 
     90               zsol = EXP( -58.0931 + 90.5069 / ztp  + 22.2940 * LOG( ztp ) + zsk * ts(ji,jj,1,jp_sal,Kmm) ) 
    9191               ! convert solubilities [mol/(L * atm)] -> [mol/(m^3 * ppm)] 
    9292               zsol = zsol * 1.e-03 
     
    121121      ! Flux of C-14 from air-to-sea; units: (C14/C ratio) x m/s 
    122122      !                               already masked 
    123       qtr_c14(:,:) = exch_c14(:,:) * ( c14sbc(:,:) - trb(:,:,1,jp_c14) ) 
     123      qtr_c14(:,:) = exch_c14(:,:) * ( c14sbc(:,:) - tr(:,:,1,jp_c14,Kbb) ) 
    124124             
    125125      ! cumulation of air-to-sea flux at each time step 
     
    129129      DO jj = 1, jpj 
    130130         DO ji = 1, jpi 
    131             tra(ji,jj,1,jp_c14) = tra(ji,jj,1,jp_c14) + qtr_c14(ji,jj) / e3t_n(ji,jj,1)  
     131            tr(ji,jj,1,jp_c14,Krhs) = tr(ji,jj,1,jp_c14,Krhs) + qtr_c14(ji,jj) / e3t(ji,jj,1,Kmm)  
    132132         END DO 
    133133      END DO 
     
    138138            DO ji = 1, jpi 
    139139               ! 
    140                tra(ji,jj,jk,jp_c14) = tra(ji,jj,jk,jp_c14) - rlam14 * trb(ji,jj,jk,jp_c14) * tmask(ji,jj,jk)  
     140               tr(ji,jj,jk,jp_c14,Krhs) = tr(ji,jj,jk,jp_c14,Krhs) - rlam14 * tr(ji,jj,jk,jp_c14,Kbb) * tmask(ji,jj,jk)  
    141141               ! 
    142142            END DO 
     
    158158      ENDIF 
    159159 
    160       IF( l_trdtrc )  CALL trd_trc( tra(:,:,:,jp_c14), 1, jptra_sms, kt, Kmm )   ! save trends 
     160      IF( l_trdtrc )  CALL trd_trc( tr(:,:,:,jp_c14,Krhs), 1, jptra_sms, kt, Kmm )   ! save trends 
    161161      ! 
    162162      IF( ln_timing )   CALL timing_stop('trc_sms_c14') 
Note: See TracChangeset for help on using the changeset viewer.