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 12377 for NEMO/trunk/src/TOP/C14/trcsms_c14.F90 – NEMO

Ignore:
Timestamp:
2020-02-12T15:39:06+01:00 (4 years ago)
Author:
acc
Message:

The big one. Merging all 2019 developments from the option 1 branch back onto the trunk.

This changeset reproduces 2019/dev_r11943_MERGE_2019 on the trunk using a 2-URL merge
onto a working copy of the trunk. I.e.:

svn merge --ignore-ancestry \

svn+ssh://acc@forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/NEMO/trunk \
svn+ssh://acc@forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/NEMO/branches/2019/dev_r11943_MERGE_2019 ./

The --ignore-ancestry flag avoids problems that may otherwise arise from the fact that
the merge history been trunk and branch may have been applied in a different order but
care has been taken before this step to ensure that all applicable fixes and updates
are present in the merge branch.

The trunk state just before this step has been branched to releases/release-4.0-HEAD
and that branch has been immediately tagged as releases/release-4.0.2. Any fixes
or additions in response to tickets on 4.0, 4.0.1 or 4.0.2 should be done on
releases/release-4.0-HEAD. From now on future 'point' releases (e.g. 4.0.2) will
remain unchanged with periodic releases as needs demand. Note release-4.0-HEAD is a
transitional naming convention. Future full releases, say 4.2, will have a release-4.2
branch which fulfills this role and the first point release (e.g. 4.2.0) will be made
immediately following the release branch creation.

2020 developments can be started from any trunk revision later than this one.

