libsim Versione 7.2.4
Tipi di dato | Funzioni/Subroutine
Riferimenti per il modulo grid_class

Module for describing geographically referenced regular grids. Continua...

Tipi di dato

interface  copy
 Copy an object, creating a fully new instance. Continua...
 
interface  delete
 Destructors of the corresponding objects. Continua...
 
interface  display
 Print a brief description on stdout. Continua...
 
interface  export
 Export griddim object to grid_id. Continua...
 
interface  get_val
 Method for returning the contents of the object. Continua...
 
type  grid_def
 This object, mainly for internal use, describes a grid on a geographical projection, except the grid dimensions. Continua...
 
type  griddim_def
 This object completely describes a grid on a geographic projection. Continua...
 
interface  import
 Import griddim object from grid_id. Continua...
 
interface  index
 Index method. Continua...
 
interface  init
 Constructors of the corresponding objects. Continua...
 
interface  operator(/=)
 Logical inequality operators for objects of the classes grid_def, and griddim_def. Continua...
 
interface  operator(==)
 Logical equality operators for objects of the classes grid_def, and griddim_def. Continua...
 
interface  proj
 Compute forward coordinate transformation from geographical system to projected system. Continua...
 
interface  read_unit
 Read the object from a formatted or unformatted file. Continua...
 
interface  set_val
 Method for setting the contents of the object. Continua...
 
interface  unproj
 Compute backward coordinate transformation from projected system to geographical system. Continua...
 
interface  write_unit
 Write the object on a formatted or unformatted file. Continua...
 

Funzioni/Subroutine

subroutine griddim_init (this, nx, ny, xmin, xmax, ymin, ymax, dx, dy, component_flag, proj_type, lov, zone, xoff, yoff, longitude_south_pole, latitude_south_pole, angle_rotation, longitude_stretch_pole, latitude_stretch_pole, stretch_factor, latin1, latin2, lad, projection_center_flag, ellips_smaj_axis, ellips_flatt, ellips_type, categoryappend)
 Constructor for a griddim_def object.
 
subroutine griddim_delete (this)
 Destroy a griddim_def object.
 
subroutine griddim_copy (this, that, categoryappend)
 Create an independent copy of a griddim_def object.
 
elemental subroutine griddim_coord_proj (this, lon, lat, x, y)
 Computes and returns coordinates in the projected system given the geographical coordinates.
 
elemental subroutine griddim_coord_unproj (this, x, y, lon, lat)
 Computes and returns geographical coordinates given the coordinates in the projected system.
 
subroutine, public griddim_unproj (this)
 Computes the geographical coordinates of all the grid points in the griddim_def object and stores them in the object itself.
 
subroutine griddim_get_val (this, nx, ny, xmin, xmax, ymin, ymax, dx, dy, component_flag, proj, proj_type, lov, zone, xoff, yoff, longitude_south_pole, latitude_south_pole, angle_rotation, longitude_stretch_pole, latitude_stretch_pole, stretch_factor, latin1, latin2, lad, projection_center_flag, ellips_smaj_axis, ellips_flatt, ellips_type)
 Query the object content.
 
subroutine griddim_set_val (this, nx, ny, xmin, xmax, ymin, ymax, dx, dy, component_flag, proj_type, lov, zone, xoff, yoff, longitude_south_pole, latitude_south_pole, angle_rotation, longitude_stretch_pole, latitude_stretch_pole, stretch_factor, latin1, latin2, lad, projection_center_flag, ellips_smaj_axis, ellips_flatt, ellips_type)
 Set the object content.
 
subroutine griddim_read_unit (this, unit)
 This method reads from a Fortran file unit the contents of the object this.
 
subroutine griddim_write_unit (this, unit)
 This method writes on a Fortran file unit the contents of the object this.
 
double precision function, public griddim_central_lon (this)
 Euristically determine the approximate central longitude of the grid in degrees.
 
subroutine, public griddim_set_central_lon (this, lonref)
 Euristically reset the approximate central longitude of the grid to a value compatible to the provided longitude lonref.
 
subroutine, public griddim_gen_coord (this, x, y)
 Generates coordinates of every point of a generic grid from the grid description.
 
subroutine griddim_steps (this, nx, ny, dx, dy)
 Compute and return grid steps.
 
subroutine, public griddim_setsteps (this)
 Compute and set grid steps.
 
subroutine griddim_import_grid_id (this, ingrid_id)
 Import a griddim object from a grid_id object associated to a supported gridded dataset driver (typically a grib message from grib_api or a raster band from gdal).
 
