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 1695 for trunk/NEMO/LIM_SRC_3/limsbc.F90 – NEMO

Ignore:
Timestamp:
2009-10-30T17:42:38+01:00 (14 years ago)
Author:
smasson
Message:

wind stress module directly at T-point, see ticket:577

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMO/LIM_SRC_3/limsbc.F90

    r1684 r1695  
    8080      REAL(wp) ::   zfrldu, zat_u, zu_ico, zutaui, zu_u, zu_ij, zu_im1j   ! temporary scalar 
    8181      REAL(wp) ::   zfrldv, zat_v, zv_ico, zvtaui, zv_v, zv_ij, zv_ijm1   !    -         - 
    82       REAL(wp) ::   zsang                                                 !    -         - 
     82      REAL(wp) ::   zsang, zztmp                                          !    -         - 
    8383      REAL(wp), DIMENSION(jpi,jpj) ::   ztio_u, ztio_v   ! ocean stress below sea-ice 
    8484#if defined key_coupled     
     
    9494      ENDIF 
    9595 
    96       SELECT CASE( kcpl ) 
    97          !                                        !--------------------------------! 
    98       CASE( 0 )                                   !  LIM 3 old stress computation  !  (at ice timestep only) 
    99          !                                        !--------------------------------!  
    100          DO jj = 2, jpjm1                             !* modulus of the ice-ocean velocity 
     96      IF( MOD( kt-1, nn_fsbc ) == 0 ) THEN 
     97!CDIR NOVERRCHK 
     98         DO jj = 2, jpjm1                         !* modulus of the ice-ocean velocity 
     99!CDIR NOVERRCHK 
    101100            DO ji = fs_2, fs_jpim1 
    102101               zu_ij   = u_ice(ji  ,jj) - ssu_m(ji  ,jj)               ! (i  ,j) 
     
    104103               zv_ij   = v_ice(ji,jj  ) - ssv_m(ji,jj  )               ! (i,j  ) 
    105104               zv_ijm1 = v_ice(ji,jj-1) - ssv_m(ji,jj-1)               ! (i,j-1) 
    106                tmod_io(ji,jj) = SQRT(  0.5 * ( zu_ij * zu_ij + zu_im1j * zu_im1j   & 
    107                   &                          + zv_ij * zv_ij + zv_ijm1 * zv_ijm1  ) ) 
     105               zztmp =  0.5 * ( zu_ij * zu_ij + zu_im1j * zu_im1j   &  ! mean of the square values instead 
     106                  &           + zv_ij * zv_ij + zv_ijm1 * zv_ijm1 )    ! of the square of the mean values... 
     107               ! WARNING, here we make an approximation for case 1 and 2: taum is not computed at each time 
     108               ! step but only every nn_fsbc time step. This avoid mutiple avarage to pass from T -> U,V grids 
     109               ! and next from U,V grids to T grid. Taum is used in tke, which should not be too sensitive to 
     110               ! this approximaton... 
     111               taum(ji,jj) = ( 1. - at_i(ji,jj) ) * taum(ji,jj) + at_i(ji,jj) * rhoco * zztmp 
     112               tmod_io(ji,jj) = SQRT( zztmp )  
    108113            END DO 
    109114         END DO 
    110          CALL lbc_lnk( tmod_io, 'T', 1. )   ! lateral boundary condition 
    111          ! 
     115         CALL lbc_lnk( taum, 'T', 1. )   ;   CALL lbc_lnk( tmod_io, 'T', 1. ) 
     116      ENDIF 
     117 
     118      SELECT CASE( kcpl ) 
     119         !                                        !--------------------------------! 
     120      CASE( 0 )                                   !  LIM 3 old stress computation  !  (at ice timestep only) 
     121         !                                        !--------------------------------!  
    112122         !                                             !* ice stress over ocean with a ice-ocean rotation angle 
    113123         DO jj = 1, jpjm1 
     
    145155            utau_oce(:,:) = utau(:,:)                 !* save the air-ocean stresses at ice time-step 
    146156            vtau_oce(:,:) = vtau(:,:) 
    147             DO jj = 2, jpjm1                          !* modulus of the ice-ocean velocity 
    148                DO ji = fs_2, fs_jpim1 
    149                   zu_ij   = u_ice(ji  ,jj) - ssu_m(ji  ,jj)               ! (i  ,j) 
    150                   zu_im1j = u_ice(ji-1,jj) - ssu_m(ji-1,jj)               ! (i-1,j) 
    151                   zv_ij   = v_ice(ji,jj  ) - ssv_m(ji,jj  )               ! (i,j  ) 
    152                   zv_ijm1 = v_ice(ji,jj-1) - ssv_m(ji,jj-1)               ! (i,j-1) 
    153                   tmod_io(ji,jj) = SQRT( 0.5 * (  zu_ij * zu_ij + zu_im1j * zu_im1j   & 
    154                      &                          + zv_ij * zv_ij + zv_ijm1 * zv_ijm1 ) ) 
    155                END DO 
    156             END DO 
    157             CALL lbc_lnk( tmod_io, 'T', 1. )          ! lateral boundary condition 
    158157         ENDIF 
    159158         ! 
     
    186185            ssu_mb  (:,:) = ssu_m(:,:)               !* save the ice-ocean velocity at ice time-step 
    187186            ssv_mb  (:,:) = ssv_m(:,:) 
    188             DO jj = 2, jpjm1                         !* modulus of the ice-ocean velocity 
    189                DO ji = fs_2, fs_jpim1 
    190                   zu_ij   = u_ice(ji  ,jj) - ssu_m(ji  ,jj)               ! (i  ,j) 
    191                   zu_im1j = u_ice(ji-1,jj) - ssu_m(ji-1,jj)               ! (i-1,j) 
    192                   zv_ij   = v_ice(ji,jj  ) - ssv_m(ji,jj  )               ! (i,j  ) 
    193                   zv_ijm1 = v_ice(ji,jj-1) - ssv_m(ji,jj-1)               ! (i,j-1) 
    194                   tmod_io(ji,jj) = SQRT( 0.5 * ( zu_ij * zu_ij + zu_im1j * zu_im1j   & 
    195                      &                         + zv_ij * zv_ij + zv_ijm1 * zv_ijm1 ) ) 
    196                END DO 
    197             END DO 
    198             CALL lbc_lnk( tmod_io, 'T', 1. ) 
    199187         ENDIF 
    200188         DO jj = 2, jpjm1                            !* ice stress over ocean with a ice-ocean rotation angle 
Note: See TracChangeset for help on using the changeset viewer.