diff --git a/tools/libfrencutils/mosaic_util.c b/tools/libfrencutils/mosaic_util.c index edb56fd5..6f3272cd 100644 --- a/tools/libfrencutils/mosaic_util.c +++ b/tools/libfrencutils/mosaic_util.c @@ -40,14 +40,9 @@ const double from_pole_threshold_rad = 0.0174533; // 1.0 deg -int reproduce_siena = 0; int rotate_poly_flag = 0; double the_rotation_matrix[3][3] = { 0 }; -void set_reproduce_siena_true(void){ - reproduce_siena = 1; -} - void set_rotate_poly_true(void){ rotate_poly_flag = 1; set_the_rotation_matrix(); @@ -303,14 +298,9 @@ double poly_area_dimensionless(const double x[], const double y[], int n) if ( fabs(lat1-lat2) < SMALL_VALUE) // cheap area calculation along latitude area -= dx*sin(0.5*(lat1+lat2)); else { - if(reproduce_siena) { - area += dx*(cos(lat1)-cos(lat2))/(lat1-lat2); - } - else { - dy = 0.5*(lat1-lat2); - dat = sin(dy)/dy; - area -= dx*sin(0.5*(lat1+lat2))*dat; - } + dy = 0.5*(lat1-lat2); + dat = sin(dy)/dy; + area -= dx*sin(0.5*(lat1+lat2))*dat; } } if(fabs(area) > HPI) { @@ -453,14 +443,9 @@ double poly_area_main(const double x[], const double y[], int n) { if (fabs(lat1 - lat2) < SMALL_VALUE) /* cheap area calculation along latitude */ area -= dx * sin(0.5 * (lat1 + lat2)); else { - if (reproduce_siena) { - area += dx * (cos(lat1) - cos(lat2)) / (lat1 - lat2); - } else { - // This expression is a trig identity with the above reproduce_siena case - dy = 0.5 * (lat1 - lat2); - dat = sin(dy) / dy; - area -= dx * sin(0.5 * (lat1 + lat2)) * dat; - } + dy = 0.5 * (lat1 - lat2); + dat = sin(dy) / dy; + area -= dx * sin(0.5 * (lat1 + lat2)) * dat; } } diff --git a/tools/libfrencutils/mosaic_util.h b/tools/libfrencutils/mosaic_util.h index a559f0f9..432ab8ab 100644 --- a/tools/libfrencutils/mosaic_util.h +++ b/tools/libfrencutils/mosaic_util.h @@ -108,7 +108,6 @@ void getCoordinates(struct Node *node, double *p); void setCoordinate(struct Node *node, double x, double y, double z); void setInbound(struct Node *interList, struct Node *list); int isInside(struct Node *node); -void set_reproduce_siena_true(void); void set_rotate_poly_true(void); int is_near_pole(const double y[], int n); diff --git a/tools/make_coupler_mosaic/make_coupler_mosaic.c b/tools/make_coupler_mosaic/make_coupler_mosaic.c index 68e22e4d..c6cf61ab 100644 --- a/tools/make_coupler_mosaic/make_coupler_mosaic.c +++ b/tools/make_coupler_mosaic/make_coupler_mosaic.c @@ -60,7 +60,6 @@ char *usage[] = { " --ocean_topog ocean_topog.nc [--land_mosaic land_mosaic.nc] [--wave_mosaic]", " [--sea_level #] [--interp_order #] [--mosaic_name mosaic_name] ", " [--area_ratio_thresh #] [--check ] [--verbose] [--print_memory] ", - " [--reproduce_siena] ", " ", "make_coupler_mosaic generates three exchange grids for the FMS coupler. The output ", "file includes exchange grid files for fluxes between atmosphere and surface (sea ice ", @@ -128,8 +127,6 @@ char *usage[] = { " ", "--print_memory debug memory usage when it is set ", " ", - "--reproduce_siena Set to reproduce siena shared codes results ", - " ", "--rotate_poly Set to calculate polar polygon areas by caculating the area of a copy ", " of the polygon, with the copy being rotated far away from the pole. ", " ", @@ -407,7 +404,6 @@ int main (int argc, char *argv[]) int tile_nest, is_nest, ie_nest, js_nest, je_nest; int tile_parent, is_parent, ie_parent, js_parent, je_parent; int print_memory=0; - int reproduce_siena=0; int rotate_poly=0; static struct option long_options[] = { @@ -423,7 +419,6 @@ int main (int argc, char *argv[]) {"check", no_argument, NULL, 'n'}, {"verbose", no_argument, NULL, 'v'}, {"print_memory", no_argument, NULL, 'p'}, - {"reproduce_siena", no_argument, NULL, 'q'}, {"rotate_poly", no_argument, NULL, 'u'}, {NULL, 0, NULL, 0} }; @@ -472,9 +467,6 @@ int main (int argc, char *argv[]) case 'p': print_memory = 1; break; - case 'q': - reproduce_siena = 1; - break; case 'u': rotate_poly = 1; break; @@ -500,8 +492,6 @@ int main (int argc, char *argv[]) /*if lmosaic is not specifiied, assign amosaic value to it */ if(!lmosaic) lmosaic = amosaic; - if(reproduce_siena) set_reproduce_siena_true(); - if(rotate_poly) set_rotate_poly_true(); /*mosaic_file can not have the same name as amosaic, lmosaic or omosaic, also the file name of diff --git a/tools/make_quick_mosaic/make_quick_mosaic.c b/tools/make_quick_mosaic/make_quick_mosaic.c index 27fd1c86..bb3f4eb3 100644 --- a/tools/make_quick_mosaic/make_quick_mosaic.c +++ b/tools/make_quick_mosaic/make_quick_mosaic.c @@ -37,8 +37,7 @@ char *usage[] = { "", " make_quick_mosaic --input_mosaic input_mosaic.nc [--mosaic_name mosaic_name]", " [--ocean_topog ocean_topog.nc] [--sea_level #] ", - " [--reproduce_siena] [--land_frac_file frac_file] ", - " [--land_frac_field frac_field] ", + " [--land_frac_file frac_file] [--land_frac_field frac_field]", " ", "make_quick_mosaic generate a complete grid a FMS coupler. When --ocean_topog ", "is not specified, it takes a coupled mosaic as input_mosaic. Otherwise it ", @@ -68,8 +67,6 @@ char *usage[] = { "--land_frac_file frac_file : land fraction file. ", "--land_frac_field frac_field: land fraction field. ", " ", - "--reproduce_siena Set to reproduce siena shared codes results ", - " ", "", NULL }; @@ -112,7 +109,6 @@ int main (int argc, char *argv[]) char *land_frac_file=NULL; char *land_frac_field=NULL; double sea_level = 0.; - int reproduce_siena=0; char mosaic_name[STRING] = "mosaic", mosaic_file[STRING]; char griddir[STRING], solo_mosaic[STRING], filepath[STRING]; char solo_mosaic_full_path[STRING] = "./"; @@ -133,7 +129,6 @@ int main (int argc, char *argv[]) {"ocean_topog", required_argument, NULL, 'o'}, {"land_frac_file", required_argument, NULL, 'l'}, {"land_frac_field", required_argument, NULL, 'f'}, - {"reproduce_siena", no_argument, NULL, 'q'}, {NULL, 0, NULL, 0} }; @@ -162,9 +157,6 @@ int main (int argc, char *argv[]) case 'f': land_frac_field = optarg; break; - case 'q': - reproduce_siena = 1; - break; case '?': errflg++; } @@ -206,8 +198,6 @@ int main (int argc, char *argv[]) } } - if(reproduce_siena) set_reproduce_siena_true(); - /* First get land grid information */ mpp_init(&argc, &argv);