Ignore:
Timestamp:
2020-02-12T15:39:06+01:00 (13 months 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/PISCES/P4Z/p4zflx.F90

    r12277 r12377  
    5252   REAL(wp) ::   xconv  = 0.01_wp / 3600._wp   !: coefficients for conversion  
    5353 
     54   !! * Substitutions 
     55#  include "do_loop_substitute.h90" 
    5456   !!---------------------------------------------------------------------- 
    5557   !! NEMO/TOP 4.0 , NEMO Consortium (2018) 
     
    5961CONTAINS 
    6062 
    61    SUBROUTINE p4z_flx ( kt, knt ) 
     63   SUBROUTINE p4z_flx ( kt, knt, Kbb, Kmm, Krhs ) 
    6264      !!--------------------------------------------------------------------- 
    6365      !!                     ***  ROUTINE p4z_flx  *** 
     
    7173      !!--------------------------------------------------------------------- 
    7274      INTEGER, INTENT(in) ::   kt, knt   ! 
     75      INTEGER, INTENT(in) ::   Kbb, Kmm, Krhs      ! time level indices 
    7376      ! 
    7477      INTEGER  ::   ji, jj, jm, iind, iindm1 
     
    106109      IF( l_co2cpl )   satmco2(:,:) = atm_co2(:,:) 
    107110 
    108       DO jj = 1, jpj 
    109          DO ji = 1, jpi 
    110             ! DUMMY VARIABLES FOR DIC, H+, AND BORATE 
    111             zfact = rhop(ji,jj,1) / 1000. + rtrn 
    112             zdic  = trb(ji,jj,1,jpdic) 
    113             zph   = MAX( hi(ji,jj,1), 1.e-10 ) / zfact 
    114             ! CALCULATE [H2CO3] 
    115             zh2co3(ji,jj) = zdic/(1. + ak13(ji,jj,1)/zph + ak13(ji,jj,1)*ak23(ji,jj,1)/zph**2) 
    116          END DO 
    117       END DO 
     111      DO_2D_11_11 
     112         ! DUMMY VARIABLES FOR DIC, H+, AND BORATE 
     113         zfact = rhop(ji,jj,1) / 1000. + rtrn 
     114         zdic  = tr(ji,jj,1,jpdic,Kbb) 
     115         zph   = MAX( hi(ji,jj,1), 1.e-10 ) / zfact 
     116         ! CALCULATE [H2CO3] 
     117         zh2co3(ji,jj) = zdic/(1. + ak13(ji,jj,1)/zph + ak13(ji,jj,1)*ak23(ji,jj,1)/zph**2) 
     118      END_2D 
    118119 
    119120      ! -------------- 
     
    124125      ! ------------------------------------------- 
    125126 
    126       DO jj = 1, jpj 
    127          DO ji = 1, jpi 
    128             ztc  = MIN( 35., tsn(ji,jj,1,jp_tem) ) 
    129             ztc2 = ztc * ztc 
    130             ztc3 = ztc * ztc2  
    131             ztc4 = ztc2 * ztc2  
    132             ! Compute the schmidt Number both O2 and CO2 
    133             zsch_co2 = 2116.8 - 136.25 * ztc + 4.7353 * ztc2 - 0.092307 * ztc3 + 0.0007555 * ztc4 
    134             zsch_o2  = 1920.4 - 135.6  * ztc + 5.2122 * ztc2 - 0.109390 * ztc3 + 0.0009377 * ztc4 
    135             !  wind speed  
    136             zws  = wndm(ji,jj) * wndm(ji,jj) 
    137             ! Compute the piston velocity for O2 and CO2 
    138             zkgwan = 0.251 * zws 
    139             zkgwan = zkgwan * xconv * ( 1.- fr_i(ji,jj) ) * tmask(ji,jj,1) 
    140             ! compute gas exchange for CO2 and O2 
    141             zkgco2(ji,jj) = zkgwan * SQRT( 660./ zsch_co2 ) 
    142             zkgo2 (ji,jj) = zkgwan * SQRT( 660./ zsch_o2 ) 
    143          END DO 
    144       END DO 
    145  
    146  
    147       DO jj = 1, jpj 
    148          DO ji = 1, jpi 
    149             ztkel = tempis(ji,jj,1) + 273.15 
    150             zsal  = salinprac(ji,jj,1) + ( 1.- tmask(ji,jj,1) ) * 35. 
    151             zvapsw    = EXP(24.4543 - 67.4509*(100.0/ztkel) - 4.8489*LOG(ztkel/100) - 0.000544*zsal) 
    152             zpco2atm(ji,jj) = satmco2(ji,jj) * ( patm(ji,jj) - zvapsw ) 
    153             zxc2      = ( 1.0 - zpco2atm(ji,jj) * 1E-6 )**2 
    154             zfugcoeff = EXP( patm(ji,jj) * (chemc(ji,jj,2) + 2.0 * zxc2 * chemc(ji,jj,3) )   & 
    155             &           / ( 82.05736 * ztkel )) 
    156             zfco2 = zpco2atm(ji,jj) * zfugcoeff 
    157  
    158             ! Compute CO2 flux for the sea and air 
    159             zfld = zfco2 * chemc(ji,jj,1) * zkgco2(ji,jj)  ! (mol/L) * (m/s) 
    160             zflu = zh2co3(ji,jj) * zkgco2(ji,jj)                                   ! (mol/L) (m/s) ? 
    161             oce_co2(ji,jj) = ( zfld - zflu ) * tmask(ji,jj,1)  
    162             ! compute the trend 
    163             tra(ji,jj,1,jpdic) = tra(ji,jj,1,jpdic) + oce_co2(ji,jj) * rfact2 / e3t_n(ji,jj,1) 
    164  
    165             ! Compute O2 flux  
    166             zfld16 = patm(ji,jj) * chemo2(ji,jj,1) * zkgo2(ji,jj)          ! (mol/L) * (m/s) 
    167             zflu16 = trb(ji,jj,1,jpoxy) * zkgo2(ji,jj) 
    168             zoflx(ji,jj) = ( zfld16 - zflu16 ) * tmask(ji,jj,1) 
    169             tra(ji,jj,1,jpoxy) = tra(ji,jj,1,jpoxy) + zoflx(ji,jj) * rfact2 / e3t_n(ji,jj,1) 
    170          END DO 
    171       END DO 
     127      DO_2D_11_11 
     128         ztc  = MIN( 35., ts(ji,jj,1,jp_tem,Kmm) ) 
     129         ztc2 = ztc * ztc 
     130         ztc3 = ztc * ztc2  
     131         ztc4 = ztc2 * ztc2  
     132         ! Compute the schmidt Number both O2 and CO2 
     133         zsch_co2 = 2116.8 - 136.25 * ztc + 4.7353 * ztc2 - 0.092307 * ztc3 + 0.0007555 * ztc4 
     134         zsch_o2  = 1920.4 - 135.6  * ztc + 5.2122 * ztc2 - 0.109390 * ztc3 + 0.0009377 * ztc4 
     135         !  wind speed  
     136         zws  = wndm(ji,jj) * wndm(ji,jj) 
     137         ! Compute the piston velocity for O2 and CO2 
     138         zkgwan = 0.251 * zws 
     139         zkgwan = zkgwan * xconv * ( 1.- fr_i(ji,jj) ) * tmask(ji,jj,1) 
     140         ! compute gas exchange for CO2 and O2 
     141         zkgco2(ji,jj) = zkgwan * SQRT( 660./ zsch_co2 ) 
     142         zkgo2 (ji,jj) = zkgwan * SQRT( 660./ zsch_o2 ) 
     143      END_2D 
     144 
     145 
     146      DO_2D_11_11 
     147         ztkel = tempis(ji,jj,1) + 273.15 
     148         zsal  = salinprac(ji,jj,1) + ( 1.- tmask(ji,jj,1) ) * 35. 
     149         zvapsw    = EXP(24.4543 - 67.4509*(100.0/ztkel) - 4.8489*LOG(ztkel/100) - 0.000544*zsal) 
     150         zpco2atm(ji,jj) = satmco2(ji,jj) * ( patm(ji,jj) - zvapsw ) 
     151         zxc2      = ( 1.0 - zpco2atm(ji,jj) * 1E-6 )**2 
     152         zfugcoeff = EXP( patm(ji,jj) * (chemc(ji,jj,2) + 2.0 * zxc2 * chemc(ji,jj,3) )   & 
     153         &           / ( 82.05736 * ztkel )) 
     154         zfco2 = zpco2atm(ji,jj) * zfugcoeff 
     155 
     156         ! Compute CO2 flux for the sea and air 
     157         zfld = zfco2 * chemc(ji,jj,1) * zkgco2(ji,jj)  ! (mol/L) * (m/s) 
     158         zflu = zh2co3(ji,jj) * zkgco2(ji,jj)                                   ! (mol/L) (m/s) ? 
     159         oce_co2(ji,jj) = ( zfld - zflu ) * tmask(ji,jj,1)  
     160         ! compute the trend 
     161         tr(ji,jj,1,jpdic,Krhs) = tr(ji,jj,1,jpdic,Krhs) + oce_co2(ji,jj) * rfact2 / e3t(ji,jj,1,Kmm) 
     162 
     163         ! Compute O2 flux  
     164         zfld16 = patm(ji,jj) * chemo2(ji,jj,1) * zkgo2(ji,jj)          ! (mol/L) * (m/s) 
     165         zflu16 = tr(ji,jj,1,jpoxy,Kbb) * zkgo2(ji,jj) 
     166         zoflx(ji,jj) = ( zfld16 - zflu16 ) * tmask(ji,jj,1) 
     167         tr(ji,jj,1,jpoxy,Krhs) = tr(ji,jj,1,jpoxy,Krhs) + zoflx(ji,jj) * rfact2 / e3t(ji,jj,1,Kmm) 
     168      END_2D 
    172169 
    173170      IF( iom_use("tcflx") .OR. iom_use("tcflxcum") .OR. kt == nitrst   & 
     
    178175      t_atm_co2_flx     =  atcco2      ! Total atmospheric pCO2 
    179176  
    180       IF(ln_ctl)   THEN  ! print mean trends (used for debugging) 
     177      IF(sn_cfctl%l_prttrc)   THEN  ! print mean trends (used for debugging) 
    181178         WRITE(charout, FMT="('flx ')") 
    182179         CALL prt_ctl_trc_info(charout) 
    183          CALL prt_ctl_trc(tab4d=tra, mask=tmask, clinfo=ctrcnm) 
     180         CALL prt_ctl_trc(tab4d=tr(:,:,:,:,Krhs), mask=tmask, clinfo=ctrcnm) 
    184181      ENDIF 
    185182 
     
    191188         CALL iom_put( "Dpco2"   , ( zpco2atm(:,:) - zh2co3(:,:) / ( chemc(:,:,1) + rtrn ) ) * tmask(:,:,1) ) 
    192189         CALL iom_put( "pCO2sea" , ( zh2co3(:,:) / ( chemc(:,:,1) + rtrn ) ) * tmask(:,:,1) ) 
    193          CALL iom_put( "Dpo2"    , ( atcox * patm(:,:) - atcox * trb(:,:,1,jpoxy) / ( chemo2(:,:,1) + rtrn ) ) * tmask(:,:,1) ) 
     190         CALL iom_put( "Dpo2"    , ( atcox * patm(:,:) - atcox * tr(:,:,1,jpoxy,Kbb) / ( chemo2(:,:,1) + rtrn ) ) * tmask(:,:,1) ) 
    194191         CALL iom_put( "tcflx"   , t_oce_co2_flx     )   ! molC/s 
    195192         CALL iom_put( "tcflxcum", t_oce_co2_flx_cum )   ! molC 
     
    222219      ENDIF 
    223220      ! 
    224       REWIND( numnatp_ref ) 
    225221      READ  ( numnatp_ref, nampisext, IOSTAT = ios, ERR = 901) 
    226222901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nampisext in reference namelist' ) 
    227  
    228       REWIND( numnatp_cfg ) 
    229223      READ  ( numnatp_cfg, nampisext, IOSTAT = ios, ERR = 902 ) 
    230224902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nampisext in configuration namelist' ) 
     
    304298         ENDIF 
    305299         ! 
    306          REWIND( numnatp_ref ) 
    307300         READ  ( numnatp_ref, nampisatm, IOSTAT = ios, ERR = 901) 
    308301901      IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampisatm in reference namelist' ) 
    309  
    310          REWIND( numnatp_cfg ) 
    311302         READ  ( numnatp_cfg, nampisatm, IOSTAT = ios, ERR = 902 ) 
    312303902      IF( ios >  0 )   CALL ctl_nam ( ios , 'nampisatm in configuration namelist' ) 
Note: See TracChangeset for help on using the changeset viewer.