Oasis3-MCT
 All Classes Files Functions Variables Macros Pages
Data Types | Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
mod_oasis_grid Module Reference

OASIS grid data and methods. More...

Data Types

interface  oasis_write_angle
 Generic interface to support writing 4 or 8 byte reals. More...
 
interface  oasis_write_area
 Generic interface to support writing 4 or 8 byte reals. More...
 
interface  oasis_write_corner
 Generic interface to support writing 4 or 8 byte reals. More...
 
interface  oasis_write_grid
 Generic interface to support writing 4 or 8 byte reals. More...
 
type  prism_grid_type
 Model grid data for creating mapping data and conserving fields. More...
 

Public Member Functions

subroutine, public oasis_print_grid_data ()
 Print grid information to log file. More...
 
subroutine, public oasis_start_grids_writing (iwrite)
 User interface to initialize grid writing. More...
 
subroutine, public oasis_write_mask (cgrid, nx, ny, mask, partid)
 User interface to set integer mask values. More...
 
subroutine, public oasis_terminate_grids_writing ()
 User interface to indicate user defined grids are done. More...
 
subroutine, public oasis_write2files ()
 Interface that actually writes fields to grid files. More...
 

Public Attributes

integer(kind=ip_intwp_p), save,
public 
prism_ngrid = 0
 counter for grids More...
 
type(prism_grid_type),
dimension(mgrid), save, public 
prism_grid
 array of grid datatypes More...
 

Private Member Functions

subroutine oasis_write_grid_r8 (cgrid, nx, ny, lon, lat, partid)
 User interface to set latitudes and longitudes for 8 byte reals. More...
 
subroutine oasis_write_grid_r4 (cgrid, nx, ny, lon, lat, partid)
 User interface to set latitudes and longitudes for 4 byte reals. More...
 
subroutine oasis_write_angle_r8 (cgrid, nx, ny, angle, partid)
 User interface to set angle for 8 byte reals. More...
 
subroutine oasis_write_angle_r4 (cgrid, nx, ny, angle, partid)
 User interface to set angle for 4 byte reals. More...
 
subroutine oasis_write_corner_r8 (cgrid, nx, ny, nc, clon, clat, partid)
 User interface to set corner latitudes and longitudes for 8 byte reals. More...
 
subroutine oasis_write_corner_r4 (cgrid, nx, ny, nc, clon, clat, partid)
 User interface to set corner latitudes and longitudes for 4 byte reals. More...
 
subroutine oasis_write_area_r8 (cgrid, nx, ny, area, partid)
 User interface to set area values for 8 byte reals. More...
 
subroutine oasis_write_area_r4 (cgrid, nx, ny, area, partid)
 User interface to set area values for 4 byte reals. More...
 
subroutine oasis_findgrid (cgrid, nx, ny, gridID)
 Local interface to find gridID for a specified grid name. More...
 
subroutine oasis_grid_loc2glo (aloc, aglo, partid, taskid)
 Local routine that gathers the local array using partition information. More...
 

Private Attributes

integer(kind=ip_intwp_p), parameter mgrid = 100
 maximum number of grids allowed More...
 
integer(kind=ip_intwp_p), save writing_grids_call =0
 

Detailed Description

OASIS grid data and methods.

These interfaces support both grid data specified globally on the root task as required in Oasis3 and grid data decomposed across tasks. If grid data is decomposed across tasks, the optional partid argument must be specified when it exists in the interface.

Definition at line 9 of file mod_oasis_grid.F90.

Member Function/Subroutine Documentation

subroutine mod_oasis_grid::oasis_findgrid ( character(len=*), intent(in)  cgrid,
integer(kind=ip_intwp_p), intent(in)  nx,
integer(kind=ip_intwp_p), intent(in)  ny,
integer(kind=ip_intwp_p), intent(out)  gridID 
)
private

Local interface to find gridID for a specified grid name.

Parameters
[in]cgridgrid name
[in]nxglobal nx size
[in]nyglobal ny size
[out]grididgridID matching cgrid

Definition at line 1174 of file mod_oasis_grid.F90.

subroutine mod_oasis_grid::oasis_grid_loc2glo ( real(kind=ip_realwp_p), dimension(:,:), intent(in)  aloc,
real(kind=ip_realwp_p), dimension(:,:), intent(inout)  aglo,
integer(kind=ip_i4_p), intent(in)  partid,
integer(kind=ip_i4_p), intent(in)  taskid 
)
private

Local routine that gathers the local array using partition information.

