NCEPLIBS-ip  4.2.0
ip_grid_descriptor_mod Module Reference

Users derived type grid descriptor objects to abstract away the raw GRIB1 and GRIB2 grid definitions. More...

Data Types

type  grib1_descriptor
 Descriptor representing a grib1 grib descriptor section (GDS) with an integer array. More...
 
type  grib2_descriptor
 Grib-2 descriptor containing a grib2 GDT represented by an integer array. More...
 
interface  init_descriptor
 
type  ip_grid_descriptor
 Abstract descriptor object which represents a grib1 or grib2 descriptor. More...
 
interface  operator(==)
 

Functions/Subroutines

type(grib1_descriptor) function, public init_grib1_descriptor (gds)
 Initialize grib-1 descriptor from integer grid definition section (GDS). More...
 
type(grib2_descriptor) function, public init_grib2_descriptor (gdt_num, gdt_len, gdt_tmpl)
 Initialize grib-2 descriptor from integer grid definition template (GDT). More...
 
logical function is_same_grid (grid1, grid2)
 Test whether two grid descriptors are the same. More...
 
logical function is_same_grid_grib1 (self, grid_desc)
 Test whether two grib1_descriptors are the same. More...
 
logical function is_same_grid_grib2 (self, grid_desc)
 Test whether two grib2_descriptors are the same. More...
 

Detailed Description

Users derived type grid descriptor objects to abstract away the raw GRIB1 and GRIB2 grid definitions.

An abstract ip_grid_descriptor class is subclassed by the GRIB1 and GRIB2 descriptor types which contain the raw integer grib arrays. A comparison operator to test whether two grid descriptors are the same is also included.

Author
Kyle Gerheiser
Date
July 2021

Function/Subroutine Documentation

◆ init_grib1_descriptor()

type(grib1_descriptor) function, public ip_grid_descriptor_mod::init_grib1_descriptor ( integer, dimension(:), intent(in)  gds)

Initialize grib-1 descriptor from integer grid definition section (GDS).

Parameters
[in]gdsGrib-1 grid definition section.
Returns
Initialized Grib-1 descriptor.
Author
Kyle Gerheiser
Date
July 2021

Definition at line 74 of file ip_grid_descriptor_mod.F90.

◆ init_grib2_descriptor()

type(grib2_descriptor) function, public ip_grid_descriptor_mod::init_grib2_descriptor ( integer, intent(in)  gdt_num,
integer, intent(in)  gdt_len,
integer, dimension(:), intent(in)  gdt_tmpl 
)

Initialize grib-2 descriptor from integer grid definition template (GDT).

Parameters
[in]gdt_numGrib-2 grid number.
[in]gdt_lenLenght of the grid definition template.
[in]gdt_tmplGrib-2 grid definition template.
Returns
Initialized Grib-2 descriptor.
Author
Kyle Gerheiser
Date
July 2021

Definition at line 93 of file ip_grid_descriptor_mod.F90.

◆ is_same_grid()

logical function ip_grid_descriptor_mod::is_same_grid ( class(ip_grid_descriptor), intent(in)  grid1,
class(ip_grid_descriptor), intent(in)  grid2 
)
private

Test whether two grid descriptors are the same.

Parameters
[in]grid1An ip_grid_descriptor.
[in]grid2Another ip_grid_descriptor.
Returns
True if the grids are the same, false if they are not.
Author
Kyle Gerheiser
Date
July 2021

Definition at line 115 of file ip_grid_descriptor_mod.F90.

Referenced by ip_grid_descriptor_mod::operator(==)::is_same_grid(), and ip_grid_mod::operator(==)::is_same_grid().

◆ is_same_grid_grib1()

logical function ip_grid_descriptor_mod::is_same_grid_grib1 ( class(grib1_descriptor), intent(in)  self,
class(grib1_descriptor), intent(in)  grid_desc 
)
private

Test whether two grib1_descriptors are the same.

Parameters
[in]selfThe grib1_descriptor which this routine was called on.
[in]grid_descA grib1_descriptor to compare.
Returns
True if the grids are the same, false if they are not.
Author
Kyle Gerheiser
Date
July 2021

Definition at line 145 of file ip_grid_descriptor_mod.F90.

◆ is_same_grid_grib2()

logical function ip_grid_descriptor_mod::is_same_grid_grib2 ( class(grib2_descriptor), intent(in)  self,
class(grib2_descriptor), intent(in)  grid_desc 
)
private

Test whether two grib2_descriptors are the same.

Parameters
[in]selfThe grib2_descriptor which this routine was called on.
[in]grid_descgrib2_descriptor to compare.
Returns
True if the grids are the same, false if they are not.
Author
Kyle Gerheiser
Date
July 2021

Definition at line 164 of file ip_grid_descriptor_mod.F90.