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

Ignore:
Timestamp:
2019-12-04T16:32:38+01:00 (4 years ago)
Author:
jchanut
Message:

#2222, add small tolerance for bathymetry matching test; correct U-V parent bathymetry on child grid in the special case of s coord into s coord

File:
1 edited

Legend:

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

    r11868 r12048  
    131131      DO jj = 1, jpjm1 
    132132         DO ji = 1, jpim1 
    133             hu0_parent(ji,jj)  = MIN( ht0_parent(ji,jj), ht0_parent(ji+1,jj) )  
    134             hv0_parent(ji,jj)  = MIN( ht0_parent(ji,jj), ht0_parent(ji,jj+1) )  
    135133            mbku_parent(ji,jj) = MIN(  mbkt_parent(ji+1,jj  ) , mbkt_parent(ji,jj)  ) 
    136134            mbkv_parent(ji,jj) = MIN(  mbkt_parent(ji  ,jj+1) , mbkt_parent(ji,jj)  ) 
    137135         END DO 
    138136      END DO 
     137      IF ( ln_sco.AND.Agrif_Parent(ln_sco) ) THEN  
     138         DO jj = 1, jpjm1 
     139            DO ji = 1, jpim1 
     140               hu0_parent(ji,jj) = 0.5_wp * ( ht0_parent(ji,jj)+ht0_parent(ji+1,jj) ) 
     141               hv0_parent(ji,jj) = 0.5_wp * ( ht0_parent(ji,jj)+ht0_parent(ji,jj+1) ) 
     142            END DO 
     143         END DO 
     144      ELSE 
     145         DO jj = 1, jpjm1 
     146            DO ji = 1, jpim1 
     147               hu0_parent(ji,jj) = MIN( ht0_parent(ji,jj), ht0_parent(ji+1,jj)) 
     148               hv0_parent(ji,jj) = MIN( ht0_parent(ji,jj), ht0_parent(ji,jj+1)) 
     149            END DO 
     150         END DO 
     151 
     152      ENDIF 
    139153      ! 
    140154      CALL lbc_lnk( 'Agrif_InitValues_cont', hu0_parent, 'U', 1. ) 
     
    264278         DO ji = 1, jpi 
    265279            DO jj = 1, jpj 
    266                IF ((mbkt_parent(ji,jj)/=0).AND.(ht0_parent(ji,jj)/=ht_0(ji,jj))) kindic_agr = kindic_agr + 1 
    267                IF ((mbku_parent(ji,jj)/=0).AND.(hu0_parent(ji,jj)/=hu_0(ji,jj))) kindic_agr = kindic_agr + 1 
    268                IF ((mbkv_parent(ji,jj)/=0).AND.(hv0_parent(ji,jj)/=hv_0(ji,jj))) kindic_agr = kindic_agr + 1 
     280               IF ((mbkt_parent(ji,jj)/=0).AND.(ABS(ht0_parent(ji,jj)-ht_0(ji,jj))>1.e-3)) kindic_agr = kindic_agr + 1 
     281               IF ((mbku_parent(ji,jj)/=0).AND.(ABS(hu0_parent(ji,jj)-hu_0(ji,jj))>1.e-3)) kindic_agr = kindic_agr + 1 
     282               IF ((mbkv_parent(ji,jj)/=0).AND.(ABS(hv0_parent(ji,jj)-hv_0(ji,jj))>1.e-3)) kindic_agr = kindic_agr + 1 
    269283            END DO 
    270284         END DO 
Note: See TracChangeset for help on using the changeset viewer.