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 15394 – NEMO

Changeset 15394


Ignore:
Timestamp:
2021-10-18T12:55:29+02:00 (3 years ago)
Author:
cetlod
Message:

trunk : bugfix in passive tracer surface boundary condition trend of flux, see ticket #2733

Location:
NEMO/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/cfgs/ORCA2_OFF_PISCES/EXPREF/namelist_cfg

    r15023 r15394  
    325325   sn_sal      = 'dyna_grid_T'           ,       120.        , 'vosaline'  ,  .true.   , .true. , 'yearly'  , ''               , ''       , '' 
    326326   sn_mld      = 'dyna_grid_T'           ,       120.        , 'somixhgt'  ,  .true.   , .true. , 'yearly'  , ''               , ''       , '' 
    327    sn_emp      = 'dyna_grid_T'           ,       120.        , 'sowaflup'  ,  .true.   , .true. , 'yearly'  , ''               , ''       , '' 
     327   sn_emp      = 'dyna_grid_T'           ,       120.        , 'sowaflcd'  ,  .true.   , .true. , 'yearly'  , ''               , ''       , '' 
    328328   sn_fmf      = 'dyna_grid_T'           ,       120.        , 'iowaflup'  ,  .true.   , .true. , 'yearly'  , ''               , ''       , '' 
    329329   sn_ice      = 'dyna_grid_T'           ,       120.        , 'soicecov'  ,  .true.   , .true. , 'yearly'  , ''               , ''       , '' 
  • NEMO/trunk/src/TOP/TRP/trcsbc.F90

    r14215 r15394  
    5151      !!            The surface freshwater flux modify the ocean volume 
    5252      !!         and thus the concentration of a tracer as : 
    53       !!            tr(Krhs) = tr(Krhs) + emp * tr(Kmm) / e3t_   for k=1 
    54       !!         where emp, the surface freshwater budget (evaporation minus 
    55       !!         precipitation ) given in kg/m2/s is divided 
    56       !!         by 1035 kg/m3 (density of ocean water) to obtain m/s. 
     53      !!            tr(Krhs) = tr(Krhs) + emp * tr(Kmm) / e3t_ + fmmflx * tri / e3t   for k=1 
     54      !!          - tr(Kmm) , the concentration of tracer in the ocean 
     55      !!          - tri, the concentration of tracer in the sea-ice 
     56      !!          - emp, the surface freshwater budget (evaporation minus precipitation + fmmflx) 
     57      !!            given in kg/m2/s is divided by 1035 kg/m3 (density of ocean water) to obtain m/s. 
     58      !!          - fmmflx, the flux asscociated to freezing-melting of sea-ice  
     59      !!            In linear free surface case (ln_linssh=T), the volume of the 
     60      !!            ocean does not change with the water exchanges at the (air+ice)-sea 
    5761      !! 
    5862      !! ** Action  : - Update the 1st level of tr(:,:,:,:,Krhs) with the trend associated 
     
    6670      INTEGER  ::   ji, jj, jn                      ! dummy loop indices 
    6771      REAL(wp) ::   zse3t, zrtrn, zfact     ! local scalars 
    68       REAL(wp) ::   zftra, zdtra, ztfx, ztra   !   -      - 
     72      REAL(wp) ::   zdtra          !   -      - 
    6973      CHARACTER (len=22) :: charout 
    70       REAL(wp), DIMENSION(jpi,jpj)   ::   zsfx 
    7174      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) ::   ztrtrd 
    7275      !!--------------------------------------------------------------------- 
     
    106109      ENDIF 
    107110 
    108       ! Coupling online : river runoff is added to the horizontal divergence (hdiv) in the subroutine sbc_rnf_div  
    109       ! one only consider the concentration/dilution effect due to evaporation minus precipitation + freezing/melting of sea-ice 
    110       ! Coupling offline : runoff are in emp which contains E-P-R 
    111       ! 
    112       IF( .NOT.ln_linssh ) THEN  ! online coupling with vvl 
    113          zsfx(:,:) = 0._wp 
    114       ELSE                                      ! online coupling free surface or offline with free surface 
    115          zsfx(:,:) = emp(:,:) 
    116       ENDIF 
    117  
    118111      ! 0. initialization 
    119112      SELECT CASE ( nn_ice_tr ) 
    120113 
    121       CASE ( -1 ) ! No tracers in sea ice (null concentration in sea ice) 
    122          ! 
    123          DO jn = 1, jptra 
    124             DO_2D( 0, 0, 0, 1 ) 
    125                sbc_trc(ji,jj,jn) = zsfx(ji,jj) * r1_rho0 * ptr(ji,jj,1,jn,Kmm) 
    126             END_2D 
    127          END DO 
    128          ! 
    129       CASE ( 0 )  ! Same concentration in sea ice and in the ocean 
    130          ! 
    131          DO jn = 1, jptra 
    132             DO_2D( 0, 0, 0, 1 ) 
    133                sbc_trc(ji,jj,jn) = ( zsfx(ji,jj) + fmmflx(ji,jj) ) * r1_rho0 * ptr(ji,jj,1,jn,Kmm) 
    134             END_2D 
    135          END DO 
     114      CASE ( -1 ) ! ! No tracers in sea ice ( trc_i = 0 ) 
     115         ! 
     116         DO jn = 1, jptra 
     117            DO_2D( 0, 0, 0, 1 ) 
     118               sbc_trc(ji,jj,jn) = 0._wp 
     119            END_2D 
     120         END DO 
     121         ! 
     122         IF( ln_linssh ) THEN  !* linear free surface   
     123            DO jn = 1, jptra 
     124               DO_2D( 0, 0, 0, 1 ) 
     125                  sbc_trc(ji,jj,jn) = sbc_trc(ji,jj,jn) + r1_rho0 * emp(ji,jj) * ptr(ji,jj,1,jn,Kmm) !==>> add concentration/dilution effect due to constant volume cell 
     126               END_2D 
     127            END DO 
     128         ENDIF 
     129         ! 
     130      CASE ( 0 )  ! Same concentration in sea ice and in the ocean ( trc_i = ptr(...,Kmm)  ) 
     131         ! 
     132         DO jn = 1, jptra 
     133            DO_2D( 0, 0, 0, 1 ) 
     134               sbc_trc(ji,jj,jn) = - fmmflx(ji,jj) * r1_rho0 * ptr(ji,jj,1,jn,Kmm) 
     135            END_2D 
     136         END DO 
     137         ! 
     138         IF( ln_linssh ) THEN  !* linear free surface   
     139            DO jn = 1, jptra 
     140               DO_2D( 0, 0, 0, 1 ) 
     141                  sbc_trc(ji,jj,jn) = sbc_trc(ji,jj,jn) + r1_rho0 * emp(ji,jj) * ptr(ji,jj,1,jn,Kmm) !==>> add concentration/dilution effect due to constant volume cell 
     142               END_2D 
     143            END DO 
     144         ENDIF 
    136145         ! 
    137146      CASE ( 1 )  ! Specific treatment of sea ice fluxes with an imposed concentration in sea ice  
     
    139148         DO jn = 1, jptra 
    140149            DO_2D( 0, 0, 0, 1 ) 
    141                zse3t = 1. / e3t(ji,jj,1,Kmm) 
    142                ! tracer flux at the ice/ocean interface (tracer/m2/s) 
    143                zftra = - trc_i(ji,jj,jn) * fmmflx(ji,jj) ! uptake of tracer in the sea ice 
    144                !                                         ! only used in the levitating sea ice case 
    145                ! tracer flux only       : add concentration dilution term in net tracer flux, no F-M in volume flux 
    146                ! tracer and mass fluxes : no concentration dilution term in net tracer flux, F-M term in volume flux 
    147                ztfx  = zftra                        ! net tracer flux 
    148                ! 
    149                zdtra = r1_rho0 * ( ztfx + ( zsfx(ji,jj) + fmmflx(ji,jj) ) * ptr(ji,jj,1,jn,Kmm) )  
    150                IF ( zdtra < 0. ) THEN 
    151                   zdtra  = MAX(zdtra, -ptr(ji,jj,1,jn,Kmm) * e3t(ji,jj,1,Kmm) / rDt_trc )   ! avoid negative concentrations to arise 
    152                ENDIF 
    153                sbc_trc(ji,jj,jn) =  zdtra  
    154             END_2D 
    155          END DO 
     150               sbc_trc(ji,jj,jn) = - fmmflx(ji,jj) * r1_rho0 * trc_i(ji,jj,jn) 
     151            END_2D 
     152         END DO 
     153         ! 
     154         IF( ln_linssh ) THEN  !* linear free surface   
     155            DO jn = 1, jptra 
     156               DO_2D( 0, 0, 0, 1 ) 
     157                  sbc_trc(ji,jj,jn) = sbc_trc(ji,jj,jn) + r1_rho0 * emp(ji,jj) * ptr(ji,jj,1,jn,Kmm) !==>> add concentration/dilution effect due to constant volume cell 
     158               END_2D 
     159            END DO 
     160         ENDIF 
     161         ! 
     162         DO jn = 1, jptra 
     163            DO_2D( 0, 0, 0, 1 ) 
     164               zse3t = rDt_trc / e3t(ji,jj,1,Kmm) 
     165               zdtra = ptr(ji,jj,1,jn,Kmm) + sbc_trc(ji,jj,jn) * zse3t  
     166               IF( zdtra < 0. ) sbc_trc(ji,jj,jn) = MAX( zdtra, -ptr(ji,jj,1,jn,Kmm) / zse3t  ) ! avoid negative concentration that can occurs if trc_i > ptr  
     167            END_2D 
     168         END DO 
     169         !                              
    156170      END SELECT 
    157171      ! 
Note: See TracChangeset for help on using the changeset viewer.