Soil Water Balance (SWB2)
Loading...
Searching...
No Matches
swbstats2_support Module Reference

Data Types

type  file_collection_t
type  length_unit_t
type  swbstats_t
type  volume_unit_t

Enumerations

enum  {
  stats_jan_sum =1 , stats_jan_mean , stats_jan_variance , stats_feb_sum ,
  stats_feb_mean , stats_feb_variance , stats_mar_sum , stats_mar_mean ,
  stats_mar_variance , stats_apr_sum , stats_apr_mean , stats_apr_variance ,
  stats_may_sum , stats_may_mean , stats_may_variance , stats_jun_sum ,
  stats_jun_mean , stats_jun_variance , stats_jul_sum , stats_jul_mean ,
  stats_jul_variance , stats_aug_sum , stats_aug_mean , stats_aug_variance ,
  stats_sep_sum , stats_sep_mean , stats_sep_variance , stats_oct_sum ,
  stats_oct_mean , stats_oct_variance , stats_nov_sum , stats_nov_mean ,
  stats_nov_variance , stats_dec_sum , stats_dec_mean , stats_dec_variance ,
  stats_mean , stats_sum , stats_variance
}
enum  {
  calc_period_all =1 , calc_period_annual , calc_period_monthly , calc_period_slice_single ,
  calc_period_slice_multiple , calc_period_water_year , calc_period_daily
}

Functions/Subroutines

subroutine create_working_grids (this)
subroutine create_monthly_working_grids (this)
subroutine calc_zonal_stats (values, zone_ids, target_id, result_vector, comparison_values)
subroutine calc_multizonal_stats (values, zone_ids, zone2_ids, target_id, target2_id, result_vector, comparison_values)
subroutine get_unique_int (this, grid_values, unique_val_list)
subroutine create_date_list_for_annual_statistics (this)
subroutine create_date_list_for_monthly_statistics (this)
subroutine create_date_list_for_daily_statistics (this)
subroutine create_date_list_for_period_statistics (this, start_date, end_date)
subroutine initialize_zone_grid (this, grid_filename)
subroutine initialize_secondary_zone_grid (this, grid_filename)
subroutine initialize_comparison_grid (this, grid_filename)
subroutine set_conversion_factors_sub (this)
subroutine write_stats_to_netcdf (this, output_files, start_date, end_date)
subroutine write_monthly_stats_to_arcgrid (this, output_files, date_range_string, output_file_prefix)
subroutine write_stats_to_arcgrid (this, output_files, start_date, end_date, date_range_string, output_file_prefix)
subroutine calculate_slice_statistics (this, start_date, end_date, grd_sum, grd_mean, grd_var)
subroutine calculate_monthly_statistics (this, month_num, finalize)
subroutine read_date_range_file (this, csv_filename, date_range_id_list, start_date_list, end_date_list)
subroutine read_comparison_period_file (this, csv_filename, date_range_id_list, start_date_list, end_date_list, comparison_grid_file_list)
subroutine read_zone_period_file (this, csv_filename, date_range_id_list, start_date_list, end_date_list, zonal_stats_grid_file_list)
subroutine output_zonal_stats (this, start_date, end_date, values, zone_ids, unique_zone_list, delimiter, funit, zone2_ids, unique_zone2_list, comparison_values)
subroutine open_output_netcdf_files (this, output_files)
subroutine close_output_netcdf_files (this, output_files)
subroutine open_zonal_stats_output_file (this, filename, delimiter)
subroutine print_all_options (this)
pure real(c_float) function update_minimum_value (current_minimum, values)
pure real(c_float) function update_maximum_value (current_maximum, values)

Variables

