Pangolin
 All Classes Files Functions Variables Pages
Data Types | Public Member Functions | Public Attributes | List of all members
configuration_class Module Reference

Contains the global simulation parameters, given by the user in configuration file. This module is mostly a parser with some checks. More...

Data Types

type  configuration
 

Public Member Functions

subroutine new_configuration (rank, configfile)
 Constructor for a type defined once (global configuration) More...
 
subroutine set_times ()
 
subroutine new_mpi_longint ()
 
subroutine broadcast_configuration ()
 Broadcast the config from master process. Must be done after the partitioning as it can affect the number of bands and partitions. More...
 
subroutine update_configuration ()
 Update the number of partitions and bands after the partitioning from the master process (only for parallel configuration) The caller must check nb_procs > 1. More...
 
subroutine new_mpi_configuration ()
 Create a MPI user-defined type for all the configuration. More...
 
integer function new_mpi_nb_partitions ()
 Create a MPI user-defined type for number of partitions and bands. More...
 
subroutine parse_config (id)
 Parser for configuration file (allows custom error) More...
 
subroutine extract_and_set_val (dummy, list_args)
 Set the value given in the string dummy on the form arg = val. More...
 
integer function search_arg (arg, list_args)
 
subroutine init_list_args (list_args)
 
subroutine check_config ()
 Check user configuration. More...
 
subroutine check_chemistry ()
 
subroutine check_analytical ()
 Check the analytical case is really implemented. More...
 
subroutine check_t_output ()
 
subroutine check_times ()
 
subroutine check_timestep ()
 
subroutine check_advection ()
 
subroutine check_nb_procs ()
 
subroutine check_directories ()
 
subroutine check_file_exist (cur_file, func)
 
subroutine check_directory (str, is_input)
 
subroutine set_arg (arg, val, list_args)
 
subroutine store_period (val, T)
 Split period from HHMM format to minutes only. Minutes can be a float. More...
 
subroutine compute_nb_bands_square_configuration (zone, nb_parts)
 Compute the number of bands maximizing the number of square partition_. More...
 
subroutine compute_nb_bands_configuration (zone, nb_parts)
 Compute the number of all bands (may be changed later) More...
 
subroutine set_nb_bands_configuration (nb)
 Set the total number of bands. More...
 
subroutine set_nb_bands_square_configuration (nb)
 Set the number of bands with square partitions. More...
 
subroutine set_nb_bands_configuration_zone (nb, zone)
 Set the number of bands on a zone. More...
 
subroutine set_nb_bands_square_configuration_zone (nb, zone)
 Set the number of bands with square partitions on a zone. More...
 
subroutine set_nb_bands_resized_configuration (nb)
 Set the number of resized bands. More...
 
subroutine set_nb_bands_resized_configuration_zone (nb, zone)
 Set the number of resized bands. More...
 
subroutine set_dt (dt)
 
subroutine set_cfl (cfl)
 
type(configuration) function get_configuration ()
 Accessor. More...
 
double precision function get_cfl ()
 
double precision function get_dt ()
 Result in minutes. More...
 
subroutine get_chemistry_file (f)
 
logical function must_write (iter)
 Write at the end of the timestep, so when iter*dt is a multiple of T. More...
 
logical function must_write_final (iter)
 
logical function must_readwinds (iter)
 
subroutine print_iterations (nb_iter)
 
subroutine extract_date_wrapper (t, y, m, d, h, minute)
 
subroutine get_day_month_year (day, month, year, iter)
 Returns the date at the beginning of the timestep. More...
 
integer function get_nb_bands_resized_configuration (zone)
 Get the number of resized bands. More...
 
subroutine get_iterations (tstart, tend)
 Get the first and last iterations. More...
 
character(line_width) function get_output_dir ()
 
integer(kind=k12) function get_t_start ()
 
character(line_width) function get_output_filename (dtype, iter, tracer)
 Returns either the concentration or wind data filename Data is written at the end of the timestep, so iter*dt. More...
 
