36 MODULE fms_diag_outfield_mod
38 USE mpp_mod,
only :fatal, warning
43 USE diag_data_mod,
only:time_zero
66 CHARACTER(len=:),
ALLOCATABLE :: module_name
67 CHARACTER(len=:),
ALLOCATABLE :: field_name
68 CHARACTER(len=:),
ALLOCATABLE :: output_name
69 CHARACTER(len=:),
ALLOCATABLE :: output_file
73 LOGICAL :: phys_window
74 LOGICAL :: need_compute
75 LOGICAL :: reduced_k_range
76 LOGICAL :: missvalue_present
77 LOGICAL :: mask_variant
78 LOGICAL :: mask_present
122 INTEGER :: is, js, ks
124 Integer :: ie, je, ke
151 character(len=:),
allocatable :: rslt
152 rslt = this%module_name
160 character(len=:),
allocatable :: rslt
161 rslt = this%field_name
169 character(len=:),
allocatable :: rslt
170 rslt = this%output_name
178 character(len=:),
allocatable :: rslt
179 rslt = this%output_file
186 rslt = this%pow_value
193 rslt = this%phys_window
200 rslt = this%need_compute
207 rslt = this%reduced_k_range
214 rslt = this%missvalue_present
221 rslt = this%mask_variant
228 rslt = this%mask_present
237 call rslt%copy(this%time_reduction)
242 pure integer function get_f1 (this)
result(rslt)
249 pure integer function get_f2 (this)
result(rslt)
256 pure integer function get_f3 (this)
result(rslt)
263 pure integer function get_f4 (this)
result(rslt)
270 pure integer function get_is (this)
result(rslt)
277 pure integer function get_js (this)
result(rslt)
284 pure integer function get_ks (this)
result(rslt)
291 pure integer function get_ie (this)
result(rslt)
298 pure integer function get_je (this)
result(rslt)
305 pure integer function get_ke (this)
result(rslt)
312 pure integer function get_hi (this)
result(rslt)
319 pure integer function get_hj (this)
result(rslt)
326 SUBROUTINE initialize_outfield_index_type(this, is, js , ks, ie, je, ke, hi, hj, f1, f2, f3, f4)
328 INTEGER,
INTENT(in) :: is, js, ks
329 INTEGER,
INTENT(in) :: ie, je, ke
330 INTEGER,
INTENT(in) :: hi, hj
331 INTEGER,
INTENT(in) :: f1, f2, f3, f4
357 LOGICAL,
INTENT(in) :: mask_present
358 INTEGER,
INTENT(in) :: freq
359 INTEGER :: time_redux
361 this%module_name = input_field%module_name
362 this%field_name = input_field%field_name
363 this%output_name = output_field%output_name
365 this%pow_value = output_field%pow_value
366 this%phys_window = output_field%phys_window
367 this%need_compute = output_field%need_compute
368 this%reduced_k_range = output_field%reduced_k_range
369 this%mask_variant = input_field%mask_variant
372 this%missvalue_present = input_field%missing_value_present
373 this%mask_present = mask_present
376 call this%time_reduction%initialize( time_redux , freq)
386 & power_val, phys_window, need_compute, mask_variant, reduced_k_range, num_elems, &
387 & time_reduction_type,output_freq)
389 CHARACTER(len=*),
INTENT(in) :: module_name
390 CHARACTER(len=*),
INTENT(in) :: field_name
391 CHARACTER(len=*),
INTENT(in) :: output_name
392 INTEGER,
INTENT(in) :: power_val
393 LOGICAL,
INTENT(in) :: phys_window
394 LOGICAL,
INTENT(in) :: need_compute
395 LOGICAL,
INTENT(in) :: mask_variant
396 LOGICAL,
INTENT(in) :: reduced_k_range
397 INTEGER,
INTENT(in) :: num_elems
398 INTEGER,
INTENT(in) :: time_reduction_type
399 INTEGER,
INTENT(in) :: output_freq
401 this%module_name = module_name
402 this%field_name = field_name
403 this%output_name = output_name
404 this%pow_value = power_val
405 this%phys_window = phys_window
406 this%need_compute = need_compute
407 this%reduced_k_range = reduced_k_range
408 this%mask_variant = mask_variant
409 call this%time_reduction%initialize(time_reduction_type, output_freq)
416 call this%time_reduction%copy(source)
426 if(ofield%time_max)
then
428 elseif(ofield%time_min)
then
430 else if (ofield%time_sum)
then
432 else if (ofield%time_rms)
then
434 else if (ofield%time_average)
then
446 END MODULE fms_diag_outfield_mod
integer, parameter glo_reg_val_alt
Alternate value used in the region specification of the diag_table to indicate to use the full axis i...
logical region_out_use_alt_value
Will determine which value to use when checking a regional output if the region is the full axis or a...
integer, parameter glo_reg_val
Value used in the region specification of the diag_table to indicate to use the full axis instead of ...
Define the region for field output.
Type to hold the output field description.
pure integer function get_ie(this)
Gets ie.
pure character(len=:) function, allocatable get_field_name(this)
Gets field_name.
integer function get_output_field_time_reduction(ofield)
Get the time reduction from a legacy output field.
pure integer function get_f1(this)
Gets f1.
subroutine initialize_outfield_imp(this, input_field, output_field, mask_present, freq)
Update the fmsDiagOutfield_type instance with those fields used in the legacy diag manager....
pure logical function get_mask_variant(this)
Gets mask_variant.
pure integer function get_js(this)
Gets js.
subroutine initialize_outfield_index_type(this, is, js, ks, ie, je, ke, hi, hj, f1, f2, f3, f4)
#brief initialize all the members of the class.
pure integer function get_ks(this)
Gets ks.
pure integer function get_f2(this)
Gets f2.
pure integer function get_hj(this)
Gets hj.
pure integer function get_je(this)
Gets je.
pure integer function get_f3(this)
Gets f3.
pure logical function get_missvalue_present(this)
Gets missvalue_present.
pure integer function get_hi(this)
Gets hi.
pure integer function get_pow_value(this)
Gets pow_value.
type(fmsdiagtimereduction_type) function, allocatable get_time_reduction(this)
Gets the time_reduction object.
pure logical function get_mask_present(this)
Gets mask_present.
subroutine reset_time_reduction_ut(this, source)
Reset the time reduction member field. Intended for use in unit tests only.
pure integer function get_ke(this)
Gets ke.
pure logical function get_need_compute(this)
Gets need_compute.
pure logical function get_reduced_k_range(this)
Gets reduced_k_range.
pure character(len=:) function, allocatable get_output_file(this)
Gets output_file.
pure integer function get_f4(this)
Gets f4.
pure character(len=:) function, allocatable get_module_name(this)
Gets module_name.
pure logical function get_phys_window(this)
Gets phys_window.
subroutine initialize_for_ut(this, module_name, field_name, output_name, power_val, phys_window, need_compute, mask_variant, reduced_k_range, num_elems, time_reduction_type, output_freq)
Initialized an fmsDiagOutfield_type as needed for unit tests.
pure character(len=:) function, allocatable get_output_name(this)
Gets output_name.
pure integer function get_is(this)
Gets is.
Class fmsDiagOutfield_type (along with class ms_diag_outfield_index_type ) contain information used i...
Class fms_diag_outfield_index_type which (along with class fmsDiagOutfield_type) encapsulate related ...
integer, parameter time_min
The reduction method is min.
integer, parameter time_power
The reduction method is power.
integer, parameter time_average
The reduction method is average.
integer, parameter time_sum
The reudction method is sum.
integer, parameter time_rms
The reduction method is rms.
integer, parameter time_max
The reduction method is max.
logical function, public fms_error_handler(routine, message, err_msg)
Facilitates the control of fatal error conditions.
subroutine, public error_mesg(routine, message, level)
Print notes, warnings and error messages; terminates program for warning and error messages....