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 11222 for NEMO/branches/2019/dev_r11219_TOP-01_cethe_PISCES_LBC/src – NEMO

Ignore:
Timestamp:
2019-07-05T16:52:07+02:00 (5 years ago)
Author:
cetlod
Message:

PISCES_LBC : 1st step of dev

Location:
NEMO/branches/2019/dev_r11219_TOP-01_cethe_PISCES_LBC/src/TOP
Files:
1 added
1 deleted
12 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/dev_r11219_TOP-01_cethe_PISCES_LBC/src/TOP/MY_TRC/trcsms_my_trc.F90

    r10425 r11222  
    1515   USE trd_oce 
    1616   USE trdtrc 
    17    USE trcbc, only : trc_bc 
    1817 
    1918   IMPLICIT NONE 
     
    5453      IF( l_trdtrc )  ALLOCATE( ztrmyt(jpi,jpj,jpk) ) 
    5554 
    56       CALL trc_bc ( kt )       ! tracers: surface and lateral Boundary Conditions 
    57  
    5855      ! add here the call to BGC model 
    5956 
  • NEMO/branches/2019/dev_r11219_TOP-01_cethe_PISCES_LBC/src/TOP/PISCES/P4Z/p4zfechem.F90

    r10416 r11222  
    1515   USE sms_pisces      ! PISCES Source Minus Sink variables 
    1616   USE p4zche          ! chemical model 
    17    USE p4zsbc          ! Boundary conditions from sediments 
     17   USE p4zbc           ! Boundary conditions from sediments 
    1818   USE prtctl_trc      ! print control for debugging 
    1919   USE iom             ! I/O manager 
     
    133133               ! 
    134134               ztrc   = ( trb(ji,jj,jk,jppoc) + trb(ji,jj,jk,jpgoc) + trb(ji,jj,jk,jpcal) + trb(ji,jj,jk,jpgsi) ) * 1.e6  
    135                IF( ln_dust )  zdust  = dust(ji,jj) / ( wdust / rday ) * tmask(ji,jj,jk) & 
     135               IF( ll_dust )  zdust  = dust(ji,jj) / ( wdust / rday ) * tmask(ji,jj,jk) & 
    136136               &  * EXP( -gdept_n(ji,jj,jk) / 540. ) 
    137137               IF (ln_ligand) THEN 
  • NEMO/branches/2019/dev_r11219_TOP-01_cethe_PISCES_LBC/src/TOP/PISCES/P4Z/p4zsed.F90

    r10788 r11222  
    1515   USE sms_pisces      !  PISCES Source Minus Sink variables 
    1616   USE p4zlim          !  Co-limitations of differents nutrients 
    17    USE p4zsbc          !  External source of nutrients  
    1817   USE p4zint          !  interpolation and computation of various fields 
    1918   USE sed             !  Sediment module 
     
    2524 
    2625   PUBLIC   p4z_sed   
     26   PUBLIC   p4z_sed_init 
    2727   PUBLIC   p4z_sed_alloc 
    2828  
     29   REAL(wp), PUBLIC ::   nitrfix      !: Nitrogen fixation rate 
     30   REAL(wp), PUBLIC ::   diazolight   !: Nitrogen fixation sensitivty to light 
     31   REAL(wp), PUBLIC ::   concfediaz   !: Fe half-saturation Cste for diazotrophs 
     32 
    2933   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: nitrpot    !: Nitrogen fixation  
    3034   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:  ) :: sdenit     !: Nitrate reduction in the sediments 
    31    REAL(wp) :: r1_rday                  !: inverse of rday 
    32    LOGICAL, SAVE :: lk_sed 
     35   ! 
     36   REAL(wp), SAVE :: r1_rday           
     37   REAL(wp), SAVE :: sedsilfrac, sedcalfrac 
    3338 
    3439   !!---------------------------------------------------------------------- 
     
    5358      INTEGER  ::  ji, jj, jk, ikt 
    5459      REAL(wp) ::  zrivalk, zrivsil, zrivno3 
    55       REAL(wp) ::  zwflux, zlim, zfact, zfactcal 
     60      REAL(wp) ::  zlim, zfact, zfactcal 
    5661      REAL(wp) ::  zo2, zno3, zflx, zpdenit, z1pdenit, zolimit 
    5762      REAL(wp) ::  zsiloss, zcaloss, zws3, zws4, zwsc, zdep 
     
    6671      REAL(wp), DIMENSION(jpi,jpj,jpk) :: zsoufer, zlight 
    6772      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: ztrpo4, ztrdop, zirondep, zpdep 
    68       REAL(wp), ALLOCATABLE, DIMENSION(:,:  ) :: zsidep, zironice 
    6973      !!--------------------------------------------------------------------- 
    7074      ! 
    7175      IF( ln_timing )  CALL timing_start('p4z_sed') 
    7276      ! 
    73       IF( kt == nittrc000 .AND. knt == 1 )   THEN 
    74           r1_rday  = 1. / rday 
    75           IF (ln_sediment .AND. ln_sed_2way) THEN 
    76              lk_sed = .TRUE. 
    77           ELSE 
    78              lk_sed = .FALSE. 
    79           ENDIF 
    80       ENDIF 
    81       ! 
    82       IF( kt == nittrc000 .AND. knt == 1 )   r1_rday  = 1. / rday 
    83       ! 
     77 
    8478      ! Allocate temporary workspace 
    8579      ALLOCATE( ztrpo4(jpi,jpj,jpk) ) 
     
    9387      zsedc   (:,:) = 0.e0 
    9488 
    95       ! Iron input/uptake due to sea ice : Crude parameterization based on Lancelot et al. 
    96       ! ---------------------------------------------------- 
    97       IF( ln_ironice ) THEN   
    98          !                                               
    99          ALLOCATE( zironice(jpi,jpj) ) 
    100          !                                               
     89      IF( .NOT.lk_sed ) THEN 
     90         ! OA: Warning, the following part is necessary to avoid CFL problems above the sediments 
     91         ! -------------------------------------------------------------------- 
    10192         DO jj = 1, jpj 
    10293            DO ji = 1, jpi 
    103                zdep    = rfact2 / e3t_n(ji,jj,1) 
    104                zwflux  = fmmflx(ji,jj) / 1000._wp 
    105                zironice(ji,jj) =  MAX( -0.99 * trb(ji,jj,1,jpfer), -zwflux * icefeinput * zdep ) 
    106             END DO 
    107          END DO 
    108          ! 
    109          tra(:,:,1,jpfer) = tra(:,:,1,jpfer) + zironice(:,:)  
    110          !  
    111          IF( lk_iomput .AND. knt == nrdttrc .AND. iom_use( "Ironice" ) )   & 
    112             &   CALL iom_put( "Ironice", zironice(:,:) * 1.e+3 * rfact2r * e3t_n(:,:,1) * tmask(:,:,1) ) ! iron flux from ice 
    113          ! 
    114          DEALLOCATE( zironice ) 
    115          !                                               
    116       ENDIF 
    117  
    118       ! Add the external input of nutrients from dust deposition 
    119       ! ---------------------------------------------------------- 
    120       IF( ln_dust ) THEN 
    121          !                                               
    122          ALLOCATE( zsidep(jpi,jpj), zpdep(jpi,jpj,jpk), zirondep(jpi,jpj,jpk) ) 
    123          !                                              ! Iron and Si deposition at the surface 
    124          IF( ln_solub ) THEN 
    125             zirondep(:,:,1) = solub(:,:) * dust(:,:) * mfrac * rfact2 / e3t_n(:,:,1) / 55.85 + 3.e-10 * r1_ryyss  
    126          ELSE 
    127             zirondep(:,:,1) = dustsolub  * dust(:,:) * mfrac * rfact2 / e3t_n(:,:,1) / 55.85 + 3.e-10 * r1_ryyss  
    128          ENDIF 
    129          zsidep(:,:)   = 8.8 * 0.075 * dust(:,:) * mfrac * rfact2 / e3t_n(:,:,1) / 28.1  
    130          zpdep (:,:,1) = 0.1 * 0.021 * dust(:,:) * mfrac * rfact2 / e3t_n(:,:,1) / 31. / po4r  
    131          !                                              ! Iron solubilization of particles in the water column 
    132          !                                              ! dust in kg/m2/s ---> 1/55.85 to put in mol/Fe ;  wdust in m/j 
    133          zwdust = 0.03 * rday / ( wdust * 55.85 ) / ( 270. * rday ) 
    134          DO jk = 2, jpkm1 
    135             zirondep(:,:,jk) = dust(:,:) * mfrac * zwdust * rfact2 * EXP( -gdept_n(:,:,jk) / 540. ) 
    136             zpdep   (:,:,jk) = zirondep(:,:,jk) * 0.023 
    137          END DO 
    138          !                                              ! Iron solubilization of particles in the water column 
    139          tra(:,:,1,jpsil) = tra(:,:,1,jpsil) + zsidep  (:,:) 
    140          DO jk = 1, jpkm1 
    141             tra(:,:,jk,jppo4) = tra(:,:,jk,jppo4) + zpdep   (:,:,jk) 
    142             tra(:,:,jk,jpfer) = tra(:,:,jk,jpfer) + zirondep(:,:,jk)  
    143          ENDDO 
    144          !  
    145          IF( lk_iomput ) THEN 
    146             IF( knt == nrdttrc ) THEN 
    147                 IF( iom_use( "Irondep" ) )   & 
    148                 &  CALL iom_put( "Irondep", zirondep(:,:,1) * 1.e+3 * rfact2r * e3t_n(:,:,1) * tmask(:,:,1) ) ! surface downward dust depo of iron 
    149                 IF( iom_use( "pdust" ) )   & 
    150                 &  CALL iom_put( "pdust"  , dust(:,:) / ( wdust * rday )  * tmask(:,:,1) ) ! dust concentration at surface 
    151             ENDIF 
    152          ENDIF 
    153          DEALLOCATE( zsidep, zpdep, zirondep ) 
    154          !                                               
    155       ENDIF 
    156       
    157       ! Add the external input of nutrients from river 
    158       ! ---------------------------------------------------------- 
    159       IF( ln_river ) THEN 
    160          DO jj = 1, jpj 
    161             DO ji = 1, jpi 
    162                DO jk = 1, nk_rnf(ji,jj) 
    163                   tra(ji,jj,jk,jppo4) = tra(ji,jj,jk,jppo4) +  rivdip(ji,jj) * rfact2 
    164                   tra(ji,jj,jk,jpno3) = tra(ji,jj,jk,jpno3) +  rivdin(ji,jj) * rfact2 
    165                   tra(ji,jj,jk,jpfer) = tra(ji,jj,jk,jpfer) +  rivdic(ji,jj) * 5.e-5 * rfact2 
    166                   tra(ji,jj,jk,jpsil) = tra(ji,jj,jk,jpsil) +  rivdsi(ji,jj) * rfact2 
    167                   tra(ji,jj,jk,jpdic) = tra(ji,jj,jk,jpdic) +  rivdic(ji,jj) * rfact2 
    168                   tra(ji,jj,jk,jptal) = tra(ji,jj,jk,jptal) +  ( rivalk(ji,jj) - rno3 * rivdin(ji,jj) ) * rfact2 
    169                   tra(ji,jj,jk,jpdoc) = tra(ji,jj,jk,jpdoc) +  rivdoc(ji,jj) * rfact2 
    170                ENDDO 
    171             ENDDO 
    172          ENDDO 
    173          IF (ln_ligand) THEN 
    174             DO jj = 1, jpj 
    175                DO ji = 1, jpi 
    176                   DO jk = 1, nk_rnf(ji,jj) 
    177                      tra(ji,jj,jk,jplgw) = tra(ji,jj,jk,jplgw) +  rivdic(ji,jj) * 5.e-5 * rfact2 
    178                   ENDDO 
    179                ENDDO 
    180             ENDDO 
    181          ENDIF 
    182          IF( ln_p5z ) THEN 
    183             DO jj = 1, jpj 
    184                DO ji = 1, jpi 
    185                   DO jk = 1, nk_rnf(ji,jj) 
    186                      tra(ji,jj,jk,jpdop) = tra(ji,jj,jk,jpdop) + rivdop(ji,jj) * rfact2 
    187                      tra(ji,jj,jk,jpdon) = tra(ji,jj,jk,jpdon) + rivdon(ji,jj) * rfact2 
    188                   ENDDO 
    189                ENDDO 
    190             ENDDO 
    191          ENDIF 
    192       ENDIF 
    193        
    194       ! Add the external input of nutrients from nitrogen deposition 
    195       ! ---------------------------------------------------------- 
    196       IF( ln_ndepo ) THEN 
    197          tra(:,:,1,jpno3) = tra(:,:,1,jpno3) + nitdep(:,:) * rfact2 
    198          tra(:,:,1,jptal) = tra(:,:,1,jptal) - rno3 * nitdep(:,:) * rfact2 
    199       ENDIF 
    200  
    201       ! Add the external input of iron from hydrothermal vents 
    202       ! ------------------------------------------------------ 
    203       IF( ln_hydrofe ) THEN 
    204             tra(:,:,:,jpfer) = tra(:,:,:,jpfer) + hydrofe(:,:,:) * rfact2 
    205          IF( ln_ligand ) THEN 
    206             tra(:,:,:,jplgw) = tra(:,:,:,jplgw) + ( hydrofe(:,:,:) * lgw_rath ) * rfact2 
    207          ENDIF 
    208          ! 
    209          IF( lk_iomput .AND. knt == nrdttrc .AND. iom_use( "HYDR" ) )   & 
    210             &   CALL iom_put( "HYDR", hydrofe(:,:,:) * 1.e+3 * tmask(:,:,:) ) ! hydrothermal iron input 
    211       ENDIF 
    212  
    213       ! OA: Warning, the following part is necessary to avoid CFL problems above the sediments 
    214       ! -------------------------------------------------------------------- 
    215       DO jj = 1, jpj 
    216          DO ji = 1, jpi 
    217             ikt  = mbkt(ji,jj) 
    218             zdep = e3t_n(ji,jj,ikt) / xstep 
    219             zwsbio4(ji,jj) = MIN( 0.99 * zdep, wsbio4(ji,jj,ikt) ) 
    220             zwsbio3(ji,jj) = MIN( 0.99 * zdep, wsbio3(ji,jj,ikt) ) 
    221          END DO 
    222       END DO 
    223       ! 
    224       IF( .NOT.lk_sed ) THEN 
    225 ! 
    226          ! Add the external input of iron from sediment mobilization 
    227          ! ------------------------------------------------------ 
    228          IF( ln_ironsed ) THEN 
    229                             tra(:,:,:,jpfer) = tra(:,:,:,jpfer) + ironsed(:,:,:) * rfact2 
    230             ! 
    231             IF( lk_iomput .AND. knt == nrdttrc .AND. iom_use( "Ironsed" ) )   & 
    232                &   CALL iom_put( "Ironsed", ironsed(:,:,:) * 1.e+3 * tmask(:,:,:) ) ! iron inputs from sediments 
    233          ENDIF 
     94               ikt  = mbkt(ji,jj) 
     95               zdep = e3t_n(ji,jj,ikt) / xstep 
     96               zwsbio4(ji,jj) = MIN( 0.99 * zdep, wsbio4(ji,jj,ikt) ) 
     97               zwsbio3(ji,jj) = MIN( 0.99 * zdep, wsbio3(ji,jj,ikt) ) 
     98            END DO 
     99         END DO 
    234100 
    235101         ! Computation of the sediment denitrification proportion: The metamodel from midlleburg (2006) is being used 
     
    494360   END SUBROUTINE p4z_sed 
    495361 
     362   SUBROUTINE p4z_sed_init 
     363      !!---------------------------------------------------------------------- 
     364      !!                  ***  routine p4z_sed_init  *** 
     365      !! 
     366      !! ** purpose :   initialization of some parameters 
     367      !! 
     368      !!---------------------------------------------------------------------- 
     369      !!---------------------------------------------------------------------- 
     370      INTEGER  :: ji, jj, jk, jm 
     371      INTEGER  :: ios                 ! Local integer output status for namelist read 
     372      ! 
     373      !! 
     374      NAMELIST/nampissed/ nitrfix, diazolight, concfediaz 
     375      !!---------------------------------------------------------------------- 
     376      ! 
     377      IF(lwp) THEN 
     378         WRITE(numout,*) 
     379         WRITE(numout,*) 'p4z_sed_init : initialization of sediment mobilisation ' 
     380         WRITE(numout,*) '~~~~~~~~~~~~ ' 
     381      ENDIF 
     382      !                            !* set file information 
     383      REWIND( numnatp_ref )              ! Namelist nampissed in reference namelist : PISCES sediment 
     384      READ  ( numnatp_ref, nampissed, IOSTAT = ios, ERR = 901) 
     385901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nampissed in reference namelist', lwp ) 
     386      REWIND( numnatp_cfg )              ! Namelist nampissbc in configuration namelist : PISCES sediment 
     387      READ  ( numnatp_cfg, nampissed, IOSTAT = ios, ERR = 902 ) 
     388902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nampissed in configuration namelist', lwp ) 
     389      IF(lwm) WRITE ( numonp, nampissed ) 
     390 
     391      IF(lwp) THEN 
     392         WRITE(numout,*) '   Namelist : nampissed ' 
     393         WRITE(numout,*) '      nitrogen fixation rate                       nitrfix = ', nitrfix 
     394         WRITE(numout,*) '      nitrogen fixation sensitivty to light    diazolight  = ', diazolight 
     395         WRITE(numout,*) '      Fe half-saturation cste for diazotrophs  concfediaz  = ', concfediaz 
     396      ENDIF 
     397      ! 
     398      r1_rday  = 1. / rday 
     399      ! 
     400      sedsilfrac = 0.03     ! percentage of silica loss in the sediments 
     401      sedcalfrac = 0.6      ! percentage of calcite loss in the sediments 
     402      ! 
     403      lk_sed = ln_sediment .AND. ln_sed_2way  
     404      ! 
     405   END SUBROUTINE p4z_sed_init 
    496406 
    497407   INTEGER FUNCTION p4z_sed_alloc() 
  • NEMO/branches/2019/dev_r11219_TOP-01_cethe_PISCES_LBC/src/TOP/PISCES/P4Z/p4zsms.F90

    r10425 r11222  
    1717   USE p4zlys          ! Calcite saturation 
    1818   USE p4zflx          ! Gas exchange 
    19    USE p4zsbc          ! External source of nutrients 
     19   USE p4zbc           ! External source of nutrients 
    2020   USE p4zsed          ! Sedimentation 
    2121   USE p4zint          ! time interpolation 
     
    102102      ENDIF 
    103103      ! 
    104       IF( ll_sbc ) CALL p4z_sbc( kt )   ! external sources of nutrients  
     104      IF( ll_bc )    CALL p4z_bc( kt )   ! external sources of nutrients  
    105105      ! 
    106106#if ! defined key_sed_off 
  • NEMO/branches/2019/dev_r11219_TOP-01_cethe_PISCES_LBC/src/TOP/PISCES/par_pisces.F90

    r10416 r11222  
    66   !! History :   2.0  !  2007-12  (C. Ethe, G. Madec)  revised architecture 
    77   !!---------------------------------------------------------------------- 
     8   USE par_kind 
    89 
    910   IMPLICIT NONE 
     
    6061   !!   Default                                   No CFC geochemical model 
    6162   ! Starting/ending PISCES do-loop indices (N.B. no PISCES : jpl_pcs < jpf_pcs the do-loop are never done) 
    62    INTEGER, PUBLIC  ::   jp_pcs0  !: First index of PISCES tracers 
    63    INTEGER, PUBLIC  ::   jp_pcs1  !: Last  index of PISCES tracers 
     63   INTEGER, PUBLIC  ::  jp_pcs0  !: First index of PISCES tracers 
     64   INTEGER, PUBLIC  ::  jp_pcs1  !: Last  index of PISCES tracers 
     65 
     66   REAL(wp), PUBLIC ::  mMass_C  = 12.00      ! Molar mass of carbon 
     67   REAL(wp), PUBLIC ::  mMass_N  = 14.00      ! Molar mass of nitrogen 
     68   REAL(wp), PUBLIC ::  mMass_P  = 31.00      ! Molar mass of phosphorus 
     69   REAL(wp), PUBLIC ::  mMass_Fe = 55.85      ! Molar mass of iron 
     70   REAL(wp), PUBLIC ::  mMass_Si = 28.00      ! Molar mass of silver 
    6471 
    6572   !!---------------------------------------------------------------------- 
  • NEMO/branches/2019/dev_r11219_TOP-01_cethe_PISCES_LBC/src/TOP/PISCES/sms_pisces.F90

    r10788 r11222  
    121121   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   tgfunc2   !: Temp. dependancy of mesozooplankton rates 
    122122 
     123   LOGICAL, SAVE :: lk_sed 
     124 
    123125   !!---------------------------------------------------------------------- 
    124126   !! NEMO/TOP 4.0 , NEMO Consortium (2018) 
  • NEMO/branches/2019/dev_r11219_TOP-01_cethe_PISCES_LBC/src/TOP/PISCES/trcini_pisces.F90

    r10817 r11222  
    5858      USE p4zsink         !  vertical flux of particulate matter due to sinking 
    5959      USE p4zopt          !  optical model 
    60       USE p4zsbc          !  Boundary conditions 
     60      USE p4zbc          !  Boundary conditions 
    6161      USE p4zfechem       !  Iron chemistry 
    6262      USE p4zrem          !  Remineralisation of organic matter 
     
    254254         CALL p5z_prod_init      !  phytoplankton growth rate over the global ocean. 
    255255      ENDIF 
    256       CALL p4z_sbc_init          !  boundary conditions 
     256      CALL p4z_bc_init           !  boundary conditions 
    257257      CALL p4z_fechem_init       !  Iron chemistry 
    258258      CALL p4z_rem_init          !  remineralisation 
     
    275275 
    276276      ! Initialization of the sediment model 
    277       IF( ln_sediment)   CALL sed_init 
     277      IF( ln_sediment)   & 
     278        & CALL sed_init ! Initialization of the sediment model  
     279 
     280      CALL p4z_sed_init          ! loss of organic matter in the sediments  
    278281 
    279282      IF(lwp) WRITE(numout,*)  
  • NEMO/branches/2019/dev_r11219_TOP-01_cethe_PISCES_LBC/src/TOP/TRP/trctrp.F90

    r10068 r11222  
    2323   USE trcrad          ! positivity                          (trc_rad routine) 
    2424   USE trcsbc          ! surface boundary condition          (trc_sbc routine) 
     25   USE trcbc           ! Tracers boundary condtions          ( trc_bc routine) 
    2526   USE zpshde          ! partial step: hor. derivative       (zps_hde routine) 
    2627   USE bdy_oce   , ONLY: ln_bdy 
     
    6162         ! 
    6263                                CALL trc_sbc    ( kt )      ! surface boundary condition 
     64         IF( lltrcbc .AND. kt /= nit000 )  & 
     65                                CALL trc_bc     ( kt )      ! tracers: surface and lateral Boundary Conditions  
    6366         IF( ln_trabbl )        CALL trc_bbl    ( kt )      ! advective (and/or diffusive) bottom boundary layer scheme 
    6467         IF( ln_trcdmp )        CALL trc_dmp    ( kt )      ! internal damping trends 
  • NEMO/branches/2019/dev_r11219_TOP-01_cethe_PISCES_LBC/src/TOP/trc.F90

    r10425 r11222  
    117117   LOGICAL , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) ::   ln_trc_cbc    !: Use coastal boundary condition data 
    118118   LOGICAL , PUBLIC                                  ::   ln_rnf_ctl    !: remove runoff dilution on tracers 
    119    REAL(wp), PUBLIC                                  ::   rn_bc_time    !: Time scaling factor for SBC and CBC data (seconds in a day) 
     119   REAL(wp), PUBLIC                                  ::   rn_sbc_time   !: Time scaling factor for SBC data (seconds in a day) 
     120   REAL(wp), PUBLIC                                  ::   rn_cbc_time   !: Time scaling factor for CBC data (seconds in a day) 
     121   LOGICAL , PUBLIC                                  ::   lltrcbc       !: Applying one of the boundary conditions  
    120122   ! 
    121123   CHARACTER(len=20), PUBLIC, DIMENSION(jp_bdy) :: cn_trc_dflt   ! Default OBC condition for all tracers 
  • NEMO/branches/2019/dev_r11219_TOP-01_cethe_PISCES_LBC/src/TOP/trcbc.F90

    r10068 r11222  
    8282      !! 
    8383      NAMELIST/namtrc_bc/ cn_dir_obc, sn_trcobc, rn_trofac, cn_dir_sbc, sn_trcsbc, rn_trsfac, &  
    84                         & cn_dir_cbc, sn_trccbc, rn_trcfac, ln_rnf_ctl, rn_bc_time 
     84                        & cn_dir_cbc, sn_trccbc, rn_trcfac, ln_rnf_ctl, rn_sbc_time, rn_cbc_time 
    8585      NAMELIST/namtrc_bdy/ cn_trc_dflt, cn_trc, nn_trcdmp_bdy 
    8686      !!---------------------------------------------------------------------- 
     
    423423         IF( ln_trc_sbc(jn) ) THEN 
    424424            jl = n_trc_indsbc(jn) 
     425            sf_trcsbc(jl)%fnow(:,:,1) = MAX( rtrn, sf_trcsbc(jl)%fnow(:,:,1) ) ! avoid nedgative value due to interpolation 
    425426            DO jj = 2, jpj 
    426427               DO ji = fs_2, fs_jpim1   ! vector opt. 
    427                   zfact = 1. / ( e3t_n(ji,jj,1) * rn_bc_time ) 
     428                  zfact = 1. / ( e3t_n(ji,jj,1) * rn_sbc_time ) 
    428429                  tra(ji,jj,1,jn) = tra(ji,jj,1,jn) + rf_trsfac(jl) * sf_trcsbc(jl)%fnow(ji,jj,1) * zfact 
    429430               END DO 
     
    432433         ! 
    433434         ! COASTAL boundary conditions 
    434          IF( ln_rnf .AND. ln_trc_cbc(jn) ) THEN 
     435         IF( ( ln_rnf .OR. l_offline ) .AND. ln_trc_cbc(jn) ) THEN 
     436            IF( l_offline )   rn_rfact = 1._wp 
    435437            jl = n_trc_indcbc(jn) 
    436438            DO jj = 2, jpj 
    437439               DO ji = fs_2, fs_jpim1   ! vector opt. 
    438440                  DO jk = 1, nk_rnf(ji,jj) 
    439                      zfact = rn_rfact / ( e1e2t(ji,jj) * h_rnf(ji,jj) * rn_bc_time )  
     441                     zfact = rn_rfact / ( e1e2t(ji,jj) * h_rnf(ji,jj) * rn_cbc_time ) * tmask(ji,jj,1) 
    440442                     tra(ji,jj,jk,jn) = tra(ji,jj,jk,jn) + rf_trcfac(jl) * sf_trccbc(jl)%fnow(ji,jj,1) * zfact 
    441443                  END DO 
  • NEMO/branches/2019/dev_r11219_TOP-01_cethe_PISCES_LBC/src/TOP/trcdta.F90

    r10222 r11222  
    178178      ! 
    179179      IF( ln_timing )   CALL timing_start('trc_dta') 
     180      ! 
     181      IF( kt == nit000 .AND. lwp) THEN 
     182         WRITE(numout,*) 
     183         WRITE(numout,*) 'trc_dta : passive tracers data for IC' 
     184         WRITE(numout,*) '~~~~~~~ ' 
     185      ENDIF 
    180186      ! 
    181187      IF( nb_trcdta > 0 ) THEN 
  • NEMO/branches/2019/dev_r11219_TOP-01_cethe_PISCES_LBC/src/TOP/trcini.F90

    r10817 r11222  
    2525   USE lib_mpp         ! distribued memory computing library 
    2626   USE trcice          ! tracers in sea ice 
    27    USE trcbc,   only : trc_bc_ini ! generalized Boundary Conditions 
     27   USE trcbc          ! generalized Boundary Conditions 
    2828  
    2929   IMPLICIT NONE 
     
    175175         ln_trc_obc(jn) =       sn_tracer(jn)%llobc 
    176176      END DO 
     177      lltrcbc = ( COUNT(ln_trc_sbc) + COUNT(ln_trc_obc) + COUNT(ln_trc_cbc) ) > 0  
    177178      !     
    178179      IF( ln_pisces      )   CALL trc_ini_pisces     !  PISCES model 
     
    191192         END DO 
    192193      ENDIF 
     194      IF( lwp .AND. lltrcbc ) THEN 
     195         WRITE(numout,*) 
     196         WRITE(numout,*) ' Applying tracer boundary conditions ' 
     197      ENDIF 
     198      
    1931999001  FORMAT(3x,i3,1x,a10,3x,l2,3x,l2,3x,l2,3x,l2) 
    194200      ! 
     
    235241      IF( ln_trcdta )   CALL trc_dta_ini( jptra )      ! set initial tracers values 
    236242      ! 
    237       IF( ln_my_trc )   CALL trc_bc_ini ( jptra )      ! set tracers Boundary Conditions 
     243      IF( lltrcbc   )  THEN  
     244        CALL trc_bc_ini ( jptra  )      ! set tracers Boundary Conditions 
     245        CALL trc_bc     ( nit000 )      ! tracers: surface and lateral Boundary Conditions 
     246      ENDIF 
    238247      ! 
    239248      ! 
Note: See TracChangeset for help on using the changeset viewer.