15 September 2021 3:23:21.898 PM SPHERE_GRID_TEST FORTRAN90 version Test the SPHERE_GRID library. TEST01 SPHERE_ICOS_POINT_NUM determines the size (number of vertices, edges and faces) in a grid on a sphere, made by subdividing an initial projected icosahedron. N determines the number of subdivisions of each edge of the icosahedral faces. N V E F -------- -------- -------- -------- 1 12 30 20 2 42 120 80 3 92 270 180 4 162 480 320 5 252 750 500 6 362 1080 720 7 492 1470 980 8 642 1920 1280 9 812 2430 1620 10 1002 3000 2000 11 1212 3630 2420 12 1442 4320 2880 13 1692 5070 3380 14 1962 5880 3920 15 2252 6750 4500 16 2562 7680 5120 17 2892 8670 5780 18 3242 9720 6480 19 3612 10830 7220 20 4002 12000 8000 Repeat, but using N constrained by doubling: N V E F -------- -------- -------- -------- 1 12 30 20 2 42 120 80 4 162 480 320 8 642 1920 1280 16 2562 7680 5120 32 10242 30720 20480 64 40962 122880 81920 128 163842 491520 327680 256 655362 1966080 1310720 512 2621442 7864320 5242880 1024 10485762 31457280 20971520 TEST02 SPHERE_ICOS_POINT_NUM "sizes" a grid generated on an icosahedron and projected to a sphere. SPHERE_ICOS1_POINTS creates the grid points. Sizing factor = 10 Number of vertices = 1002 Number of edges = 10485762 Number of faces = 0 Initial part of NODE_XYZ array: Row 1 2 3 Col 1: 0.850651 0.525731 0.00000 2: 0.850651 -0.525731 0.00000 3: 0.525731 0.00000 0.850651 4: 0.525731 0.00000 -0.850651 5: 0.00000 0.850651 0.525731 6: 0.00000 0.850651 -0.525731 7: 0.00000 -0.850651 0.525731 8: 0.00000 -0.850651 -0.525731 9: -0.525731 0.00000 0.850651 10: -0.525731 0.00000 -0.850651 11: -0.850651 0.525731 0.00000 12: -0.850651 -0.525731 0.00000 13: 0.896416 0.443213 0.00000 14: 0.937611 0.347685 0.00000 15: 0.970776 0.239989 0.00000 16: 0.992447 0.122673 0.00000 17: 1.00000 0.00000 0.00000 18: 0.992447 -0.122673 0.00000 19: 0.970776 -0.239989 0.00000 20: 0.937611 -0.347685 0.00000 Wrote grid nodes to "sphere_icos1_points_f10.xyz". TEST03 SPHERE_ICOS_POINT_NUM "sizes" a grid generated on an icosahedron and projected to a sphere. SPHERE_ICOS2_POINTS creates the grid. Sizing factor FACTOR = 10 Number of nodes = 1002 Number of edges = 10485762 Number of triangles = 0 Initial part of NODE_XYZ array: Row 1 2 3 Col 1: 0.850651 0.525731 0.00000 2: 0.850651 -0.525731 0.00000 3: 0.525731 0.00000 0.850651 4: 0.525731 0.00000 -0.850651 5: 0.00000 0.850651 0.525731 6: 0.00000 0.850651 -0.525731 7: 0.00000 -0.850651 0.525731 8: 0.00000 -0.850651 -0.525731 9: -0.525731 0.00000 0.850651 10: -0.525731 0.00000 -0.850651 11: -0.850651 0.525731 0.00000 12: -0.850651 -0.525731 0.00000 13: 0.903530 0.428525 0.00000 14: 0.945345 0.326071 0.00000 15: 0.975584 0.219625 0.00000 16: 0.993877 0.110489 0.00000 17: 1.00000 0.333067E-15 0.00000 18: 0.993877 -0.110489 0.00000 19: 0.975584 -0.219625 0.00000 20: 0.945345 -0.326071 0.00000 Wrote grid nodes to "sphere_icos2_points_f10.xyz". TEST04 SPHERE_LL_POINTS produces latitude/longitude points on a sphere in 3D. Radius = 10.0000 Center: 1: 0.0000000 2: 0.0000000 3: 0.0000000 The number of latitudes = 3 The number of longitudes = 4 The number of grid points is 14 1 0.00000 0.00000 10.0000 2 7.07107 0.00000 7.07107 3 0.432978E-15 7.07107 7.07107 4 -7.07107 0.865956E-15 7.07107 5 -0.129893E-14 -7.07107 7.07107 6 10.0000 0.00000 0.612323E-15 7 0.612323E-15 10.0000 0.612323E-15 8 -10.0000 0.122465E-14 0.612323E-15 9 -0.183697E-14 -10.0000 0.612323E-15 10 7.07107 0.00000 -7.07107 11 0.432978E-15 7.07107 -7.07107 12 -7.07107 0.865956E-15 -7.07107 13 -0.129893E-14 -7.07107 -7.07107 14 0.122465E-14 0.00000 -10.0000 TEST05 SPHERE_SPIRALPOINTS produces a spiral of points on a sphere in 3D. Radius = 1.00000 Center: 1: 0.0000000 2: 0.0000000 3: 0.0000000 The number of spiral points is 500 The spiral points: Row 1 2 3 Col 1: 0.00000 0.00000 -1.00000 2: -0.203218E-01 0.871033E-01 -0.995992 3: -0.126076 0.852490E-02 -0.991984 4: -0.869129E-01 -0.127866 -0.987976 5: 0.536818E-01 -0.170075 -0.983968 6: 0.178769 -0.878637E-01 -0.979960 7: 0.209391 0.606077E-01 -0.975952 8: 0.133698 0.193520 -0.971944 9: -0.912706E-02 0.251032 -0.967936 10: -0.159212 0.213294 -0.963928 Wrote grid nodes to "sphere_grid_spiral_n0500.xyz". TEST06 SPHERE_LL_LINES computes latitude/longitude lines on a sphere in 3D. Number of latitudes is 3 Number of longitudes is 4 Number of line segments is 36 Grid line vertices: Row 1 2 Col 1: 1 2 2: 2 6 3: 6 10 4: 10 14 5: 1 3 6: 3 7 7: 7 11 8: 11 14 9: 1 4 10: 4 8 11: 8 12 12: 12 14 13: 1 5 14: 5 9 15: 9 13 16: 13 14 17: 2 3 18: 3 4 19: 4 5 20: 5 2 21: 6 7 22: 7 8 23: 8 9 24: 9 6 25: 10 11 26: 11 12 27: 12 13 28: 13 10 29: 2 7 30: 7 12 31: 3 8 32: 8 13 33: 4 9 34: 9 10 35: 5 6 36: 6 11 TEST07 SPHERE_GRID_Q4 computes a grid of Q4 rectangular elements on a sphere in 3D. Number of latitudes is 3 Number of longitudes is 4 The number of rectangles is 12 Rectangle vertices: Row 1 2 3 4 Col 1: 2 3 1 1 2: 3 4 1 1 3: 4 5 1 1 4: 5 2 1 1 5: 6 7 3 2 6: 7 8 4 3 7: 8 9 5 4 8: 9 6 2 5 9: 7 6 10 10 10: 8 7 10 10 11: 9 8 10 10 12: 6 9 10 10 TEST08 SPHERE_GRID_T3 computes a grid of T3 triangular elements on a sphere in 3D. Number of latitudes is 3 Number of longitudes is 4 The number of triangles is 32 Triangle vertices: Row 1 2 3 Col 1: 2 3 1 2: 3 4 1 3: 4 5 1 4: 5 2 1 5: 6 7 2 6: 3 2 7 7: 7 8 3 8: 4 3 8 9: 8 9 4 10: 5 4 9 11: 9 6 5 12: 2 5 6 13: 10 11 6 14: 7 6 11 15: 11 12 7 16: 8 7 12 17: 12 13 8 18: 9 8 13 19: 13 10 9 20: 6 9 10 21: 14 15 10 22: 11 10 15 23: 15 16 11 24: 12 11 16 25: 16 17 12 26: 13 12 17 27: 17 14 13 28: 10 13 14 29: 15 14 18 30: 16 15 18 31: 17 16 18 32: 14 17 18 TEST09 For the unit sphere in 3 dimensions: SPHERE_UNIT_SAMPLE does a random sampling. First 10 values: Row 1 2 3 Col 1: 0.591743 -0.775126E-01 -0.802391 2: -0.952407E-01 0.994856 0.345151E-01 3: 0.639057E-01 -0.991644 0.112065 4: 0.310721 -0.174435 0.934358 5: 0.325872 0.859061 -0.394742 6: 0.969000 -0.214842 -0.121991 7: 0.594881 0.802167 0.514299E-01 8: 0.362453 0.783108 -0.505341 9: -0.115007 0.338051 0.934075 10: 0.975718 -0.219021 0.215671E-02 Wrote grid nodes to "sphere_sample_n001000.xyz". TEST10 SPHERE_CUBED_POINTS computes points on a cubed sphere grid. Number of divisions on each face = 10 Total number of points = 602 Initial part of XYZ array: Row 1 2 3 Col 1: -0.577350 -0.577350 -0.577350 2: -0.628960 -0.456966 -0.628960 3: -0.665247 -0.338960 -0.665247 4: -0.689152 -0.223919 -0.689152 5: -0.702714 -0.111299 -0.702714 6: -0.707107 0.00000 -0.707107 7: -0.702714 0.111299 -0.702714 8: -0.689152 0.223919 -0.689152 9: -0.665247 0.338960 -0.665247 10: -0.628960 0.456966 -0.628960 11: -0.577350 0.577350 -0.577350 12: -0.456966 -0.628960 -0.628960 13: -0.506732 -0.506732 -0.697457 14: -0.543426 -0.381106 -0.747962 15: -0.568473 -0.254229 -0.782436 16: -0.583019 -0.127097 -0.802456 17: -0.587785 0.00000 -0.809017 18: -0.583019 0.127097 -0.802456 19: -0.568473 0.254229 -0.782436 20: -0.543426 0.381106 -0.747962 Wrote grid nodes to "sphere_cubed_f000010.xyz". TEST11 SPHERE_LL_POINTS computes points on a latitude/longitude grid SPHERE_LL_LINES computes lines on a latitude/longitude grid Use this information to draw a globe with a grid. Number of latitudes is 22 Number of longitudes is 24 The number of grid points is 530 Number of line segments is 1584 SPHERE_GRID_TEST Normal end of execution. 15 September 2021 3:23:21.906 PM