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/r6232_INGV1_WAVE-coupling/NEMOGCM/NEMO/OPA_SRC/SBC/sbcflx.F90 – NEMO

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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 
Note: See TracChangeset for help on using the changeset viewer.