[cig-commits] [commit] devel, master: fixed bug in smoothing of topography (periodic conditions between South and North pole...) (2d93bd8)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Thu Nov 6 08:00:28 PST 2014


Repository : https://github.com/geodynamics/specfem3d_globe

On branches: devel,master
Link       : https://github.com/geodynamics/specfem3d_globe/compare/bc58e579b3b0838a0968725a076f5904845437ca...be63f20cbb6f462104e949894dbe205d2398cd7f

>---------------------------------------------------------------

commit 2d93bd85d8b2a41c7e795606fbe21b3ffff9cfb4
Author: Dimitri Komatitsch <komatitsch at lma.cnrs-mrs.fr>
Date:   Mon Jul 19 16:17:47 2004 +0000

    fixed bug in smoothing of topography (periodic conditions between South and North pole...)


>---------------------------------------------------------------

2d93bd85d8b2a41c7e795606fbe21b3ffff9cfb4
 topo_bathy/image_topo_bathy_smooth_10.jpg  | Bin 306143 -> 0 bytes
 topo_bathy/image_topo_bathy_smooth_7.jpg   | Bin 325214 -> 320697 bytes
 topo_bathy/smooth_topo_bathy_PPM_image.f90 |   8 +++++---
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/topo_bathy/image_topo_bathy_smooth_10.jpg b/topo_bathy/image_topo_bathy_smooth_10.jpg
deleted file mode 100644
index 042804b..0000000
Binary files a/topo_bathy/image_topo_bathy_smooth_10.jpg and /dev/null differ
diff --git a/topo_bathy/image_topo_bathy_smooth_7.jpg b/topo_bathy/image_topo_bathy_smooth_7.jpg
index 54e17b2..e1e61c7 100644
Binary files a/topo_bathy/image_topo_bathy_smooth_7.jpg and b/topo_bathy/image_topo_bathy_smooth_7.jpg differ
diff --git a/topo_bathy/smooth_topo_bathy_PPM_image.f90 b/topo_bathy/smooth_topo_bathy_PPM_image.f90
index 38ea367..7279f60 100644
--- a/topo_bathy/smooth_topo_bathy_PPM_image.f90
+++ b/topo_bathy/smooth_topo_bathy_PPM_image.f90
@@ -101,12 +101,14 @@
         ix_value = ix
         iy_value = iy
 
-! avoid edge effects, use periodic boundary
+! avoid edge effects, use periodic boundary in Xmin and Xmax
       if(ix_value < 1) ix_value = ix_value + NX_BATHY
       if(ix_value > NX_BATHY) ix_value = ix_value - NX_BATHY
 
-      if(iy_value < 1) iy_value = iy_value + NY_BATHY
-      if(iy_value > NY_BATHY) iy_value = iy_value - NY_BATHY
+! avoid edge effects, use rigid boundary in Ymin and Ymax
+! *not* periodic, because South and North poles must not be merged
+      if(iy_value < 1) iy_value = 1
+      if(iy_value > NY_BATHY) iy_value = NY_BATHY
 
 ! compute sum
       value_sum = value_sum + dble(ibathy_topo_ori(ix_value,iy_value))



More information about the CIG-COMMITS mailing list