com_cpl module reference¶
Common MPI initialization and communication routines and data.
Data Types¶
A derived type used to hold information associated with a variable that is passed via MPI at run time. |
|
A derived type used to hold details of a data transfer between two component modules, sent through the coupler. |
|
Hold information about the type of remapping that should be done for a particular variable. |
|
Specifies the properties of a ‘field’. |
Functions/Subroutines¶
initialize common coupler parameters |
|
Convert all upper case A-Z characters in the input string to lower case This function is also in the strings module but is included here to minimize dependencies for this module. |
|
Convert all lower case a-z characters in the input string to upper case This function is also in the strings module but is included here to minimize dependencies for this module. |
|
Determine the number of overlap longitudes given the x and y grid dimension (nx,ny) sizes as well as the total size of the transfer (sz) |
|
Calculate the x and y indicies of a 2D array in column-major order using nx …the size of the first dimension of the 2D array addr …the index in a 1D array corresponding with the sequential layout in memory of the 2D array. |
|
Return a string with min,max,avg (and possibly other stats) for a subset of an array. |
|
Return a string with min,max,avg (and possibly other stats) over the entire array. |
|
Print min, max, and avg of an entire array to standard out. |
|
Print min, max, and avg over a subset of an array to standard out. |
|
Identify non-transfer events by their name. |
|
Reset the group ID for certain variable names that must always belong to a particular group. |
|
Copy data between 2 |
|
Print data from an |
|
Copy data between 2 |
|
Print data from a |
|
Define the list of all fields that may be coupled. |
|
Add an new entry to cpl_var_list. |
|
Determine if a given variable name exists in cpl_var_list. |
|
Find a tag value that is not currently used in cpl_var_list. |
|
Define a |
|
Add fields to the event list that are sent coupler to NEMO. |
|
Add fields to the event list that are sent coupler to AGCM. |
|
Add fields to the event list that are sent NEMO to coupler. |
|
Add fields to the event list that are sent AGCM to coupler. |
|
Initialize the default event list. |
|
Determine if a given name is to be coupled (ie is on the event stack) |
|
Return a |
Detailed Description¶
Common MPI initialization and communication routines and data.
Type Documentation¶
-
type
com_cpl/cpl_vinfo_t¶ A derived type used to hold information associated with a variable that is passed via MPI at run time.
- Type fields
%name[character(len=32),private] :: A unique name used to identify this record.%grid[character(len=128),private] :: A string to identify the horizontal grid associated with this variable.%tag[integer(kind= impi ),private] :: Integer tag used in mpi calls (tags must be unique for all records)%size[integer,private] :: The number of words passed during each MPI send or receive The size is defined in terms of nlon, nlat and olap as follows size == (nlon+olap) * nlat.%nlon[integer,private] :: The number of longitudes in the associated grid This will NOT include any overlap (cyclic) longitude.%nlat[integer,private] :: The number of latitudes in the associated grid.%olap[integer,private] :: The number of overlapping longitudes.%ncopy[integer,private] :: The number of instances of this field to be passed sequentially.%freq[integer,private] :: The coupling frequency in seconds.%ccc_name[character(len=4),private] :: The 4 character CCCma variable name (ie ibuf3 as char)%regrid[type( regrid_info_t ),private] :: Infomation about regridding this variable.
-
type
com_cpl/event_t¶ A derived type used to hold details of a data transfer between two component modules, sent through the coupler.
- Type fields
%get_model[character(32),private]%put_model[character(32),private]%get_var[character(32),private]%put_var[character(32),private]%regrid_method[character(32),private]%regrid_norm_opt[character(32),private]%action[character(64),private]%freq[integer,private]%tag[integer,private]%ncopy[integer,private]%get_master[integer,private]%put_master[integer,private]%regrid_id[integer,private]%alarm_index[integer,private]%is_msg[logical,private]
-
type
com_cpl/regrid_info_t¶ Hold information about the type of remapping that should be done for a particular variable.
- Type fields
%method[character(64),private] :: The type of interpolation to be done Possible values are: cv, conservative bl, bilinear bc, bicubic nn, distwgt.%norm_opt[character(64),private] :: The type of normalization to be done for a conservative remap Possible values are (case insensitive): fracArea destArea.%masked[logical,private] :: Logical flag to indicate whether or not land/ocean masks supplied in the grid description file will be used during the creation of interpolation weights and associated map info masked = T means mask found in the grid desc file will be used masked = F means mask will not be used (ie all grid points will participate in the weights calculation)
-
type
com_cpl/uniq_names_t¶ Specifies the properties of a ‘field’.
- Type fields
%name[character(32),private]%grid[character(128),private]
Function/Subroutine Documentation¶
-
subroutine
com_cpl/init_common_coupler_parameters()¶ initialize common coupler parameters
- Call to
a_flnda_maskerr_exitnlat_anlat_canomnlat_inlat_onlon_anlon_a_with_olapnlon_canomnlon_inlon_onlon_o_with_olapolap_aolap_canomolap_iolap_osize_atm_gridsize_canom_gridsize_ice_gridsize_ocn_grid- Called from
cpl_initcpl_main
-
subroutine
com_cpl/err_exit(name, n)¶ - Call to
model_group_comm- Called from
add_cpl_varadd_events_agcm_to_cpladd_events_cpl_to_agcmadd_events_cpl_to_nemoadd_events_nemo_to_cplcpl_var_new_tagdefine_cpl_var_by_namedefine_cpl_var_listfind_cpl_vinfoinit_common_coupler_parametersinit_events_part1is_coupledlowercprint_var_stats_data_nwrdsupperc
-
function
com_cpl/lowerc(strng) [)]¶ Convert all upper case A-Z characters in the input string to lower case This function is also in the strings module but is included here to minimize dependencies for this module.
-
function
com_cpl/upperc(strng) [)]¶ Convert all lower case a-z characters in the input string to upper case This function is also in the strings module but is included here to minimize dependencies for this module.
- Call to
-
function
com_cpl/overlap(nx, ny, sz) [integer]¶ Determine the number of overlap longitudes given the x and y grid dimension (nx,ny) sizes as well as the total size of the transfer (sz)
-
subroutine
com_cpl/idx2d_from_1d(ix, iy, addr, nx)¶ Calculate the x and y indicies of a 2D array in column-major order using nx …the size of the first dimension of the 2D array addr …the index in a 1D array corresponding with the sequential layout in memory of the 2D array.
- Called from
-
function
com_cpl/sprint_var_stats_data_nwrds(var_data, nwrds, name, pfx) [character(512)]¶ Return a string with min,max,avg (and possibly other stats) for a subset of an array.
- Parameters
var_data :: Variable data to operate on
nwrds :: Number of elements to operate over
name :: The name of the variable
pfx :: String to prefix the output
- Return
undefined :: Output string with statistics
- Call to
-
function
com_cpl/sprint_var_stats_data(var_data, name, pfx) [character(512)]¶ Return a string with min,max,avg (and possibly other stats) over the entire array.
- Parameters
var_data :: Variable data to operate on
name :: The name of the variable
pfx :: String to prefix the output
- Return
undefined :: Output string with statistics
- Call to
-
subroutine
com_cpl/print_var_stats_data(var_data, name, pfx, gavg)¶ Print min, max, and avg of an entire array to standard out.
- Call to
-
subroutine
com_cpl/print_var_stats_data_nwrds(var_data, nwrds, name, pfx, gavg, str_out)¶ Print min, max, and avg over a subset of an array to standard out.
- Call to
err_exitfillvaluefind_cpl_vinfoidx2d_from_1d- Called from
print_var_stats_datasprint_var_stats_datasprint_var_stats_data_nwrds
-
function
com_cpl/is_special_op(name) [logical]¶ Identify non-transfer events by their name.
- Called from
-
function
com_cpl/filter_group_id(name, gid_in) [integer]¶ Reset the group ID for certain variable names that must always belong to a particular group.
- Call to
atm_forcing_from_fileatm_gid- Called from
cpl_mainhistory::history_initfield_ops::prepare_agcm_fieldsfield_ops::prepare_nemo_fieldsatm_f_data::read_atm_forcing_datarestart::restart_initfield_ops::special_ops
-
subroutine
com_cpl/print_event_t(event)¶ Print data from an
event_t()data type. data type.- Called from
-
subroutine
com_cpl/copy_cpl_vinfo_t(from, to)¶ Copy data between 2
cpl_vinfo_t()data types. data types.- Called from
-
subroutine
com_cpl/print_cpl_vinfo_t(vinfo)¶ Print data from a
cpl_vinfo_t()data type. data type.- Called from
-
subroutine
com_cpl/define_cpl_var_list()¶ Define the list of all fields that may be coupled.
- Call to
copy_cpl_vinfo_tcpl_var_listdefault_regriderr_exitnlat_anlat_canomnlat_inlat_onlon_anlon_canomnlon_inlon_oolap_aolap_canomolap_iolap_osize_atm_gridsize_canom_gridsize_char_msgsize_ice_gridsize_ocn_grid- Called from
-
subroutine
com_cpl/add_cpl_var(new_var, exists)¶ Add an new entry to cpl_var_list.
- Parameters
new_var :: [in] The new variable to be added; must be completely defined by the user
exists :: [in] Provides the user control over whether the existing variable info is used (exists=0), overwritten with info supplied by the user (exists=1) or the program aborts when there is a name conflict (exists=2)
- Call to
copy_cpl_vinfo_tcpl_var_listerr_exitprint_cpl_vinfo_t- Called from
add_events_agcm_to_cplregrid_mod::create_fractional_land_maskdefine_cpl_var_by_nameccc_esmf::define_regridhistory::history_openhistory::register_hist_varregridregrid_mod::test_grid
-
function
com_cpl/cpl_var_name_exists(name) [logical]¶ Determine if a given variable name exists in cpl_var_list.
- Call to
cpl_var_list- Called from
add_events_agcm_to_cplhistory::history_get_field_datafield_ops::prepare_nemo_fields
-
function
com_cpl/cpl_var_new_tag(start_tag) [integer]¶ Find a tag value that is not currently used in cpl_var_list.
- Call to
cpl_var_listerr_exit- Called from
add_events_agcm_to_cplregrid_mod::create_fractional_land_maskdefine_cpl_var_by_nameccc_esmf::define_regridhistory::history_openhistory::register_hist_varregridregrid_mod::test_grid
-
subroutine
com_cpl/define_cpl_var_by_name(name, grid)¶ Define a
cpl_vinfo_t()variable on a particular grid given the name of the field and the name of the grid. variable on a particular grid given the name of the field and the name of the grid.- Parameters
name :: [in] Name of the field
grid :: [in] Name of the grid associated with the field
- Call to
add_cpl_varcpl_var_new_tagerr_exitnlat_anlat_onlon_anlon_oolap_aolap_o- Called from
history::history_get_field_datafield_ops::prepare_nemo_fields
-
subroutine
com_cpl/add_events_cpl_to_nemo(nrec, tmp_event)¶ Add fields to the event list that are sent coupler to NEMO.
- Parameters
nrec :: nrec is the current number of variables defined in tmp_event
tmp_event :: The event list to be appended with cpl_to_nemo variables
- Call to
copy_event_tcpl_ocn_freqerr_exitnemo_n_recv_varnemo_recv_var- Called from
-
subroutine
com_cpl/add_events_cpl_to_agcm(nrec, tmp_event)¶ Add fields to the event list that are sent coupler to AGCM.
- Parameters
nrec :: nrec is the current number of variables defined in tmp_event
tmp_event :: The event list to be appended with cpl_to_agcm variables
- Call to
atm_n_recv_varatm_recv_varcopy_event_tcpl_atm_freqerr_exit- Called from
-
subroutine
com_cpl/add_events_nemo_to_cpl(nrec, tmp_event)¶ Add fields to the event list that are sent NEMO to coupler.
- Parameters
nrec :: The current number of variables defined in tmp_event
tmp_event :: The event list to be appended with nemo to cpl variables
- Call to
copy_event_tcpl_ocn_freqerr_exitnemo_n_send_varnemo_send_var- Called from
-
subroutine
com_cpl/add_events_agcm_to_cpl(nrec, tmp_event)¶ Add fields to the event list that are sent AGCM to coupler.
- Parameters
nrec :: nrec is the current number of variables defined in tmp_event
tmp_event :: The event list to be appended with agcm to cpl variables
- Call to
add_cpl_varatm_n_send_varatm_send_varcopy_event_tcpl_atm_freqcpl_var_name_existscpl_var_new_tagerr_exitnlat_anlon_aolap_asize_atm_grid- Called from
-
subroutine
com_cpl/init_events_part1()¶ Initialize the default event list.
- Call to
add_events_agcm_to_cpladd_events_cpl_to_agcmadd_events_cpl_to_nemoadd_events_nemo_to_cplatm_mastercopy_event_tcouple_serialcoupler_parallel_typecpl_mastercpl_var_listerr_exiteventfind_cpl_vinfoneventsocn_masterprint_event_t- Called from
-
function
com_cpl/is_coupled(name) [logical]¶ Determine if a given name is to be coupled (ie is on the event stack)
- Parameters
name :: [in] The name of the variable (this name must be known to the coupler)
- Call to
err_exiteventnevents
-
function
com_cpl/find_cpl_vinfo(name, tag, list_index, status) [type(cpl_vinfo_t)]¶ Return a
cpl_vinfo_t()record from cpl_var_list that matches either the “name” or the “tag” element. record from cpl_var_list that matches either the “name” or the “tag” element.- Call to
atm_cv_lmaskatm_deltatm_earth_radiusatm_flandatm_forcing_from_fileatm_grid_cell_areaatm_gwtatm_kfinalatm_kountatm_kstartatm_kstepsatm_latatm_lmaskatm_lonatm_masteratm_n_recv_varatm_n_send_varatm_nlatatm_nlonatm_recv_varatm_send_varcom_mpi_initializedcopy_cpl_vinfo_tcouple_serialcoupler_parallel_typecpl_atm_freqcpl_build_commit_idcpl_build_repo_pathcpl_mastercpl_ocn_freqcpl_runtime_commitcpl_runtime_repo_pathcpl_time_stringcpl_var_listcurr_real_typecurr_taskdefine_cpl_var_listerr_exiteventgroup_infoice_mastermpi_types_mod::id_atmospherempi_types_mod::id_couplermpi_types_mod::id_oceanierrinit_events_part1lowercmodel_group_commmy_groupnbufnemo_build_cancpl_commitnemo_build_cancpl_repo_pathnemo_commitnemo_confignemo_e1fnemo_e1tnemo_e1unemo_e1vnemo_e2fnemo_e2tnemo_e2unemo_e2vnemo_fmasknemo_glamfnemo_glamtnemo_glamunemo_glamvnemo_gphifnemo_gphitnemo_gphiunemo_gphivnemo_jpiglonemo_jpjglonemo_n_recv_varnemo_n_send_varnemo_namsbc_cpl_cldesnemo_ncatnemo_nn_date0nemo_nn_fsbcnemo_nn_icenemo_nn_it000nemo_nn_itendnemo_recv_varnemo_repo_pathnemo_rn_rdtnemo_runtime_commitnemo_runtime_confignemo_runtime_repo_pathnemo_send_varnemo_tmasknemo_umasknemo_vmaskneventsnlat_anlat_onlon_anlon_oocn_masterolap_a- Called from
cpl_maindata_atmdata_iceccc_esmf::define_eventsinit_events_part1print_var_stats_data_nwrdshistory::register_hist_varccc_esmf::regrid_field_cvccc_esmf::regrid_fieldbynameccc_esmf::store2arraystore::store_addstoragestore::store_appendrecord_datastore::store_appendrecord_data_and_ibufstore::store_initstorage