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 7123 for branches/UKMO/r5518_bdy_sponge_temp/NEMOGCM/NEMO/OPA_SRC/BDY/bdyini.F90 – NEMO

Ignore:
Timestamp:
2016-10-26T19:32:29+02:00 (8 years ago)
Author:
jcastill
Message:

Changes as in UKMO/dev_r5518_bdy_sponge_temp@5878

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/r5518_bdy_sponge_temp/NEMOGCM/NEMO/OPA_SRC/BDY/bdyini.F90

    r7122 r7123  
    102102         &             cn_ice_lim, nn_ice_lim_dta,                           & 
    103103         &             rn_ice_tem, rn_ice_sal, rn_ice_age,                 & 
    104          &             ln_vol, nn_volctl, nn_rimwidth 
     104         &             ln_vol, nn_volctl, nn_rimwidth,                     & 
     105         &             ln_sponge, rn_sponge 
    105106      !! 
    106107      NAMELIST/nambdy_index/ ctypebdy, nbdyind, nbdybeg, nbdyend 
     
    365366        IF(lwp) WRITE(numout,*) '      Width of relaxation zone = ', nn_rimwidth(ib_bdy) 
    366367        IF(lwp) WRITE(numout,*) 
     368        IF( ln_sponge(ib_bdy) ) THEN                     ! check sponge layer choice  
     369           IF(lwp) WRITE(numout,*) 'Sponge layer applied at open boundaries'  
     370           IF(lwp) WRITE(numout,*) 'Multiplier for diffusion in sponge layer : ', rn_sponge  
     371           IF(lwp) WRITE(numout,*)  
     372        ELSE  
     373           IF(lwp) WRITE(numout,*) 'No volume correction applied at open boundaries'  
     374           IF(lwp) WRITE(numout,*)  
     375        ENDIF  
    367376 
    368377      ENDDO 
     
    383392        ENDIF 
    384393     ENDIF 
     394 
     395     sponge_factor(:,:) = 1.0 
    385396 
    386397      ! ------------------------------------------------- 
     
    11041115            END DO 
    11051116         END DO  
     1117         ! Compute multiplier for diffusion for sponge layer 
     1118         ! ------------------------------------------------- 
     1119         IF( ln_sponge(ib_bdy) ) THEN 
     1120            igrd=1 
     1121            DO ib = 1, idx_bdy(ib_bdy)%nblen(igrd) 
     1122               nbi => idx_bdy(ib_bdy)%nbi(ib,igrd) 
     1123               nbj => idx_bdy(ib_bdy)%nbj(ib,igrd) 
     1124               nbr => idx_bdy(ib_bdy)%nbr(ib,igrd) 
     1125               sponge_factor(nbi,nbj) = 1.0 + (rn_sponge-1.0) * ( 1.- TANH( FLOAT( nbr - 1 ) *0.5 ) ) 
     1126               ! 0.5 factor says how fast tanh goes to 1 - reduce this to have 
     1127               ! effect on more of the rimwidth 
     1128            END DO 
     1129         ENDIF 
    11061130 
    11071131      ENDDO 
Note: See TracChangeset for help on using the changeset viewer.