FMS  2024.03
Flexible Modeling System
create_xgrid.c File Reference

(f703b82972701a4e32a46d4d44a15f9fc2debb27)

Grid creation and calculation functions for use in mosaic_mod /. More...

#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include "mosaic_util.h"
#include "create_xgrid.h"
#include "constant.h"
Include dependency graph for create_xgrid.c:

Go to the source code of this file.

Macros

#define AREA_RATIO_THRESH   (1.e-6)
 
#define EPSLN10   (1.0e-10)
 
#define EPSLN30   (1.0e-30)
 
#define EPSLN8   (1.e-8)
 
#define MASK_THRESH   (0.5)
 
#define R2D   (180/M_PI)
 
#define TPI   (2.0*M_PI)
 

Functions

double box_ctrlat (double ll_lon, double ll_lat, double ur_lon, double ur_lat)
 
double box_ctrlon (double ll_lon, double ll_lat, double ur_lon, double ur_lat, double clon)
 
int clip (const double lon_in[], const double lat_in[], int n_in, double ll_lon, double ll_lat, double ur_lon, double ur_lat, double lon_out[], double lat_out[])
 
int clip_2dx2d (const double lon1_in[], const double lat1_in[], int n1_in, const double lon2_in[], const double lat2_in[], int n2_in, double lon_out[], double lat_out[])
 
int clip_2dx2d_great_circle (const double x1_in[], const double y1_in[], const double z1_in[], int n1_in, const double x2_in[], const double y2_in[], const double z2_in[], int n2_in, double x_out[], double y_out[], double z_out[])
 
int create_xgrid_1dx2d_order1 (const int *nlon_in, const int *nlat_in, const int *nlon_out, const int *nlat_out, const double *lon_in, const double *lat_in, const double *lon_out, const double *lat_out, const double *mask_in, int *i_in, int *j_in, int *i_out, int *j_out, double *xgrid_area)
 
int create_xgrid_1dx2d_order1_ (const int *nlon_in, const int *nlat_in, const int *nlon_out, const int *nlat_out, const double *lon_in, const double *lat_in, const double *lon_out, const double *lat_out, const double *mask_in, int *i_in, int *j_in, int *i_out, int *j_out, double *xgrid_area)
 
int create_xgrid_1dx2d_order1_ug (const int *nlon_in, const int *nlat_in, const int *npts_out, const double *lon_in, const double *lat_in, const double *lon_out, const double *lat_out, const double *mask_in, int *i_in, int *j_in, int *l_out, double *xgrid_area)
 
int create_xgrid_1dx2d_order1_ug_ (const int *nlon_in, const int *nlat_in, const int *npts_out, const double *lon_in, const double *lat_in, const double *lon_out, const double *lat_out, const double *mask_in, int *i_in, int *j_in, int *l_out, double *xgrid_area)
 
int create_xgrid_1dx2d_order2 (const int *nlon_in, const int *nlat_in, const int *nlon_out, const int *nlat_out, const double *lon_in, const double *lat_in, const double *lon_out, const double *lat_out, const double *mask_in, int *i_in, int *j_in, int *i_out, int *j_out, double *xgrid_area, double *xgrid_clon, double *xgrid_clat)
 
int create_xgrid_1dx2d_order2_ (const int *nlon_in, const int *nlat_in, const int *nlon_out, const int *nlat_out, const double *lon_in, const double *lat_in, const double *lon_out, const double *lat_out, const double *mask_in, int *i_in, int *j_in, int *i_out, int *j_out, double *xgrid_area, double *xgrid_clon, double *xgrid_clat)
 
int create_xgrid_2dx1d_order1 (const int *nlon_in, const int *nlat_in, const int *nlon_out, const int *nlat_out, const double *lon_in, const double *lat_in, const double *lon_out, const double *lat_out, const double *mask_in, int *i_in, int *j_in, int *i_out, int *j_out, double *xgrid_area)
 
int create_xgrid_2dx1d_order1_ (const int *nlon_in, const int *nlat_in, const int *nlon_out, const int *nlat_out, const double *lon_in, const double *lat_in, const double *lon_out, const double *lat_out, const double *mask_in, int *i_in, int *j_in, int *i_out, int *j_out, double *xgrid_area)
 
int create_xgrid_2dx1d_order2 (const int *nlon_in, const int *nlat_in, const int *nlon_out, const int *nlat_out, const double *lon_in, const double *lat_in, const double *lon_out, const double *lat_out, const double *mask_in, int *i_in, int *j_in, int *i_out, int *j_out, double *xgrid_area, double *xgrid_clon, double *xgrid_clat)
 
int create_xgrid_2dx1d_order2_ (const int *nlon_in, const int *nlat_in, const int *nlon_out, const int *nlat_out, const double *lon_in, const double *lat_in, const double *lon_out, const double *lat_out, const double *mask_in, int *i_in, int *j_in, int *i_out, int *j_out, double *xgrid_area, double *xgrid_clon, double *xgrid_clat)
 
