35 MODULE fms_diag_outfield_mod
37 USE mpp_mod,
only :fatal, warning
42 USE diag_data_mod,
only:time_zero
65 CHARACTER(len=:),
ALLOCATABLE :: module_name
66 CHARACTER(len=:),
ALLOCATABLE :: field_name
67 CHARACTER(len=:),
ALLOCATABLE :: output_name
68 CHARACTER(len=:),
ALLOCATABLE :: output_file
72 LOGICAL :: phys_window
73 LOGICAL :: need_compute
74 LOGICAL :: reduced_k_range
75 LOGICAL :: missvalue_present
76 LOGICAL :: mask_variant
77 LOGICAL :: mask_present
121 INTEGER :: is, js, ks
123 Integer :: ie, je, ke
150 character(len=:),
allocatable :: rslt
151 rslt = this%module_name
159 character(len=:),
allocatable :: rslt
160 rslt = this%field_name
168 character(len=:),
allocatable :: rslt
169 rslt = this%output_name
177 character(len=:),
allocatable :: rslt
178 rslt = this%output_file
185 rslt = this%pow_value
192 rslt = this%phys_window
199 rslt = this%need_compute
206 rslt = this%reduced_k_range
213 rslt = this%missvalue_present
220 rslt = this%mask_variant
227 rslt = this%mask_present
236 call rslt%copy(this%time_reduction)
241 pure integer function get_f1 (this)
result(rslt)
248 pure integer function get_f2 (this)
result(rslt)
255 pure integer function get_f3 (this)
result(rslt)
262 pure integer function get_f4 (this)
result(rslt)
269 pure integer function get_is (this)
result(rslt)
276 pure integer function get_js (this)
result(rslt)
283 pure integer function get_ks (this)
result(rslt)
290 pure integer function get_ie (this)
result(rslt)
297 pure integer function get_je (this)
result(rslt)
304 pure integer function get_ke (this)
result(rslt)
311 pure integer function get_hi (this)
result(rslt)
318 pure integer function get_hj (this)
result(rslt)
325 SUBROUTINE initialize_outfield_index_type(this, is, js , ks, ie, je, ke, hi, hj, f1, f2, f3, f4)
327 INTEGER,
INTENT(in) :: is, js, ks
328 INTEGER,
INTENT(in) :: ie, je, ke
329 INTEGER,
INTENT(in) :: hi, hj
330 INTEGER,
INTENT(in) :: f1, f2, f3, f4
356 LOGICAL,
INTENT(in) :: mask_present
357 INTEGER,
INTENT(in) :: freq
358 INTEGER :: time_redux
360 this%module_name = input_field%module_name
361 this%field_name = input_field%field_name
362 this%output_name = output_field%output_name
364 this%pow_value = output_field%pow_value
365 this%phys_window = output_field%phys_window
366 this%need_compute = output_field%need_compute
367 this%reduced_k_range = output_field%reduced_k_range
368 this%mask_variant = input_field%mask_variant
371 this%missvalue_present = input_field%missing_value_present
372 this%mask_present = mask_present
375 call this%time_reduction%initialize( time_redux , freq)
385 & power_val, phys_window, need_compute, mask_variant, reduced_k_range, num_elems, &
386 & time_reduction_type,output_freq)
388 CHARACTER(len=*),
INTENT(in) :: module_name
389 CHARACTER(len=*),
INTENT(in) :: field_name
390 CHARACTER(len=*),
INTENT(in) :: output_name
391 INTEGER,
INTENT(in) :: power_val
392 LOGICAL,
INTENT(in) :: phys_window
393 LOGICAL,
INTENT(in) :: need_compute
394 LOGICAL,
INTENT(in) :: mask_variant
395 LOGICAL,
INTENT(in) :: reduced_k_range
396 INTEGER,
INTENT(in) :: num_elems
397 INTEGER,
INTENT(in) :: time_reduction_type
398 INTEGER,
INTENT(in) :: output_freq
400 this%module_name = module_name
401 this%field_name = field_name
402 this%output_name = output_name
403 this%pow_value = power_val
404 this%phys_window = phys_window
405 this%need_compute = need_compute
406 this%reduced_k_range = reduced_k_range
407 this%mask_variant = mask_variant
408 call this%time_reduction%initialize(time_reduction_type, output_freq)
415 call this%time_reduction%copy(source)
425 if(ofield%time_max)
then
427 elseif(ofield%time_min)
then
429 else if (ofield%time_sum)
then
431 else if (ofield%time_rms)
then
433 else if (ofield%time_average)
then
445 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....