[cig-commits] r14999 - mc/3D/CitcomS/trunk/visual
tan2 at geodynamics.org
tan2 at geodynamics.org
Fri May 15 15:32:48 PDT 2009
Author: tan2
Date: 2009-05-15 15:32:48 -0700 (Fri, 15 May 2009)
New Revision: 14999
Modified:
mc/3D/CitcomS/trunk/visual/project_geoid.c
Log:
ignoring the degree-0 and degree-1 components of geoid
Modified: mc/3D/CitcomS/trunk/visual/project_geoid.c
===================================================================
--- mc/3D/CitcomS/trunk/visual/project_geoid.c 2009-05-15 17:16:35 UTC (rev 14998)
+++ mc/3D/CitcomS/trunk/visual/project_geoid.c 2009-05-15 22:32:48 UTC (rev 14999)
@@ -248,18 +248,25 @@
float val;
float *cosm, *sinm;
mesh *grid = geoid->grid;
- /* double modified_plgndr_a(int, int, double); */
+ const int min_sph_degree_to_proj = 2;
+
allocate_field(geoid);
cosm = (float *)malloc(grid->nphi * sizeof(float));
sinm = (float *)malloc(grid->nphi * sizeof(float));
/* projecting */
+ printf("Expanding spherical harmonics from degree %d to %d\n",
+ min_sph_degree_to_proj, coeff->ll[coeff->len - 1]);
+
for(index=0; index < coeff->len; index++) {
ll = coeff->ll[index];
mm = coeff->mm[index];
+ /* skipping small ll */
+ if(ll < min_sph_degree_to_proj) continue;
+
for(j=0; j<grid->nphi; j++) {
cosm[j] = cos(mm * grid->phi[j]);
sinm[j] = sin(mm * grid->phi[j]);
More information about the CIG-COMMITS
mailing list