AGRIF
Adaptive Grid Refinement In Fortran
agrif_user_functions Module Reference

Module Agrif_user_Functions. More...

Data Types

interface  agrif_parent
 

Functions/Subroutines

real function agrif_rel_dt ()
 Returns the time step of the current grid, relatively to the root grid (for which dt=1.). More...
 
integer function agrif_rel_idt ()
 This function returns an integer which is the time refinement factor of the current grid, relatively to the root grid (for which time step = 1). More...
 
integer function agrif_irhot ()
 This function returns an integer number which is the time refinement factor of the current grid. More...
 
real function agrif_rhot ()
 This function returns a real number which is the time refinement factor of the current grid. More...
 
integer function agrif_parent_irhot ()
 This function returns an integer number which represents the time refinement factor of the parent of the current grid. More...
 
real function agrif_parent_rhot ()
 Returns a real number which represents the time refinement factor of the parent of the current grid. More...
 
integer function agrif_nbstepint ()
 This function returns an integer which is the time step of the current grid inside one time step of its parent grid. More...
 
integer function agrif_parent_nbstepint ()
 It returns an integer which represents time step of the parent grid inside one time step of its parent grid. More...
 
subroutine agrif_interpnearborderx ()
 Allows to interpolate (in the x direction) on a near (West) border of the current grid if this one has a common border with the root coarse grid. More...
 
subroutine agrif_interpdistantborderx ()
 Allows to interpolate (in the x direction) on a distant (East) border of the current grid if this one has a common border with the root coarse grid. More...
 
subroutine agrif_interpnearbordery ()
 Allows to interpolate (in the y direction) on a near (South) border of the current grid if this one has a common border with the root coarse grid. More...
 
subroutine agrif_interpdistantbordery ()
 Allows to interpolate (in the y direction) on a distant (North) border of the current grid if this one has a common border with the root coarse grid. More...
 
subroutine agrif_interpnearborderz ()
 Allows to interpolate (in the z direction) on a near (Down) border of the current grid if this one has a common border with the root coarse grid. More...
 
subroutine agrif_interpdistantborderz ()
 Allows to interpolate (in the z direction) on a distant (Up) border of the current grid if this one has a common border with the root coarse grid. More...
 
integer function agrif_parent_nb_step ()
 This function returns an integer which is the number of time step of the parent of the current grid. More...
 
logical function agrif_root ()
 This function returns a logical which indicates if the current grid is the root grid or not. More...
 
logical function agrif_grandmother ()
 This function returns a logical which indicates if the current grid is the grandmother grid or not. More...
 
logical function agrif_parent_root ()
 This function indicates if the parent of the current grid is the root grid or not. More...
 
integer function agrif_fixed ()
 This function returns the number of the current grid. More...
 
integer function agrif_parent_fixed ()
 This function returns the number of the parent of the current grid. More...
 
logical function agrif_is_fixed ()
 This function returns .TRUE. if the current grid is fixed even if we are on the root grid. More...
 
logical function agrif_parent_is_fixed ()
 This function returns .TRUE. if the parent grid of the current grid is fixed even if we are on the root grid. More...
 
character(3) function agrif_cfixed ()
 This function returns the number of the current grid as a string. More...
 
character(3) function agrif_parent_cfixed ()
 This function returns the number of the parent of the current grid as a string. More...
 
subroutine agrif_childgrid_to_parentgrid ()
 This subroutine makes #Agrif_Curgrid point on the parent grid of the current grid. More...
 
subroutine agrif_parentgrid_to_childgrid ()
 This subroutine makes the pointer #Agrif_Curgrid point on the child grid after having called the subroutine :agrifdoc:moduserfunctions.F90::agrif_childgrid_to_parentgrid<Agrif_ChildGrid_to_ParentGrid()> . More...
 
integer function agrif_get_unit ()
 This function returns a unit not connected to any file. More...
 
subroutine agrif_set_extra_boundary_cells (nb_extra_cells)
 This subroutine is used to set the number of extra boundary cells which is take as input parameter. More...
 
subroutine agrif_set_efficiency (eff)
 This subroutine is used to set the efficiency which is taken as input parameter. More...
 
subroutine agrif_set_regridding (regfreq)
 This subroutine is used to set the regridding frequency which is taken as input parameter. More...
 
