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 13352 for NEMO/branches/2020/dev_r13312_AGRIF-03-04_jchanut_vinterp_tstep/src/NST/agrif_top_interp.F90 – NEMO

Ignore:
Timestamp:
2020-07-29T10:33:53+02:00 (4 years ago)
Author:
jchanut
Message:

#2222, #2129: correct depths used in linear vertical interpolation. NB: these are also used for initial state interpolation/extrapolation with identical vertical grids

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/dev_r13312_AGRIF-03-04_jchanut_vinterp_tstep/src/NST/agrif_top_interp.F90

    r13351 r13352  
    140140                  z_in(1) = 0.5_wp * h_in(1) - zhtot + ht0_parent(ji,jj) 
    141141                  DO jk=2,N_in 
    142                      z_in(jk) = z_in(jk-1) + 0.5_wp * h_in(jk) 
     142                     z_in(jk) = z_in(jk-1) + 0.5_wp * (h_in(jk-1)+h_in(jk)) 
    143143                  END DO 
    144144 
     
    152152                  z_out(1) = 0.5_wp * h_out(1) - SUM(h_out(1:N_out)) + ht_0(ji,jj) 
    153153                  DO jk=2,N_out 
    154                      z_out(jk) = z_out(jk-1) + 0.5_wp * h_out(jk) 
     154                     z_out(jk) = z_out(jk-1) + 0.5_wp * (h_out(jk-1)+h_out(jk)) 
    155155                  END DO 
    156156 
Note: See TracChangeset for help on using the changeset viewer.