Parameters
[in]aloclocal array
[in,out]agloglobal array
[in]partidpartition id for local data
[in]taskidtask id to gather data to

Definition at line 1222 of file mod_oasis_grid.F90.

subroutine, public mod_oasis_grid::oasis_print_grid_data ( )

Print grid information to log file.

Definition at line 155 of file mod_oasis_grid.F90.

subroutine, public mod_oasis_grid::oasis_start_grids_writing ( integer(kind=ip_intwp_p), intent(out)  iwrite)

User interface to initialize grid writing.

Parameters
[out]iwriteflag, obsolete

Definition at line 208 of file mod_oasis_grid.F90.

subroutine, public mod_oasis_grid::oasis_terminate_grids_writing ( )

User interface to indicate user defined grids are done.

Definition at line 797 of file mod_oasis_grid.F90.

subroutine, public mod_oasis_grid::oasis_write2files ( )

Interface that actually writes fields to grid files.

Write fields to grid files. Only write fields that have been buffered and if prism_grid_terminate_grids_writing has been called. This is called by all tasks from oasis_enddef.

  • Check that a grid defined on a partitition is defined on all tasks on that partition.
  • Write grid information
    • Determine which tasks are associated with the grid information
    • Check that array sizes match for all fields
    • Gather longitudes if needed and write from root
    • Gather latitudes if needed and write from root
    • Gather corner longitudes if needed and write from root
    • Gather corner latitudes if needed and write from root
    • Gather areas if needed and write from root
    • Gather angles if needed and write from root
    • Gather masks if needed and write from root

Definition at line 828 of file mod_oasis_grid.F90.

subroutine mod_oasis_grid::oasis_write_angle_r4 ( character(len=*), intent(in)  cgrid,
integer(kind=ip_intwp_p), intent(in)  nx,
integer(kind=ip_intwp_p), intent(in)  ny,
real(kind=ip_single_p), dimension(:,:), intent(in)  angle,
integer(kind=ip_intwp_p), intent(in), optional  partid 
)
private

User interface to set angle for 4 byte reals.

Parameters
[in]cgridgrid name
[in]nxglobal nx size
[in]nyglobal ny size
[in]angleangles
[in]partidpartition id if nonglobal data

Definition at line 437 of file mod_oasis_grid.F90.

subroutine mod_oasis_grid::oasis_write_angle_r8 ( character(len=*), intent(in)  cgrid,
integer(kind=ip_intwp_p), intent(in)  nx,
integer(kind=ip_intwp_p), intent(in)  ny,
real(kind=ip_double_p), dimension(:,:), intent(in)  angle,
integer(kind=ip_intwp_p), intent(in), optional  partid 
)
private

User interface to set angle for 8 byte reals.

Parameters
[in]cgridgrid name
[in]nxglobal nx size
[in]nyglobal ny size
[in]angleangles
[in]partidpartition id if nonglobal data

Definition at line 381 of file mod_oasis_grid.F90.

subroutine mod_oasis_grid::oasis_write_area_r4 ( character(len=*), intent(in)  cgrid,
integer(kind=ip_intwp_p), intent(in)  nx,
integer(kind=ip_intwp_p), intent(in)  ny,
real(kind=ip_single_p), dimension(:,:), intent(in)  area,
integer(kind=ip_intwp_p), intent(in), optional  partid 
)
private

User interface to set area values for 4 byte reals.

Parameters
[in]cgridgrid name
[in]nxglobal nx size
[in]nyglobal ny size
[in]areaareas
[in]partidpartition id if nonglobal data

Definition at line 741 of file mod_oasis_grid.F90.

subroutine mod_oasis_grid::oasis_write_area_r8 ( character(len=*), intent(in)  cgrid,
integer(kind=ip_intwp_p), intent(in)  nx,
integer(kind=ip_intwp_p), intent(in)  ny,
real(kind=ip_double_p), dimension(:,:), intent(in)  area,
integer(kind=ip_intwp_p), intent(in), optional  partid 
)
private

User interface to set area values for 8 byte reals.

Parameters
[in]cgridgrid name
[in]nxglobal nx size
[in]nyglobal ny size
[in]areaareas
[in]partidpartition id if nonglobal data

Definition at line 684 of file mod_oasis_grid.F90.

subroutine mod_oasis_grid::oasis_write_corner_r4 ( character(len=*), intent(in)  cgrid,
integer(kind=ip_intwp_p), intent(in)  nx,
integer(kind=ip_intwp_p), intent(in)  ny,
integer(kind=ip_intwp_p), intent(in)  nc,
real(kind=ip_single_p), dimension(:,:,:), intent(in)  clon,
real(kind=ip_single_p), dimension(:,:,:), intent(in)  clat,
integer(kind=ip_intwp_p), intent(in), optional  partid 
)
private

