MOM NUOPC Cap
 All Classes Files Functions Variables Pages
Data Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
mom_cap_mod Module Reference

Data Types

type  fld_list_type
 
type  ocean_internalstate_type
 
type  ocean_internalstate_wrapper
 

Public Member Functions

subroutine, public setservices (gcomp, rc)
 NUOPC SetService method is the only public entry point. SetServices registers all of the user-provided subroutines in the module with the NUOPC layer. More...
 

Private Member Functions

subroutine initializep0 (gcomp, importState, exportState, clock, rc)
 First initialize subroutine called by NUOPC. The purpose is to set which version of the Initialize Phase Definition (IPD) to use. More...
 
subroutine initializeadvertise (gcomp, importState, exportState, clock, rc)
 Called by NUOPC to advertise import and export fields. "Advertise" simply means that the standard names of all import and export fields are supplied. The NUOPC layer uses these to match fields between components in the coupled system. More...
 
subroutine initializerealize (gcomp, importState, exportState, clock, rc)
 Called by NUOPC to realize import and export fields. "Realizing" a field means that its grid has been defined and an ESMF_Field object has been created and put into the import or export State. More...
 
subroutine setclock (gcomp, rc)
 NUOPC specialization point to set up this cap's clock. More...
 
subroutine modeladvance (gcomp, rc)
 Called by NUOPC to advance the model a single timestep. More...
 
subroutine ocean_model_finalize (gcomp, rc)
 Called by NUOPC at the end of the run to clean up. More...
 
subroutine ice_ocn_bnd_from_data (x, Time, Time_step_coupled)
 
subroutine external_coupler_mpi_init (mom_local_communicator, external_initialization)
 
subroutine external_coupler_sbc_init (Dom, dt_cpld, Run_len)
 
subroutine external_coupler_sbc_before (Ice_ocean_boundary, Ocean_sfc, nsteps, dt_cpld)
 
subroutine external_coupler_sbc_after (Ice_ocean_boundary, Ocean_sfc, nsteps, dt_cpld)
 
subroutine external_coupler_restart (dt_cpld, num_cpld_calls)
 
subroutine external_coupler_exit
 
subroutine external_coupler_mpi_exit (mom_local_communicator, external_initialization)
 
subroutine writeslicefields (state, filename_prefix, slice, rc)
 
subroutine state_getfldptr (ST, fldname, fldptr, rc)
 
subroutine mom_advertisefields (state, nfields, field_defs, rc)
 
subroutine mom_realizefields (state, grid, nfields, field_defs, tag, rc)
 
subroutine mom_fieldssetup (ice_ocean_boundary, ocean_sfc)
 
subroutine fld_list_add (num, fldlist, stdname, transferOffer, data, shortname)
 
subroutine dumpmominternal (grid, slice, stdname, nop, farray)
 

Private Attributes

integer, parameter fldsmax = 100
 
integer fldstoocn_num = 0
 
