|
◆ grid_transform_vol7d_grid_init()
subroutine grid_transform_vol7d_grid_init |
( |
type(grid_transform), intent(out) |
this, |
|
|
type(transform_def), intent(in) |
trans, |
|
|
type(vol7d), intent(in) |
v7d_in, |
|
|
type(griddim_def), intent(in) |
out, |
|
|
character(len=*), intent(in), optional |
categoryappend |
|
) |
| |
Constructor for a grid_transform object, defining a particular sparse points-to-grid transformation.
It defines an object describing a transformation from a set of sparse points to a rectangular grid; the abstract type of transformation is described in the transformation object trans (type transform_def) which must have been properly initialised. The additional information required here is the list of the input sparse points in the form of a vol7d object (parameter v7d_in), which can be the same volume that will be successively used for interpolation, or a volume with just the same coordinate data, and the description of the output grid griddim (a griddim_def object).
The generated grid_transform object is specific to the sparse point list and grid provided. The function c_e can be used in order to check whether the object has been successfully initialised, if the result is .FALSE., it should not be used further on.
- Parametri
-
[out] | this | grid transformation object |
[in] | trans | transformation object |
[in] | v7d_in | vol7d object with the coordinates of the sparse point to be used as input (only information about coordinates is used) |
[in] | out | griddim object defining target grid |
[in] | categoryappend | append this suffix to log4fortran namespace category |
Definizione alla linea 2428 del file grid_transform_class.F90.
2429 this%outnx = SIZE(v7d_in%ana) 2431 this%point_index(:,1) = (/(i,i=1,this%innx)/) 2432 CALL vol7d_alloc(v7d_out, nana= SIZE(v7d_in%ana)) 2433 v7d_out%ana = v7d_in%ana 2437 ELSE IF (this%trans%sub_type == 'coordbb' ) THEN 2439 ALLOCATE(lon(this%innx),lat(this%innx)) 2444 CALL getval(v7d_in%ana(:)%coord,lon=lon,lat=lat) 2447 IF (lon(i) > this%trans%rect_coo%ilon .AND. & 2448 lon(i) < this%trans%rect_coo%flon .AND. & 2449 lat(i) > this%trans%rect_coo%ilat .AND. & 2450 lat(i) < this%trans%rect_coo%flat) THEN 2451 this%outnx = this%outnx + 1 2452 this%point_index(i,1) = this%outnx 2456 IF (this%outnx <= 0) THEN 2457 CALL l4f_category_log(this%category,l4f_warn, & 2458 "metamorphosis:coordbb: no points inside bounding box "//& 2459 trim( to_char(this%trans%rect_coo%ilon))// ","// & 2460 trim( to_char(this%trans%rect_coo%flon))// ","// & 2461 trim( to_char(this%trans%rect_coo%ilat))// ","// & 2462 trim( to_char(this%trans%rect_coo%flat))) 2465 CALL vol7d_alloc(v7d_out, nana=this%outnx) 2470 IF ( c_e(this%point_index(i,1))) THEN 2472 CALL init(v7d_out%ana(n),lon=lon(i),lat=lat(i)) 2475 DEALLOCATE(lon, lat) 2479 ELSE IF (this%trans%sub_type == 'poly' ) THEN 2486 CALL getval(v7d_in%ana(i)%coord,lon=lon1,lat=lat1) 2487 point = georef_coord_new(x=lon1, y=lat1) 2488 DO n = 1, this%trans%poly%arraysize 2489 IF (inside(point, this%trans%poly%array(n))) THEN 2490 this%outnx = this%outnx + 1 2491 this%point_index(i,1) = n 2498 IF (this%outnx <= 0) THEN 2499 CALL l4f_category_log(this%category,l4f_warn, & 2500 "metamorphosis:poly: no points inside polygons") 2503 CALL vol7d_alloc(v7d_out, nana=this%outnx) 2508 IF ( c_e(this%point_index(i,1))) THEN Restituiscono il valore dell'oggetto in forma di stringa stampabile.
Restituiscono il valore dell'oggetto nella forma desiderata.
Costruttori per le classi datetime e timedelta.
|