PUBLIC INTERFACE ~ PUBLIC DATA ~ PUBLIC ROUTINES ~ NAMELIST ~ DIAGNOSTIC FIELDS ~ ERROR MESSAGES ~ REFERENCES ~ NOTES

Module diag_util_mod

Contact:  Seth Underwood
Reviewers: 
Change History: WebCVS Log


OVERVIEW



OTHER MODULES USED

   diag_data_mod
diag_axis_mod
diag_output_mod
diag_grid_mod
fms_mod
fms_io_mod
mpp_domains_mod
time_manager_mod
mpp_io_mod
mpp_mod
constants_mod

PUBLIC INTERFACE

get_subfield_size:
get_subfield_vert_size:
Get size, start and end indices for output_fields(outnum), fill in output_fields(outnum)%output_grid%(start_indx, end_indx)
log_diag_field_info:
Writes brief diagnostic field info to the log file.
update_bounds:
check_out_of_bounds:
check_bounds_are_exact_dynamic:
check_bounds_are_exact_static:
init_file:
sync_file_times:
Synchronize the file's start and close times with the model start and end times.
diag_time_inc:
find_input_field:
init_input_field:
init_output_field:
get_date_dif:
diag_data_out:
write_static:
Output all static fields in this file
check_duplicate_output_fields:
Checks to see if output_name and output_file are unique in output_fields.


PUBLIC DATA

None.


PUBLIC ROUTINES

  1. get_subfield_size

    SUBROUTINE get_subfield_size (axes, outnum)
    DESCRIPTION
    Get the size, start and end indices for output_fields(outnum), then fill in output_fields(outnum)%output_grid%(start_indx, end_indx)


    INPUT
    axes   Axes of the input_field.
       [INTEGER, DIMENSION(:)]
    outnum   Position in array output_fields.
       [INTEGER]

  2. get_subfield_vert_size

     
    get_subfield_vert_size 
    
    DESCRIPTION
    Get size, start and end indices for output_fields(outnum), fill in output_fields(outnum)%output_grid%(start_indx, end_indx).


    INPUT
    axes   Axes of the input_field
       [INTEGER, DIMENSION(:)]
    outnum   Position in array output_fields.
       [INTEGER]

  3. log_diag_field_info

    SUBROUTINE log_diag_field_info (module_name, field_name, axes, long_name, units, missing_value, range, dynamic)
    DESCRIPTION
    If the do_diag_field_log namelist parameter is .TRUE., then a line briefly describing diagnostic field is added to the log file. Normally users should not call this subroutine directly, since it is called by register_static_field and register_diag_field if do_not_log is not set to .TRUE.. It is used, however, in LM3 to avoid excessive logs due to the number of fields registered for each of the tile types. LM3 code uses a do_not_log parameter in the registration calls, and subsequently calls this subroutine to log field information under a generic name.


    INPUT
    module_name   
       [CHARACTER(len=*)]
    field_name   
       [CHARACTER(len=*)]
    axes   
       [INTEGER, DIMENSION(:)]
    long_name   
       [CHARACTER(len=*), OPTIONAL]
    units   
       [CHARACTER(len=*), OPTIONAL]
    missing_value   
       [REAL, OPTIONAL]
    range   
       [REAL, DIMENSION(2), OPTIONAL]
    dynamic   
       [LOGICAL, OPTIONAL]

  4. update_bounds

     
    update_bounds 
    
    DESCRIPTION


    INPUT
    out_num   
       [INTEGER]
    lower_i   
       [INTEGER]
    upper_i   
       [INTEGER]
    lower_j   
       [INTEGER]
    upper_j   
       [INTEGER]
    lower_k   
       [INTEGER]
    upper_k   
       [INTEGER]

  5. check_out_of_bounds

    SUBROUTINE check_out_of_bounds (out_num, diag_field_id, err_msg)
    DESCRIPTION


    INPUT
    out_num   
       [INTEGER]
    diag_field_id   
       [INTEGER]

    OUTPUT
    err_msg   
       [CHARACTER(len=*)]

  6. check_bounds_are_exact_dynamic

    SUBROUTINE check_bounds_are_exact_dynamic (out_num, diag_field_id, Time, err_msg)
    DESCRIPTION


    INPUT
    out_num   
       [INTEGER]
    diag_field_id   
       [INTEGER]
    Time   
       [TYPE(time_type)]

    OUTPUT
    err_msg   
       [CHARACTER(len=*)]

  7. check_bounds_are_exact_static

    SUBROUTINE check_bounds_are_exact_static (out_num, diag_field_id, err_msg)
    DESCRIPTION


    INPUT
    out_num   
       [INTEGER]
    diag_field_id   
       [INTEGER]

    OUTPUT
    err_msg   
       [CHARACTER(len=*)]

  8. init_file

    SUBROUTINE init_file (name, output_freq, output_units, format, time_units long_name, tile_count, new_file_freq, new_file_freq_units, start_time, file_duration, file_duration_units)
    DESCRIPTION


    INPUT
    name   
       [CHARACTER(len=*)]
    output_freq   
       [INTEGER]
    output_units   
       [INTEGER]
    format   
       [INTEGER]
    time_units   
       [INTEGER]
    log_name   
       [CHARACTER(len=*)]
    tile_count   
       [INTEGER]
    new_file_freq   
       [INTEGER, OPTIONAL]
    new_file_freq_units   
       [INTEGER, OPTIONAL]
    start_time   
       [TYPE(time_type), OPTIONAL]
    file_duration   
       [INTEGER, OPTIONAL]
    file_duration_units   
       [INTEGER, OPTIONAL]

  9. sync_file_times

    SUBROUTINE sync_file_times (init_time)
    DESCRIPTION
    sync_file_times checks to see if the file start time is less than the model's init time (passed in as the only argument). If it is less, then the both the file start time and end time are synchronized using the passed in initial time and the duration as calculated by the diag_time_inc function. sync_file_times will also increase the next_open until it is greater than the init_time.


    INPUT
    file_id   The file ID
       [INTEGER]
    init_time   Initial time use for the synchronization.
       [TYPE(time_type)]

    OUTPUT
    err_msg   Return error message
       [CHARACTER(len=*), OPTIONAL]

  10. diag_time_inc

    TYPE(time_type) FUNCTION diag_time_inc (time, output_freq, output_units, err_msg)
    DESCRIPTION


    INPUT
    time   
       [TYPE(time_type)]
    output_freq   
       [INTEGER]
    output_units   
       [INTEGER]

    OUTPUT
    err_msg   
       [CHARACTER, OPTIONAL]

  11. find_input_field

    INTEGER FUNCTION find_input_field (module_name, field_name, tile_count)
    DESCRIPTION


    INPUT
    module_name   
       [CHARACTER(len=*)]
    field_name   
       [CHARACTER(len=*)]
    tile_count   
       [INTEGER]

  12. init_input_field

    SUBROUTINE init_input_field (module_name, field_name, tile_count)
    DESCRIPTION


    INPUT
    module_name   
       [CHARACTER(len=*)]
    field_name   
       [CHARACTER(len=*)]
    tile_count   
       [INTEGER]

  13. init_output_field

    SUBROUTINE init_output_field (module_name, field_name, output_name, output_file time_method, pack, tile_count, local_coord)
    DESCRIPTION


    INPUT
    module_name   
       [CHARACTER(len=*)]
    field_name   
       [CHARACTER(len=*)]
    output_name   
       [CHARACTER(len=*)]
    output_file   
       [CHARACTER(len=*)]
    time_method   
       [CHARACTER(len=*)]
    pack   
       [INTEGER]
    tile_count   
       [INTEGER]
    local_coord   
       [INTEGER, OPTIONAL]

  14. get_date_dif

    REAL FUNCTION get_date_dif (t2, t1, units)
    DESCRIPTION


    INPUT
    t2   
       [TYPE(time_type)]
    t1   
       [TYPE(time_type)]
    units   
       [INTEGER]

  15. diag_data_out

    SUBROUTINE diag_data_out (file, field, dat, time, fianl_call_in, static_write_in)
    DESCRIPTION


    INPUT
    file   
       [INTEGER]
    field   
       [INTEGER]
    time   
       [TYPE(time_type)]
    final_call_in   
       [LOGICAL, OPTIONAL]
    static_write_in   
       [LOGICAL, OPTIONAL]

    INPUT/OUTPUT
    dat   
       [REAL, DIMENSION(:,:,:,:)]

  16. write_static

    SUBROUTINE write_static (file)
    DESCRIPTION


    INPUT
    file   
       [INTEGER]

  17. check_duplicate_output_fields

    SUBROUTINE check_duplicate_output_fields (err_msg)
    DESCRIPTION


    OUTPUT
    err_msg   
       [CHARACTER(len=*), OPTIONAL]


