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 – 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.

Location:
NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/TOP/C14
Files:
3 edited

Legend:

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

    r10069 r10975  
    3131CONTAINS 
    3232 
    33    SUBROUTINE trc_ini_c14 
     33   SUBROUTINE trc_ini_c14( Kmm ) 
    3434      !!---------------------------------------------------------------------- 
    3535      !!                     ***  trc_ini_c14  ***   
     
    4040      !!---------------------------------------------------------------------- 
    4141      ! 
     42      INTEGER, INTENT(in)  ::  Kmm  ! time level indices 
    4243      REAL(wp) :: ztrai 
    4344      INTEGER  :: jn 
     
    5758         IF(lwp) WRITE(numout,*) '                      ==>    Ocean C14/C :', rc14init  
    5859         ! 
    59          trn(:,:,:,jp_c14) = rc14init * tmask(:,:,:) 
     60         tr(:,:,:,jp_c14,Kmm) = rc14init * tmask(:,:,:) 
    6061         ! 
    6162         qtr_c14(:,:) = 0._wp           ! Init of air-sea BC 
  • 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') 
  • NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/TOP/C14/trcwri_c14.F90

    r10425 r10975  
    2727CONTAINS 
    2828 
    29    SUBROUTINE trc_wri_c14 
     29   SUBROUTINE trc_wri_c14( Kmm ) 
    3030      !!--------------------------------------------------------------------- 
    3131      !!                     ***  ROUTINE trc_wri_c14  *** 
     
    3333      !! ** Purpose :   output additional C14 tracers fields  
    3434      !!--------------------------------------------------------------------- 
     35      INTEGER, INTENT(in)  :: Kmm           ! time level indices 
    3536      CHARACTER (len=20)   :: cltra         ! short title for tracer 
    3637      INTEGER              :: ji,jj,jk,jn   ! dummy loop indexes 
     
    4344      ! --------------------------------------- 
    4445      cltra = TRIM( ctrcnm(jp_c14) )                  ! short title for tracer 
    45       CALL iom_put( cltra, trn(:,:,:,jp_c14) ) 
     46      CALL iom_put( cltra, tr(:,:,:,jp_c14,Kmm) ) 
    4647 
    4748      ! compute and write the tracer diagnostic in the file 
     
    6162               DO ji = 1, jpi 
    6263                  IF( tmask(ji,jj,jk) > 0._wp) THEN 
    63                      z3d (ji,jj,jk) = trn(ji,jj,jk,jp_c14) 
     64                     z3d (ji,jj,jk) = tr(ji,jj,jk,jp_c14,Kmm) 
    6465                     zz3d(ji,jj,jk) = LOG( z3d(ji,jj,jk) ) 
    6566                  ENDIF 
     
    113114      ENDIF 
    114115      IF( iom_use("C14Inv") ) THEN 
    115          ztemp = glob_sum( 'trcwri_c14', trn(:,:,:,jp_c14) * cvol(:,:,:) ) 
     116         ztemp = glob_sum( 'trcwri_c14', tr(:,:,:,jp_c14,Kmm) * cvol(:,:,:) ) 
    116117         ztemp = atomc14 * xdicsur * ztemp 
    117118         CALL iom_put( "C14Inv", ztemp )  !  Radiocarbon ocean inventory [10^26 atoms] 
Note: See TracChangeset for help on using the changeset viewer.