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

Ignore:
Timestamp:
2017-11-20T17:28:07+01:00 (7 years ago)
Author:
jcastill
Message:

Changes for receiving the ocean wind stress components from a wave model, both in forced and coupled mode
WARNING: this might not work properly without merging the branch svn+ssh://forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/branches/UKMO/AMM15_v3_6_STABLE_package_UKEP

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/r6232_HZG_WAVE-coupling/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90

    r8553 r8756  
    116116   INTEGER, PARAMETER ::   jpr_wdrag  = 51            ! Neutral surface drag coefficient  
    117117   INTEGER, PARAMETER ::   jpr_wfreq  = 52            ! Wave peak frequency  
    118    INTEGER, PARAMETER ::   jprcv      = 52            ! total number of fields received 
     118   INTEGER, PARAMETER ::   jpr_tauwx  = 53            ! x component of the ocean stress from waves 
     119   INTEGER, PARAMETER ::   jpr_tauwy  = 54            ! y component of the ocean stress from waves 
     120   INTEGER, PARAMETER ::   jprcv      = 54            ! total number of fields received 
    119121 
    120122   INTEGER, PARAMETER ::   jps_fice   =  1            ! ice fraction sent to the atmosphere 
     
    169171   ! Received from waves   
    170172   TYPE(FLD_C) ::   sn_rcv_hsig,sn_rcv_phioc,sn_rcv_sdrft,sn_rcv_wper, & 
    171                     sn_rcv_wfreq,sn_rcv_wnum,sn_rcv_tauoc,sn_rcv_wdrag 
     173                    sn_rcv_wfreq,sn_rcv_wnum,sn_rcv_tauoc,sn_rcv_tauw, & 
     174                    sn_rcv_wdrag 
    172175   ! Other namelist parameters                        ! 
    173176   INTEGER     ::   nn_cplmodel            ! Maximum number of models to/from which NEMO is potentialy sending/receiving data 
     
    246249         &                  sn_rcv_sdrft, sn_rcv_wper  , sn_rcv_wnum  , sn_rcv_wfreq, sn_rcv_tauoc,    & 
    247250         &                  sn_rcv_wdrag, sn_rcv_qns   , sn_rcv_emp   , sn_rcv_rnf  , sn_rcv_cal ,     & 
    248          &                  sn_rcv_iceflx, sn_rcv_co2   , sn_rcv_mslp  , nn_cplmodel, ln_usecplmask 
     251         &                  sn_rcv_iceflx, sn_rcv_co2   , sn_rcv_mslp , sn_rcv_tauw ,                  & 
     252         &                  nn_cplmodel, ln_usecplmask 
    249253      !!--------------------------------------------------------------------- 
    250254      ! 
     
    295299         WRITE(numout,*)'      Wave peak frequency             = ', TRIM(sn_rcv_wfreq%cldes ), ' (', TRIM(sn_rcv_wfreq%clcat ), ')'   
    296300         WRITE(numout,*)'      Stress frac adsorbed by waves   = ', TRIM(sn_rcv_tauoc%cldes ), ' (', TRIM(sn_rcv_tauoc%clcat ), ')'   
     301         WRITE(numout,*)'      Stress components by waves      = ', TRIM(sn_rcv_tauw%cldes  ), ' (', TRIM(sn_rcv_tauw%clcat  ), ')'   
    297302         WRITE(numout,*)'      Neutral surf drag coefficient   = ', TRIM(sn_rcv_wdrag%cldes ), ' (', TRIM(sn_rcv_wdrag%clcat ), ')' 
    298303         WRITE(numout,*)'  sent fields (multiple ice categories)' 
     
    573578         cpl_tauoc = .TRUE.  
    574579      ENDIF  
     580      srcv(jpr_tauwx)%clname = 'O_Tauwx'      ! ocean stress from wave in the x direction 
     581      srcv(jpr_tauwy)%clname = 'O_Tauwy'      ! ocean stress from wave in the y direction 
     582      IF( TRIM(sn_rcv_tauw%cldes ) == 'coupled' )  THEN  
     583         srcv(jpr_tauwx)%laction = .TRUE.  
     584         srcv(jpr_tauwy)%laction = .TRUE.  
     585         cpl_tauw = .TRUE.  
     586      ENDIF  
    575587      srcv(jpr_wdrag)%clname = 'O_WDrag'     ! neutral surface drag coefficient  
    576588      IF( TRIM(sn_rcv_wdrag%cldes ) == 'coupled' )  THEN  
     
    578590         cpl_wdrag = .TRUE.  
    579591      ENDIF  
     592      ! 
     593      IF( srcv(jpr_tauoc)%laction .AND. srcv(jpr_tauwx)%laction .AND. srcv(jpr_tauwy)%laction ) & 
     594            CALL ctl_stop( 'More than one method for modifying the ocean stress has been selected ', & 
     595                                     '(sn_rcv_tauoc=coupled and sn_rcv_tauw=coupled)' ) 
     596      ! 
    580597      !   
    581598      !                                                      ! ------------------------------- ! 
     
    12051222         WHERE(tauoc_wave <   0.0 ) tauoc_wave = 1.0 
    12061223         WHERE(tauoc_wave > 100.0 ) tauoc_wave = 1.0 
     1224      ENDIF 
     1225      !                                                      ! ========================= !   
     1226      !                                                      ! Stress component by waves !  
     1227      !                                                      ! ========================= !   
     1228      IF( srcv(jpr_tauwx)%laction .AND. srcv(jpr_tauwy)%laction .AND. ln_tauw ) THEN 
     1229         tauw_x(:,:) = frcv(jpr_tauwx)%z3(:,:,1) 
     1230         tauw_y(:,:) = frcv(jpr_tauwy)%z3(:,:,1) 
     1231         ! cap the value of tauoc 
     1232         WHERE(tauw_x < -100.0 ) tauw_x = 0.0 
     1233         WHERE(tauw_x >  100.0 ) tauw_x = 0.0 
     1234         WHERE(tauw_y < -100.0 ) tauw_y = 0.0 
     1235         WHERE(tauw_y >  100.0 ) tauw_y = 0.0 
    12071236      ENDIF 
    12081237       
Note: See TracChangeset for help on using the changeset viewer.