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 15194 for NEMO/branches/UKMO/NEMO_4.0.4_momentum_trends/src/OCE/TRD/trddyn.F90 – NEMO

Ignore:
Timestamp:
2021-08-13T17:14:10+02:00 (3 years ago)
Author:
davestorkey
Message:

UKMO/NEMO_4.0.4_momentum_trends: Bug fixes so that it works with explicit friction (ln_drgimp=F).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/UKMO/NEMO_4.0.4_momentum_trends/src/OCE/TRD/trddyn.F90

    r15184 r15194  
    209209         ! write out total top and bottom friction "trends" for the surface / bottom layers after  
    210210         ! removing any depth-mean component. 
    211          IF( ALLOCATED( zutrd_tfr ) ) THEN 
     211         IF( ALLOCATED( zutrd_tfr ) .OR. ALLOCATED( zutrd_iceoc ) ) THEN 
     212            ! With explicit top and bottom friction, the top friction diagnostic 
     213            ! is initialised here. 
     214            IF( .NOT. ALLOCATED( zutrd_tfr ) ) THEN 
     215               ALLOCATE( zutrd_tfr(jpi,jpj,jpk), zvtrd_tfr(jpi,jpj,jpk) ) 
     216               zutrd_tfr(:,:,:) = 0.0 
     217               zvtrd_tfr(:,:,:) = 0.0 
     218            ENDIF    
    212219            IF( ALLOCATED( zutrd_iceoc ) ) THEN 
    213220               ! Add trend due to ice-ocean stress at the surface 
Note: See TracChangeset for help on using the changeset viewer.