int create_xgrid_2dx2d_order1 (const int *nlon_in, const int *nlat_in, const int *nlon_out, const int *nlat_out, const double *lon_in, const double *lat_in, const double *lon_out, const double *lat_out, const double *mask_in, int *i_in, int *j_in, int *i_out, int *j_out, double *xgrid_area)
 
int create_xgrid_2dx2d_order1_ (const int *nlon_in, const int *nlat_in, const int *nlon_out, const int *nlat_out, const double *lon_in, const double *lat_in, const double *lon_out, const double *lat_out, const double *mask_in, int *i_in, int *j_in, int *i_out, int *j_out, double *xgrid_area)
 
int create_xgrid_2dx2d_order2 (const int *nlon_in, const int *nlat_in, const int *nlon_out, const int *nlat_out, const double *lon_in, const double *lat_in, const double *lon_out, const double *lat_out, const double *mask_in, int *i_in, int *j_in, int *i_out, int *j_out, double *xgrid_area, double *xgrid_clon, double *xgrid_clat)
 
int create_xgrid_2dx2d_order2_ (const int *nlon_in, const int *nlat_in, const int *nlon_out, const int *nlat_out, const double *lon_in, const double *lat_in, const double *lon_out, const double *lat_out, const double *mask_in, int *i_in, int *j_in, int *i_out, int *j_out, double *xgrid_area, double *xgrid_clon, double *xgrid_clat)
 
int create_xgrid_great_circle (const int *nlon_in, const int *nlat_in, const int *nlon_out, const int *nlat_out, const double *lon_in, const double *lat_in, const double *lon_out, const double *lat_out, const double *mask_in, int *i_in, int *j_in, int *i_out, int *j_out, double *xgrid_area, double *xgrid_clon, double *xgrid_clat)
 
int create_xgrid_great_circle_ (const int *nlon_in, const int *nlat_in, const int *nlon_out, const int *nlat_out, const double *lon_in, const double *lat_in, const double *lon_out, const double *lat_out, const double *mask_in, int *i_in, int *j_in, int *i_out, int *j_out, double *xgrid_area, double *xgrid_clon, double *xgrid_clat)
 
int create_xgrid_great_circle_ug (const int *nlon_in, const int *nlat_in, const int *npts_out, const double *lon_in, const double *lat_in, const double *lon_out, const double *lat_out, const double *mask_in, int *i_in, int *j_in, int *l_out, double *xgrid_area, double *xgrid_clon, double *xgrid_clat)
 
int create_xgrid_great_circle_ug_ (const int *nlon_in, const int *nlat_in, const int *npts_out, const double *lon_in, const double *lat_in, const double *lon_out, const double *lat_out, const double *mask_in, int *i_in, int *j_in, int *l_out, double *xgrid_area, double *xgrid_clon, double *xgrid_clat)
 
double dist_between_boxes (const double *x1, const double *y1, const double *z1, int n1, const double *x2, const double *y2, const double *z2, int n2)
 
void get_grid_area (const int *nlon, const int *nlat, const double *lon, const double *lat, double *area)
 
void get_grid_area_ (const int *nlon, const int *nlat, const double *lon, const double *lat, double *area)
 
void get_grid_area_dimensionless (const int *nlon, const int *nlat, const double *lon, const double *lat, double *area)
 
void get_grid_area_no_adjust (const int *nlon, const int *nlat, const double *lon, const double *lat, double *area)
 
void get_grid_area_ug (const int *npts, const double *lon, const double *lat, double *area)
 
void get_grid_area_ug_ (const int *npts, const double *lon, const double *lat, double *area)
 
void get_grid_great_circle_area (const int *nlon, const int *nlat, const double *lon, const double *lat, double *area)
 
void get_grid_great_circle_area_ (const int *nlon, const int *nlat, const double *lon, const double *lat, double *area)
 
void get_grid_great_circle_area_ug (const int *npts, const double *lon, const double *lat, double *area)
 
void get_grid_great_circle_area_ug_ (const int *npts, const double *lon, const double *lat, double *area)
 
int get_maxxgrid (void)
 
int get_maxxgrid_ (void)
 
double grid_box_radius (const double *x, const double *y, const double *z, int n)
 
int inside_edge (double x0, double y0, double x1, double y1, double x, double y)
 
int line_intersect_2D_3D (double *a1, double *a2, double *q1, double *q2, double *q3, double *intersect, double *u_a, double *u_q, int *inbound)
 
int main (int argc, char *argv[])
 
double poly_ctrlat (const double x[], const double y[], int n)
 
double poly_ctrlon (const double x[], const double y[], int n, double clon)
 

Detailed Description

Grid creation and calculation functions for use in mosaic_mod /.

/******************************************************************************* int get_maxxgrid return constants MAXXGRID.

Definition in file create_xgrid.c.