-
Notifications
You must be signed in to change notification settings - Fork 156
xgrid 2dx2d order1 refactor #1796
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: horiz_interp_dev
Are you sure you want to change the base?
Changes from 3 commits
a3735ae
08a7ed7
38b2dee
29bde6c
5c94608
be5f7b2
029b183
40208a3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -718,18 +718,18 @@ double spherical_excess_area(const double* p_ll, const double* p_ul, | |
| void get_grid_area(const int *nlon, const int *nlat, const double *lon, const double *lat, const double *area) | ||
| return the grid area. | ||
| *******************************************************************************/ | ||
| 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) | ||
| { | ||
| get_grid_area(nlon, nlat, lon, lat, area); | ||
| } | ||
|
|
||
| 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) | ||
| { | ||
| int nx, ny, nxp, i, j, n_in; | ||
| double x_in[20], y_in[20]; | ||
|
|
||
| nx = *nlon; | ||
| ny = *nlat; | ||
| nx = nlon; | ||
|
||
| ny = nlat; | ||
| nxp = nx + 1; | ||
|
|
||
| for(j=0; j<ny; j++) for(i=0; i < nx; i++) { | ||
|
|
@@ -752,17 +752,17 @@ void get_grid_area(const int *nlon, const int *nlat, const double *lon, const do | |
| void get_grid_area_ug(const int *npts, const double *lon, const double *lat, const double *area) | ||
| return the grid 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) | ||
| { | ||
| get_grid_area_ug(npts, lon, lat, 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) | ||
| { | ||
| int nl, l, n_in, nv; | ||
| double x_in[20], y_in[20]; | ||
|
|
||
| nl = *npts; | ||
| nl = npts; | ||
| nv = 4; | ||
|
|
||
| for(l=0; l<nl; l++) { | ||
|
|
@@ -781,22 +781,22 @@ void get_grid_area_ug(const int *npts, const double *lon, const double *lat, dou | |
| } /* get_grid_area_ug */ | ||
|
|
||
|
|
||
| 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) | ||
| { | ||
| get_grid_great_circle_area(nlon, nlat, lon, lat, 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) | ||
| { | ||
| int nx, ny, nxp, nyp, i, j; | ||
| int n0, n1, n2, n3; | ||
| struct Node *grid=NULL; | ||
| double *x=NULL, *y=NULL, *z=NULL; | ||
|
|
||
|
|
||
| nx = *nlon; | ||
| ny = *nlat; | ||
| nx = nlon; | ||
| ny = nlat; | ||
| nxp = nx + 1; | ||
| nyp = ny + 1; | ||
|
|
||
|
|
@@ -827,20 +827,20 @@ void get_grid_great_circle_area(const int *nlon, const int *nlat, const double * | |
|
|
||
| } /* get_grid_great_circle_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) | ||
| { | ||
| get_grid_great_circle_area_ug(npts, lon, lat, 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 l, nl, nv; | ||
| int n0, n1, n2, n3; | ||
| struct Node *grid=NULL; | ||
| double *x=NULL, *y=NULL, *z=NULL; | ||
|
|
||
| nl = *npts; | ||
| nl = npts; | ||
|
||
| nv = 4; | ||
|
|
||
| x = (double *)malloc(nl*nv*sizeof(double)); | ||
|
|
@@ -870,13 +870,13 @@ void get_grid_great_circle_area_ug(const int *npts, const double *lon, const dou | |
|
|
||
| } /* get_grid_great_circle_area_ug */ | ||
|
|
||
| void get_grid_area_dimensionless(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) | ||
| { | ||
| int nx, ny, nxp, i, j, n_in; | ||
| double x_in[20], y_in[20]; | ||
|
|
||
| nx = *nlon; | ||
| ny = *nlat; | ||
| nx = nlon; | ||
| ny = nlat; | ||
|
||
| nxp = nx + 1; | ||
|
|
||
| for(j=0; j<ny; j++) for(i=0; i < nx; i++) { | ||
|
|
@@ -896,13 +896,13 @@ void get_grid_area_dimensionless(const int *nlon, const int *nlat, const double | |
|
|
||
|
|
||
|
|
||
| void get_grid_area_no_adjust(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) | ||
| { | ||
| int nx, ny, nxp, i, j, n_in; | ||
| double x_in[20], y_in[20]; | ||
|
|
||
| nx = *nlon; | ||
| ny = *nlat; | ||
| nx = nlon; | ||
| ny = nlat; | ||
| nxp = nx + 1; | ||
|
|
||
| for(j=0; j<ny; j++) for(i=0; i < nx; i++) { | ||
|
|
@@ -1734,3 +1734,5 @@ int inside_edge(double x0, double y0, double x1, double y1, double x, double y) | |
| return (product<=SMALL) ? 1:0; | ||
|
|
||
| } /* inside_edge */ | ||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. extra lines |
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does the pass in by value work when fortran calls function_?