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 6069 for branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/TRA/trasbc.F90 – NEMO

Ignore:
Timestamp:
2015-12-16T16:44:35+01:00 (9 years ago)
Author:
timgraham
Message:

Merge of dev_MetOffice_merge_2015 into branch (only NEMO directory for now).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/TRA/trasbc.F90

    r6060 r6069  
    2323   USE sbcrnf         ! River runoff   
    2424   USE sbcisf         ! Ice shelf    
     25   USE iscplini       ! Ice sheet coupling 
    2526   USE traqsr         ! solar radiation penetration 
    2627   USE trd_oce        ! trends: ocean variables 
     
    7475      INTEGER  ::   ikt, ikb              ! local integers 
    7576      REAL(wp) ::   zfact, z1_e3t, zdep   ! local scalar 
    76       REAL(wp) ::   zalpha, zhk           !   -      - 
    7777      REAL(wp), POINTER, DIMENSION(:,:,:) ::  ztrdt, ztrds 
    7878      !!---------------------------------------------------------------------- 
     
    155155!!gm BUG ?   Why no differences between non-linear and linear free surface ? 
    156156!!gm         probably taken into account in r1_hisf_tbl : to be verified 
    157       ! 
    158       IF( nn_isf > 0 ) THEN 
     157      IF( ln_isf ) THEN 
    159158         zfact = 0.5_wp 
    160159         DO jj = 2, jpj 
     
    165164               ! 
    166165               ! level fully include in the ice shelf boundary layer 
    167                ! if isfdiv, we have to remove heat flux due to inflow at 0oC (as in rnf when you add rnf at sst) 
    168166               ! sign - because fwf sign of evapo (rnf sign of precip) 
    169167               DO jk = ikt, ikb - 1 
    170                ! compute tfreez for the temperature correction (we add water at freezing temperature) 
    171168               ! compute trend 
    172                   tsa(ji,jj,jk,jp_tem) = tsa(ji,jj,jk,jp_tem)                                          & 
    173                      &           + zfact * (risf_tsc_b(ji,jj,jp_tem) + risf_tsc(ji,jj,jp_tem)) * r1_hisf_tbl(ji,jj) 
    174                   tsa(ji,jj,jk,jp_sal) = tsa(ji,jj,jk,jp_sal)                                          & 
    175                      &           + zfact * (risf_tsc_b(ji,jj,jp_sal) + risf_tsc(ji,jj,jp_sal)) * r1_hisf_tbl(ji,jj) 
     169                  tsa(ji,jj,jk,jp_tem) = tsa(ji,jj,jk,jp_tem)                                                & 
     170                     &           + zfact * ( risf_tsc_b(ji,jj,jp_tem) + risf_tsc(ji,jj,jp_tem) )             & 
     171                     &           * r1_hisf_tbl(ji,jj) 
    176172               END DO 
    177173    
    178174               ! level partially include in ice shelf boundary layer  
    179                ! compute tfreez for the temperature correction (we add water at freezing temperature) 
    180175               ! compute trend 
    181                tsa(ji,jj,ikb,jp_tem) = tsa(ji,jj,ikb,jp_tem)                                           & 
    182                   &              + zfact * (risf_tsc_b(ji,jj,jp_tem) + risf_tsc(ji,jj,jp_tem)) * r1_hisf_tbl(ji,jj) * ralpha(ji,jj) 
    183                tsa(ji,jj,ikb,jp_sal) = tsa(ji,jj,ikb,jp_sal)                                           & 
    184                   &              + zfact * (risf_tsc_b(ji,jj,jp_sal) + risf_tsc(ji,jj,jp_sal)) * r1_hisf_tbl(ji,jj) * ralpha(ji,jj)  
     176               tsa(ji,jj,ikb,jp_tem) = tsa(ji,jj,ikb,jp_tem)                                                 & 
     177                  &              + zfact * ( risf_tsc_b(ji,jj,jp_tem) + risf_tsc(ji,jj,jp_tem) )             & 
     178                  &              * r1_hisf_tbl(ji,jj) * ralpha(ji,jj) 
     179 
    185180            END DO 
    186181         END DO 
     
    213208      ENDIF 
    214209      ! 
    215       IF( l_trdtra )   THEN                      ! send trends for further diagnostics 
     210      !---------------------------------------- 
     211      !        Ice Sheet coupling imbalance correction to have conservation 
     212      !---------------------------------------- 
     213      ! 
     214      IF( ln_iscpl .AND. ln_hsb) THEN         ! input of heat and salt due to river runoff  
     215         DO jk = 1,jpk 
     216            DO jj = 2, jpj  
     217               DO ji = fs_2, fs_jpim1 
     218                  zdep = 1._wp / fse3t_n(ji,jj,jk)  
     219                  tsa(ji,jj,jk,jp_tem) = tsa(ji,jj,jk,jp_tem) - htsc_iscpl(ji,jj,jk,jp_tem)                       & 
     220                      &                                         * zdep 
     221                  tsa(ji,jj,jk,jp_sal) = tsa(ji,jj,jk,jp_sal) - htsc_iscpl(ji,jj,jk,jp_sal)                       & 
     222                      &                                         * zdep   
     223               END DO   
     224            END DO   
     225         END DO 
     226      ENDIF 
     227 
     228      IF( l_trdtra )   THEN                      ! save the horizontal diffusive trends for further diagnostics 
    216229         ztrdt(:,:,:) = tsa(:,:,:,jp_tem) - ztrdt(:,:,:) 
    217230         ztrds(:,:,:) = tsa(:,:,:,jp_sal) - ztrds(:,:,:) 
Note: See TracChangeset for help on using the changeset viewer.