Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
real(kind=wp), | public | :: | x_min |
Data bounds |
|||
real(kind=wp), | public | :: | x_max |
Data bounds |
|||
real(kind=wp), | public | :: | y_min |
Data bounds |
|||
real(kind=wp), | public | :: | y_max |
Data bounds |
|||
integer, | public | :: | grid_nx |
Grid dimensions |
|||
integer, | public | :: | grid_ny |
Grid dimensions |
|||
integer, | public | :: | mask_nx |
Mask dimensions |
|||
integer, | public | :: | mask_ny |
Mask dimensions |
|||
real(kind=wp), | public | :: | x_grid2mask |
Grid to mask scaling |
|||
real(kind=wp), | public | :: | y_grid2mask |
Grid to mask scaling |
|||
real(kind=wp), | public | :: | x_mask2grid |
Mask to grid scaling |
|||
real(kind=wp), | public | :: | y_mask2grid |
Mask to grid scaling |
|||
real(kind=wp), | public | :: | x_data2grid |
Data to grid scaling |
|||
real(kind=wp), | public | :: | y_data2grid |
Data to grid scaling |
Initialize coordinate mapper for data ↔ grid ↔ mask conversions
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(coordinate_mapper_t), | intent(inout) | :: | self | |||
real(kind=wp), | intent(in) | :: | x_bounds(2) | |||
real(kind=wp), | intent(in) | :: | y_bounds(2) | |||
integer, | intent(in) | :: | grid_shape(2) | |||
integer, | intent(in) | :: | mask_shape(2) |
Convert from data coordinates to grid coordinates
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(coordinate_mapper_t), | intent(in) | :: | self | |||
real(kind=wp), | intent(in) | :: | x_data | |||
real(kind=wp), | intent(in) | :: | y_data | |||
real(kind=wp), | intent(out) | :: | x_grid | |||
real(kind=wp), | intent(out) | :: | y_grid |
Convert from grid coordinates to data coordinates
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(coordinate_mapper_t), | intent(in) | :: | self | |||
real(kind=wp), | intent(in) | :: | x_grid | |||
real(kind=wp), | intent(in) | :: | y_grid | |||
real(kind=wp), | intent(out) | :: | x_data | |||
real(kind=wp), | intent(out) | :: | y_data |
Convert from mask coordinates to grid coordinates
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(coordinate_mapper_t), | intent(in) | :: | self | |||
integer, | intent(in) | :: | x_mask | |||
integer, | intent(in) | :: | y_mask | |||
real(kind=wp), | intent(out) | :: | x_grid | |||
real(kind=wp), | intent(out) | :: | y_grid |
Convert from grid coordinates to mask coordinates (nearest)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(coordinate_mapper_t), | intent(in) | :: | self | |||
real(kind=wp), | intent(in) | :: | x_grid | |||
real(kind=wp), | intent(in) | :: | y_grid | |||
integer, | intent(out) | :: | x_mask | |||
integer, | intent(out) | :: | y_mask |