subroutine get_ratio_filename (fname, tracer)
 Appends tracer id to filename for I/O. More...
 
character(line_width) function get_input_filename (dtype, iter, tracer)
 Returns either the concentration or wind data filename. More...
 
integer function get_total_nb_partitions_configuration ()
 Get total number partitions. More...
 
integer function get_total_nb_partitions_sector_configuration ()
 Get total number partitions on a sector. More...
 
integer function get_nb_partitions_configuration (zone)
 Get total number partitions on a zone. More...
 
integer function get_total_nb_partitions ()
 Get total number partitions. More...
 
integer function get_nb_lat2_configuration ()
 Get number of latitudes on a hemisphere. More...
 
integer function get_nb_bands_square_configuration (zone)
 Get the number of bands with square partitions. More...
 
integer function get_nb_bands_configuration (zone)
 Get the total number of bands on a zone. More...
 
integer function get_total_nb_bands_configuration ()
 Get the total number of bands on all sectors. More...
 
integer function get_total_nb_bands_configuration_sector ()
 Get the total number of bands on 2 sectors (north + south) More...
 
logical function has_single_partition ()
 Returns true if there is only one partition. More...
 
logical function has_three_partitions ()
 Returns true if there is only 3 partitions (one for each sector) More...
 
logical function is_data_analytical ()
 Check if the concentration data is set analytically. More...
 
logical function is_data_numerical ()
 Check if the concentration data is set analytically. More...
 
logical function is_advection_meridional_only ()
 Meridional advection if numerical case or analytical case (except for zonal test case) More...
 
logical function is_advection_zonal_only ()
 Zonal advection if numerical case or analytical case (except for meridional test case) More...
 
logical function has_chemistry ()
 
subroutine set_nb_partitions_configuration_zone (nb, zone)
 Set total number partitions in a zone (with idle process) More...
 
subroutine set_nb_partitions_configuration (nb)
 Set total number partitions (with idle process) More...
 
character(line_width) function get_test_case ()
 Get analytical test case. More...
 
integer function get_t_winds ()
 Result in minutes. More...
 
subroutine print_configuration ()
 Print. More...
 
subroutine free_configuration ()
 Destructor. More...
 

Public Attributes

character(*), parameter fname_config = "configuration_class.F90"
 

Detailed Description

Contains the global simulation parameters, given by the user in configuration file. This module is mostly a parser with some checks.

Author
Alexis Praga

Member Function/Subroutine Documentation

subroutine configuration_class::broadcast_configuration ( )

Broadcast the config from master process. Must be done after the partitioning as it can affect the number of bands and partitions.

Here is the call graph for this function:

subroutine configuration_class::check_advection ( )

Here is the call graph for this function:

subroutine configuration_class::check_analytical ( )

Check the analytical case is really implemented.

Here is the call graph for this function:

subroutine configuration_class::check_chemistry ( )

Here is the call graph for this function:

subroutine configuration_class::check_config ( )

Check user configuration.

Here is the call graph for this function:

subroutine configuration_class::check_directories ( )

Here is the call graph for this function:

subroutine configuration_class::check_directory ( character(*), intent(in)  str,
logical  is_input 
)

Here is the call graph for this function:

subroutine configuration_class::check_file_exist ( character(*), intent(in)  cur_file,
character(*), intent(in)  func 
)

Here is the call graph for this function:

subroutine configuration_class::check_nb_procs ( )

Here is the call graph for this function:

subroutine configuration_class::check_t_output ( )

Here is the call graph for this function:

subroutine configuration_class::check_times ( )

Here is the call graph for this function:

subroutine configuration_class::check_timestep ( )

Here is the call graph for this function:

subroutine configuration_class::compute_nb_bands_configuration ( integer, intent(in)  zone,
integer, intent(in)  nb_parts 
)

Compute the number of all bands (may be changed later)

Parameters
zone: zone indice
nb_parts: number of partitions on this zone

Here is the call graph for this function:

subroutine configuration_class::compute_nb_bands_square_configuration ( integer, intent(in)  zone,
integer, intent(in)  nb_parts 
)

Compute the number of bands maximizing the number of square partition_.

subroutine configuration_class::extract_and_set_val ( character(*)  dummy,
character(*), dimension(:)  list_args 
)

Set the value given in the string dummy on the form arg = val.

Here is the call graph for this function:

subroutine configuration_class::extract_date_wrapper ( integer(kind=8), intent(in)  t,
integer(kind=4)  y,
integer(kind=4)  m,
integer(kind=4)  d,
integer(kind=4)  h,
integer(kind=4)  minute 
)
subroutine configuration_class::free_configuration ( )

Destructor.

Here is the call graph for this function:

double precision function configuration_class::get_cfl ( )
subroutine configuration_class::get_chemistry_file ( character(*)  f)
type(configuration) function configuration_class::get_configuration ( )

Accessor.

subroutine configuration_class::get_day_month_year ( integer  day,
integer  month,
integer  year,
integer, intent(in)  iter 
)

Returns the date at the beginning of the timestep.

double precision function configuration_class::get_dt ( )

Result in minutes.

character(line_width) function configuration_class::get_input_filename ( integer, intent(in)  dtype,
integer, intent(in)  iter,
integer, intent(in)  tracer 
)

Returns either the concentration or wind data filename.

Parameters
dtype: IS_RATIO, IS_ZWINDS, IS_MWINDS

Here is the call graph for this function:

subroutine configuration_class::get_iterations ( integer(kind=k12)  tstart,
integer(kind=k12)  tend 
)

Get the first and last iterations.

Parameters
zone: zone indice
integer function configuration_class::get_nb_bands_configuration ( integer, intent(in)  zone)

Get the total number of bands on a zone.

Parameters
zone: zone indice
integer function configuration_class::get_nb_bands_resized_configuration ( integer, intent(in)  zone)

Get the number of resized bands.

Parameters
zone: zone indice
integer function configuration_class::get_nb_bands_square_configuration ( integer, intent(in)  zone)

Get the number of bands with square partitions.

Parameters
zone: zone indice
integer function configuration_class::get_nb_lat2_configuration ( )

Get number of latitudes on a hemisphere.

integer function configuration_class::get_nb_partitions_configuration ( integer, intent(in)  zone)

Get total number partitions on a zone.

character(line_width) function configuration_class::get_output_dir ( )
character(line_width) function configuration_class::get_output_filename ( integer, intent(in)  dtype,
integer, intent(in)  iter,
integer, intent(in), optional  tracer 
)

Returns either the concentration or wind data filename Data is written at the end of the timestep, so iter*dt.

Parameters
dtype: IS_RATIO, IS_ZWINDS, IS_MWINDS

Here is the call graph for this function:

subroutine configuration_class::get_ratio_filename ( character(line_width)  fname,
integer, intent(in)  tracer 
)

Appends tracer id to filename for I/O.

integer(kind=k12) function configuration_class::get_t_start ( )
integer function configuration_class::get_t_winds ( )

Result in minutes.

character(line_width) function configuration_class::get_test_case ( )

Get analytical test case.

integer function configuration_class::get_total_nb_bands_configuration ( )

Get the total number of bands on all sectors.

integer function configuration_class::get_total_nb_bands_configuration_sector ( )

Get the total number of bands on 2 sectors (north + south)

integer function configuration_class::get_total_nb_partitions ( )

Get total number partitions.

integer function configuration_class::get_total_nb_partitions_configuration ( )

Get total number partitions.

integer function configuration_class::get_total_nb_partitions_sector_configuration ( )

Get total number partitions on a sector.

logical function configuration_class::has_chemistry ( )
logical function configuration_class::has_single_partition ( )

Returns true if there is only one partition.

logical function configuration_class::has_three_partitions ( )

Returns true if there is only 3 partitions (one for each sector)

subroutine configuration_class::init_list_args ( character(line_width), dimension(:), intent(inout)  list_args)
logical function configuration_class::is_advection_meridional_only ( )