type(fld_list_type), dimension(fldsmaxfldstoocn
 
integer fldsfrocn_num = 0
 
type(fld_list_type), dimension(fldsmaxfldsfrocn
 
integer import_slice = 1
 
integer export_slice = 1
 
character(len=256) tmpstr
 
integer dbrc
 
type(esmf_grid), save mom_grid_i
 
logical write_diagnostics = .true.
 
logical profile_memory = .true.
 
logical ocean_solo = .true.
 
integer(esmf_kind_i8) restart_interval
 

Member Function/Subroutine Documentation

subroutine mom_cap_mod::dumpmominternal ( type(esmf_grid)  grid,
integer, intent(in)  slice,
character(len=*)  stdname,
character(len=*)  nop,
real(esmf_kind_r8), dimension(:,:), target  farray 
)
private
subroutine mom_cap_mod::external_coupler_exit ( )
private
subroutine mom_cap_mod::external_coupler_mpi_exit ( integer, intent(in)  mom_local_communicator,
logical, intent(in)  external_initialization 
)
private
subroutine mom_cap_mod::external_coupler_mpi_init ( integer, intent(out)  mom_local_communicator,
logical, intent(out)  external_initialization 
)
private
subroutine mom_cap_mod::external_coupler_restart ( integer, intent(in)  dt_cpld,
integer, intent(in)  num_cpld_calls 
)
private
subroutine mom_cap_mod::external_coupler_sbc_after ( type (ice_ocean_boundary_type)  Ice_ocean_boundary,
type (ocean_public_type)  Ocean_sfc,
integer  nsteps,
integer  dt_cpld 
)
private
subroutine mom_cap_mod::external_coupler_sbc_before ( type (ice_ocean_boundary_type), intent(inout)  Ice_ocean_boundary,
type (ocean_public_type), intent(inout)  Ocean_sfc,
integer, intent(in)  nsteps,
integer, intent(in)  dt_cpld 
)
private
subroutine mom_cap_mod::external_coupler_sbc_init ( type(domain2d)  Dom,
integer  dt_cpld,
type(time_type)  Run_len 
)
private
subroutine mom_cap_mod::fld_list_add ( integer, intent(inout)  num,
type(fld_list_type), dimension(:), intent(inout)  fldlist,
character(len=*), intent(in)  stdname,
character(len=*), intent(in)  transferOffer,
real(esmf_kind_r8), dimension(:,:), optional, target  data,
character(len=*), intent(in), optional  shortname 
)
private
subroutine mom_cap_mod::ice_ocn_bnd_from_data ( type (ice_ocean_boundary_type)  x,
type(time_type), intent(in)  Time,
type(time_type), intent(in)  Time_step_coupled 
)
private
subroutine mom_cap_mod::initializeadvertise ( type(esmf_gridcomp)  gcomp,
type(esmf_state)  importState,
type(esmf_state)  exportState,
type(esmf_clock)  clock,
integer, intent(out)  rc 
)
private

Called by NUOPC to advertise import and export fields. "Advertise" simply means that the standard names of all import and export fields are supplied. The NUOPC layer uses these to match fields between components in the coupled system.

Parameters
gcompan ESMF_GridComp object
importStatean ESMF_State object for import fields
exportStatean ESMF_State object for export fields
clockan ESMF_Clock object
rcreturn code
subroutine mom_cap_mod::initializep0 ( type(esmf_gridcomp)  gcomp,
type(esmf_state)  importState,
type(esmf_state)  exportState,
type(esmf_clock)  clock,
integer, intent(out)  rc 
)
private

First initialize subroutine called by NUOPC. The purpose is to set which version of the Initialize Phase Definition (IPD) to use.

For this MOM cap, we are using IPDv01.

Parameters
gcompan ESMF_GridComp object
importStatean ESMF_State object for import fields
exportStatean ESMF_State object for export fields
clockan ESMF_Clock object
rcreturn code
subroutine mom_cap_mod::initializerealize ( type(esmf_gridcomp)  gcomp,
type(esmf_state)  importState,
type(esmf_state)  exportState,
type(esmf_clock)  clock,
integer, intent(out)  rc 
)
private

Called by NUOPC to realize import and export fields. "Realizing" a field means that its grid has been defined and an ESMF_Field object has been created and put into the import or export State.

Parameters
gcompan ESMF_GridComp object
importStatean ESMF_State object for import fields
exportStatean ESMF_State object for export fields
clockan ESMF_Clock object
rcreturn code
subroutine mom_cap_mod::modeladvance ( type(esmf_gridcomp)  gcomp,
integer, intent(out)  rc 
)
private

Called by NUOPC to advance the model a single timestep.

Parameters
gcompan ESMF_GridComp object
rcreturn code
subroutine mom_cap_mod::mom_advertisefields ( type(esmf_state), intent(inout)  state,
integer, intent(in)  nfields,
type(fld_list_type), dimension(:), intent(inout)  field_defs,
integer, intent(inout)  rc 
)
private
subroutine mom_cap_mod::mom_fieldssetup ( type(ice_ocean_boundary_type), intent(in)  ice_ocean_boundary,
type(ocean_public_type), intent(in)  ocean_sfc 
)
private
subroutine mom_cap_mod::mom_realizefields ( type(esmf_state), intent(inout)  state,
type(esmf_grid), intent(in)  grid,
integer, intent(in)  nfields,
type(fld_list_type), dimension(:), intent(inout)  field_defs,
character(len=*), intent(in)  tag,
integer, intent(inout)  rc 
)
private
subroutine mom_cap_mod::ocean_model_finalize ( type(esmf_gridcomp)  gcomp,
integer, intent(out)  rc 
)
private

Called by NUOPC at the end of the run to clean up.

Parameters
gcompan ESMF_GridComp object
rcreturn code
subroutine mom_cap_mod::setclock ( type(esmf_gridcomp)  gcomp,
integer, intent(out)  rc 
)
private

NUOPC specialization point to set up this cap's clock.

By default, the clock is a copy of the clock coming in from the NUOPC Driver. Here, we ensure that the timestep for MOM is smaller than 120 minutes or smaller to ensure stability.

Parameters
gcompthe ESMF_GridComp
rcreturn code
subroutine, public mom_cap_mod::setservices ( type(esmf_gridcomp)  gcomp,
integer, intent(out)  rc 
)

NUOPC SetService method is the only public entry point. SetServices registers all of the user-provided subroutines in the module with the NUOPC layer.

Parameters
gcompan ESMF_GridComp object
rcreturn code
subroutine mom_cap_mod::state_getfldptr ( type(esmf_state), intent(in)  ST,
character(len=*), intent(in)  fldname,
real(esmf_kind_r8), dimension(:,:), intent(in), pointer  fldptr,
integer, intent(out), optional  rc 
)
private
subroutine mom_cap_mod::writeslicefields ( type(esmf_state)  state,
character(len=*)  filename_prefix,
integer  slice,
integer, intent(out), optional  rc 
)
private

Member Data Documentation

integer mom_cap_mod::dbrc
private
integer mom_cap_mod::export_slice = 1
private
type (fld_list_type), dimension(fldsmax) mom_cap_mod::fldsfrocn
private
integer mom_cap_mod::fldsfrocn_num = 0
private
integer, parameter mom_cap_mod::fldsmax = 100
private
type (fld_list_type), dimension(fldsmax) mom_cap_mod::fldstoocn
private
integer mom_cap_mod::fldstoocn_num = 0
private
integer mom_cap_mod::import_slice = 1
private
type(esmf_grid), save mom_cap_mod::mom_grid_i
private
logical mom_cap_mod::ocean_solo = .true.
private
logical mom_cap_mod::profile_memory = .true.
private
integer(esmf_kind_i8) mom_cap_mod::restart_interval
private
character(len=256) mom_cap_mod::tmpstr
private
logical mom_cap_mod::write_diagnostics = .true.
private

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