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 7717 for branches/UKMO/r6232_INGV1_WAVE-coupling/NEMOGCM/NEMO/OPA_SRC/SBC/sbcwave.F90 – NEMO

Ignore:
Timestamp:
2017-02-22T17:49:40+01:00 (7 years ago)
Author:
jcastill
Message:

Add surface drag coefficient direct forcing and coupling

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/r6232_INGV1_WAVE-coupling/NEMOGCM/NEMO/OPA_SRC/SBC/sbcwave.F90

    r7606 r7717  
    6363   REAL(wp), PUBLIC, ALLOCATABLE, DIMENSION(:,:)   ::   ut0sd, vt0sd        !: surface Stokes drift velocities at t-point 
    6464   REAL(wp), PUBLIC, ALLOCATABLE, DIMENSION(:,:,:) ::   usd  , vsd  , wsd   !: Stokes drift velocities at u-, v- & w-points, resp. 
     65 
     66   INTEGER, PUBLIC            ::   nn_drag       ! type of formula to calculate wind stress from wind components 
     67   INTEGER, PUBLIC, PARAMETER ::   jp_ukmo = 0        ! UKMO SHELF formulation 
     68   INTEGER, PUBLIC, PARAMETER ::   jp_std  = 1        ! standard formulation:  
    6569 
    6670   !! * Substitutions 
     
    210214         CALL fld_read( kt, nn_fsbc, sf_cd )             ! read from external forcing 
    211215         cdn_wave(:,:) = sf_cd(1)%fnow(:,:,1) 
     216         ! make sure that the interpolation does not write silly fill values in case it fails in a grid point 
     217         where( cdn_wave > 1.0 ) cdn_wave = 1.5e-3  
    212218      ENDIF 
    213219 
     
    265271                             &   sn_hsw, sn_wmp, sn_wnum, sn_tauoc      ! informations about the fields to be read 
    266272      ! 
    267       NAMELIST/namsbc_wave/  sn_cdg, cn_dir, sn_usd, sn_vsd, sn_hsw, sn_wmp, sn_wnum, sn_tauoc 
     273      NAMELIST/namsbc_wave/  sn_cdg, cn_dir, sn_usd, sn_vsd, sn_hsw, sn_wmp, sn_wnum, sn_tauoc, nn_drag 
    268274      !!--------------------------------------------------------------------- 
    269275      ! 
     
    278284      ! 
    279285      IF( ln_cdgw ) THEN 
     286         ! check the value of nn_drag 
     287         IF( .NOT. ( nn_drag == jp_ukmo .OR. nn_drag == jp_std )) THEN 
     288            CALL ctl_stop( 'sbc_wave_init: nn_drag does not specify a valid drag formulation' ) 
     289            RETURN   
     290         ENDIF 
     291            
    280292         IF( .NOT. cpl_wdrag ) THEN 
    281293            ALLOCATE( sf_cd(1), STAT=ierror )           !* allocate and fill sf_wave with sn_cdg 
Note: See TracChangeset for help on using the changeset viewer.