DATA SETS

None.


ERROR MESSAGES

FATAL in get_subfield_size
wrong order of axes. X should come first.
FATAL in get_subfield_size
wrong order of axes, Y should come second.
FATAL in get_subfield_size
wrong values in vertical axis of region
FATAL in get_subfield_size
i should equal 3 for z axis
FATAL in get_subfield_size
Wrong axis_cart
FATAL in get_subfield_size
can not find gstart_indx/gend_indx for <output_fields(outnum)%output_name> check region bounds for axis <i>.
FATAL in get_subfield_size
wrong values in vertical axis of region
FATAL in get_subfield_size
No domain available
FATAL in get_subfield_size
wrong compute domain indices
FATAL in get_subfield_size
<output_fields(outnum)%output_name> error at i = <i>
FATAL in get_subfield_vert_size
wrong order of axes, X should come first
FATAL in get_subfield_vert_size
wrong order of axes, Y should come second
FATAL in get_subfield_vert_size
wrong values in vertical axis of region
FATAL in get_subfield_vert_size
i should equal 3 for z axis
FATAL in get_subfield_vert_size
Wrong axis_cart
FATAL in get_subfield_vert_size
can not find gstart_indx/gend_indx for <output_fields(outnum)%output_name> check region bounds for axis
FATAL in init_file
max_files exceeded, increase max_files via the max_files variable in the namelist diag_manager_nml
FATAL in init_file
close time GREATER than next_open time, check file duration, file frequency in < files(num_files)%name>
FATAL in init_input_field
max_input_fields exceeded, increase it via diag_manager_nml
FATAL in init_output_field
max_output_fields exceeded, increase it via diag_manager_nml
FATAL in init_output_field
module_name/field_name <module_name>/<field_name>[/tile_count=<tile_count>] NOT registered
FATAL in init_output_field
max_out_per_in_field exceeded, increase max_out_per_in_field
FATAL in init_output_field
could not find integer number of diurnal samples in string <t_method>
FATAL in init_output_field
The integer value of diurnal samples must be greater than zero.
FATAL in init_output_field
improper time method in diag_table for output field <output_name>
FATAL in get_date_dif
months not supported as output units
FATAL in get_date_dif
years not suppored as output units
FATAL in get_date_dif
illegal time units


top