User interface to set corner latitudes and longitudes for 4 byte reals.

Parameters
[in]cgridgrid name
[in]nxglobal nx size
[in]nyglobal ny size
[in]ncnumber of corners per cell
[in]cloncorner longitudes
[in]clatcorner latitudes
[in]partidpartition id if nonglobal data

Definition at line 560 of file mod_oasis_grid.F90.

subroutine mod_oasis_grid::oasis_write_corner_r8 ( character(len=*), intent(in)  cgrid,
integer(kind=ip_intwp_p), intent(in)  nx,
integer(kind=ip_intwp_p), intent(in)  ny,
integer(kind=ip_intwp_p), intent(in)  nc,
real(kind=ip_double_p), dimension(:,:,:), intent(in)  clon,
real(kind=ip_double_p), dimension(:,:,:), intent(in)  clat,
integer(kind=ip_intwp_p), intent(in), optional  partid 
)
private

User interface to set corner latitudes and longitudes for 8 byte reals.

Parameters
[in]cgridgrid name
[in]nxglobal nx size
[in]nyglobal ny size
[in]ncnumber of corners per cell
[in]cloncorner longitudes
[in]clatcorner latitudes
[in]partidpartition id if nonglobal data

Definition at line 492 of file mod_oasis_grid.F90.

subroutine mod_oasis_grid::oasis_write_grid_r4 ( character(len=*), intent(in)  cgrid,
integer(kind=ip_intwp_p), intent(in)  nx,
integer(kind=ip_intwp_p), intent(in)  ny,
real(kind=ip_single_p), dimension(:,:), intent(in)  lon,
real(kind=ip_single_p), dimension(:,:), intent(in)  lat,
integer(kind=ip_intwp_p), intent(in), optional  partid 
)
private

User interface to set latitudes and longitudes for 4 byte reals.

Parameters
[in]cgridgrid name
[in]nxglobal nx size
[in]nyglobal ny size
[in]lonlongitudes
[in]latlatitudes
[in]partidpartition id if nonglobal data

Definition at line 315 of file mod_oasis_grid.F90.

subroutine mod_oasis_grid::oasis_write_grid_r8 ( character(len=*), intent(in)  cgrid,
integer(kind=ip_intwp_p), intent(in)  nx,
integer(kind=ip_intwp_p), intent(in)  ny,
real(kind=ip_double_p), dimension(:,:), intent(in)  lon,
real(kind=ip_double_p), dimension(:,:), intent(in)  lat,
integer(kind=ip_intwp_p), intent(in), optional  partid 
)
private

User interface to set latitudes and longitudes for 8 byte reals.

Parameters
[in]cgridgrid name
[in]nxglobal nx size
[in]nyglobal ny size
[in]lonlongitudes
[in]latlatitudes
[in]partidpartition id if nonglobal data

Definition at line 248 of file mod_oasis_grid.F90.

subroutine, public mod_oasis_grid::oasis_write_mask ( character(len=*), intent(in)  cgrid,
integer(kind=ip_intwp_p), intent(in)  nx,
integer(kind=ip_intwp_p), intent(in)  ny,
integer(kind=ip_intwp_p), dimension(:,:), intent(in)  mask,
integer(kind=ip_intwp_p), intent(in), optional  partid 
)

User interface to set integer mask values.

Parameters
[in]cgridgrid name
[in]nxglobal nx size
[in]nyglobal ny size
[in]maskmask
[in]partidpartition id if nonglobal data

Definition at line 627 of file mod_oasis_grid.F90.

Member Data Documentation

integer(kind=ip_intwp_p), parameter mod_oasis_grid::mgrid = 100
private

maximum number of grids allowed

Definition at line 113 of file mod_oasis_grid.F90.

type(prism_grid_type), dimension(mgrid), save, public mod_oasis_grid::prism_grid

array of grid datatypes

Definition at line 140 of file mod_oasis_grid.F90.

integer(kind=ip_intwp_p), save, public mod_oasis_grid::prism_ngrid = 0

counter for grids

Definition at line 139 of file mod_oasis_grid.F90.

integer(kind=ip_intwp_p), save mod_oasis_grid::writing_grids_call =0
private

Definition at line 114 of file mod_oasis_grid.F90.


The documentation for this module was generated from the following file: