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

Ignore:
Timestamp:
2019-12-23T13:01:19+01:00 (4 years ago)
Author:
jcastill
Message:

Fist attempt at adding wave momentum coupling (not tested)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/r8395_cpl_tauwav/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90

    r12286 r12287  
    117117   INTEGER, PARAMETER ::   jpr_isf    = 52 
    118118   INTEGER, PARAMETER ::   jpr_icb    = 53 
    119  
    120    INTEGER, PARAMETER ::   jprcv      = 53   ! total number of fields received   
     119   INTEGER, PARAMETER ::   jpr_tauwx  = 54   ! x component of the ocean stress from waves  
     120   INTEGER, PARAMETER ::   jpr_tauwy  = 55   ! y component of the ocean stress from waves 
     121 
     122   INTEGER, PARAMETER ::   jprcv      = 55   ! total number of fields received   
    121123 
    122124   INTEGER, PARAMETER ::   jps_fice   =  1   ! ice fraction sent to the atmosphere 
     
    170172   TYPE(FLD_C) ::   sn_snd_ifrac, sn_snd_crtw, sn_snd_wlev  
    171173   ! Received from waves  
    172    TYPE(FLD_C) ::   sn_rcv_hsig,sn_rcv_phioc,sn_rcv_sdrfx,sn_rcv_sdrfy,sn_rcv_wper,sn_rcv_wnum,sn_rcv_wstrf,sn_rcv_wdrag 
     174   TYPE(FLD_C) ::   sn_rcv_hsig,sn_rcv_phioc,sn_rcv_sdrfx,sn_rcv_sdrfy,sn_rcv_wper,sn_rcv_wnum,sn_rcv_wstrf,sn_rcv_tauw, & 
     175                    sn_rcv_wdrag 
    173176   !                                   ! Other namelist parameters 
    174177   INTEGER     ::   nn_cplmodel           ! Maximum number of models to/from which NEMO is potentialy sending/receiving data 
     
    245248         &                  sn_rcv_wdrag, sn_rcv_qns  , sn_rcv_emp   , sn_rcv_rnf   , sn_rcv_cal   ,   & 
    246249         &                  sn_rcv_iceflx,sn_rcv_co2  , nn_cplmodel  , ln_usecplmask, sn_rcv_mslp  ,   & 
    247          &                  sn_rcv_icb , sn_rcv_isf 
     250         &                  sn_rcv_icb , sn_rcv_isf   , sn_rcv_tauw 
    248251 
    249252      !!--------------------------------------------------------------------- 
     
    296299         WRITE(numout,*)'      Mean wave number                = ', TRIM(sn_rcv_wnum%cldes  ), ' (', TRIM(sn_rcv_wnum%clcat  ), ')'  
    297300         WRITE(numout,*)'      Stress frac adsorbed by waves   = ', TRIM(sn_rcv_wstrf%cldes ), ' (', TRIM(sn_rcv_wstrf%clcat ), ')'  
     301         WRITE(numout,*)'      Stress components by waves      = ', TRIM(sn_rcv_tauw%cldes  ), ' (', TRIM(sn_rcv_tauw%clcat  ), ')' 
    298302         WRITE(numout,*)'      Neutral surf drag coefficient   = ', TRIM(sn_rcv_wdrag%cldes ), ' (', TRIM(sn_rcv_wdrag%clcat ), ')'  
    299303         WRITE(numout,*)'  sent fields (multiple ice categories)' 
     
    588592         cpl_wstrf = .TRUE. 
    589593      ENDIF 
     594      srcv(jpr_tauwx)%clname = 'O_Tauwx'      ! ocean stress from wave in the x direction  
     595      srcv(jpr_tauwy)%clname = 'O_Tauwy'      ! ocean stress from wave in the y direction  
     596      IF( TRIM(sn_rcv_tauw%cldes ) == 'coupled' )  THEN   
     597         srcv(jpr_tauwx)%laction = .TRUE.   
     598         srcv(jpr_tauwy)%laction = .TRUE.   
     599         cpl_tauw = .TRUE.   
     600      ENDIF 
    590601      srcv(jpr_wdrag)%clname = 'O_WDrag'     ! neutral surface drag coefficient 
    591602      IF( TRIM(sn_rcv_wdrag%cldes ) == 'coupled' )  THEN 
     
    593604         cpl_wdrag = .TRUE. 
    594605      ENDIF 
     606      !  
     607      IF( srcv(jpr_tauoc)%laction .AND. srcv(jpr_tauwx)%laction .AND. srcv(jpr_tauwy)%laction ) &  
     608            CALL ctl_stop( 'More than one method for modifying the ocean stress has been selected ', &  
     609                                     '(sn_rcv_tauoc=coupled and sn_rcv_tauw=coupled)' )  
     610      ! 
    595611      !  
    596612      !                                                      ! ------------------------------- ! 
     
    11811197      !                                                      ! ========================= !  
    11821198      IF( srcv(jpr_wstrf)%laction .AND. ln_tauoc ) tauoc_wave(:,:) = frcv(jpr_wstrf)%z3(:,:,1) 
     1199 
     1200      !                                                      ! ========================= !  
     1201      !                                                      ! Stress component by waves ! 
     1202      !                                                      ! ========================= !  
     1203      IF( srcv(jpr_tauwx)%laction .AND. srcv(jpr_tauwy)%laction .AND. ln_tauw ) THEN 
     1204         tauw_x(:,:) = frcv(jpr_tauwx)%z3(:,:,1) 
     1205         tauw_y(:,:) = frcv(jpr_tauwy)%z3(:,:,1) 
     1206      ENDIF 
    11831207 
    11841208      !                                                      ! ========================= !  
Note: See TracChangeset for help on using the changeset viewer.