subroutine agrif_set_coeffref_x (coeffref)
 This subroutine is used to set the space refinement coefficient in the x direction (first dimension). More...
 
subroutine agrif_set_coeffref_y (coeffref)
 This subroutine is used to set the space refinement coefficient in the y direction (second dimension). More...
 
subroutine agrif_set_coeffref_z (coeffref)
 This subroutine is used to set the space refinement coefficient in the z direction (third dimension). More...
 
subroutine agrif_set_coeffreft_x (coeffref)
 This subroutine is used to set the time refinement factor in x direction (first dimension). More...
 
subroutine agrif_set_coeffreft_y (coeffref)
 This subroutine is used to set the time refinement factor in y direction (second dimension). More...
 
subroutine agrif_set_coeffreft_z (coeffref)
 This subroutine is used to set the time refinement coefficient in the z direction (third dimension). More...
 
subroutine agrif_set_minwidth (coefminwidth)
 This subroutine is used to set the minimum width which is taken as input parameter. More...
 
subroutine agrif_set_rafmax (coefrafmax)
 This subroutine is used to set the maximal level in x,y and z-direction which is taken as input parameter. More...
 
subroutine agrif_set_maskmaxsearch (mymaxsearch)
 
integer function agrif_level ()
 This function returns the level of the current grid in the grids hierarchy. More...
 
integer function agrif_maxlevel ()
 This function returns the maximum level of grid location in the hierarchy. More...
 
logical function agrif_gridallocation_is_done ()
 This function is used to verify if the the allocation is done for the current grid. More...
 
real(kind=4) function agrif_parent_real_4 (real_variable)
 This function returns the list of real grid variables of the parent of the current grid as single-precision real floating-point. More...
 
real(kind=8) function agrif_parent_real_8 (real_variable)
 This function returns the list of real grid variables of the parent of the current grid as double-precision real floating-point. More...
 
integer function agrif_parent_integer (integer_variable)
 This function returns the list of integer grid variables of the parent of the current grid as integer. More...
 
character(len(character_variable)) function agrif_parent_character (character_variable)
 This function returns the list of character grid variables of the parent of the current grid as character. More...
 
logical function agrif_parent_logical (logical_variable)
 This function returns the list of logical grid variables of the parent of the current grid as logical variables. More...
 
integer function agrif_irhox ()
 This function is used to get the space refinement factor of the current grid in x direction (first dimension) set as integer. More...
 
integer function agrif_irhoy ()
 This function is used to get the space refinement factor of the current grid in y direction (second dimension) set as integer. More...
 
integer function agrif_irhoz ()
 This function is used to get the space refinement factor of the current grid in z direction (third dimension) set as integer. More...
 
logical function agrif_nearcommonborderx ()
 This function returns a logical which indicates whether the current grid and root grid have a common border on the western side of the first dimension of space (the x direction). More...
 
logical function agrif_nearcommonbordery ()
 This function returns a logical which indicates whether the current grid and root grid have a common border on the southern side of the second dimension of space (the y direction). More...
 
logical function agrif_nearcommonborderz ()
 This function returns a logical which indicates whether the current grid and root grid have a common border on the down side of the third dimension of space (the z direction). More...
 
logical function agrif_distantcommonborderx ()
 This function returns a logical which indicates whether the current grid and root grid have a common border on the eastern side of the first dimension of space (the x direction). More...
 
logical function agrif_distantcommonbordery ()
 This function returns a logical which indicates whether the current grid and root grid have a common border on the northern side of the second dimension of space (the y direction). More...
 
logical function agrif_distantcommonborderz ()
 This function returns a logical which indicates whether the current grid and root grid have a common border on the up side of the third dimension of space (the z direction). More...
 
integer function agrif_ix ()
 This function returns an integer which indicates the minimal position of the current grid in the x direction. More...
 
integer function agrif_iy ()
 This function returns an integer which indicates the minimal position of the current grid in the y direction. More...
 
integer function agrif_iz ()
 This function returns an integer which indicates the minimal position of the current grid in the z direction. More...
 
integer function agrif_get_grid_id ()
 This function is used to get the grid id of the current grid. More...
 
integer function agrif_get_parent_id ()
 This function is used to get the grid id of the parent grid of the current grid. More...
 