Meridional advection if numerical case or analytical case (except for zonal test case)

logical function configuration_class::is_advection_zonal_only ( )

Zonal advection if numerical case or analytical case (except for meridional test case)

logical function configuration_class::is_data_analytical ( )

Check if the concentration data is set analytically.

logical function configuration_class::is_data_numerical ( )

Check if the concentration data is set analytically.

Here is the call graph for this function:

logical function configuration_class::must_readwinds ( integer, intent(in)  iter)
logical function configuration_class::must_write ( integer, intent(in)  iter)

Write at the end of the timestep, so when iter*dt is a multiple of T.

logical function configuration_class::must_write_final ( integer, intent(in)  iter)
subroutine configuration_class::new_configuration ( integer  rank,
character(*)  configfile 
)

Constructor for a type defined once (global configuration)

Here is the call graph for this function:

subroutine configuration_class::new_mpi_configuration ( )

Create a MPI user-defined type for all the configuration.

Here is the call graph for this function:

subroutine configuration_class::new_mpi_longint ( )

Here is the call graph for this function:

integer function configuration_class::new_mpi_nb_partitions ( )

Create a MPI user-defined type for number of partitions and bands.

Here is the call graph for this function:

subroutine configuration_class::parse_config ( integer, intent(in)  id)

Parser for configuration file (allows custom error)

Here is the call graph for this function:

subroutine configuration_class::print_configuration ( )

Print.

subroutine configuration_class::print_iterations ( integer, intent(in)  nb_iter)

Here is the call graph for this function:

integer function configuration_class::search_arg ( character(*), intent(in)  arg,
character(*), dimension(:), intent(in)  list_args 
)

Here is the call graph for this function:

subroutine configuration_class::set_arg ( character(*), intent(in)  arg,
character(*), intent(in)  val,
character(*), dimension(:), intent(in)  list_args 
)

Here is the call graph for this function:

subroutine configuration_class::set_cfl ( double precision  cfl)
subroutine configuration_class::set_dt ( double precision  dt)
subroutine configuration_class::set_nb_bands_configuration ( integer, dimension(:), intent(in)  nb)

Set the total number of bands.

subroutine configuration_class::set_nb_bands_configuration_zone ( integer, intent(in)  nb,
integer, intent(in)  zone 
)

Set the number of bands on a zone.

Parameters
zone: zone indice
subroutine configuration_class::set_nb_bands_resized_configuration ( integer, dimension(:)  nb)

Set the number of resized bands.

subroutine configuration_class::set_nb_bands_resized_configuration_zone ( integer  nb,
integer, intent(in)  zone 
)

Set the number of resized bands.

Parameters
zone: zone indice
subroutine configuration_class::set_nb_bands_square_configuration ( integer, dimension(:), intent(in)  nb)

Set the number of bands with square partitions.

subroutine configuration_class::set_nb_bands_square_configuration_zone ( integer, intent(in)  nb,
integer, intent(in)  zone 
)

Set the number of bands with square partitions on a zone.

Parameters
zone: zone indice
subroutine configuration_class::set_nb_partitions_configuration ( integer, dimension(:), intent(in)  nb)

Set total number partitions (with idle process)

subroutine configuration_class::set_nb_partitions_configuration_zone ( integer, intent(in)  nb,
integer, intent(in)  zone 
)

Set total number partitions in a zone (with idle process)

subroutine configuration_class::set_times ( )
subroutine configuration_class::store_period ( character(*)  val,
integer(kind=4)  T 
)

Split period from HHMM format to minutes only. Minutes can be a float.

Here is the call graph for this function:

subroutine configuration_class::update_configuration ( )

Update the number of partitions and bands after the partitioning from the master process (only for parallel configuration) The caller must check nb_procs > 1.

Here is the call graph for this function:

Member Data Documentation

character(*), parameter configuration_class::fname_config = "configuration_class.F90"

The documentation for this module was generated from the following file: