MOM6
|
This module contains a set of subroutines that are required by NUOPC.
Data Types | |
type | fld_list_type |
Contains field information. More... | |
type | ocean_internalstate_type |
Internal state type with pointers to three types defined by MOM. More... | |
type | ocean_internalstate_wrapper |
Wrapper-derived type required to associate an internal state instance with the ESMF/NUOPC component. More... | |
Functions/Subroutines | |
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... | |
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 | datainitialize (gcomp, rc) |
TODO. More... | |
subroutine | modeladvance (gcomp, rc) |
Called by NUOPC to advance the model a single timestep. More... | |
subroutine | modelsetrunclock (gcomp, rc) |
subroutine | ocean_model_finalize (gcomp, rc) |
Called by NUOPC at the end of the run to clean up. More... | |
subroutine | state_setscalar (value, scalar_id, State, mytask, scalar_name, scalar_count, rc) |
Set scalar data from state for a particula name. More... | |
subroutine | mom_realizefields (state, nfields, field_defs, tag, grid, mesh, rc) |
Realize the import and export fields using either a grid or a mesh. More... | |
subroutine | fld_list_add (num, fldlist, stdname, transferOffer, shortname) |
Set up list of field information. More... | |
subroutine | shr_file_setlogunit (nunit) |
subroutine | shr_file_getlogunit (nunit) |
Variables | |
integer, parameter | fldsmax = 100 |
integer | fldstoocn_num = 0 |
type(fld_list_type), dimension(fldsmax) | fldstoocn |
integer | fldsfrocn_num = 0 |
type(fld_list_type), dimension(fldsmax) | fldsfrocn |
integer | debug = 0 |
integer | import_slice = 1 |
integer | export_slice = 1 |
character(len=256) | tmpstr |
logical | write_diagnostics = .false. |
logical | overwrite_timeslice = .false. |
character(len=32) | runtype |
run type More... | |
integer | logunit |
stdout logging unit number More... | |
logical | profile_memory = .true. |
logical | grid_attach_area = .false. |
character(len=128) | scalar_field_name = '' |
integer | scalar_field_count = 0 |
integer | scalar_field_idx_grid_nx = 0 |
integer | scalar_field_idx_grid_ny = 0 |
character(len= *), parameter | u_file_u = __FILE__ |
logical | cesm_coupled = .false. |
type(esmf_geomtype_flag) | geomtype = ESMF_GEOMTYPE_GRID |
|
private |
TODO.
gcomp | an ESMF_GridComp object | |
rc | return code | |
gcomp | ESMF_GridComp object | |
[out] | rc | return code |
Definition at line 1472 of file mom_cap.F90.
References mom_ocean_model_nuopc::get_ocean_grid(), import_slice, mom_cap_methods::mom_export(), overwrite_timeslice, and write_diagnostics.
Referenced by setservices().
|
private |
Set up list of field information.
Definition at line 2292 of file mom_cap.F90.
References fldsmax.
Referenced by initializeadvertise().
|
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.
gcomp | an ESMF_GridComp object | |
importState | an ESMF_State object for import fields | |
exportState | an ESMF_State object for export fields | |
clock | an ESMF_Clock object | |
rc | return code | |
gcomp | ESMF_GridComp object | |
exportstate | ESMF_State object for import/export fields | |
clock | ESMF_Clock object | |
[out] | rc | return code |
Definition at line 432 of file mom_cap.F90.
References cesm_coupled, fld_list_add(), fldsfrocn, fldsfrocn_num, fldstoocn, fldstoocn_num, mom_error_handler::is_root_pe(), logunit, runtype, and scalar_field_name.
Referenced by setservices().
|
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.
gcomp | an ESMF_GridComp object | |
importState | an ESMF_State object for import fields | |
exportState | an ESMF_State object for export fields | |
clock | an ESMF_Clock object | |
rc | return code | |
gcomp | ESMF_GridComp object | |
exportstate | ESMF_State object for import/export fields | |
clock | ESMF_Clock object | |
[out] | rc | return code |
Definition at line 244 of file mom_cap.F90.
References grid_attach_area, overwrite_timeslice, profile_memory, scalar_field_count, scalar_field_idx_grid_nx, scalar_field_idx_grid_ny, scalar_field_name, and write_diagnostics.
Referenced by setservices().
|
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.
gcomp | an ESMF_GridComp object | |
importState | an ESMF_State object for import fields | |
exportState | an ESMF_State object for export fields | |
clock | an ESMF_Clock object | |
rc | return code | |
gcomp | ESMF_GridComp object | |
exportstate | ESMF_State object for import/export fields | |
clock | ESMF_Clock object | |
[out] | rc | return code |
Definition at line 839 of file mom_cap.F90.
References debug, fldsfrocn, fldsfrocn_num, fldstoocn, fldstoocn_num, geomtype, mom_ocean_model_nuopc::get_eps_omesh(), mom_grid::get_global_grid_size(), mom_ocean_model_nuopc::get_ocean_grid(), grid_attach_area, logunit, mom_error_handler::mom_error(), mom_realizefields(), mom_cap_methods::mom_set_geomtype(), scalar_field_count, scalar_field_idx_grid_nx, scalar_field_idx_grid_ny, scalar_field_name, shr_file_setlogunit(), state_setscalar(), and tmpstr.
Referenced by setservices().
|
private |
Called by NUOPC to advance the model a single timestep.
gcomp | an ESMF_GridComp object | |
rc | return code | |
gcomp | ESMF_GridComp object | |
[out] | rc | return code |
Definition at line 1569 of file mom_cap.F90.
References cesm_coupled, export_slice, mom_ocean_model_nuopc::get_ocean_grid(), import_slice, mom_error_handler::is_root_pe(), logunit, mom_cap_methods::mom_export(), mom_cap_methods::mom_import(), overwrite_timeslice, profile_memory, runtype, shr_file_setlogunit(), and write_diagnostics.
Referenced by setservices().
|
private |
Definition at line 1879 of file mom_cap.F90.
References mom_cap_time::alarminit().
Referenced by setservices().
|
private |
Realize the import and export fields using either a grid or a mesh.
[in,out] | state | ESMF_State object for import/export fields. |
[in] | nfields | Number of fields. |
[in,out] | field_defs | Structure with field's information. |
[in] | tag | Import or export. |
[in] | grid | ESMF grid. |
[in] | mesh | ESMF mesh. |
[in,out] | rc | Return code. |
Definition at line 2139 of file mom_cap.F90.
References scalar_field_name, and setscalarfield().
Referenced by initializerealize().
|
private |
Called by NUOPC at the end of the run to clean up.
gcomp | an ESMF_GridComp object | |
rc | return code | |
gcomp | ESMF_GridComp object | |
[out] | rc | return code |
Definition at line 2046 of file mom_cap.F90.
References cesm_coupled.
Referenced by setservices().
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.
gcomp | an ESMF_GridComp object | |
rc | return code | |
gcomp | an ESMF_GridComp object | |
[out] | rc | return code |
Definition at line 155 of file mom_cap.F90.
References datainitialize(), initializeadvertise(), initializep0(), initializerealize(), modeladvance(), modelsetrunclock(), and ocean_model_finalize().
|
private |
Definition at line 2330 of file mom_cap.F90.
|
private |
Definition at line 2324 of file mom_cap.F90.
Referenced by initializerealize(), and modeladvance().
|
private |
Set scalar data from state for a particula name.
[in,out] | rc | return code |
Definition at line 2102 of file mom_cap.F90.
References u_file_u.
Referenced by initializerealize().
|
private |
Definition at line 142 of file mom_cap.F90.
Referenced by initializeadvertise(), modeladvance(), and ocean_model_finalize().
|
private |
Definition at line 121 of file mom_cap.F90.
Referenced by initializerealize().
|
private |
Definition at line 123 of file mom_cap.F90.
Referenced by modeladvance().
|
private |
Definition at line 119 of file mom_cap.F90.
Referenced by initializeadvertise(), and initializerealize().
|
private |
Definition at line 118 of file mom_cap.F90.
Referenced by initializeadvertise(), and initializerealize().
|
private |
Definition at line 115 of file mom_cap.F90.
Referenced by fld_list_add().
|
private |
Definition at line 117 of file mom_cap.F90.
Referenced by initializeadvertise(), and initializerealize().
|
private |
Definition at line 116 of file mom_cap.F90.
Referenced by initializeadvertise(), and initializerealize().
|
private |
Definition at line 143 of file mom_cap.F90.
Referenced by initializerealize().
|
private |
Definition at line 130 of file mom_cap.F90.
Referenced by initializep0(), and initializerealize().
|
private |
Definition at line 122 of file mom_cap.F90.
Referenced by datainitialize(), and modeladvance().
|
private |
stdout logging unit number
Definition at line 128 of file mom_cap.F90.
Referenced by initializeadvertise(), initializerealize(), and modeladvance().
|
private |
Definition at line 126 of file mom_cap.F90.
Referenced by datainitialize(), initializep0(), and modeladvance().
|
private |
Definition at line 129 of file mom_cap.F90.
Referenced by initializep0(), and modeladvance().
|
private |
run type
Definition at line 127 of file mom_cap.F90.
Referenced by initializeadvertise(), and modeladvance().
|
private |
Definition at line 132 of file mom_cap.F90.
Referenced by initializep0(), initializerealize(), and setscalarfield().
|
private |
Definition at line 133 of file mom_cap.F90.
Referenced by initializep0(), and initializerealize().
|
private |
Definition at line 134 of file mom_cap.F90.
Referenced by initializep0(), and initializerealize().
|
private |
Definition at line 131 of file mom_cap.F90.
Referenced by initializeadvertise(), initializep0(), initializerealize(), mom_realizefields(), and setscalarfield().
|
private |
Definition at line 124 of file mom_cap.F90.
Referenced by initializerealize().
|
private |
Definition at line 135 of file mom_cap.F90.
Referenced by state_setscalar().
|
private |
Definition at line 125 of file mom_cap.F90.
Referenced by datainitialize(), initializep0(), and modeladvance().