|
◆ grid_transform_v7d_grid_compute()
subroutine grid_transform_class::grid_transform_v7d_grid_compute |
( |
type(grid_transform), intent(in) |
this, |
|
|
real, dimension(:,:), intent(in) |
field_in, |
|
|
real, dimension(:,:,:), intent(out) |
field_out, |
|
|
type(vol7d_var), intent(in), optional |
var, |
|
|
real, dimension(:,:,:), intent(in), optional, target |
coord_3d_in |
|
) |
| |
|
private |
Compute the output data array from input data array according to the defined transformation.
The grid_transform object this must have been properly initialised, so that it contains all the information needed for computing the transformation. This is the sparse points-to-grid and sparse points-to-sparse points version.
- Parametri
-
[in] | this | grid_tranform object |
[in] | field_in | input array |
[out] | field_out | output array |
[in] | var | physical variable to be interpolated, if provided, some ad-hoc algorithms may be used where possible |
[in] | coord_3d_in | input vertical coordinate for vertical interpolation, if not provided by other means |
Definizione alla linea 4338 del file grid_transform_class.F90.
4338 FUNCTION shapiro (z,zp) RESULT(zs) 4341 REAL, INTENT(in) :: z(:) 4342 REAL, INTENT(in) :: zp 4348 zs = zp - 0.5* ( n*zp - sum(z, c_e(z)) )/n 4353 END FUNCTION shapiro 4357 SUBROUTINE basic_find_index(this, near, nx, ny, xmin, xmax, ymin, ymax, & 4358 lon, lat, extrap, index_x, index_y) 4359 TYPE(griddim_def), INTENT(in) :: this 4360 LOGICAL, INTENT(in) :: near 4361 INTEGER, INTENT(in) :: nx,ny 4362 DOUBLE PRECISION, INTENT(in) :: xmin, xmax, ymin, ymax 4363 DOUBLE PRECISION, INTENT(in) :: lon(:,:),lat(:,:) 4364 LOGICAL, INTENT(in) :: extrap 4365 INTEGER, INTENT(out) :: index_x(:,:),index_y(:,:) 4368 DOUBLE PRECISION :: x(SIZE(lon,1),SIZE(lon,2)),y(SIZE(lon,1),SIZE(lon,2)) 4371 CALL proj(this,lon,lat,x,y) 4372 index_x = nint((x-xmin)/((xmax-xmin)/dble(nx-1)))+1 4373 index_y = nint((y-ymin)/((ymax-ymin)/dble(ny-1)))+1 4377 CALL proj(this,lon,lat,x,y) 4378 index_x = floor((x-xmin)/((xmax-xmin)/dble(nx-1)))+1 4379 index_y = floor((y-ymin)/((ymax-ymin)/dble(ny-1)))+1 4385 index_x = max(index_x, 1) 4386 index_y = max(index_y, 1) 4387 index_x = min(index_x, lnx) 4388 index_y = min(index_y, lny) 4390 WHERE(index_x < 1 .OR. index_x > lnx .OR. index_y < 1 .OR. index_y > lny) 4396 END SUBROUTINE basic_find_index
|