real function agrif_rhox ()
 This function returns a real number which represents the space refinement factor of the current grid for the first dimension x. More...
 
real function agrif_rhoy ()
 This function returns a real number which represents the space refinement factor of the current grid for the second dimension y. More...
 
real function agrif_rhoz ()
 This function returns a real number which represents the space refinement factor of the current grid for the third dimension z. More...
 
integer function agrif_nb_step ()
 This function returns an integer which represents the number of time steps of the current grid. More...
 
integer function agrif_nb_fine_grids ()
 This function returns the number of fixed grids. More...
 

Detailed Description

Module Agrif_user_Functions.

This module defines procedures concerning current grids informations.

Function/Subroutine Documentation

real function agrif_user_functions::agrif_rel_dt ( )

Returns the time step of the current grid, relatively to the root grid (for which dt=1.).

In fact, it is a real number which could be define as the ratio between the current grid time step and the root grid time step.

Returns
time step
integer function agrif_user_functions::agrif_rel_idt ( )

This function returns an integer which is the time refinement factor of the current grid, relatively to the root grid (for which time step = 1).

It is the inverse of Agrif_rel_dt set to integer. Here, it is the ratio between the time step of the root grid and the time step of the current grid.

Returns
time step
integer function agrif_user_functions::agrif_irhot ( )

This function returns an integer number which is the time refinement factor of the current grid.

Returns
time refinement factor of the current grid
real function agrif_user_functions::agrif_rhot ( )

This function returns a real number which is the time refinement factor of the current grid.

Returns
time refinement factor of the current grid
integer function agrif_user_functions::agrif_parent_irhot ( )

This function returns an integer number which represents the time refinement factor of the parent of the current grid.

Returns
time refinement factor of the parent grid
real function agrif_user_functions::agrif_parent_rhot ( )

Returns a real number which represents the time refinement factor of the parent of the current grid.

Returns
time refinement factor of the parent grid
integer function agrif_user_functions::agrif_nbstepint ( )

This function returns an integer which is the time step of the current grid inside one time step of its parent grid.

It variates from zero to the time refinement factor of the current grid minus 1 (Agrif_Rhot - 1). It is useful for example for interpolation/update.

Returns
time step of the current grid
integer function agrif_user_functions::agrif_parent_nbstepint ( )

It returns an integer which represents time step of the parent grid inside one time step of its parent grid.

It variates from zero to the time refinement factor of the parent grid minus 1 (Agrif_Parent_Rhot - 1).

Returns
time step of the parent grid
subroutine agrif_user_functions::agrif_interpnearborderx ( )

Allows to interpolate (in the x direction) on a near (West) border of the current grid if this one has a common border with the root coarse grid.

subroutine agrif_user_functions::agrif_interpdistantborderx ( )

Allows to interpolate (in the x direction) on a distant (East) border of the current grid if this one has a common border with the root coarse grid.

subroutine agrif_user_functions::agrif_interpnearbordery ( )

Allows to interpolate (in the y direction) on a near (South) border of the current grid if this one has a common border with the root coarse grid.

subroutine agrif_user_functions::agrif_interpdistantbordery ( )

Allows to interpolate (in the y direction) on a distant (North) border of the current grid if this one has a common border with the root coarse grid.

subroutine agrif_user_functions::agrif_interpnearborderz ( )

Allows to interpolate (in the z direction) on a near (Down) border of the current grid if this one has a common border with the root coarse grid.

subroutine agrif_user_functions::agrif_interpdistantborderz ( )

Allows to interpolate (in the z direction) on a distant (Up) border of the current grid if this one has a common border with the root coarse grid.

integer function agrif_user_functions::agrif_parent_nb_step ( )

This function returns an integer which is the number of time step of the parent of the current grid.

In fact, it indicates the number of iterations done on the parent grid of the current grid since the start of the time integration of the grid.

Returns
time step of the parent of the current grid
logical function agrif_user_functions::agrif_root ( )

This function returns a logical which indicates if the current grid is the root grid or not.

logical function agrif_user_functions::agrif_grandmother ( )

This function returns a logical which indicates if the current grid is the grandmother grid or not.

logical function agrif_user_functions::agrif_parent_root ( )

This function indicates if the parent of the current grid is the root grid or not.

integer function agrif_user_functions::agrif_fixed ( )

