FMS 2025.01.02-dev
Flexible Modeling System
Loading...
Searching...
No Matches
mosaic2_mod

Implements some utility routines to read mosaic information. More...

Data Types

interface  calc_mosaic_grid_area
 
interface  calc_mosaic_grid_great_circle_area
 
interface  get_mosaic_xgrid
 
interface  is_inside_polygon
 

Functions/Subroutines

 calc_mosaic_grid_area_r4
 
 calc_mosaic_grid_area_r8
 
 calc_mosaic_grid_great_circle_area_r4
 
 calc_mosaic_grid_great_circle_area_r8
 
subroutine, public get_mosaic_contact (fileobj, tile1, tile2, istart1, iend1, jstart1, jend1, istart2, iend2, jstart2, jend2)
 Get contact information from mosaic_file
Example usage: call get_mosaic_contact(mosaic_file, tile1, tile2, istart1, iend1, jstart1, jend1, istart2, iend2, jstart2, jend2)
 
subroutine, public get_mosaic_grid_sizes (fileobj, nx, ny)
 Get grid size of each tile from mosaic_file.
 
integer function, public get_mosaic_ncontacts (fileobj)
 Get number of contacts in the mosaic_file.
 
integer function, public get_mosaic_ntiles (fileobj)
 Get number of tiles in the mosaic_file.
 
subroutine, public get_mosaic_tile_grid (grid_file, fileobj, domain, tile_count)
 Gets the name of a mosaic tile grid file.
 
 get_mosaic_xgrid_r4
 
 get_mosaic_xgrid_r8
 
integer function, public get_mosaic_xgrid_size (fileobj)
 return exchange grid size of mosaic xgrid file.
 
 is_inside_polygon_r4
 
 is_inside_polygon_r8
 
subroutine mosaic_init ()
 Initialize the mosaic_mod. Initialization routine for the mosaic module. It writes the version information to the log file.
Example usage: call mosaic_init ( )
 
integer function parse_string (string, set, sval)
 
integer function transfer_to_model_index (istart, iend, refine_ratio)
 

Variables

character(len= *), parameter all
 
integer, parameter direction
 
character(len= *), parameter directory
 
character(len= *), parameter files
 
character(len= *), parameter for
 
character(len= *), parameter grid
 
integer, parameter in
 
integer, parameter max_name = 256
 
integer, parameter model
 
logical module_is_initialized = .true.
 
character(len= *), parameter root
 
integer, parameter size
 
integer, parameter supergrid
 
integer, parameter x_refine = 2
 
integer, parameter y
 
integer, parameter y_refine = 2
 

Detailed Description

Implements some utility routines to read mosaic information.

Author
Zhi Liang

Implements some utility routines to read mosaic information. The information includes number of tiles and contacts in the mosaic, mosaic grid resolution of each tile, mosaic contact information, mosaic exchange grid information. Each routine will call a C-version routine to get these information.


Data Type Documentation

◆ mosaic2_mod::calc_mosaic_grid_area

interface mosaic2_mod::calc_mosaic_grid_area

Definition at line 74 of file mosaic2.F90.

Public Member Functions

 calc_mosaic_grid_area_r4
 
 calc_mosaic_grid_area_r8
 

◆ mosaic2_mod::calc_mosaic_grid_great_circle_area

interface mosaic2_mod::calc_mosaic_grid_great_circle_area

Definition at line 79 of file mosaic2.F90.

Public Member Functions

 calc_mosaic_grid_great_circle_area_r4
 
 calc_mosaic_grid_great_circle_area_r8
 

◆ mosaic2_mod::get_mosaic_xgrid

interface mosaic2_mod::get_mosaic_xgrid

Definition at line 69 of file mosaic2.F90.

Public Member Functions

 get_mosaic_xgrid_r4
 
 get_mosaic_xgrid_r8
 

◆ mosaic2_mod::is_inside_polygon

interface mosaic2_mod::is_inside_polygon

Definition at line 84 of file mosaic2.F90.

Public Member Functions

 is_inside_polygon_r4
 
 is_inside_polygon_r8
 

Function/Subroutine Documentation

◆ get_mosaic_contact()

subroutine, public get_mosaic_contact ( type(fmsnetcdffile_t), intent(in)  fileobj,
integer, dimension(:), intent(inout)  tile1,
integer, dimension(:), intent(inout)  tile2,
integer, dimension(:), intent(inout)  istart1,
integer, dimension(:), intent(inout)  iend1,
integer, dimension(:), intent(inout)  jstart1,
integer, dimension(:), intent(inout)  jend1,
integer, dimension(:), intent(inout)  istart2,
integer, dimension(:), intent(inout)  iend2,
integer, dimension(:), intent(inout)  jstart2,
integer, dimension(:), intent(inout)  jend2 
)

Get contact information from mosaic_file
Example usage: call get_mosaic_contact(mosaic_file, tile1, tile2, istart1, iend1, jstart1, jend1, istart2, iend2, jstart2, jend2)