integer(c_size_t) recnum = 0
type(length_unit_t), dimension(3), parameter length_units = [ LENGTH_UNIT_T("meters ", "m ", 0.254_c_double), LENGTH_UNIT_T("feet ", "ft", 1.0_c_double / 12.0_c_double), LENGTH_UNIT_T("millimeters", "mm", 25.4_c_double) ]
type(volume_unit_t), dimension(3), parameter volume_units = [ VOLUME_UNIT_T("billions of gallons", "BG ", 7.4805194805E-9_c_double ), VOLUME_UNIT_T("millions of gallons", "MG ", 7.4805194805E-6_c_double), VOLUME_UNIT_T("acre-feet ", "ac-ft", 0.000022956840808_c_double) ]
type(data_catalog_entry_tinput_data_obj
type(file_collection_t), dimension(39) output_files
type(running_stats_trstat
type(running_stats_t), dimension(12) mon_stat

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
stats_jan_sum 
stats_jan_mean 
stats_jan_variance 
stats_feb_sum 
stats_feb_mean 
stats_feb_variance 
stats_mar_sum 
stats_mar_mean 
stats_mar_variance 
stats_apr_sum 
stats_apr_mean 
stats_apr_variance 
stats_may_sum 
stats_may_mean 
stats_may_variance 
stats_jun_sum 
stats_jun_mean 
stats_jun_variance 
stats_jul_sum 
stats_jul_mean 
stats_jul_variance 
stats_aug_sum 
stats_aug_mean 
stats_aug_variance 
stats_sep_sum 
stats_sep_mean 
stats_sep_variance 
stats_oct_sum 
stats_oct_mean 
stats_oct_variance 
stats_nov_sum 
stats_nov_mean 
stats_nov_variance 
stats_dec_sum 
stats_dec_mean 
stats_dec_variance 
stats_mean 
stats_sum 
stats_variance 

Definition at line 26 of file swbstats2_support.F90.

◆ anonymous enum

anonymous enum
Enumerator
calc_period_all 
calc_period_annual 
calc_period_monthly 
calc_period_slice_single 
calc_period_slice_multiple 
calc_period_water_year 
calc_period_daily 

Definition at line 42 of file swbstats2_support.F90.

Function/Subroutine Documentation

◆ calc_multizonal_stats()

subroutine swbstats2_support::calc_multizonal_stats ( real (c_double), dimension(:,:), intent(inout) values,
integer (c_int), dimension(:,:), intent(inout) zone_ids,
integer (c_int), dimension(:,:), intent(inout) zone2_ids,
integer (c_int), intent(inout) target_id,
integer (c_int), intent(inout) target2_id,
real (c_double), dimension(:), intent(inout), allocatable result_vector,
real (c_double), dimension(:,:), intent(inout), optional comparison_values )

Definition at line 389 of file swbstats2_support.F90.

◆ calc_zonal_stats()

subroutine swbstats2_support::calc_zonal_stats ( real (c_double), dimension(:,:), intent(inout) values,
integer (c_int), dimension(:,:), intent(inout) zone_ids,
integer (c_int), intent(inout) target_id,
real (c_double), dimension(:), intent(inout), allocatable result_vector,
real (c_double), dimension(:,:), intent(inout), optional comparison_values )

Definition at line 319 of file swbstats2_support.F90.

◆ calculate_monthly_statistics()

subroutine swbstats2_support::calculate_monthly_statistics ( class (swbstats_t), intent(inout) this,
integer (c_short), intent(in) month_num,
logical (c_bool), intent(in) finalize )

Definition at line 1299 of file swbstats2_support.F90.

◆ calculate_slice_statistics()

subroutine swbstats2_support::calculate_slice_statistics ( class (swbstats_t), intent(inout) this,
type (datetime_t), intent(inout) start_date,
type (datetime_t), intent(inout) end_date,
real (c_double), dimension(:,:), intent(inout) grd_sum,
real (c_double), dimension(:,:), intent(inout) grd_mean,
real (c_double), dimension(:,:), intent(inout) grd_var )

Definition at line 1178 of file swbstats2_support.F90.

Here is the call graph for this function:

◆ close_output_netcdf_files()

subroutine swbstats2_support::close_output_netcdf_files ( class (swbstats_t), intent(inout) this,
type (file_collection_t), dimension(:), intent(inout) output_files )

Definition at line 1736 of file swbstats2_support.F90.

Here is the call graph for this function:

◆ create_date_list_for_annual_statistics()

subroutine swbstats2_support::create_date_list_for_annual_statistics ( class (swbstats_t), intent(inout) this)

Definition at line 504 of file swbstats2_support.F90.

◆ create_date_list_for_daily_statistics()

subroutine swbstats2_support::create_date_list_for_daily_statistics ( class (swbstats_t), intent(inout) this)

Definition at line 564 of file swbstats2_support.F90.

◆ create_date_list_for_monthly_statistics()

subroutine swbstats2_support::create_date_list_for_monthly_statistics ( class (swbstats_t), intent(inout) this)

Definition at line 534 of file swbstats2_support.F90.

◆ create_date_list_for_period_statistics()

subroutine swbstats2_support::create_date_list_for_period_statistics ( class (swbstats_t), intent(inout) this,
type (datetime_t), intent(in) start_date,
type (datetime_t), intent(in) end_date )

Definition at line 593 of file swbstats2_support.F90.

◆ create_monthly_working_grids()

subroutine swbstats2_support::create_monthly_working_grids ( class (swbstats_t), intent(inout) this)

Definition at line 263 of file swbstats2_support.F90.

◆ create_working_grids()

subroutine swbstats2_support::create_working_grids ( class (swbstats_t), intent(inout) this)

Definition at line 188 of file swbstats2_support.F90.

◆ get_unique_int()

subroutine swbstats2_support::get_unique_int ( class (swbstats_t), intent(inout) this,
integer (c_int), dimension(:,:), intent(in) grid_values,
type (fstring_list_t), intent(inout) unique_val_list )

Definition at line 471 of file swbstats2_support.F90.

◆ initialize_comparison_grid()

subroutine swbstats2_support::initialize_comparison_grid ( class (swbstats_t), intent(inout) this,
character (len=*), intent(inout) grid_filename )

Definition at line 712 of file swbstats2_support.F90.

Here is the call graph for this function:

◆ initialize_secondary_zone_grid()

subroutine swbstats2_support::initialize_secondary_zone_grid ( class (swbstats_t), intent(inout) this,
character (len=*), intent(inout) grid_filename )

Definition at line 662 of file swbstats2_support.F90.

Here is the call graph for this function:

◆ initialize_zone_grid()

subroutine swbstats2_support::initialize_zone_grid ( class (swbstats_t), intent(inout) this,
character (len=*), intent(inout) grid_filename )

Definition at line 607 of file swbstats2_support.F90.

Here is the call graph for this function:

◆ open_output_netcdf_files()

subroutine swbstats2_support::open_output_netcdf_files ( class (swbstats_t), intent(inout) this,
type (file_collection_t), dimension(:), intent(inout) output_files )

Definition at line 1672 of file swbstats2_support.F90.

Here is the call graph for this function:

◆ open_zonal_stats_output_file()

subroutine swbstats2_support::open_zonal_stats_output_file ( class (swbstats_t), intent(inout) this,
character (len=*) filename,
character (len=*), intent(in), optional delimiter )

Definition at line 1779 of file swbstats2_support.F90.

◆ output_zonal_stats()

subroutine swbstats2_support::output_zonal_stats ( class (swbstats_t), intent(inout) this,
type (datetime_t), intent(in) start_date,
type (datetime_t), intent(in) end_date,
real (c_double), dimension(:,:), intent(inout) values,
integer (c_int), dimension(:,:), intent(inout) zone_ids,
type (fstring_list_t), intent(inout) unique_zone_list,
character (len=*), intent(in), optional delimiter,
integer (c_int), intent(in), optional funit,
integer (c_int), dimension(:,:), intent(inout), optional zone2_ids,
type (fstring_list_t), intent(inout), optional unique_zone2_list,
real (c_double), dimension(:,:), intent(inout), optional comparison_values )

Definition at line 1527 of file swbstats2_support.F90.

Here is the call graph for this function:

◆ print_all_options()

subroutine swbstats2_support::print_all_options ( class (swbstats_t) this)

Definition at line 1841 of file swbstats2_support.F90.

◆ read_comparison_period_file()

subroutine swbstats2_support::read_comparison_period_file ( class (swbstats_t), intent(inout) this,
character (len=*), intent(inout) csv_filename,
type (fstring_list_t), intent(out) date_range_id_list,
type (fstring_list_t), intent(out) start_date_list,
type (fstring_list_t), intent(out) end_date_list,
type (fstring_list_t), intent(out) comparison_grid_file_list )

Definition at line 1413 of file swbstats2_support.F90.

◆ read_date_range_file()

subroutine swbstats2_support::read_date_range_file ( class (swbstats_t), intent(inout) this,
character (len=*), intent(inout) csv_filename,
type (fstring_list_t), intent(out) date_range_id_list,
type (fstring_list_t), intent(out) start_date_list,
type (fstring_list_t), intent(out) end_date_list )

Definition at line 1361 of file swbstats2_support.F90.

◆ read_zone_period_file()

subroutine swbstats2_support::read_zone_period_file ( class (swbstats_t), intent(inout) this,
character (len=*), intent(inout) csv_filename,
type (fstring_list_t), intent(out) date_range_id_list,
type (fstring_list_t), intent(out) start_date_list,
type (fstring_list_t), intent(out) end_date_list,
type (fstring_list_t), intent(out) zonal_stats_grid_file_list )

Definition at line 1470 of file swbstats2_support.F90.

◆ set_conversion_factors_sub()

subroutine swbstats2_support::set_conversion_factors_sub ( class (swbstats_t), intent(inout) this)

Definition at line 762 of file swbstats2_support.F90.

Here is the call graph for this function:

◆ update_maximum_value()

pure real (c_float) function swbstats2_support::update_maximum_value ( real (c_float), intent(in) current_maximum,
real (c_float), dimension(:,:), intent(in) values )

Definition at line 1941 of file swbstats2_support.F90.

◆ update_minimum_value()

pure real (c_float) function swbstats2_support::update_minimum_value ( real (c_float), intent(in) current_minimum,
real (c_float), dimension(:,:), intent(in) values )

Definition at line 1928 of file swbstats2_support.F90.

◆ write_monthly_stats_to_arcgrid()

subroutine swbstats2_support::write_monthly_stats_to_arcgrid ( class (swbstats_t), intent(inout) this,
type (file_collection_t), dimension(:), intent(inout) output_files,
character (len=*), intent(in), optional date_range_string,
character (len=*), intent(in), optional output_file_prefix )

Definition at line 862 of file swbstats2_support.F90.

Here is the call graph for this function:

◆ write_stats_to_arcgrid()

subroutine swbstats2_support::write_stats_to_arcgrid ( class (swbstats_t), intent(inout) this,
type (file_collection_t), dimension(:), intent(inout) output_files,
type (datetime_t), intent(inout) start_date,
type (datetime_t), intent(inout) end_date,
character (len=*), intent(in), optional date_range_string,
character (len=:), intent(in), optional, allocatable output_file_prefix )

Definition at line 965 of file swbstats2_support.F90.

Here is the call graph for this function:

◆ write_stats_to_netcdf()

subroutine swbstats2_support::write_stats_to_netcdf ( class (swbstats_t), intent(inout) this,
type (file_collection_t), dimension(:), intent(inout) output_files,
type (datetime_t), intent(inout) start_date,
type (datetime_t), intent(inout) end_date )

Definition at line 791 of file swbstats2_support.F90.

Here is the call graph for this function:

Variable Documentation

◆ input_data_obj

type (data_catalog_entry_t) swbstats2_support::input_data_obj

Definition at line 178 of file swbstats2_support.F90.

◆ length_units

type (length_unit_t), dimension(3), parameter swbstats2_support::length_units = [ LENGTH_UNIT_T("meters ", "m ", 0.254_c_double), LENGTH_UNIT_T("feet ", "ft", 1.0_c_double / 12.0_c_double), LENGTH_UNIT_T("millimeters", "mm", 25.4_c_double) ]

Definition at line 168 of file swbstats2_support.F90.

◆ mon_stat

type (running_stats_t), dimension(12) swbstats2_support::mon_stat

Definition at line 184 of file swbstats2_support.F90.

◆ output_files

type (file_collection_t), dimension(39) swbstats2_support::output_files

Definition at line 180 of file swbstats2_support.F90.

◆ recnum

integer (c_size_t) swbstats2_support::recnum = 0

Definition at line 48 of file swbstats2_support.F90.

◆ rstat

type ( running_stats_t) swbstats2_support::rstat

Definition at line 182 of file swbstats2_support.F90.

◆ volume_units

type (volume_unit_t), dimension(3), parameter swbstats2_support::volume_units = [ VOLUME_UNIT_T("billions of gallons", "BG ", 7.4805194805E-9_c_double ), VOLUME_UNIT_T("millions of gallons", "MG ", 7.4805194805E-6_c_double), VOLUME_UNIT_T("acre-feet ", "ac-ft", 0.000022956840808_c_double) ]

Definition at line 173 of file swbstats2_support.F90.