This function returns the number of the current grid.

Indeed, it returns 0 for the coarse grid, a positive number for a fixed grid and -1 for a non fixed grid.

Returns
Result
integer function agrif_user_functions::agrif_parent_fixed ( )

This function returns the number of the parent of the current grid.

Indeed, it returns 0 for the coarse grid and non fixed parent grid and positive number for a fixed grid.

logical function agrif_user_functions::agrif_is_fixed ( )

This function returns .TRUE. if the current grid is fixed even if we are on the root grid.

logical function agrif_user_functions::agrif_parent_is_fixed ( )

This function returns .TRUE. if the parent grid of the current grid is fixed even if we are on the root grid.

character(3) function agrif_user_functions::agrif_cfixed ( )

This function returns the number of the current grid as a string.

character(3) function agrif_user_functions::agrif_parent_cfixed ( )

This function returns the number of the parent of the current grid as a string.

subroutine agrif_user_functions::agrif_childgrid_to_parentgrid ( )

This subroutine makes #Agrif_Curgrid point on the parent grid of the current grid.

subroutine agrif_user_functions::agrif_parentgrid_to_childgrid ( )

This subroutine makes the pointer #Agrif_Curgrid point on the child grid after having called the subroutine :agrifdoc:moduserfunctions.F90::agrif_childgrid_to_parentgrid<Agrif_ChildGrid_to_ParentGrid()> .

integer function agrif_user_functions::agrif_get_unit ( )

This function returns a unit not connected to any file.

subroutine agrif_user_functions::agrif_set_extra_boundary_cells ( integer, intent(in)  nb_extra_cells)

This subroutine is used to set the number of extra boundary cells which is take as input parameter.

Parameters
[in]nb_extra_cellsnumber of extra cells
subroutine agrif_user_functions::agrif_set_efficiency ( real, intent(in)  eff)

This subroutine is used to set the efficiency which is taken as input parameter.

Parameters
[in]effefficiency
subroutine agrif_user_functions::agrif_set_regridding ( integer, intent(in)  regfreq)

This subroutine is used to set the regridding frequency which is taken as input parameter.

Parameters
[in]regfreqRegridding frequency
subroutine agrif_user_functions::agrif_set_coeffref_x ( integer, intent(in)  coeffref)

This subroutine is used to set the space refinement coefficient in the x direction (first dimension).

Parameters
[in]coeffrefCoefficient of spatial refinement
subroutine agrif_user_functions::agrif_set_coeffref_y ( integer, intent(in)  coeffref)

This subroutine is used to set the space refinement coefficient in the y direction (second dimension).

Parameters
[in]coeffrefCoefficient of spatial refinement
subroutine agrif_user_functions::agrif_set_coeffref_z ( integer, intent(in)  coeffref)

This subroutine is used to set the space refinement coefficient in the z direction (third dimension).

Parameters
[in]coeffrefCoefficient of spatial refinement
subroutine agrif_user_functions::agrif_set_coeffreft_x ( integer, intent(in)  coeffref)

This subroutine is used to set the time refinement factor in x direction (first dimension).

Parameters
[in]coeffrefCoefficient of time refinement
subroutine agrif_user_functions::agrif_set_coeffreft_y ( integer, intent(in)  coeffref)

This subroutine is used to set the time refinement factor in y direction (second dimension).

Parameters
[in]coeffrefCoefficient of time refinement
subroutine agrif_user_functions::agrif_set_coeffreft_z ( integer, intent(in)  coeffref)

This subroutine is used to set the time refinement coefficient in the z direction (third dimension).

subroutine agrif_user_functions::agrif_set_minwidth ( integer, intent(in)  coefminwidth)

This subroutine is used to set the minimum width which is taken as input parameter.

Parameters
[in]coefminwidthCoefficient of minwidth
subroutine agrif_user_functions::agrif_set_rafmax ( integer, intent(in)  coefrafmax)

This subroutine is used to set the maximal level in x,y and z-direction which is taken as input parameter.

Parameters
[in]coefrafmaxmaximal space refinement coefficient
subroutine agrif_user_functions::agrif_set_maskmaxsearch ( integer, intent(in)  mymaxsearch)
Parameters
[in]mymaxsearchinput variables
integer function agrif_user_functions::agrif_level ( )