subroutine griddim_export_grid_id (this, outgrid_id)
 Export a griddim object to a grid_id object associated to a supported gridded dataset driver (typically a grib message from grib_api).
 
subroutine griddim_display (this)
 Display on the screen a brief content of the object.
 
integer function count_distinct_grid (vect, mask, back)
 conta gli elementi distinti in vect
 
type(grid_def) function, dimension(dim) pack_distinct_grid (vect, dim, mask, back)
 compatta gli elementi distinti di vect in un array
 
integer function, dimension(size(vect)) map_distinct_grid (vect, mask, back)
 map distinct
 
integer function, dimension(dim) map_inv_distinct_grid (vect, dim, mask, back)
 map inv distinct
 
integer function index_grid (vect, search, mask, back, cache)
 Cerca l'indice del primo o ultimo elemento di vect uguale a search.
 
integer function count_distinct_griddim (vect, mask, back)
 conta gli elementi distinti in vect
 
type(griddim_def) function, dimension(dim) pack_distinct_griddim (vect, dim, mask, back)
 compatta gli elementi distinti di vect in un array
 
integer function, dimension(size(vect)) map_distinct_griddim (vect, mask, back)
 map distinct
 
integer function, dimension(dim) map_inv_distinct_griddim (vect, dim, mask, back)
 map inv distinct
 
integer function index_griddim (vect, search, mask, back, cache)
 Cerca l'indice del primo o ultimo elemento di vect uguale a search.
 
subroutine griddim_wind_unrot (this, rot_mat)
 Compute rotation matrix for wind unrotation.
 
subroutine long_reset_0_360 (lon)
 Reset a longitude value in the interval [0-360[.
 
subroutine long_reset_m180_360 (lon)
 Reset a longitude value in the interval [-180-360[.
 
subroutine long_reset_m180_180 (lon)
 Reset a longitude value in the interval [-90-270[.
 
subroutine long_reset_to_cart_closest (lon, lonref)
 

Descrizione dettagliata

Module for describing geographically referenced regular grids.

This module defines classes and methods describing rectangular georeferenced grids in different geographical projections. The grid and projection definition can be specified explicitely by the caller or they can be entirely imported from a grib file (through grib_api) or from a file format supported by gdal (through gdal fortran interface).

The projection is internally stored following the WMO grib conventions (gridType in grib_api). The projections currently supported or for which support is planned are:

See the example program

! Copyright (C) 2010 ARPA-SIM <urpsim@smr.arpa.emr.it>
! authors:
! Davide Cesari <dcesari@arpa.emr.it>
! Paolo Patruno <ppatruno@arpa.emr.it>
! This program is free software; you can redistribute it and/or
! modify it under the terms of the GNU General Public License as
! published by the Free Software Foundation; either version 2 of
! the License, or (at your option) any later version.
! This program is distributed in the hope that it will be useful,
! but WITHOUT ANY WARRANTY; without even the implied warranty of
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
! GNU General Public License for more details.
! You should have received a copy of the GNU General Public License
! along with this program. If not, see <http://www.gnu.org/licenses/>.
program demo
implicit none
integer :: category,ier
character(len=512):: a_name
doubleprecision :: val
type (griddim_def) :: griddim
!questa chiamata prende dal launcher il nome univoco
call l4f_launcher(a_name,a_name_force="demo1")
!imposta a_name
category=l4f_category_get(a_name//".main")
!init di log4fortran
ier=l4f_init()
!imposto i dati su grigliato
call init (griddim,proj_type="regular_ll", &
nx = 10,ny = 15, &
xmin = -2.d0, &
xmax = 16.d0, &
ymin = 37.d0, &
ymax = 51.d0, &
component_flag=1,&
categoryappend="grigliato regolare manuale")
call griddim_unproj(griddim)
call l4f_category_log(category,l4f_info,&
"unproj ritorna "//to_char(griddim%dim%lat(1,1))//to_char(griddim%dim%lon(1,1)))
call get_val(griddim,ymax=val)
call l4f_category_log(category,l4f_info,&
"get_val ritorna "//to_char(val))
call display(griddim)
call delete(griddim)
!chiudo il logger
call l4f_category_delete(category)
ier=l4f_fini()
end program demo
Destructor for the line_split class.
Set of functions that return a CHARACTER representation of the input variable.
Print a brief description on stdout.
Method for returning the contents of the object.
Constructors of the corresponding objects.
Emit log message for a category with specific priority.
log4fortran destructor
Global log4fortran constructor.
Utilities for CHARACTER variables.
Module for describing geographically referenced regular grids.
classe per la gestione del logging

Generated with Doxygen.