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 15393 for NEMO/releases – NEMO

Changeset 15393 for NEMO/releases


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

r4.0-HEAD : bugfix in passive tracer surface boundary condition trend of flux, see ticket #2733

Location:
NEMO/releases/r4.0/r4.0-HEAD
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • NEMO/releases/r4.0/r4.0-HEAD/cfgs/ORCA2_OFF_PISCES/EXPREF/namelist_cfg

    r13278 r15393  
    321321   sn_sal      = 'dyna_grid_T'           ,       120.        , 'vosaline'  ,  .true.   , .true. , 'yearly'  , ''               , ''       , '' 
    322322   sn_mld      = 'dyna_grid_T'           ,       120.        , 'somixhgt'  ,  .true.   , .true. , 'yearly'  , ''               , ''       , '' 
    323    sn_emp      = 'dyna_grid_T'           ,       120.        , 'sowaflup'  ,  .true.   , .true. , 'yearly'  , ''               , ''       , '' 
     323   sn_emp      = 'dyna_grid_T'           ,       120.        , 'sowaflcd'  ,  .true.   , .true. , 'yearly'  , ''               , ''       , '' 
    324324   sn_fmf      = 'dyna_grid_T'           ,       120.        , 'iowaflup'  ,  .true.   , .true. , 'yearly'  , ''               , ''       , '' 
    325325   sn_ice      = 'dyna_grid_T'           ,       120.        , 'soicecov'  ,  .true.   , .true. , 'yearly'  , ''               , ''       , '' 
  • NEMO/releases/r4.0/r4.0-HEAD/cfgs/ORCA2_OFF_TRC/EXPREF/namelist_cfg

    r13278 r15393  
    319319   sn_sal      = 'dyna_grid_T'           ,       120.        , 'vosaline'  ,  .true.   , .true. , 'yearly'  , ''               , ''       , '' 
    320320   sn_mld      = 'dyna_grid_T'           ,       120.        , 'somixhgt'  ,  .true.   , .true. , 'yearly'  , ''               , ''       , '' 
    321    sn_emp      = 'dyna_grid_T'           ,       120.        , 'sowaflup'  ,  .true.   , .true. , 'yearly'  , ''               , ''       , '' 
     321   sn_emp      = 'dyna_grid_T'           ,       120.        , 'sowaflcd'  ,  .true.   , .true. , 'yearly'  , ''               , ''       , '' 
    322322   sn_fmf      = 'dyna_grid_T'           ,       120.        , 'iowaflup'  ,  .true.   , .true. , 'yearly'  , ''               , ''       , '' 
    323323   sn_ice      = 'dyna_grid_T'           ,       120.        , 'soicecov'  ,  .true.   , .true. , 'yearly'  , ''               , ''       , '' 
  • NEMO/releases/r4.0/r4.0-HEAD/src/TOP/TRP/trcsbc.F90

    r10788 r15393  
    4949      !!            The surface freshwater flux modify the ocean volume 
    5050      !!         and thus the concentration of a tracer as : 
    51       !!            tra = tra + emp * trn / e3t   for k=1 
    52       !!         where emp, the surface freshwater budget (evaporation minus 
    53       !!         precipitation ) given in kg/m2/s is divided 
    54       !!         by 1035 kg/m3 (density of ocean water) to obtain m/s. 
     51      !!            tra = tra + emp * trn / e3t + fmmflx * tri / e3t  for k=1 
     52      !!         where : 
     53      !!          - trn, the concentration of tracer in the ocean 
     54      !!          - tri, the concentration of tracer in the sea-ice 
     55      !!          - emp, the surface freshwater budget (evaporation minus precipitation + fmmflx) 
     56      !!            given in kg/m2/s is divided by 1035 kg/m3 (density of ocean water) to obtain m/s. 
     57      !!          - fmmflx, the flux asscociated to freezing-melting of sea-ice  
     58      !!            In linear free surface case (ln_linssh=T), the volume of the 
     59      !!            ocean does not change with the water exchanges at the (air+ice)-sea 
    5560      !! 
    5661      !! ** Action  : - Update the 1st level of tra with the trend associated 
     
    6267      INTEGER  ::   ji, jj, jn                      ! dummy loop indices 
    6368      REAL(wp) ::   zse3t, zrtrn, zfact     ! local scalars 
    64       REAL(wp) ::   zftra, zdtra, ztfx, ztra   !   -      - 
     69      REAL(wp) ::   zdtra          !   -      - 
    6570      CHARACTER (len=22) :: charout 
    66       REAL(wp), DIMENSION(jpi,jpj)   ::   zsfx 
    6771      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) ::   ztrtrd 
    6872      !!--------------------------------------------------------------------- 
     
    102106      ENDIF 
    103107 
    104       ! Coupling online : river runoff is added to the horizontal divergence (hdivn) in the subroutine sbc_rnf_div  
    105       ! one only consider the concentration/dilution effect due to evaporation minus precipitation + freezing/melting of sea-ice 
    106       ! Coupling offline : runoff are in emp which contains E-P-R 
    107       ! 
    108       IF( .NOT.ln_linssh ) THEN  ! online coupling with vvl 
    109          zsfx(:,:) = 0._wp 
    110       ELSE                                      ! online coupling free surface or offline with free surface 
    111          zsfx(:,:) = emp(:,:) 
    112       ENDIF 
    113  
    114108      ! 0. initialization 
    115109      SELECT CASE ( nn_ice_tr ) 
    116110 
    117       CASE ( -1 ) ! No tracers in sea ice (null concentration in sea ice) 
    118          ! 
    119          DO jn = 1, jptra 
    120             DO jj = 2, jpj 
    121                DO ji = fs_2, fs_jpim1   ! vector opt. 
    122                   sbc_trc(ji,jj,jn) = zsfx(ji,jj) * r1_rau0 * trn(ji,jj,1,jn) 
    123                END DO 
    124             END DO 
    125          END DO 
    126          ! 
    127       CASE ( 0 )  ! Same concentration in sea ice and in the ocean 
    128          ! 
    129          DO jn = 1, jptra 
    130             DO jj = 2, jpj 
    131                DO ji = fs_2, fs_jpim1   ! vector opt. 
    132                   sbc_trc(ji,jj,jn) = ( zsfx(ji,jj) + fmmflx(ji,jj) ) * r1_rau0 * trn(ji,jj,1,jn) 
    133                END DO 
    134             END DO 
    135          END DO 
    136          ! 
     111      CASE ( -1 ) ! No tracers in sea ice ( trc_i = 0 ) 
     112         ! 
     113         DO jn = 1, jptra 
     114            DO jj = 2, jpj 
     115               DO ji = fs_2, fs_jpim1   ! vector opt. 
     116                  sbc_trc(ji,jj,jn) = 0._wp 
     117               END DO 
     118            END DO 
     119         END DO 
     120         ! 
     121         IF( ln_linssh ) THEN  !* linear free surface   
     122            DO jn = 1, jptra 
     123               DO jj = 2, jpj 
     124                  DO ji = fs_2, fs_jpim1   ! vector opt. 
     125                     sbc_trc(ji,jj,jn) = sbc_trc(ji,jj,jn) + r1_rau0 * emp(ji,jj) * trn(ji,jj,1,jn) !==>> add concentration/dilution effect due to constant volume cell 
     126                  END DO 
     127               END DO 
     128            END DO 
     129         ENDIF 
     130         ! 
     131      CASE ( 0 )  ! Same concentration in sea ice and in the ocean ( trc_i = trn ) 
     132         ! 
     133         DO jn = 1, jptra 
     134            DO jj = 2, jpj 
     135               DO ji = fs_2, fs_jpim1   ! vector opt. 
     136                  sbc_trc(ji,jj,jn) = - fmmflx(ji,jj) * r1_rau0 * trn(ji,jj,1,jn) 
     137               END DO 
     138            END DO 
     139         END DO 
     140         ! 
     141         IF( ln_linssh ) THEN  !* linear free surface   
     142            DO jn = 1, jptra 
     143               DO jj = 2, jpj 
     144                  DO ji = fs_2, fs_jpim1   ! vector opt. 
     145                     sbc_trc(ji,jj,jn) = sbc_trc(ji,jj,jn) + r1_rau0 * emp(ji,jj) * trn(ji,jj,1,jn) !==>> add concentration/dilution effect due to constant volume cell 
     146                  END DO 
     147               END DO 
     148            END DO 
     149         ENDIF 
     150 
    137151      CASE ( 1 )  ! Specific treatment of sea ice fluxes with an imposed concentration in sea ice  
    138152         ! 
     
    140154            DO jj = 2, jpj 
    141155               DO ji = fs_2, fs_jpim1   ! vector opt. 
    142                   zse3t = 1. / e3t_n(ji,jj,1) 
    143                   ! tracer flux at the ice/ocean interface (tracer/m2/s) 
    144                   zftra = - trc_i(ji,jj,jn) * fmmflx(ji,jj) ! uptake of tracer in the sea ice 
    145                   !                                         ! only used in the levitating sea ice case 
    146                   ! tracer flux only       : add concentration dilution term in net tracer flux, no F-M in volume flux 
    147                   ! tracer and mass fluxes : no concentration dilution term in net tracer flux, F-M term in volume flux 
    148                   ztfx  = zftra                        ! net tracer flux 
    149                   ! 
    150                   zdtra = r1_rau0 * ( ztfx + ( zsfx(ji,jj) + fmmflx(ji,jj) ) * trn(ji,jj,1,jn) )  
    151                   IF ( zdtra < 0. ) THEN 
    152                      zdtra  = MAX(zdtra, -trn(ji,jj,1,jn) * e3t_n(ji,jj,1) / r2dttrc )   ! avoid negative concentrations to arise 
    153                   ENDIF 
    154                   sbc_trc(ji,jj,jn) =  zdtra  
    155                END DO 
    156             END DO 
    157          END DO 
     156                  sbc_trc(ji,jj,jn)  = - fmmflx(ji,jj) * r1_rau0 * trc_i(ji,jj,jn) 
     157               END DO 
     158            END DO 
     159         END DO 
     160         ! 
     161         IF( ln_linssh ) THEN  !* linear free surface   
     162            DO jn = 1, jptra 
     163               DO jj = 2, jpj 
     164                  DO ji = fs_2, fs_jpim1   ! vector opt. 
     165                     sbc_trc(ji,jj,jn) = sbc_trc(ji,jj,jn) + r1_rau0 * emp(ji,jj) * trn(ji,jj,1,jn) !==>> add concentration/dilution effect due to constant volume cell 
     166                  END DO 
     167               END DO 
     168            END DO 
     169         ENDIF 
     170         ! 
     171         DO jn = 1, jptra 
     172            DO jj = 2, jpj 
     173               DO ji = fs_2, fs_jpim1   ! vector opt. 
     174                  zse3t = r2dttrc / e3t_n(ji,jj,1) 
     175                  zdtra = trn(ji,jj,1,jn) + sbc_trc(ji,jj,jn) * zse3t  
     176                  IF( zdtra < 0. ) sbc_trc(ji,jj,jn) = MAX( zdtra, -trn(ji,jj,1,jn) / zse3t  ) ! avoid negative concentration that can occurs if trc_i > trn                    
     177               END DO 
     178            END DO 
     179         END DO 
     180         !                                                       ! =========== 
    158181      END SELECT 
     182 
    159183      ! 
    160184      CALL lbc_lnk( 'trcsbc', sbc_trc(:,:,:), 'T', 1. ) 
     
    175199            CALL trd_tra( kt, 'TRC', jn, jptra_nsr, ztrtrd ) 
    176200         END IF 
    177          !                                                       ! =========== 
     201         ! 
    178202      END DO                                                     ! tracer loop 
    179203      !                                                          ! =========== 
Note: See TracChangeset for help on using the changeset viewer.