Contains all functions and subroutines used by the analytical partitioning. More...
Public Member Functions | |
integer function | nb_parts_on_band (i) |
Return the number of partitions in the band i, whatever the band. Works for all sectors. More... | |
integer function | nb_parts_on_band_sector (i) |
Return the number of partitions in the band i, whatever the band. Works for both hemispheres, but on the first sector only ! More... | |
logical function | has_leftover_band (zone) |
Check if our partitioning has a "last band", meaning a leftover of partititions. More... | |
integer function | sum_partitions (i) |
Returns the sum of all partitions up to the ith line on the adequate sector. For that, we need to compute the current sector. More... | |
integer function | sum_partitions_sector (i) |
Returns the sum of all partitions up to the ith line on the first sector. On the south hemisphere, it sums from the south pole. Work also for the leftover band. More... | |
logical function | is_leftover_band (i_pos) |
Check if the partition is on the leftover band in our partitioning. Different from the last band. More... | |
integer function | zone_from_ipos (i) |
Small function for finding the zone from the band latitude. More... | |
logical function | middle_partition (i, j, zone) |
Returns true if the partition is on the middle of the current band (for square partitions). More... | |
integer function | translate_jpos (j, nb_parts) |
Translate the column position of the partition into the first sector if needs to be. More... | |
integer function | nb_cells_south_last (i_pos, zone, nb_cells) |
Find number of cells on the south latitude line for the current partition. More... | |
integer function | nb_cells_north_last (i_pos, zone, nb_cells) |
Find number of cells on latitude north of the last latitude for the current partition. More... | |
integer function | nb_cells_next_lat_ghost (is_first, i_pos, zone, nb_cells) |
Find number of cells on the next north/south latitude from ghost cells. More... | |
logical function | is_just_before_equator (i_pos) |
Returns if the partition is on the band just before the equator. More... | |
logical function | is_just_after_equator (i_pos) |
Returns if the partition is on the band just after the equator. More... | |
logical function | right_partition (i, j) |
Returns true if the partition is on the right of the current band. More... | |
integer function | nb_square_parts_on_band (i) |
Return the number of partitions in the band i on a sector. Works only for the partitions in [1,N^2]. Works also for the southern hemisphere. More... | |
integer function | sector_from_zone (zone) |
Find the sector from the zone. More... | |
logical function | on_northern_hemisphere (zone) |
Returns true if the current zone is on the northern hemisphere. More... | |
logical function | on_southern_hemisphere (zone) |
Returns true if the current zone is on the south hemisphere. More... | |
logical function | is_on_last_band (i_pos, zone) |
Check if the partition is on the last band in our partitioning (last band here means either the last band in the square partitioning or the last band with a rest. More... | |
integer function | left_south_cell (cur, mid, zone) |
Wrapper for left_south_cell. On the south hemisphere, south and north relations are inverted. !! Warning !! it determines the hemisphere based on the zone (does not work for a single partition, so better call the underlying function) !! Warning !! does not work at the equator. More... | |
integer function | left_north_cell (cur, mid, zone) |
Wrapper for left_north_cell. On the south hemisphere, south and north relations are inverted. !! Warning !! it determines the hemisphere based on the zone (does not work for a single partition, so better call the underlying function) !! Warning !! does not work at the equator. More... | |
integer function | right_south_cell (cur, mid, last, zone) |
Wrapper for right_south_cell_northern. On the south hemisphere, south and north relations are inverted. !! Warning !! it determines the hemisphere based on the zone (does not work for a single partition, so better call the underlying function) !! Warning !! does not work at the equator. More... | |
integer function | right_north_cell (cur, mid, last, zone) |
Wrapper for right_north_cell_northern. On the south hemisphere, south and north relations are inverted. !! Warning !! it determines the hemisphere based on the zone (does not work for a single partition, so better call the underlying function) !! Warning !! does not work at the equator. More... | |
integer function | right_south_cell_northern (cur, mid) |
Fast computation of the rightmost south neighbour of the cell number cur Warning : only works on northern hemisphere ! Returns only the position on the next lat. More... | |
integer function | left_south_cell_northern (cur, mid) |
Fast computation of the leftmost south neighbour of the cell number cur Returns only the position on the next lat Warning : only works on northern hemisphere ! More... | |
integer function | left_north_cell_northern (cur, mid) |
Fast computation of the leftmost north neighbour of the cell number cur Mid is the middle on the current part Warning : only works on northern hemisphere ! Returns only the position on the previous lat. More... | |
integer function | right_north_cell_northern (cur, mid, last) |
Fast computation of the rightmost north neighbour of the cell number cur Returns only the position on the previous lat Warning : only works on northern hemisphere ! More... | |
Contains all functions and subroutines used by the analytical partitioning.
logical function analytical_partitioning::has_leftover_band | ( | integer, intent(in) | zone | ) |
Check if our partitioning has a "last band", meaning a leftover of partititions.
logical function analytical_partitioning::is_just_after_equator | ( | integer, intent(in) | i_pos | ) |
Returns if the partition is on the band just after the equator.
logical function analytical_partitioning::is_just_before_equator | ( | integer, intent(in) | i_pos | ) |
Returns if the partition is on the band just before the equator.
logical function analytical_partitioning::is_leftover_band | ( | integer, intent(in) | i_pos | ) |
Check if the partition is on the leftover band in our partitioning. Different from the last band.
logical function analytical_partitioning::is_on_last_band | ( | integer, intent(in) | i_pos, |
integer, intent(in) | zone | ||
) |
Check if the partition is on the last band in our partitioning (last band here means either the last band in the square partitioning or the last band with a rest.
zone | : current partition zone |
i_pos | : partition band |
integer function analytical_partitioning::left_north_cell | ( | integer, intent(in) | cur, |
integer, intent(in) | mid, | ||
integer, intent(in) | zone | ||
) |
Wrapper for left_north_cell. On the south hemisphere, south and north relations are inverted. !! Warning !! it determines the hemisphere based on the zone (does not work for a single partition, so better call the underlying function) !! Warning !! does not work at the equator.
mid | : the middle cell on the current part |
integer function analytical_partitioning::left_north_cell_northern | ( | integer, intent(in) | cur, |
integer, intent(in) | mid | ||
) |
Fast computation of the leftmost north neighbour of the cell number cur Mid is the middle on the current part Warning : only works on northern hemisphere ! Returns only the position on the previous lat.
integer function analytical_partitioning::left_south_cell | ( | integer, intent(in) | cur, |
integer, intent(in) | mid, | ||
integer, intent(in) | zone | ||
) |
Wrapper for left_south_cell. On the south hemisphere, south and north relations are inverted. !! Warning !! it determines the hemisphere based on the zone (does not work for a single partition, so better call the underlying function) !! Warning !! does not work at the equator.
mid | : the middle cell on the current line |
cur | : current cell (in global coordinates) |
integer function analytical_partitioning::left_south_cell_northern | ( | integer, intent(in) | cur, |
integer, intent(in) | mid | ||
) |
Fast computation of the leftmost south neighbour of the cell number cur Returns only the position on the next lat Warning : only works on northern hemisphere !
mid | : the middle of the current latitude line. |
logical function analytical_partitioning::middle_partition | ( | integer, intent(in) | i, |
integer, intent(in) | j, | ||
integer, intent(in) | zone | ||
) |
Returns true if the partition is on the middle of the current band (for square partitions).
i | : band number |
j | : partition number on the band (for any sector) |
zone | : partition zone |
integer function analytical_partitioning::nb_cells_next_lat_ghost | ( | logical, intent(in) | is_first, |
integer, intent(in) | i_pos, | ||
integer, intent(in) | zone, | ||
integer, intent(in) | nb_cells | ||
) |
Find number of cells on the next north/south latitude from ghost cells.
is_first | : true if the latitude line is the first (otherwise, the |
nb_cells | : number of cells on the current latitude (current partition) |
integer function analytical_partitioning::nb_cells_north_last | ( | integer, intent(in) | i_pos, |
integer, intent(in) | zone, | ||
integer, intent(in) | nb_cells | ||
) |
Find number of cells on latitude north of the last latitude for the current partition.
nb_cells | : number of cells on the last latitude (current partition) |
integer function analytical_partitioning::nb_cells_south_last | ( | integer, intent(in) | i_pos, |
integer, intent(in) | zone, | ||
integer, intent(in) | nb_cells | ||
) |
Find number of cells on the south latitude line for the current partition.
nb_cells | : number of cells on the last latitude (current partition) |
integer function analytical_partitioning::nb_parts_on_band | ( | integer, intent(in) | i | ) |
Return the number of partitions in the band i, whatever the band. Works for all sectors.
zone | : zone indice |
i | : band number |
integer function analytical_partitioning::nb_parts_on_band_sector | ( | integer, intent(in) | i | ) |
Return the number of partitions in the band i, whatever the band. Works for both hemispheres, but on the first sector only !
zone | : zone indice |
i | : band number |
integer function analytical_partitioning::nb_square_parts_on_band | ( | integer, intent(in) | i | ) |
Return the number of partitions in the band i on a sector. Works only for the partitions in [1,N^2]. Works also for the southern hemisphere.
logical function analytical_partitioning::on_northern_hemisphere | ( | integer, intent(in) | zone | ) |
Returns true if the current zone is on the northern hemisphere.
logical function analytical_partitioning::on_southern_hemisphere | ( | integer, intent(in) | zone | ) |
Returns true if the current zone is on the south hemisphere.
integer function analytical_partitioning::right_north_cell | ( | integer, intent(in) | cur, |
integer, intent(in) | mid, | ||
integer, intent(in) | last, | ||
integer, intent(in) | zone | ||
) |
Wrapper for right_north_cell_northern. On the south hemisphere, south and north relations are inverted. !! Warning !! it determines the hemisphere based on the zone (does not work for a single partition, so better call the underlying function) !! Warning !! does not work at the equator.
mid | : the middle on the current part |
last | : the number of cells on the current latitude band |
integer function analytical_partitioning::right_north_cell_northern | ( | integer, intent(in) | cur, |
integer, intent(in) | mid, | ||
integer, intent(in) | last | ||
) |
Fast computation of the rightmost north neighbour of the cell number cur Returns only the position on the previous lat Warning : only works on northern hemisphere !
mid | : the middle on the current part |
last | : the number of cells on the current latitude band |
logical function analytical_partitioning::right_partition | ( | integer, intent(in) | i, |
integer, intent(in) | j | ||
) |
Returns true if the partition is on the right of the current band.
i | : band number |
j | : partition number on the band |
integer function analytical_partitioning::right_south_cell | ( | integer, intent(in) | cur, |
integer, intent(in) | mid, | ||
integer, intent(in) | last, | ||
integer, intent(in) | zone | ||
) |
Wrapper for right_south_cell_northern. On the south hemisphere, south and north relations are inverted. !! Warning !! it determines the hemisphere based on the zone (does not work for a single partition, so better call the underlying function) !! Warning !! does not work at the equator.
mid | : the middle on the current latitude line (single sector) |
last | : the number of cells on the current latitude line |
integer function analytical_partitioning::right_south_cell_northern | ( | integer, intent(in) | cur, |
integer, intent(in) | mid | ||
) |
Fast computation of the rightmost south neighbour of the cell number cur Warning : only works on northern hemisphere ! Returns only the position on the next lat.
integer function analytical_partitioning::sector_from_zone | ( | integer, intent(in) | zone | ) |
Find the sector from the zone.
integer function analytical_partitioning::sum_partitions | ( | integer, intent(in) | i | ) |
Returns the sum of all partitions up to the ith line on the adequate sector. For that, we need to compute the current sector.
i | : band number |
integer function analytical_partitioning::sum_partitions_sector | ( | integer, intent(in) | i | ) |
Returns the sum of all partitions up to the ith line on the first sector. On the south hemisphere, it sums from the south pole. Work also for the leftover band.
i | : band number |
integer function analytical_partitioning::translate_jpos | ( | integer, intent(in) | j, |
integer, intent(in) | nb_parts | ||
) |
Translate the column position of the partition into the first sector if needs to be.
j | :: columun position |
nb_parts | :: number of partition on the current band (first sector) |
integer function analytical_partitioning::zone_from_ipos | ( | integer, intent(in) | i | ) |
Small function for finding the zone from the band latitude.