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

High level OASIS user interfaces. More...

Public Member Functions

subroutine, public oasis_init_comp (mynummod, cdnam, kinfo, coupled)
 OASIS user init method. More...
 
subroutine, public oasis_terminate (kinfo)
 OASIS user finalize method. More...
 
subroutine, public oasis_enddef (kinfo)
 OASIS user interface specifying the OASIS definition phase is complete. More...
 

Private Member Functions

subroutine mod_oasis_setrootglobal ()
 Local method to compute each models' global task ids, exists for reuse in enddef. More...
 

Private Attributes

integer(kind=ip_intwp_p), parameter debug =1
 
logical, save lg_mpiflag
 

Detailed Description

High level OASIS user interfaces.

Definition at line 4 of file mod_oasis_method.F90.

Member Function/Subroutine Documentation

subroutine mod_oasis_method::mod_oasis_setrootglobal ( )
private

Local method to compute each models' global task ids, exists for reuse in enddef.

Definition at line 783 of file mod_oasis_method.F90.

subroutine, public mod_oasis_method::oasis_enddef ( integer (kind=ip_intwp_p), intent(inout), optional  kinfo)

OASIS user interface specifying the OASIS definition phase is complete.

Parameters
[in,out]kinforeturn code
  • Check enddef called only once per task
  • Reset mpi_comm_global because active tasks might have been excluded
  • For active tasks only
    • Update mpi_comm_global
    • Update mpi_root_global
    • Document
    • Reconcile partitions, call part_setup
    • Reconcile variables, call var_setup
    • Write grid info to files one model at a time
    • MCT Initialization
    • Initialize coupling via call to coupler_setup
    • Call advance_init to initialize coupling fields from restarts

Definition at line 618 of file mod_oasis_method.F90.

subroutine, public mod_oasis_method::oasis_init_comp ( integer (kind=ip_intwp_p), intent(out)  mynummod,
character(len=*), intent(in)  cdnam,
integer (kind=ip_intwp_p), intent(inout), optional  kinfo,
logical, intent(in), optional  coupled 
)

OASIS user init method.

Parameters
[out]mynummod* This is COLLECTIVE, all pes must call
[out]mynummodcomponent model ID
[in]cdnammodel name
[in,out]kinforeturn code
[in]coupledflag to specify whether this component is coupled in oasis
  • Initialize MPI
  • Set initial output file, need mpi_rank_world
  • Initialize namcouple. First on rank 0 to write error messages then on all other ranks. All tasks will read the namcouple file independently.
  • Check if NFIELDS=0, there is no coupling.
  • Determine the total number of coupling fields from namcouple. Set maxvar parameter and allocate prism_var.
  • Store all the names of the fields exchanged in the namcouple
  • Gather model names from all tasks to generate active model list on all tasks.
  • Broadcast the model list to all MPI tasks
  • Compute compid
  • Re-Set MPI info based on active model tasks
  • Reset debug levels
  • Open log files
  • Set mpi_root_global
  • Memory Initialization
  • Timer Initialization
  • Diagnostics

Definition at line 44 of file mod_oasis_method.F90.

subroutine, public mod_oasis_method::oasis_terminate ( integer (kind=ip_intwp_p), intent(inout), optional  kinfo)

OASIS user finalize method.

Parameters
[in,out]kinforeturn code
  • Print timer information
  • Call MPI finalize
  • Write SUCCESSFUL RUN

Definition at line 555 of file mod_oasis_method.F90.

Member Data Documentation

integer(kind=ip_intwp_p), parameter mod_oasis_method::debug =1
private

Definition at line 34 of file mod_oasis_method.F90.

logical, save mod_oasis_method::lg_mpiflag
private

Definition at line 36 of file mod_oasis_method.F90.


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