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 11827 for NEMO/branches/2019/dev_r11233_AGRIF-05_jchanut_vert_coord_interp – NEMO

Ignore:
Timestamp:
2019-10-29T16:03:36+01:00 (4 years ago)
Author:
jchanut
Message:

#2222, corrections to interpolation within sponge

Location:
NEMO/branches/2019/dev_r11233_AGRIF-05_jchanut_vert_coord_interp/src/NST
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/dev_r11233_AGRIF-05_jchanut_vert_coord_interp/src/NST/agrif_oce_sponge.F90

    r11802 r11827  
    294294      DO jj = 2, jpjm1 
    295295         DO ji = 2, jpim1 
    296             IF ((fspu(ji-1,jj)==0._wp).AND.(fspu(ji,jj)==0._wp)) mbkt_parent(ji,jj) = 0 
    297             IF ((fspv(ji,jj-1)==0._wp).AND.(fspv(ji,jj)==0._wp)) mbkt_parent(ji,jj) = 0 
     296            IF ((fspu(ji-1,jj)==0._wp).AND.(fspu(ji,jj)==0._wp).AND. & 
     297            &   (fspv(ji,jj-1)==0._wp).AND.(fspv(ji,jj)==0._wp)) mbkt_parent(ji,jj) = 0 
    298298! 
    299             IF ((fspt(ji+1,jj)==0._wp).AND.(fspt(ji,jj)==0._wp)) mbku_parent(ji,jj) = 0 
    300             IF ((fspt(ji,jj+1)==0._wp).AND.(fspt(ji,jj)==0._wp)) mbkv_parent(ji,jj) = 0 
     299            IF ((fspt(ji+1,jj)==0._wp).AND.(fspt(ji,jj)==0._wp).AND. & 
     300            &   (fspf(ji,jj-1)==0._wp).AND.(fspf(ji,jj)==0._wp)) mbku_parent(ji,jj) = 0 
    301301! 
    302             IF ((fspf(ji,jj-1)==0._wp).AND.(fspf(ji,jj)==0._wp)) mbku_parent(ji,jj) = 0 
    303             IF ((fspf(ji-1,jj)==0._wp).AND.(fspf(ji,jj)==0._wp)) mbkv_parent(ji,jj) = 0 
     302            IF ((fspt(ji,jj+1)==0._wp).AND.(fspt(ji,jj)==0._wp).AND. & 
     303            &   (fspf(ji-1,jj)==0._wp).AND.(fspf(ji,jj)==0._wp)) mbkv_parent(ji,jj) = 0 
    304304! 
    305305            IF (mbkt(ji,jj) == 0) mbkt_parent(ji,jj) = 0 
     
    310310      ! 
    311311      ztabramp(:,:) = REAL( mbkt_parent(:,:), wp )   ;   CALL lbc_lnk( 'Agrif_Sponge', ztabramp, 'T', 1. ) 
    312       mbkt_parent(:,:) = MAX( NINT( ztabramp(:,:) ), 1 ) 
     312      mbkt_parent(:,:) = NINT( ztabramp(:,:) ) 
    313313      ztabramp(:,:) = REAL( mbku_parent(:,:), wp )   ;   CALL lbc_lnk( 'Agrif_Sponge', ztabramp, 'U', 1. ) 
    314       mbku_parent(:,:) = MAX( NINT( ztabramp(:,:) ), 1 ) 
     314      mbku_parent(:,:) = NINT( ztabramp(:,:) ) 
    315315      ztabramp(:,:) = REAL( mbkv_parent(:,:), wp )   ;   CALL lbc_lnk( 'Agrif_Sponge', ztabramp, 'V', 1. ) 
    316       mbkv_parent(:,:) = MAX( NINT( ztabramp(:,:) ), 1 ) 
     316      mbkv_parent(:,:) = NINT( ztabramp(:,:) ) 
    317317#endif 
    318318      ! 
     
    393393               tabres_child(ji,jj,:,:) = 0._wp  
    394394               N_in = mbkt_parent(ji,jj) 
    395 !               IF (( tmask(ji,jj,1) == 0._wp ).OR.(fspt(ji,jj)==0._wp)) N_in = 0 
    396395               zhtot = 0._wp 
    397396               DO jk=1,N_in !k2 = jpk of parent grid 
     
    558557               tabres_child(ji,jj,:) = 0._wp 
    559558               N_in = mbku_parent(ji,jj) 
    560 !               IF (( umask(ji,jj,1) == 0._wp ).OR.(fspu(ji,jj)==0._wp)) N_in = 0 
    561559               zhtot = 0._wp 
    562560               DO jk=1,N_in 
     
    735733               tabres_child(ji,jj,:) = 0._wp 
    736734               N_in = mbkv_parent(ji,jj) 
    737 !               IF (( vmask(ji,jj,1) == 0._wp ).OR.(fspv(ji,jj)==0._wp)) N_in = 0 
    738735               zhtot = 0._wp 
    739736               DO jk=1,N_in 
  • NEMO/branches/2019/dev_r11233_AGRIF-05_jchanut_vert_coord_interp/src/NST/agrif_oce_update.F90

    r11802 r11827  
    295295      ! 
    296296      IF (before) THEN 
    297          AGRIF_SpecialValue = -999._wp 
     297!jc_alt 
     298!         AGRIF_SpecialValue = -999._wp 
    298299         DO jn = n1,n2-1 
    299300            DO jk=k1,k2 
  • NEMO/branches/2019/dev_r11233_AGRIF-05_jchanut_vert_coord_interp/src/NST/agrif_user.F90

    r11769 r11827  
    383383      CALL Agrif_Set_bc( vn_interp_id, (/0,ind1-1/) ) 
    384384 
    385       CALL Agrif_Set_bc( tsn_sponge_id, (/-nn_sponge_len*Agrif_irhox(),0/) )  ! if west and rhox=3 and sponge=2 and ghost=1: columns 2 to 9  
    386       CALL Agrif_Set_bc(  un_sponge_id, (/-nn_sponge_len*Agrif_irhox(),0/) ) 
    387       CALL Agrif_Set_bc(  vn_sponge_id, (/-nn_sponge_len*Agrif_irhox(),0/) ) 
     385      CALL Agrif_Set_bc( tsn_sponge_id, (/-nn_sponge_len*Agrif_irhox()-1,0/) )  ! if west and rhox=3 and sponge=2 and ghost=1: columns 2 to 9  
     386      CALL Agrif_Set_bc(  un_sponge_id, (/-nn_sponge_len*Agrif_irhox()-1,0/) ) 
     387      CALL Agrif_Set_bc(  vn_sponge_id, (/-nn_sponge_len*Agrif_irhox()-1,0/) ) 
    388388 
    389389      CALL Agrif_Set_bc(        sshn_id, (/0,ind1-1/) ) 
     
    398398# if defined key_vertical 
    399399      ! extend the interpolation zone by 1 more point than necessary: 
    400       CALL Agrif_Set_bc(  mbkt_id, (/-nn_sponge_len*Agrif_irhox()-1,ind1/) ) 
    401       CALL Agrif_Set_bc(  ht0_id,  (/-nn_sponge_len*Agrif_irhox()-1,ind1/) ) 
     400      CALL Agrif_Set_bc(  mbkt_id, (/-nn_sponge_len*Agrif_irhox()-2,ind1/) ) 
     401      CALL Agrif_Set_bc(  ht0_id,  (/-nn_sponge_len*Agrif_irhox()-2,ind1/) ) 
    402402# endif 
    403403 
Note: See TracChangeset for help on using the changeset viewer.