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 7739 for branches/UKMO – NEMO

Changeset 7739 for branches/UKMO


Ignore:
Timestamp:
2017-02-27T13:07:05+01:00 (7 years ago)
Author:
jcastill
Message:

Add a 'standard formulation' for calculating momentum from forcing winds using a constant drag coefficient; remove drag coefficient checks after fixing the wave model

Location:
branches/UKMO/r6232_INGV1_WAVE-coupling/NEMOGCM
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/r6232_INGV1_WAVE-coupling/NEMOGCM/CONFIG/SHARED/namelist_ref

    r7717 r7739  
    277277                           !  = 1  Average and redistribute per-category fluxes, forced mode only, not yet implemented coupled 
    278278                           !  = 2  Redistribute a single flux over categories (coupled mode only) 
     279   nn_drag   = 0           !  formula to calculate momentum from the wind components 
     280                           !  = 0 UKMO SHELF formulation 
     281                           !  = 1 standard formulation with forced of coupled drag coefficient 
     282                           !  = 2 standard formulation with constant drag coefficient 
    279283/ 
    280284!----------------------------------------------------------------------- 
     
    12981302!  
    12991303   cn_dir      = './'  !  root directory for the location of drag coefficient files 
    1300    nn_drag     = 0     !  formula to calculate momentum from the wind components 
    1301                               =0 UKMO SHELF formulation 
    1302                               =1 standard formulation 
    13031304/ 
    13041305!----------------------------------------------------------------------- 
  • branches/UKMO/r6232_INGV1_WAVE-coupling/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90

    r7717 r7739  
    956956      !!---------------------------------------------------------------------- 
    957957      USE zdf_oce,  ONLY : ln_zdfqiao 
    958       USE sbcflx ,  ONLY : ln_shelf_flx 
     958      USE sbcflx ,  ONLY : ln_shelf_flx, nn_drag, jp_std 
    959959 
    960960      INTEGER, INTENT(in)           ::   kt          ! ocean model time step index 
  • branches/UKMO/r6232_INGV1_WAVE-coupling/NEMOGCM/NEMO/OPA_SRC/SBC/sbcflx.F90

    r7717 r7739  
    3838   LOGICAL , PUBLIC    ::   ln_shelf_flx = .FALSE. ! UKMO SHELF specific flux flag 
    3939   INTEGER             ::   jpfld_local   ! maximum number of files to read (locally modified depending on ln_shelf_flx)  
     40 
     41   INTEGER, PUBLIC            ::   nn_drag        ! type of formula to calculate wind stress from wind components 
     42   INTEGER, PUBLIC, PARAMETER ::   jp_ukmo  = 0        ! UKMO SHELF formulation 
     43   INTEGER, PUBLIC, PARAMETER ::   jp_std   = 1        ! standard formulation with forced or coupled drag coefficient  
     44   INTEGER, PUBLIC, PARAMETER ::   jp_const = 2        ! standard formulation with constant drag coefficient  
    4045 
    4146   !! * Substitutions 
     
    147152         !                                                        ! add modification due to drag coefficient read from wave forcing 
    148153         !                                                        ! this code is inefficient but put here to allow merging with another UKMO branch 
    149          IF( ln_shelf_flx .AND. ln_cdgw .AND. nn_drag == jp_std ) THEN 
    150             IF( cpl_wdrag ) THEN  
    151                ! reset utau and vtau to the wind components: the momentum will 
    152                ! be calculated from the coupled value of the drag coefficient 
    153                DO jj = 1, jpj 
    154                   DO ji = 1, jpi 
    155                      utau(ji,jj) = sf(jp_utau)%fnow(ji,jj,1) 
    156                      vtau(ji,jj) = sf(jp_vtau)%fnow(ji,jj,1) 
     154         IF( ln_shelf_flx ) THEN 
     155            IF( ln_cdgw .AND. nn_drag == jp_std ) THEN 
     156               IF( cpl_wdrag ) THEN  
     157                  ! reset utau and vtau to the wind components: the momentum will 
     158                  ! be calculated from the coupled value of the drag coefficient 
     159                  DO jj = 1, jpj 
     160                     DO ji = 1, jpi 
     161                        utau(ji,jj) = sf(jp_utau)%fnow(ji,jj,1) 
     162                        vtau(ji,jj) = sf(jp_vtau)%fnow(ji,jj,1) 
     163                     END DO 
    157164                  END DO 
    158                END DO 
    159             ELSE 
     165               ELSE 
     166                  DO jj = 1, jpj 
     167                     DO ji = 1, jpi 
     168                        totwind = sqrt((sf(jp_utau)%fnow(ji,jj,1))**2.0 + (sf(jp_vtau)%fnow(ji,jj,1))**2.0) 
     169                        utau(ji,jj) = zrhoa * cdn_wave(ji,jj) * sf(jp_utau)%fnow(ji,jj,1) * totwind 
     170                        vtau(ji,jj) = zrhoa * cdn_wave(ji,jj) * sf(jp_vtau)%fnow(ji,jj,1) * totwind 
     171                     END DO 
     172                  END DO 
     173               ENDIF 
     174            ELSE IF( nn_drag == jp_const ) THEN 
    160175               DO jj = 1, jpj 
    161176                  DO ji = 1, jpi 
    162177                     totwind = sqrt((sf(jp_utau)%fnow(ji,jj,1))**2.0 + (sf(jp_vtau)%fnow(ji,jj,1))**2.0) 
    163                      utau(ji,jj) = zrhoa * cdn_wave(ji,jj) * sf(jp_utau)%fnow(ji,jj,1) * totwind 
    164                      vtau(ji,jj) = zrhoa * cdn_wave(ji,jj) * sf(jp_vtau)%fnow(ji,jj,1) * totwind 
     178                     utau(ji,jj) = zrhoa * zcdrag * sf(jp_utau)%fnow(ji,jj,1) * totwind 
     179                     vtau(ji,jj) = zrhoa * zcdrag * sf(jp_vtau)%fnow(ji,jj,1) * totwind 
    165180                  END DO 
    166181               END DO 
  • branches/UKMO/r6232_INGV1_WAVE-coupling/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90

    r7717 r7739  
    9090         &             ln_ssr    , nn_isf    , nn_fwb, ln_cdgw    , ln_wave    , ln_sdw   ,   & 
    9191         &             ln_tauoc  , ln_stcor  , nn_lsm, nn_limflx , nn_components, ln_cpl  ,   & 
    92          &             ln_wavcpl 
     92         &             ln_wavcpl , nn_drag 
    9393      INTEGER  ::   ios 
    9494      INTEGER  ::   ierr, ierr0, ierr1, ierr2, ierr3, jpm 
     
    152152         WRITE(numout,*) '              closed sea (=0/1) (set in namdom)          nn_closea   = ', nn_closea 
    153153         WRITE(numout,*) '              n. of iterations if land-sea-mask applied  nn_lsm      = ', nn_lsm 
     154         WRITE(numout,*) '              momentum formulation (ln_shelf_flx)        nn_drag     = ', nn_drag 
    154155      ENDIF 
    155156 
  • branches/UKMO/r6232_INGV1_WAVE-coupling/NEMOGCM/NEMO/OPA_SRC/SBC/sbcwave.F90

    r7717 r7739  
    6464   REAL(wp), PUBLIC, ALLOCATABLE, DIMENSION(:,:,:) ::   usd  , vsd  , wsd   !: Stokes drift velocities at u-, v- & w-points, resp. 
    6565 
    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:  
    69  
    70    !! * Substitutions 
    7166#  include "vectopt_loop_substitute.h90" 
    7267   !!---------------------------------------------------------------------- 
     
    214209         CALL fld_read( kt, nn_fsbc, sf_cd )             ! read from external forcing 
    215210         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  
    218211      ENDIF 
    219212 
     
    271264                             &   sn_hsw, sn_wmp, sn_wnum, sn_tauoc      ! informations about the fields to be read 
    272265      ! 
    273       NAMELIST/namsbc_wave/  sn_cdg, cn_dir, sn_usd, sn_vsd, sn_hsw, sn_wmp, sn_wnum, sn_tauoc, nn_drag 
     266      NAMELIST/namsbc_wave/  sn_cdg, cn_dir, sn_usd, sn_vsd, sn_hsw, sn_wmp, sn_wnum, sn_tauoc 
    274267      !!--------------------------------------------------------------------- 
    275268      ! 
     
    284277      ! 
    285278      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             
    292279         IF( .NOT. cpl_wdrag ) THEN 
    293280            ALLOCATE( sf_cd(1), STAT=ierror )           !* allocate and fill sf_wave with sn_cdg 
Note: See TracChangeset for help on using the changeset viewer.