Location:
NEMO/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk

    • Property svn:externals
      •  

        old new  
        33^/utils/build/mk@HEAD         mk 
        44^/utils/tools@HEAD            tools 
        5 ^/vendors/AGRIF/dev@HEAD      ext/AGRIF 
         5^/vendors/AGRIF/dev_r11615_ENHANCE-04_namelists_as_internalfiles_agrif@HEAD      ext/AGRIF 
        66^/vendors/FCM@HEAD            ext/FCM 
        77^/vendors/IOIPSL@HEAD         ext/IOIPSL 
  • NEMO/trunk/src/TOP/C14/trcsms_c14.F90

    r10069 r12377  
    2626   PUBLIC   trc_sms_c14       ! called in trcsms.F90 
    2727 
     28   !! * Substitutions 
     29#  include "do_loop_substitute.h90" 
    2830   !!---------------------------------------------------------------------- 
    2931   !! NEMO/TOP 4.0 , NEMO Consortium (2018) 
     
    3335CONTAINS 
    3436 
    35    SUBROUTINE trc_sms_c14( kt ) 
     37   SUBROUTINE trc_sms_c14( kt, Kbb, Kmm, Krhs ) 
    3638      !!---------------------------------------------------------------------- 
    3739      !!                  ***  ROUTINE trc_sms_c14  *** 
     
    4648      !            freshwater fluxes which should not impact the C14/C ratio 
    4749      ! 
    48       !        =>   Delta-C14= ( trn(...jp_c14) -1)*1000. 
     50      !        =>   Delta-C14= ( tr(...jp_c14,Kmm) -1)*1000. 
    4951      !! 
    5052      !!---------------------------------------------------------------------- 
    5153      ! 
    52       INTEGER, INTENT(in) ::   kt    ! ocean time-step index 
     54      INTEGER, INTENT(in) ::   kt               ! ocean time-step index 
     55      INTEGER, INTENT(in) ::   Kbb, Kmm, Krhs   ! ocean time level 
    5356      ! 
    54       INTEGER  :: ji, jj, jk         ! dummy loop indices  
     57      INTEGER  :: ji, jj, jk        ! dummy loop indices  
    5558      REAL(wp) :: zt, ztp, zsk      ! dummy variables 
    5659      REAL(wp) :: zsol              ! solubility 
     
    7780      ! ------------------------------------------------------------------- 
    7881 
    79       DO jj = 1, jpj 
    80          DO ji = 1, jpi   
    81             IF( tmask(ji,jj,1) >  0. ) THEN 
    82                ! 
    83                zt   = MIN( 40. , tsn(ji,jj,1,jp_tem) ) 
    84                ! 
    85                !  Computation of solubility zsol in [mol/(L * atm)] 
    86                !   after Wanninkhof (2014) referencing Weiss (1974) 
    87                ztp  = ( zt + 273.16 ) * 0.01 
    88                zsk  = 0.027766 + ztp * ( -0.025888 + 0.0050578 * ztp )   ! [mol/(L * atm)] 
    89                zsol = EXP( -58.0931 + 90.5069 / ztp  + 22.2940 * LOG( ztp ) + zsk * tsn(ji,jj,1,jp_sal) ) 
    90                ! convert solubilities [mol/(L * atm)] -> [mol/(m^3 * ppm)] 
    91                zsol = zsol * 1.e-03 
     82      DO_2D_11_11 
     83         IF( tmask(ji,jj,1) >  0. ) THEN 
     84            ! 
     85            zt   = MIN( 40. , ts(ji,jj,1,jp_tem,Kmm) ) 
     86            ! 
     87            !  Computation of solubility zsol in [mol/(L * atm)] 
     88            !   after Wanninkhof (2014) referencing Weiss (1974) 
     89            ztp  = ( zt + 273.16 ) * 0.01 
     90            zsk  = 0.027766 + ztp * ( -0.025888 + 0.0050578 * ztp )   ! [mol/(L * atm)] 
     91            zsol = EXP( -58.0931 + 90.5069 / ztp  + 22.2940 * LOG( ztp ) + zsk * ts(ji,jj,1,jp_sal,Kmm) ) 
     92            ! convert solubilities [mol/(L * atm)] -> [mol/(m^3 * ppm)] 
     93            zsol = zsol * 1.e-03 
    9294 
    93                ! Computes the Schmidt number of CO2 in seawater 
    94                !               Wanninkhof-2014 
    95                zsch = 2116.8 + zt * ( -136.25 + zt * (4.7353 + zt * (-0.092307 + 0.0007555 * zt ) ) ) 
     95            ! Computes the Schmidt number of CO2 in seawater 
     96            !               Wanninkhof-2014 
     97            zsch = 2116.8 + zt * ( -136.25 + zt * (4.7353 + zt * (-0.092307 + 0.0007555 * zt ) ) ) 
    9698 
    97                ! Wanninkhof Piston velocity: zpv in units [m/s] 
    98                zv2 = xkwind * (wndm(ji,jj) * wndm(ji,jj))              ! wind speed module at T points 
    99                ! chemical enhancement (Wanninkhof & Knox, 1996) 
    100                IF( ln_chemh ) zv2 = zv2 + 2.5 * ( 0.5246 + zt * (0.016256 + 0.00049946  * zt ) ) 
    101                zv2 = zv2/360000._wp                                    ! conversion cm/h -> m/s 
    102                ! 
    103                zpv  = ( zv2 * SQRT( 660./ zsch ) ) * ( 1. - fr_i(ji,jj) ) * tmask(ji,jj,1) 
     99            ! Wanninkhof Piston velocity: zpv in units [m/s] 
     100            zv2 = xkwind * (wndm(ji,jj) * wndm(ji,jj))              ! wind speed module at T points 
     101            ! chemical enhancement (Wanninkhof & Knox, 1996) 
     102            IF( ln_chemh ) zv2 = zv2 + 2.5 * ( 0.5246 + zt * (0.016256 + 0.00049946  * zt ) ) 
     103            zv2 = zv2/360000._wp                                    ! conversion cm/h -> m/s 
     104            ! 
     105            zpv  = ( zv2 * SQRT( 660./ zsch ) ) * ( 1. - fr_i(ji,jj) ) * tmask(ji,jj,1) 
    104106 
    105                ! CO2 piston velocity (m/s) 
    106                exch_co2(ji,jj)= zpv 
    107                ! CO2 invasion rate (mol/ppm/m2/s) = 1st part of 14C/C exchange velocity 
    108                exch_c14(ji,jj)= zpv * zsol 
    109             ELSE 
    110                exch_co2(ji,jj) = 0._wp 
    111                exch_c14(ji,jj) = 0._wp 
    112             ENDIF 
    113          END DO 
    114       END DO 
     107            ! CO2 piston velocity (m/s) 
     108            exch_co2(ji,jj)= zpv 
     109            ! CO2 invasion rate (mol/ppm/m2/s) = 1st part of 14C/C exchange velocity 
     110            exch_c14(ji,jj)= zpv * zsol 
     111         ELSE 
     112            exch_co2(ji,jj) = 0._wp 
     113            exch_c14(ji,jj) = 0._wp 
     114         ENDIF 
     115      END_2D 
    115116 
    116117      ! Exchange velocity for 14C/C ratio (m/s) 
     
    120121      ! Flux of C-14 from air-to-sea; units: (C14/C ratio) x m/s 
    121122      !                               already masked 
    122       qtr_c14(:,:) = exch_c14(:,:) * ( c14sbc(:,:) - trb(:,:,1,jp_c14) ) 
     123      qtr_c14(:,:) = exch_c14(:,:) * ( c14sbc(:,:) - tr(:,:,1,jp_c14,Kbb) ) 
    123124             
    124125      ! cumulation of air-to-sea flux at each time step 
     
    126127      ! 
    127128      ! Add the surface flux to the trend of jp_c14 
    128       DO jj = 1, jpj 
    129          DO ji = 1, jpi 
    130             tra(ji,jj,1,jp_c14) = tra(ji,jj,1,jp_c14) + qtr_c14(ji,jj) / e3t_n(ji,jj,1)  
    131          END DO 
    132       END DO 
     129      DO_2D_11_11 
     130         tr(ji,jj,1,jp_c14,Krhs) = tr(ji,jj,1,jp_c14,Krhs) + qtr_c14(ji,jj) / e3t(ji,jj,1,Kmm)  
     131      END_2D 
    133132      ! 
    134133      ! Computation of decay effects on jp_c14 
    135       DO jk = 1, jpk 
    136          DO jj = 1, jpj 
    137             DO ji = 1, jpi 
    138                ! 
    139                tra(ji,jj,jk,jp_c14) = tra(ji,jj,jk,jp_c14) - rlam14 * trb(ji,jj,jk,jp_c14) * tmask(ji,jj,jk)  
    140                ! 
    141             END DO 
    142          END DO 
    143       END DO 
     134      DO_3D_11_11( 1, jpk ) 
     135         ! 
     136         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)  
     137         ! 
     138      END_3D 
    144139      ! 
    145140      IF( lrst_trc ) THEN 
     
    157152      ENDIF 
    158153 
    159       IF( l_trdtrc )  CALL trd_trc( tra(:,:,:,jp_c14), 1, jptra_sms, kt )   ! save trends 
     154      IF( l_trdtrc )  CALL trd_trc( tr(:,:,:,jp_c14,Krhs), 1, jptra_sms, kt, Kmm )   ! save trends 
    160155      ! 
    161156      IF( ln_timing )   CALL timing_stop('trc_sms_c14') 
Note: See TracChangeset for help on using the changeset viewer.