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 10966 for NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/TOP/TRP/trcsbc.F90 – NEMO

Ignore:
Timestamp:
2019-05-10T18:43:09+02:00 (5 years ago)
Author:
acc
Message:

2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps : Convert TOP routines in TOP/TRP directory and all knock on effects of these conversions. SETTE tested (GYRE_PISCES only)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/TOP/TRP/trcsbc.F90

    r10946 r10966  
    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 
     51      !!            tr(Krhs) = tr(Krhs) + emp * tr(Kmm) / e3t   for k=1 
    5252      !!         where emp, the surface freshwater budget (evaporation minus 
    5353      !!         precipitation ) given in kg/m2/s is divided 
    5454      !!         by 1035 kg/m3 (density of ocean water) to obtain m/s. 
    5555      !! 
    56       !! ** Action  : - Update the 1st level of tra with the trend associated 
     56      !! ** Action  : - Update the 1st level of tr(:,:,:,:,Krhs) with the trend associated 
    5757      !!                with the tracer surface boundary condition  
    5858      !! 
     
    103103      ENDIF 
    104104 
    105       ! Coupling online : river runoff is added to the horizontal divergence (hdivn) in the subroutine sbc_rnf_div  
     105      ! Coupling online : river runoff is added to the horizontal divergence (hdiv) in the subroutine sbc_rnf_div  
    106106      ! one only consider the concentration/dilution effect due to evaporation minus precipitation + freezing/melting of sea-ice 
    107107      ! Coupling offline : runoff are in emp which contains E-P-R 
     
    119119            DO jj = 2, jpj 
    120120               DO ji = fs_2, fs_jpim1   ! vector opt. 
    121                   sbc_trc(ji,jj,jn) = zsfx(ji,jj) * r1_rau0 * trn(ji,jj,1,jn) 
     121                  sbc_trc(ji,jj,jn) = zsfx(ji,jj) * r1_rau0 * tr(ji,jj,1,jn,Kmm) 
    122122               END DO 
    123123            END DO 
     
    129129            DO jj = 2, jpj 
    130130               DO ji = fs_2, fs_jpim1   ! vector opt. 
    131                   zse3t = 1. / e3t_n(ji,jj,1) 
     131                  zse3t = 1. / e3t(ji,jj,1,Kmm) 
    132132                  ! tracer flux at the ice/ocean interface (tracer/m2/s) 
    133133                  zftra = - trc_i(ji,jj,jn) * fmmflx(ji,jj) ! uptake of tracer in the sea ice 
     
    138138                  ztfx  = zftra                             ! net tracer flux 
    139139                  ! 
    140                   zdtra = r1_rau0 * ( ztfx + zsfx(ji,jj) * trn(ji,jj,1,jn) )  
     140                  zdtra = r1_rau0 * ( ztfx + zsfx(ji,jj) * tr(ji,jj,1,jn,Kmm) )  
    141141                  IF ( zdtra < 0. ) THEN 
    142                      zratio = -zdtra * zse3t * r2dttrc / ( trn(ji,jj,1,jn) + zrtrn ) 
     142                     zratio = -zdtra * zse3t * r2dttrc / ( tr(ji,jj,1,jn,Kmm) + zrtrn ) 
    143143                     zdtra = MIN(1.0, zratio) * zdtra ! avoid negative concentrations to arise 
    144144                  ENDIF 
     
    153153      DO jn = 1, jptra 
    154154         ! 
    155          IF( l_trdtrc )   ztrtrd(:,:,:) = tra(:,:,:,jn)  ! save trends 
     155         IF( l_trdtrc )   ztrtrd(:,:,:) = tr(:,:,:,jn,Krhs)  ! save trends 
    156156         ! 
    157157         DO jj = 2, jpj 
    158158            DO ji = fs_2, fs_jpim1   ! vector opt. 
    159                zse3t = zfact / e3t_n(ji,jj,1) 
    160                tra(ji,jj,1,jn) = tra(ji,jj,1,jn) + ( sbc_trc_b(ji,jj,jn) + sbc_trc(ji,jj,jn) ) * zse3t 
     159               zse3t = zfact / e3t(ji,jj,1,Kmm) 
     160               tr(ji,jj,1,jn,Krhs) = tr(ji,jj,1,jn,Krhs) + ( sbc_trc_b(ji,jj,jn) + sbc_trc(ji,jj,jn) ) * zse3t 
    161161            END DO 
    162162         END DO 
    163163         ! 
    164164         IF( l_trdtrc ) THEN 
    165             ztrtrd(:,:,:) = tra(:,:,:,jn) - ztrtrd(:,:,:) 
     165            ztrtrd(:,:,:) = tr(:,:,:,jn,Krhs) - ztrtrd(:,:,:) 
    166166            CALL trd_tra( kt, Kmm, Krhs, 'TRC', jn, jptra_nsr, ztrtrd ) 
    167167         END IF 
     
    184184      IF( ln_ctl )   THEN 
    185185         WRITE(charout, FMT="('sbc ')") ;  CALL prt_ctl_trc_info(charout) 
    186                                            CALL prt_ctl_trc( tab4d=tra, mask=tmask, clinfo=ctrcnm, clinfo2='trd' ) 
     186                                           CALL prt_ctl_trc( tab4d=tr(:,:,:,:,Krhs), mask=tmask, clinfo=ctrcnm, clinfo2='trd' ) 
    187187      ENDIF 
    188188      IF( l_trdtrc )  DEALLOCATE( ztrtrd ) 
Note: See TracChangeset for help on using the changeset viewer.