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 9023 for branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/TRA/trasbc.F90 – NEMO

Ignore:
Timestamp:
2017-12-13T18:08:50+01:00 (6 years ago)
Author:
timgraham
Message:

Merged METO_MERCATOR branch and resolved all conflicts in OPA_SRC

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/TRA/trasbc.F90

    r9019 r9023  
    2727   USE trd_oce        ! trends: ocean variables 
    2828   USE trdtra         ! trends manager: tracers  
     29#if defined key_asminc    
     30   USE asminc         ! Assimilation increment 
     31#endif 
    2932   ! 
    3033   USE in_out_manager ! I/O manager 
     
    3336   USE lbclnk         ! ocean lateral boundary conditions (or mpp link) 
    3437   USE timing         ! Timing 
     38   USE wet_dry,  ONLY : ll_wd, rn_wdmin1, r_rn_wdmin1 ! Wetting and drying 
    3539 
    3640   IMPLICIT NONE 
     
    7175      INTEGER, INTENT(in) ::   kt   ! ocean time-step index 
    7276      ! 
    73       INTEGER  ::   ji, jj, jk, jn        ! dummy loop indices   
    74       INTEGER  ::   ikt, ikb              ! local integers 
    75       REAL(wp) ::   zfact, z1_e3t, zdep   ! local scalar 
     77      INTEGER  ::   ji, jj, jk, jn              ! dummy loop indices   
     78      INTEGER  ::   ikt, ikb                    ! local integers 
     79      REAL(wp) ::   zfact, z1_e3t, zdep, ztim   ! local scalar 
    7680      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) ::  ztrdt, ztrds 
    7781      !!---------------------------------------------------------------------- 
     
    121125      DO jj = 2, jpj 
    122126         DO ji = fs_2, fs_jpim1   ! vector opt. 
    123             sbc_tsc(ji,jj,jp_tem) = r1_rau0_rcp * qns(ji,jj)   ! non solar heat flux 
     127            IF ( ll_wd ) THEN     ! If near WAD point limit the flux for now 
     128               IF ( sshn(ji,jj) + ht_0(ji,jj) >  2._wp * rn_wdmin1 ) THEN 
     129                  sbc_tsc(ji,jj,jp_tem) = r1_rau0_rcp * qns(ji,jj)   ! non solar heat flux 
     130               ELSE IF ( sshn(ji,jj) + ht_0(ji,jj) >  rn_wdmin1 ) THEN 
     131                  sbc_tsc(ji,jj,jp_tem) = r1_rau0_rcp * qns(ji,jj) * (tanh(5._wp*( ( sshn(ji,jj) + ht_0(ji,jj) -  rn_wdmin1 )*r_rn_wdmin1)) ) 
     132               ELSE 
     133                  sbc_tsc(ji,jj,jp_tem) = 0._wp 
     134               ENDIF 
     135            ELSE  
     136               sbc_tsc(ji,jj,jp_tem) = r1_rau0_rcp * qns(ji,jj)   ! non solar heat flux 
     137            ENDIF 
     138 
    124139            sbc_tsc(ji,jj,jp_sal) = r1_rau0     * sfx(ji,jj)   ! salt flux due to freezing/melting 
    125140         END DO 
     
    207222      IF( iom_use('rnf_x_sss') )   CALL iom_put( "rnf_x_sss", rnf*tsn(:,:,1,jp_sal) )   ! runoff term on sss 
    208223 
     224#if defined key_asminc 
     225      ! 
     226      !---------------------------------------- 
     227      !        Assmilation effects 
     228      !---------------------------------------- 
     229      ! 
     230      IF( ln_sshinc ) THEN         ! input of heat and salt due to assimilation 
     231          ! 
     232         IF( ln_linssh ) THEN  
     233            DO jj = 2, jpj  
     234               DO ji = fs_2, fs_jpim1 
     235                  ztim = ssh_iau(ji,jj) / e3t_n(ji,jj,1) 
     236                  tsa(ji,jj,1,jp_tem) = tsa(ji,jj,1,jp_tem) + tsn(ji,jj,1,jp_tem) * ztim 
     237                  tsa(ji,jj,1,jp_sal) = tsa(ji,jj,1,jp_sal) + tsn(ji,jj,1,jp_sal) * ztim 
     238               END DO 
     239            END DO 
     240         ELSE 
     241            DO jj = 2, jpj  
     242               DO ji = fs_2, fs_jpim1 
     243                  ztim = ssh_iau(ji,jj) / ( ht_n(ji,jj) + 1. - ssmask(ji, jj) ) 
     244                  tsa(ji,jj,:,jp_tem) = tsa(ji,jj,:,jp_tem) + tsn(ji,jj,:,jp_tem) * ztim 
     245                  tsa(ji,jj,:,jp_sal) = tsa(ji,jj,:,jp_sal) + tsn(ji,jj,:,jp_sal) * ztim 
     246               END DO   
     247            END DO   
     248         ENDIF 
     249         ! 
     250      ENDIF 
     251      ! 
     252#endif 
     253 
    209254      ! 
    210255      !---------------------------------------- 
Note: See TracChangeset for help on using the changeset viewer.