This function returns the level of the current grid in the grids hierarchy.

Returns
level of the current grid
integer function agrif_user_functions::agrif_maxlevel ( )

This function returns the maximum level of grid location in the hierarchy.

logical function agrif_user_functions::agrif_gridallocation_is_done ( )

This function is used to verify if the the allocation is done for the current grid.

real(kind=4) function agrif_user_functions::agrif_parent_real_4 ( real(kind=4)  real_variable)

This function returns the list of real grid variables of the parent of the current grid as single-precision real floating-point.

Parameters
real_variableinput real variable
real(kind=8) function agrif_user_functions::agrif_parent_real_8 ( real(kind=8)  real_variable)

This function returns the list of real grid variables of the parent of the current grid as double-precision real floating-point.

Parameters
real_variableinput real variable
integer function agrif_user_functions::agrif_parent_integer ( integer  integer_variable)

This function returns the list of integer grid variables of the parent of the current grid as integer.

character(len(character_variable)) function agrif_user_functions::agrif_parent_character ( character(*)  character_variable)

This function returns the list of character grid variables of the parent of the current grid as character.

logical function agrif_user_functions::agrif_parent_logical ( logical  logical_variable)

This function returns the list of logical grid variables of the parent of the current grid as logical variables.

integer function agrif_user_functions::agrif_irhox ( )

This function is used to get the space refinement factor of the current grid in x direction (first dimension) set as integer.

integer function agrif_user_functions::agrif_irhoy ( )

This function is used to get the space refinement factor of the current grid in y direction (second dimension) set as integer.

integer function agrif_user_functions::agrif_irhoz ( )

This function is used to get the space refinement factor of the current grid in z direction (third dimension) set as integer.

logical function agrif_user_functions::agrif_nearcommonborderx ( )

This function returns a logical which indicates whether the current grid and root grid have a common border on the western side of the first dimension of space (the x direction).

logical function agrif_user_functions::agrif_nearcommonbordery ( )

This function returns a logical which indicates whether the current grid and root grid have a common border on the southern side of the second dimension of space (the y direction).

logical function agrif_user_functions::agrif_nearcommonborderz ( )

This function returns a logical which indicates whether the current grid and root grid have a common border on the down side of the third dimension of space (the z direction).

logical function agrif_user_functions::agrif_distantcommonborderx ( )

This function returns a logical which indicates whether the current grid and root grid have a common border on the eastern side of the first dimension of space (the x direction).

logical function agrif_user_functions::agrif_distantcommonbordery ( )

This function returns a logical which indicates whether the current grid and root grid have a common border on the northern side of the second dimension of space (the y direction).

logical function agrif_user_functions::agrif_distantcommonborderz ( )

This function returns a logical which indicates whether the current grid and root grid have a common border on the up side of the third dimension of space (the z direction).

integer function agrif_user_functions::agrif_ix ( )

This function returns an integer which indicates the minimal position of the current grid in the x direction.

Returns
minimal position
integer function agrif_user_functions::agrif_iy ( )

This function returns an integer which indicates the minimal position of the current grid in the y direction.

Returns
minimal position
integer function agrif_user_functions::agrif_iz ( )

This function returns an integer which indicates the minimal position of the current grid in the z direction.

Returns
minimal position
integer function agrif_user_functions::agrif_get_grid_id ( )

This function is used to get the grid id of the current grid.

Returns
grid id of the current grid
integer function agrif_user_functions::agrif_get_parent_id ( )

This function is used to get the grid id of the parent grid of the current grid.

Returns
grid id of the parent grid
real function agrif_user_functions::agrif_rhox ( )

This function returns a real number which represents the space refinement factor of the current grid for the first dimension x.

Returns
space refinement factor
real function agrif_user_functions::agrif_rhoy ( )

This function returns a real number which represents the space refinement factor of the current grid for the second dimension y.

Returns
space refinement factor
real function agrif_user_functions::agrif_rhoz ( )

This function returns a real number which represents the space refinement factor of the current grid for the third dimension z.

Returns
space refinement factor
integer function agrif_user_functions::agrif_nb_step ( )

This function returns an integer which represents the number of time steps of the current grid.

Returns
number of time steps
integer function agrif_user_functions::agrif_nb_fine_grids ( )

This function returns the number of fixed grids.