FMS
2024.03
Flexible Modeling System
|
diag_manager_mod is a set of simple calls for parallel diagnostics on distributed systems. It is geared toward the writing of data in netCDF format. See Diag Manager for diag table information. More...
Files | |
file | diag_manager.F90 |
File for diag_manager_mod. | |
Data Types | |
interface | diag_field_add_attribute |
Add a attribute to the output field. More... | |
interface | register_diag_field |
Register a diagnostic field for a given module. More... | |
interface | send_data |
Send data over to output fields. More... | |
interface | send_tile_averaged_data |
Send tile-averaged data over to output fields. More... | |
Functions/Subroutines | |
subroutine | add_associated_files (file_num, cm_file_num, cm_ind) |
Add to the associated files attribute. More... | |
subroutine | average_tiles (diag_field_id, x, area, mask, out) |
Calculates tile average of a field. More... | |
subroutine | average_tiles1d (diag_field_id, x, area, mask, out) |
Calculates average for a field with the given area and land mask. More... | |
subroutine | closing_file (file, time) |
Replaces diag_manager_end; close just one file: files(file) | |
subroutine | copy_3d_to_4d (data_in, data_out, field_name) |
Copies a 3d buffer to a 4d buffer. More... | |
subroutine | diag_field_add_attribute_i1d (diag_field_id, att_name, att_value) |
Add an integer 1D array attribute to the diag field corresponding to a given id. More... | |
subroutine | diag_field_add_attribute_r1d (diag_field_id, att_name, att_value) |
Add a real 1D array attribute to the diag field corresponding to a given id. More... | |
subroutine | diag_field_add_attribute_scalar_c (diag_field_id, att_name, att_value) |
Add a scalar character attribute to the diag field corresponding to a given id. More... | |
subroutine | diag_field_add_attribute_scalar_i (diag_field_id, att_name, att_value) |
Add a scalar integer attribute to the diag field corresponding to a given id. More... | |
subroutine | diag_field_add_attribute_scalar_r (diag_field_id, att_name, att_value) |
Add a scalar real attribute to the diag field corresponding to a given id. More... | |
subroutine, public | diag_field_add_cell_measures (diag_field_id, area, volume) |
Add the cell_measures attribute to a diag out field. More... | |
subroutine | diag_field_attribute_init (diag_field_id, name, type, cval, ival, rval) |
subroutine, public | diag_manager_end (time) |
Flushes diagnostic buffers where necessary. Close diagnostics files. A warning will be issued here if a field in diag_table is not registered. | |
subroutine, public | diag_manager_init (diag_model_subset, time_init, err_msg) |
Initialize Diagnostics Manager. More... | |
subroutine, public | diag_manager_set_time_end (Time_end_in) |
subroutine, public | diag_send_complete (time_step, err_msg) |
Saves diagnostic data for the given time value. | |
subroutine, public | diag_send_complete_instant (time) |
The subroutine 'diag_send_complete_instant' allows the user to save diagnostic data on variable intervals (user defined in code logic) to the same file. The argument (time_type) will be written to the time axis correspondingly. More... | |
logical function | diag_send_data (diag_field_id, field, time, is_in, js_in, ks_in, mask, rmask, ie_in, je_in, ke_in, weight, err_msg) |
subroutine, public | get_base_date (year, month, day, hour, minute, second) |
Return base date for diagnostics. More... | |
integer function, public | get_diag_field_id (module_name, field_name) |
Return the diagnostic field ID of a given variable. More... | |
logical function | get_related_field (field, rel_field, out_field_id, out_file_id) |
Finds the corresponding related output field and file for a given input field. More... | |
integer function | init_diurnal_axis (n_samples) |
Finds or initializes a diurnal time axis and returns its' ID. More... | |
subroutine | init_field_cell_measures (output_field, area, volume, err_msg) |
If needed, add cell_measures and associated_file attribute to out field/file. More... | |
logical function, public | need_data (diag_field_id, next_model_time) |
Determine whether data is needed for the current model time step. More... | |
integer function | register_diag_field_array (module_name, field_name, axes, init_time, long_name, units, missing_value, range, mask_variant, standard_name, verbose, do_not_log, err_msg, interp_method, tile_count, area, volume, realm, multiple_send_data) |
Registers an array field. More... | |
integer function | register_diag_field_array_old (module_name, field_name, axes, init_time, long_name, units, missing_value, range, mask_variant, standard_name, verbose, do_not_log, err_msg, interp_method, tile_count, area, volume, realm) |
Registers an array field. More... | |
integer function | register_diag_field_scalar (module_name, field_name, init_time, long_name, units, missing_value, range, standard_name, do_not_log, err_msg, area, volume, realm, multiple_send_data) |
Registers a scalar field. More... | |
integer function | register_diag_field_scalar_old (module_name, field_name, init_time, long_name, units, missing_value, range, standard_name, do_not_log, err_msg, area, volume, realm) |
Registers a scalar field. More... | |
integer function, public | register_static_field (module_name, field_name, axes, long_name, units, missing_value, range, mask_variant, standard_name, DYNAMIC, do_not_log, interp_method, tile_count, area, volume, realm) |
Return field index for subsequent call to send_data. More... | |
integer function | register_static_field_old (module_name, field_name, axes, long_name, units, missing_value, range, mask_variant, standard_name, DYNAMIC, do_not_log, interp_method, tile_count, area, volume, realm) |
Return field index for subsequent call to send_data. More... | |
logical function | send_data_0d (diag_field_id, field, time, err_msg) |
logical function | send_data_1d (diag_field_id, field, time, is_in, mask, rmask, ie_in, weight, err_msg) |
logical function | send_data_2d (diag_field_id, field, time, is_in, js_in, mask, rmask, ie_in, je_in, weight, err_msg) |
logical function | send_data_3d (diag_field_id, field, time, is_in, js_in, ks_in, mask, rmask, ie_in, je_in, ke_in, weight, err_msg) |
logical function | send_data_4d (diag_field_id, field, time, is_in, js_in, ks_in, mask, rmask, ie_in, je_in, ke_in, weight, err_msg) |
Updates the output buffer for a field based on the data for current time step. More... | |
logical function | send_tile_averaged_data1d (id, field, area, time, mask) |
logical function | send_tile_averaged_data2d (id, field, area, time, mask) |
logical function | send_tile_averaged_data3d (id, field, area, time, mask) |
integer function | writing_field (out_num, at_diag_end, error_string, time) |
diag_manager_mod is a set of simple calls for parallel diagnostics on distributed systems. It is geared toward the writing of data in netCDF format. See Diag Manager for diag table information.
diag_manager_mod
provides a convenient set of interfaces for writing data to disk. It is built upon the parallel I/O interface of FMS code /shared/mpp/mpp_io.F90
.
A single group of calls to the diag_manager_mod
interfaces provides data to disk at any number of sampling and/or averaging intervals specified at run-time. Run-time specification of diagnostics are input through the diagnostics table.
Use of diag_manager
includes the following steps:
Features of diag_manager_mod
:
register_diag_field
fails due to misspelled module name or field name. null
. debug_diag_manager=.true.
in diag_manager namelist, then the the content of diag_table is printed in stdout. New optional format of file information in diag_table_mod. It is possible to have just one file name and reuse it many times. A time string will be appended to the base file name each time a new file is opened. The time string can be any combination from year to second of current model time.
Here is an example file line:
"file2_yr_dy%1yr%3dy",2,"hours",1,"hours","Time", 10, "days", "1 1 7 0 0 0", 6, "hours"
From left to right we have:
The 'file duration', if absent, will be equal to frequency for creating a new file.
Thus, the above means: create a new file every 10 days, each file will last 6 hours from creation time, no files will be created before time "1 1 7 0 0 0".
In this example the string 10, "days", "1 1 7 0 0 0", 6, "hours"
is optional.
Keywords for the time string suffix is xyr,xmo,xdy,xhr,xmi,xsc
where x
is a mandatory 1 digit number specifying the width of field used in writing the string
New time axis for time averaged fields. Users can use a namelist option to handle the time value written to time axis for time averaged fields.
If mix_snapshot_average_fields=.true.
then a time averaged file will have time values corresponding to ending time_bound e.g. January monthly average is labeled Feb01. Users can have both snapshot and averaged fields in one file.
If mix_snapshot_average_fields=.false.
The time value written to time axis for time averaged fields is the middle on the averaging time. For example, January monthly mean will be written at Jan 16 not Feb 01 as before. However, to use this new feature users should separate snapshot fields and time averaged fields in different files or a fatal error will occur.
The namelist default value is mix_snapshot_average_fields=.false.
Time average, Root Mean Square, Max and Min, and diurnal. In addition to time average users can also get then Root Mean Square, Max or Min value during the same interval of time as time average. For this purpose, in the diag table users must replace .true.
or .false.
by rms
, max
or min
. Note: Currently, max and min are not available for regional output.
A diurnal average or the average of an integer power can also be requested using diurnal##
or pow##
where ##
are the number of diurnal sections or integer power to average.
standard_name
is added as optional argument in register_diag_field. debug_diag_manager = .true.
array bounds are checked in send_data. interface diag_manager_mod::diag_field_add_attribute |
Add a attribute to the output field.
Definition at line 371 of file diag_manager.F90.
Private Member Functions | |
subroutine | diag_field_add_attribute_i1d (diag_field_id, att_name, att_value) |
Add an integer 1D array attribute to the diag field corresponding to a given id. More... | |
subroutine | diag_field_add_attribute_r1d (diag_field_id, att_name, att_value) |
Add a real 1D array attribute to the diag field corresponding to a given id. More... | |
subroutine | diag_field_add_attribute_scalar_c (diag_field_id, att_name, att_value) |
Add a scalar character attribute to the diag field corresponding to a given id. More... | |
subroutine | diag_field_add_attribute_scalar_i (diag_field_id, att_name, att_value) |
Add a scalar integer attribute to the diag field corresponding to a given id. More... | |
subroutine | diag_field_add_attribute_scalar_r (diag_field_id, att_name, att_value) |
Add a scalar real attribute to the diag field corresponding to a given id. More... | |
|
private |
Add an integer 1D array attribute to the diag field corresponding to a given id.
[in] | diag_field_id | ID number for field to add attribute to |
[in] | att_name | new attribute name |
[in] | att_value | new attribute value |
Definition at line 4552 of file diag_manager.F90.
|
private |
Add a real 1D array attribute to the diag field corresponding to a given id.
[in] | diag_field_id | ID number for field to add attribute to |
[in] | att_name | new attribute name |
[in] | att_value | new attribute value |
Definition at line 4539 of file diag_manager.F90.
|
private |
Add a scalar character attribute to the diag field corresponding to a given id.
[in] | diag_field_id | ID number for field to add attribute to |
[in] | att_name | new attribute name |
[in] | att_value | new attribute value |
Definition at line 4526 of file diag_manager.F90.
|
private |
Add a scalar integer attribute to the diag field corresponding to a given id.
[in] | diag_field_id | ID number for field to add attribute to |
[in] | att_name | new attribute name |
[in] | att_value | new attribute value |
Definition at line 4513 of file diag_manager.F90.
|
private |
Add a scalar real attribute to the diag field corresponding to a given id.
[in] | diag_field_id | ID number for field to add attribute to |
[in] | att_name | new attribute name |
[in] | att_value | new attribute value |
Definition at line 4500 of file diag_manager.F90.
interface diag_manager_mod::register_diag_field |
Register a diagnostic field for a given module.
Definition at line 356 of file diag_manager.F90.
Private Member Functions | |
integer function | register_diag_field_array (module_name, field_name, axes, init_time, long_name, units, missing_value, range, mask_variant, standard_name, verbose, do_not_log, err_msg, interp_method, tile_count, area, volume, realm, multiple_send_data) |
Registers an array field. More... | |
integer function | register_diag_field_scalar (module_name, field_name, init_time, long_name, units, missing_value, range, standard_name, do_not_log, err_msg, area, volume, realm, multiple_send_data) |
Registers a scalar field. More... | |
|
private |
Registers an array field.
[in] | module_name | Module where the field comes from |
[in] | field_name | Name of the field |
[in] | axes | Ids corresponding to the variable axis |
[in] | init_time | Time to start writing data from |
[in] | long_name | Long_name to add as a variable attribute |
[in] | units | Units to add as a variable_attribute |
[in] | missing_value | Missing value to add as a variable attribute |
[in] | range | Range to add a variable attribute |
[in] | mask_variant | .True. if the mask changes over time |
[in] | standard_name | Standard_name to name the variable in the file |
[in] | verbose | Print more information |
[in] | do_not_log | If TRUE, field information is not logged |
[out] | err_msg | Error_msg from call |
[in] | interp_method | The interp method to be used when regridding the field in post-processing. Valid options are "conserve_order1", "conserve_order2", and "none". |
[in] | tile_count | The current tile number |
[in] | area | Id of the area field |
[in] | volume | Id of the volume field |
[in] | realm | String to set as the modeling_realm attribute |
[in] | multiple_send_data | .True. if send data is called, multiple times for the same time |
Definition at line 435 of file diag_manager.F90.
|
private |
Registers a scalar field.
[in] | module_name | Module where the field comes from |
[in] | field_name | Name of the field |
[in] | init_time | Time to start writing data from |
[in] | long_name | Long_name to add as a variable attribute |
[in] | units | Units to add as a variable_attribute |
[in] | standard_name | Standard_name to name the variable in the file |
[in] | missing_value | Missing value to add as a variable attribute |
[in] | range | Range to add a variable attribute |
[in] | do_not_log | If TRUE, field information is not logged |
[out] | err_msg | Error_msg from call |
[in] | area | Id of the area field |
[in] | volume | Id of the volume field |
[in] | realm | String to set as the modeling_realm attribute |
[in] | multiple_send_data | .True. if send data is called, multiple times for the same time |
Definition at line 385 of file diag_manager.F90.
interface diag_manager_mod::send_data |
Send data over to output fields.
send_data
is overloaded for fields having zero dimension (scalars) to 3 dimension. diag_field_id
corresponds to the id returned from a previous call to register_diag_field
. The field array is restricted to the computational range of the array. Optional argument is_in
can be used to update sub-arrays of the entire field. Additionally, an optional logical or real mask can be used to apply missing values to the array.
If a field is declared to be mask_variant
in register_diag_field
logical mask should be mandatory.
For the real mask, the mask is applied if the mask value is less than 0.5.
By default, a field will be written out entirely in its global grid. Users can also specify regions in which the field will be output. The region is specified in diag-table just before the end of output_field replacing "none".
For example, by default:
"ocean_mod","Vorticity","vorticity","file1","all",.false.,"none",2
for regional output:
"ocean_mod","Vorticity","vorticity_local","file2","all",.false.,"0.5 53.5 -89.5 -28.5 -1 -1",2
The format of a region is "<TT>xbegin xend ybegin yend zbegin zend</TT>". If it is a 2D field use (-1 -1) for (zbegin zend) as in the example above. For a 3D field use (-1 -1) for (zbegin zend) when you want to write the entire vertical extent, otherwise specify real coordinates. The units used for region are the actual units used in grid_spec.nc (for example degrees for lat, lon). NOTE: A FATAL error will occur if the region's boundaries are not found in grid_spec.nc.
Regional output on the cubed sphere grid is also supported. To use regional output on the cubed sphere grid, first the grid information needs to be sent to diag_manager_mod
using the diag_grid::diag_grid_init subroutine.
Time averaging is supported in regional output.
Physical fields (written in "physics windows" of atmospheric code) are fully supported for regional outputs.
NOTE: Most fields are defined in the data domain but use the compute domain. In send_data
the field can be passed in either the data domain or in the compute domain. If the data domain is used, the start and end indicies of the compute domain (isc, iec, . . .) should be passed. If the compute domain is used no indices are needed. The indices are for determining halo exclusively. If users want to output the field partially they should use regional output as mentioned above.
Weight in Time averaging is now supported, each time level may have a different weight. The default of weight is 1.
Definition at line 346 of file diag_manager.F90.
Private Member Functions | |
logical function | send_data_0d (diag_field_id, field, time, err_msg) |
logical function | send_data_1d (diag_field_id, field, time, is_in, mask, rmask, ie_in, weight, err_msg) |
logical function | send_data_2d (diag_field_id, field, time, is_in, js_in, mask, rmask, ie_in, je_in, weight, err_msg) |
logical function | send_data_3d (diag_field_id, field, time, is_in, js_in, ks_in, mask, rmask, ie_in, je_in, ke_in, weight, err_msg) |
logical function | send_data_4d (diag_field_id, field, time, is_in, js_in, ks_in, mask, rmask, ie_in, je_in, ke_in, weight, err_msg) |
Updates the output buffer for a field based on the data for current time step. More... | |
|
private |
Definition at line 1458 of file diag_manager.F90.
|
private |
Definition at line 1501 of file diag_manager.F90.
|
private |
Definition at line 1584 of file diag_manager.F90.
|
private |
Definition at line 1658 of file diag_manager.F90.
|
private |
Updates the output buffer for a field based on the data for current time step.
[in] | diag_field_id | The field id returned from the register call |
[in] | field | The field data for the current time step |
[in] | weight | The weight to multiply the data by when averaging |
[in] | time | The current model time |
[in] | is_in | Starting i index of the data |
[in] | js_in | Starting j index of the data |
[in] | ks_in | Starting k index of the data |
[in] | ie_in | Ending i index of the data |
[in] | je_in | Ending j index of the data |
[in] | ke_in | Ending k index of the data |
[in] | mask | Logical mask indicating the points to not average |
[in] | rmask | Real mask indicating the points to not averafe |
[out] | err_msg | If some errors occurs, send_data will return the error message instead of crashing |
Definition at line 3488 of file diag_manager.F90.
interface diag_manager_mod::send_tile_averaged_data |
Send tile-averaged data over to output fields.
Definition at line 363 of file diag_manager.F90.
Private Member Functions | |
logical function | send_tile_averaged_data1d (id, field, area, time, mask) |
logical function | send_tile_averaged_data2d (id, field, area, time, mask) |
logical function | send_tile_averaged_data3d (id, field, area, time, mask) |
|
private |
[in] | id | id od the diagnostic field |
[in] | field | field to average and send |
[in] | area | area of tiles (== averaging weights), arbitrary units |
[in] | time | current time |
[in] | mask | land mask |
Definition at line 3538 of file diag_manager.F90.
|
private |
[in] | id | id od the diagnostic field |
[in] | field | field to average and send |
[in] | area | area of tiles (== averaging weights), arbitrary units |
[in] | time | current time |
[in] | mask | land mask |
Definition at line 3605 of file diag_manager.F90.
|
private |
[in] | id | id of the diagnostic field |
[in] | field | (lon, lat, tile, lev) field to average and send |
[in] | area | (lon, lat, tile) tile areas ( == averaging weights), arbitrary units |
[in] | time | current time |
[in] | mask | (lon, lat, tile) land mask |
Definition at line 3625 of file diag_manager.F90.
|
private |
Add to the associated files attribute.
FATAL,Length of asso_file_name is not long enough to hold the associated file name. | The length of character array asso_file_name is not long enough to hold the full file name of the associated_file. Please contact the developer to increase the length of the variable. |
[in] | file_num | File number that needs the associated_files attribute |
[in] | cm_file_num | file number that contains the associated field |
[in] | cm_ind | index of the output_field in the associated file |
Definition at line 1410 of file diag_manager.F90.
|
private |
Calculates tile average of a field.
[in] | x | (lon, lat, tile) field to average |
[in] | area | (lon, lat, tile) fractional area |
[in] | mask | (lon, lat, tile) land mask |
[out] | out | (lon, lat) result of averaging |
Definition at line 3656 of file diag_manager.F90.
|
private |
Calculates average for a field with the given area and land mask.
[in] | x | (ug_index, tile) field to average |
[in] | area | (ug_index, tile) fractional area |
[in] | mask | (ug_index, tile) land mask |
[out] | out | (ug_index) result of averaging |
Definition at line 3558 of file diag_manager.F90.
|
private |
Copies a 3d buffer to a 4d buffer.
[in] | data_in | Data to copy |
[in] | field_name | Name of the field copying (for error messages) |
[out] | data_out | 4D version of the data |
Definition at line 4595 of file diag_manager.F90.
|
private |
Add an integer 1D array attribute to the diag field corresponding to a given id.
[in] | diag_field_id | ID number for field to add attribute to |
[in] | att_name | new attribute name |
[in] | att_value | new attribute value |
Definition at line 4552 of file diag_manager.F90.
|
private |
Add a real 1D array attribute to the diag field corresponding to a given id.
[in] | diag_field_id | ID number for field to add attribute to |
[in] | att_name | new attribute name |
[in] | att_value | new attribute value |
Definition at line 4539 of file diag_manager.F90.
|
private |
Add a scalar character attribute to the diag field corresponding to a given id.
[in] | diag_field_id | ID number for field to add attribute to |
[in] | att_name | new attribute name |
[in] | att_value | new attribute value |
Definition at line 4526 of file diag_manager.F90.
|
private |
Add a scalar integer attribute to the diag field corresponding to a given id.
[in] | diag_field_id | ID number for field to add attribute to |
[in] | att_name | new attribute name |
[in] | att_value | new attribute value |
Definition at line 4513 of file diag_manager.F90.
|
private |
Add a scalar real attribute to the diag field corresponding to a given id.
[in] | diag_field_id | ID number for field to add attribute to |
[in] | att_name | new attribute name |
[in] | att_value | new attribute value |
Definition at line 4500 of file diag_manager.F90.
subroutine, public diag_manager_mod::diag_field_add_cell_measures | ( | integer, intent(in) | diag_field_id, |
integer, intent(in), optional | area, | ||
integer, intent(in), optional | volume | ||
) |
Add the cell_measures attribute to a diag out field.
Add the cell_measures attribute to a give diag field. This is useful if the area/volume fields for the diagnostic field are defined in another module after the diag_field.
[in] | area | diag ids of area |
[in] | volume | diag ids of volume |
Definition at line 4569 of file diag_manager.F90.
|
private |
[in] | diag_field_id | input field ID, obtained from diag_manager_mod::register_diag_field. |
[in] | name | Name of the attribute |
[in] | type | NetCDF type (NF90_FLOAT, NF90_INT, NF90_CHAR) |
[in] | cval | Character string attribute value |
[in] | ival | Integer attribute value(s) |
[in] | rval | Real attribute value(s) |
Definition at line 4336 of file diag_manager.F90.
subroutine, public diag_manager_mod::diag_manager_init | ( | integer, intent(in), optional | diag_model_subset, |
integer, dimension(6), intent(in), optional | time_init, | ||
character(len=*), intent(out), optional | err_msg | ||
) |
Initialize Diagnostics Manager.
Open and read diag_table. Select fields and files for diagnostic output.
[in] | time_init | Model time diag_manager initialized |
Allocate files
Initialize fnum_for_domain with "dn" which stands for done
Definition at line 4067 of file diag_manager.F90.
subroutine, public diag_manager_mod::diag_send_complete_instant | ( | type (time_type), intent(in) | time | ) |
The subroutine 'diag_send_complete_instant' allows the user to save diagnostic data on variable intervals (user defined in code logic) to the same file. The argument (time_type) will be written to the time axis correspondingly.
The user is responsible for any averaging of accumulated data as this routine is not designed for instantaneous values. This routine works only for send_data calls within OpenMP regions as they are buffered until the complete signal is given.
Definition at line 3878 of file diag_manager.F90.
|
private |
Definition at line 1687 of file diag_manager.F90.
subroutine, public diag_manager_mod::get_base_date | ( | integer, intent(out) | year, |
integer, intent(out) | month, | ||
integer, intent(out) | day, | ||
integer, intent(out) | hour, | ||
integer, intent(out) | minute, | ||
integer, intent(out) | second | ||
) |
Return base date for diagnostics.
Return date information for diagnostic reference time.
Definition at line 4245 of file diag_manager.F90.
integer function, public diag_manager_mod::get_diag_field_id | ( | character(len=*), intent(in) | module_name, |
character(len=*), intent(in) | field_name | ||
) |
Return the diagnostic field ID of a given variable.
[in] | module_name | Module name that registered the variable |
[in] | field_name | Variable name |
Definition at line 1256 of file diag_manager.F90.
|
private |
Finds the corresponding related output field and file for a given input field.
[in] | field | input field ID to find the corresponding |
[in] | rel_field | Output field that field must correspond to |
[out] | out_field_id | output_field index of related output field |
[out] | out_file_id | file index of the out_field_id output field |
Definition at line 1274 of file diag_manager.F90.
|
private |
Finds or initializes a diurnal time axis and returns its' ID.
Given number of time intervals in the day, finds or initializes a diurnal time axis and returns its ID. It uses get_base_date, so should be in the file where it's accessible. The units are 'days since BASE_DATE', all diurnal axes belong to the set 'diurnal'
[in] | n_samples | number of intervals during the day |
Definition at line 4292 of file diag_manager.F90.
|
private |
If needed, add cell_measures and associated_file attribute to out field/file.
[in,out] | output_field | Output field that needs the cell_measures |
[in] | area | Field ID for area |
[in] | volume | Field ID for volume |
Definition at line 1334 of file diag_manager.F90.
logical function, public diag_manager_mod::need_data | ( | integer, intent(in) | diag_field_id, |
type(time_type), intent(in) | next_model_time | ||
) |
Determine whether data is needed for the current model time step.
Determine whether data is needed for the current model time step. Since diagnostic data are buffered, the "next" model time is passed instead of the current model time. This call can be used to minimize overhead for complicated diagnostics.
[in] | next_model_time | next_model_time = current model time + model time_step |
Definition at line 4265 of file diag_manager.F90.
|
private |
Registers an array field.
[in] | module_name | Module where the field comes from |
[in] | field_name | Name of the field |
[in] | axes | Ids corresponding to the variable axis |
[in] | init_time | Time to start writing data from |
[in] | long_name | Long_name to add as a variable attribute |
[in] | units | Units to add as a variable_attribute |
[in] | missing_value | Missing value to add as a variable attribute |
[in] | range | Range to add a variable attribute |
[in] | mask_variant | .True. if the mask changes over time |
[in] | standard_name | Standard_name to name the variable in the file |
[in] | verbose | Print more information |
[in] | do_not_log | If TRUE, field information is not logged |
[out] | err_msg | Error_msg from call |
[in] | interp_method | The interp method to be used when regridding the field in post-processing. Valid options are "conserve_order1", "conserve_order2", and "none". |
[in] | tile_count | The current tile number |
[in] | area | Id of the area field |
[in] | volume | Id of the volume field |
[in] | realm | String to set as the modeling_realm attribute |
[in] | multiple_send_data | .True. if send data is called, multiple times for the same time |
Definition at line 435 of file diag_manager.F90.
|
private |
Registers an array field.
[in] | do_not_log | if TRUE, field info is not logged |
[in] | interp_method | The interp method to be used when regridding the field in post-processing. Valid options are "conserve_order1", "conserve_order2", and "none". |
[in] | tile_count | The current tile number |
[in] | area | Id of the area field |
[in] | volume | Id of the volume field |
[in] | realm | String to set as the modeling_realm attribute |
Definition at line 577 of file diag_manager.F90.
|
private |
Registers a scalar field.
[in] | module_name | Module where the field comes from |
[in] | field_name | Name of the field |
[in] | init_time | Time to start writing data from |
[in] | long_name | Long_name to add as a variable attribute |
[in] | units | Units to add as a variable_attribute |
[in] | standard_name | Standard_name to name the variable in the file |
[in] | missing_value | Missing value to add as a variable attribute |
[in] | range | Range to add a variable attribute |
[in] | do_not_log | If TRUE, field information is not logged |
[out] | err_msg | Error_msg from call |
[in] | area | Id of the area field |
[in] | volume | Id of the volume field |
[in] | realm | String to set as the modeling_realm attribute |
[in] | multiple_send_data | .True. if send data is called, multiple times for the same time |
Definition at line 385 of file diag_manager.F90.
|
private |
Registers a scalar field.
[in] | module_name | Module where the field comes from |
[in] | field_name | Name of the field |
[in] | init_time | Time to start writing data from |
[in] | long_name | Long_name to add as a variable attribute |
[in] | units | Units to add as a variable_attribute |
[in] | standard_name | Standard_name to name the variable in the file |
[in] | missing_value | Missing value to add as a variable attribute |
[in] | range | Range to add a variable attribute |
[in] | do_not_log | If TRUE, field information is not logged |
[out] | err_msg | Error_msg from call |
[in] | area | Id of the area field |
[in] | volume | Id of the volume field |
[in] | realm | String to set as the modeling_realm attribute |
Definition at line 544 of file diag_manager.F90.
integer function, public diag_manager_mod::register_static_field | ( | character(len=*), intent(in) | module_name, |
character(len=*), intent(in) | field_name, | ||
integer, dimension(:), intent(in) | axes, | ||
character(len=*), intent(in), optional | long_name, | ||
character(len=*), intent(in), optional | units, | ||
class(*), intent(in), optional | missing_value, | ||
class(*), dimension(:), intent(in), optional | range, | ||
logical, intent(in), optional | mask_variant, | ||
character(len=*), intent(in), optional | standard_name, | ||
logical, intent(in), optional | DYNAMIC, | ||
logical, intent(in), optional | do_not_log, | ||
character(len=*), intent(in), optional | interp_method, | ||
integer, intent(in), optional | tile_count, | ||
integer, intent(in), optional | area, | ||
integer, intent(in), optional | volume, | ||
character(len=*), intent(in), optional | realm | ||
) |
Return field index for subsequent call to send_data.
[in] | module_name | Name of the module, the field is on |
[in] | field_name | Name of the field |
[in] | axes | Axes_id of the field |
[in] | long_name | Longname to be added as a attribute |
[in] | units | Units to be added as a attribute |
[in] | standard_name | Standard name to be added as a attribute |
[in] | missing_value | Missing value to be added as a attribute |
[in] | range | Range to be added as a attribute |
[in] | mask_variant | .True. if the mask changes over time |
[in] | dynamic | Flag indicating if the field is dynamic |
[in] | do_not_log | if TRUE, field information is not logged |
[in] | interp_method | The interp method to be used when regridding the field in post-processing Valid options are "conserve_order1", "conserve_order2", and "none". |
[in] | area | Field ID for the area field associated with this field |
[in] | volume | Field ID for the volume field associated with this field |
[in] | realm | String to set as the value to the modeling_realm attribute |
Definition at line 488 of file diag_manager.F90.
|
private |
Return field index for subsequent call to send_data.
[in] | do_not_log | if TRUE, field information is not logged |
[in] | interp_method | The interp method to be used when regridding the field in post-processing. Valid options are "conserve_order1", "conserve_order2", and "none". |
[in] | area | Field ID for the area field associated with this field |
[in] | volume | Field ID for the volume field associated with this field |
[in] | realm | String to set as the value to the modeling_realm attribute |
Definition at line 774 of file diag_manager.F90.
|
private |
Definition at line 1458 of file diag_manager.F90.
|
private |
Definition at line 1501 of file diag_manager.F90.
|
private |
Definition at line 1584 of file diag_manager.F90.
|
private |
Definition at line 1658 of file diag_manager.F90.
|
private |
Updates the output buffer for a field based on the data for current time step.
[in] | diag_field_id | The field id returned from the register call |
[in] | field | The field data for the current time step |
[in] | weight | The weight to multiply the data by when averaging |
[in] | time | The current model time |
[in] | is_in | Starting i index of the data |
[in] | js_in | Starting j index of the data |
[in] | ks_in | Starting k index of the data |
[in] | ie_in | Ending i index of the data |
[in] | je_in | Ending j index of the data |
[in] | ke_in | Ending k index of the data |
[in] | mask | Logical mask indicating the points to not average |
[in] | rmask | Real mask indicating the points to not averafe |
[out] | err_msg | If some errors occurs, send_data will return the error message instead of crashing |
Definition at line 3488 of file diag_manager.F90.
|
private |
[in] | id | id od the diagnostic field |
[in] | field | field to average and send |
[in] | area | area of tiles (== averaging weights), arbitrary units |
[in] | time | current time |
[in] | mask | land mask |
Definition at line 3538 of file diag_manager.F90.
|
private |
[in] | id | id od the diagnostic field |
[in] | field | field to average and send |
[in] | area | area of tiles (== averaging weights), arbitrary units |
[in] | time | current time |
[in] | mask | land mask |
Definition at line 3605 of file diag_manager.F90.
|
private |
[in] | id | id of the diagnostic field |
[in] | field | (lon, lat, tile, lev) field to average and send |
[in] | area | (lon, lat, tile) tile areas ( == averaging weights), arbitrary units |
[in] | time | current time |
[in] | mask | (lon, lat, tile) land mask |
Definition at line 3625 of file diag_manager.F90.
|
private |
Definition at line 3703 of file diag_manager.F90.