Parameters
fileobjmosaic file object
[in,out]tile1list of tile numbers in tile 1 of each contact
[in,out]tile2list of tile numbers in tile 2 of each contact
[in,out]istart1list of starting i-index in tile 1 of each contact
[in,out]iend1list of ending i-index in tile 1 of each contact
[in,out]jstart1list of starting j-index in tile 1 of each contact
[in,out]jend1list of ending j-index in tile 1 of each contact
[in,out]istart2list of starting i-index in tile 2 of each contact
[in,out]iend2list of ending i-index in tile 2 of each contact
[in,out]jstart2list of starting j-index in tile 2 of each contact
[in,out]jend2list of ending j-index in tile 2 of each contact

Definition at line 221 of file mosaic2.F90.

◆ get_mosaic_grid_sizes()

subroutine, public get_mosaic_grid_sizes ( type(fmsnetcdffile_t), intent(in)  fileobj,
integer, dimension(:), intent(inout)  nx,
integer, dimension(:), intent(inout)  ny 
)

Get grid size of each tile from mosaic_file.

Parameters
fileobjmosaic file object
[in,out]nxList of grid size in x-direction of each tile
[in,out]nyList of grid size in y-direction of each tile
Example usage: call get_mosaic_grid_sizes(mosaic_file, nx, ny)

Definition at line 172 of file mosaic2.F90.

◆ get_mosaic_ncontacts()

integer function, public get_mosaic_ncontacts ( type(fmsnetcdffile_t), intent(in)  fileobj)

Get number of contacts in the mosaic_file.

Parameters
fileobjmosaic file object
Returns
number of contacts in a given file
Example usage: ntiles = get_mosaic_ncontacts( mosaic_file)

Definition at line 150 of file mosaic2.F90.

◆ get_mosaic_ntiles()

integer function, public get_mosaic_ntiles ( type(fmsnetcdffile_t), intent(in)  fileobj)

Get number of tiles in the mosaic_file.

Parameters
fileobjmosaic file object
Returns
Number of tiles in given file
Example usage: ntiles = get_mosaic_ntiles( mosaic_file)

Definition at line 134 of file mosaic2.F90.

◆ get_mosaic_tile_grid()

subroutine, public get_mosaic_tile_grid ( character(len=*), intent(out)  grid_file,
type(fmsnetcdffile_t), intent(in)  fileobj,
type(domain2d), intent(in)  domain,
integer, intent(in), optional  tile_count 
)

Gets the name of a mosaic tile grid file.

Parameters
[out]grid_filename of grid file
fileobjmosaic file object
domaincurrent domain
tile_countoptional count of tiles

Definition at line 428 of file mosaic2.F90.

◆ get_mosaic_xgrid_size()

integer function, public get_mosaic_xgrid_size ( type(fmsnetcdffile_t), intent(in)  fileobj)

return exchange grid size of mosaic xgrid file.


Example usage: nxgrid = get_mosaic_xgrid_size(xgrid_file)

Definition at line 118 of file mosaic2.F90.

◆ mosaic_init()

subroutine mosaic_init
private

Initialize the mosaic_mod. Initialization routine for the mosaic module. It writes the version information to the log file.
Example usage: call mosaic_init ( )

Definition at line 103 of file mosaic2.F90.

◆ parse_string()

integer function parse_string ( character(len=*), intent(in)  string,
character(len=*), intent(in)  set,
character(len=*), dimension(:), intent(out)  sval 
)
private

Definition at line 378 of file mosaic2.F90.

◆ transfer_to_model_index()

integer function transfer_to_model_index ( integer, intent(inout)  istart,
integer, intent(inout)  iend,
integer  refine_ratio 
)
private

Definition at line 345 of file mosaic2.F90.

Variable Documentation

◆ all

character(len=*), parameter all
private

Definition at line 46 of file mosaic2.F90.

◆ direction

integer, parameter direction
private

Definition at line 49 of file mosaic2.F90.

◆ directory

character(len=*), parameter directory
private

Definition at line 46 of file mosaic2.F90.

◆ files

character(len=*), parameter files
private

Definition at line 46 of file mosaic2.F90.

◆ for

character(len=*), parameter for
private

Definition at line 46 of file mosaic2.F90.

◆ grid

integer parameter grid
private

Definition at line 46 of file mosaic2.F90.

◆ in

integer, parameter in
private

Definition at line 49 of file mosaic2.F90.

◆ max_name

integer, parameter max_name = 256
private

Definition at line 49 of file mosaic2.F90.

◆ model

integer, parameter model
private

Definition at line 49 of file mosaic2.F90.

◆ module_is_initialized

logical module_is_initialized = .true.
private

Definition at line 90 of file mosaic2.F90.

◆ root

character(len=*), parameter root
private

Definition at line 46 of file mosaic2.F90.

◆ size

integer parameter size
private

Definition at line 49 of file mosaic2.F90.

◆ supergrid

integer, parameter supergrid
private

Definition at line 49 of file mosaic2.F90.

◆ x_refine

integer, parameter x_refine = 2
private

Definition at line 49 of file mosaic2.F90.

◆ y

integer, parameter y
private

Definition at line 49 of file mosaic2.F90.

◆ y_refine

integer, parameter y_refine = 2
private

Definition at line 49 of file mosaic2.F90.