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 7807 for branches/UKMO/r6232_HZG_WAVE/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_core.F90 – NEMO

Ignore:
Timestamp:
2017-03-17T10:44:05+01:00 (7 years ago)
Author:
jcastill
Message:

Changes as in HZG wave forcing branch, but adapted to r6232

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/r6232_HZG_WAVE/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_core.F90

    r5582 r7807  
    1717   !!            3.7  !  2014-06  (L. Brodeau) simplification and optimization of CORE bulk 
    1818   !!---------------------------------------------------------------------- 
    19  
     19   !!            3.6     2016-06  (V.Alari) Added wave dependent drag 
     20   !coefficient and ocean side stress 
    2021   !!---------------------------------------------------------------------- 
    2122   !!   sbc_blk_core    : bulk formulation as ocean surface boundary condition (forced mode, CORE bulk formulea) 
     
    4142   USE lbclnk          ! ocean lateral boundary conditions (or mpp link) 
    4243   USE prtctl          ! Print control 
    43    USE sbcwave, ONLY   :  cdn_wave ! wave module 
     44!   USE sbcwave, ONLY   :  cdn_wave ! wave module (V.Alari 27.06.2016) We get 
     45!   info from sbc_oce 
    4446   USE sbc_ice         ! Surface boundary condition: ice fields 
    4547   USE lib_fortran     ! to use key_nosignedzero 
     
    183185         ! 
    184186         lhftau = ln_taudif                        ! do we use HF tau information? 
     187 
     188 
     189 
    185190         jfld = jpfld - COUNT( (/.NOT. lhftau/) ) 
    186191         ! 
     
    192197         END DO 
    193198         !                                         ! fill sf with slf_i and control print 
     199 
    194200         CALL fld_fill( sf, slf_i, cn_dir, 'sbc_blk_core', 'flux formulation for ocean surface boundary condition', 'namsbc_core' ) 
    195201         ! 
     
    258264      REAL(wp), DIMENSION(:,:), POINTER ::   zq_zu             ! air spec. hum.  at wind speed height 
    259265      !!--------------------------------------------------------------------- 
     266      REAL(wp) ::   ztheta               ! local variable, wind direction,V.Alari 27.06.2016 
     267 
    260268      ! 
    261269      IF( nn_timing == 1 )  CALL timing_start('blk_oce_core') 
     
    285293      END DO 
    286294#endif 
     295        ! Start 27.06.2016 (V.Alari) 
     296           ! Wind vector at T points 
     297      IF ( ln_cdgw ) THEN 
     298         ! Use neutral 10-m wind speed from wave model if available 
     299         DO jj = 2, jpjm1 
     300            DO ji = fs_2, fs_jpim1   ! vect. opt. 
     301               ! Local wind direction from non-neutral 10-m wind vector 
     302               ! (relative to grid and no current) 
     303               ! since we do not have the directional information from the wave 
     304               ! model 
     305               ztheta = ATAN2(sf(jp_wndi)%fnow(ji,jj,1),sf(jp_wndj)%fnow(ji,jj,1)) 
     306               ! Wind vector magnitude from 10-m neutral wind speed from wave 
     307               ! model 
     308               zwnd_i(ji,jj) = wspd_wavepar(ji,jj) * SIN(ztheta) 
     309               zwnd_j(ji,jj) = wspd_wavepar(ji,jj) * COS(ztheta) 
     310               ! Correct for surface current, 0.0 <= rn_rrelwind <= 1.0 
     311               zwnd_i(ji,jj) = (zwnd_i(ji,jj) - 0.5*rn_vfac*(pu(ji-1,jj  )+pu(ji,jj))) 
     312               zwnd_j(ji,jj) = (zwnd_j(ji,jj) - 0.5*rn_vfac*(pv(ji  ,jj-1)+pv(ji,jj))) 
     313            END DO 
     314         END DO 
     315      ELSE ! If no neutral wind from wave model 
    287316      DO jj = 2, jpjm1 
    288317         DO ji = fs_2, fs_jpim1   ! vect. opt. 
     
    291320         END DO 
    292321      END DO 
     322    ENDIF ! End (V.Alari) 
     323 
    293324      CALL lbc_lnk( zwnd_i(:,:) , 'T', -1. ) 
    294325      CALL lbc_lnk( zwnd_j(:,:) , 'T', -1. ) 
     
    320351     
    321352      ! ... tau module, i and j component 
     353! Start 27.06.2016 (V.Alari) 
     354     IF ( ln_cdgw ) THEN 
     355         DO jj = 1, jpj 
     356            DO ji = 1, jpi 
     357               !zztmp = rhoa * wspd_wavepar(ji,jj) * Cd_n10(ji,jj) 
     358               zztmp = rhoa * wndm(ji,jj) * cdn_wave(ji,jj) 
     359               !taum(ji,jj) = tauoc_wavepar(ji,jj) 
     360               !taum(ji,jj) = zztmp * wspd_wavepar(ji,jj) 
     361               taum  (ji,jj) = zztmp * wndm  (ji,jj) 
     362               zwnd_i(ji,jj) = zztmp * zwnd_i(ji,jj) 
     363               zwnd_j(ji,jj) = zztmp * zwnd_j(ji,jj) 
     364            ENDDO 
     365         ENDDO 
     366      ELSE 
    322367      DO jj = 1, jpj 
    323368         DO ji = 1, jpi 
     
    328373         END DO 
    329374      END DO 
    330  
     375     ENDIF ! End, (V.Alari) 
    331376      ! ... add the HF tau contribution to the wind stress module? 
    332377      IF( lhftau ) THEN 
     
    349394      CALL lbc_lnk( vtau(:,:), 'V', -1. ) 
    350395 
    351      
     396        ! START: 27.06.2015 (V. Alari). Added tauoc 
     397 
     398         IF (ln_tauoc) THEN 
     399         utau(:,:) = utau(:,:)*tauoc_wavepar(:,:) 
     400         vtau(:,:) = vtau(:,:)*tauoc_wavepar(:,:) 
     401         taum(:,:) = taum(:,:)*tauoc_wavepar(:,:) 
     402         ENDIF 
     403 
     404        ! END  (V.Alari) 
    352405      !  Turbulent fluxes over ocean 
    353406      ! ----------------------------- 
Note: See TracChangeset for help on using the changeset viewer.