My Project
programmer's documentation
Functions/Subroutines | Variables
atimbr Module Reference

Functions/Subroutines

subroutine allocate_all ()
 Allocate variables adapted to the number of files and time step to be considered. More...
 
subroutine finalize_imbrication ()
 Final step for deallocation. More...
 
subroutine interpolate_all_profiles (the_time)
 Time interpolation of all profiles -. More...
 
subroutine dump_interpolated_profiles
 Print the interpolated profiles for checking purposes. More...
 
integer function yo2j (year, ordinal)
 Converts a (year,ordinal) date to julian calendar date for calculating time shifts. More...
 
subroutine read_files_list (a_file, the_list)
 Reads a file having in each significative line a file name it returns then as 'the_list' the list of lines read a line is significative if it's first char is not / or # or ! The following 3 lines give an example from which one must remove the first two characters. More...
 
subroutine find_next_line (unilog, current_line, meteo_file, l_iostat)
 Find next validated line. More...
 
subroutine read_meteo_file (meteo_file)
 Reads a meteo_file for Code_Saturne Atmospheric Physics option. More...
 
subroutine check_chronologies
 Checks the time variables to ensure the chronology. More...
 
subroutine check_positions
 Check that the profiles position is the same over time. More...
 
subroutine check_altitudes
 Check that the profiles vertical grids heights are strictly increasing. More...
 
subroutine hydrostatic_pressure
 Compute the hydrostastic pressure by Laplace integration. More...
 
subroutine potential_temperature_and_density
 Computes the potential_temperature_and_density profiles. More...
 
subroutine get_index (the_array, the_value, lower, upper)
 Search for the position of a value in an array, assuming that the array is sorted in a strictly increasing order. More...
 
subroutine time_interpolation (the_time, the_times, the_profiles, interpolated_profile)
 Interpolates a "profile" at a given time. Given a series of profiles varying in time you get the profile interpolated from them at the given time. More...
 
subroutine altitude_interpolation (the_altitude, the_altitudes, the_profile, interpolated_value)
 interpolates in a profile at a given altitude More...
 
subroutine red_tape
 Compute radius of influence. More...
 
subroutine bounds (string, length, b, e)
 Identification of the first and last non white character of a string. More...
 
subroutine activate_imbrication
 Prepare data for imbrication by reading meteo files. More...
 
subroutine summon_cressman (the_time)
 Prepare for the cressman interpolation of the variables. More...
 

Variables

logical imbrication_flag
 activation flag More...
 
logical, save imbrication_verbose
 
logical cressman_u
 Flags for activating the cressman interpolation for the boundary conditions. More...
 
logical cressman_v
 
logical cressman_tke
 
logical cressman_eps
 
logical cressman_theta
 
logical cressman_qw
 
logical cressman_nc
 
double precision horizontal_influence_radius
 numerical parameters for the cressman interpolation formulas More...
 
double precision vertical_influence_radius
 
integer line_len
 Parameter for "meteo" files. More...
 
character(line_lenimbrication_files_list
 
character(line_len), dimension(:), allocatable imbrication_files
 
integer number_of_files
 
character *(3) skip_chars
 
integer thermal_profile_dim
 Profile dimension variable. More...
 
integer dynamical_profile_dim
 
integer sections_per_file
 Time sections per files. More...
 
integer, dimension(:,:), allocatable years
 read data from "meteo" files More...
 
integer, dimension(:,:), allocatable ordinals
 
integer, dimension(:,:), allocatable hours
 
integer, dimension(:,:), allocatable minutes
 
double precision, dimension(:,:), allocatable seconds
 
double precision, dimension(:,:), allocatable xpos
 Positions. More...
 
double precision, dimension(:,:), allocatable ypos
 
double precision, dimension(:,:), allocatable ground_pressure
 
double precision, dimension(:,:,:), allocatable zt
 Vertical grid for temperature and humidity variables. More...
 
double precision, dimension(:,:,:), allocatable tempc
 
double precision, dimension(:,:,:), allocatable qw
 
double precision, dimension(:,:,:), allocatable nc
 
double precision, dimension(:,:,:), allocatable zd
 Vertical grid for wind variables. More...
 
double precision, dimension(:,:,:), allocatable u
 
double precision, dimension(:,:,:), allocatable v
 
double precision, dimension(:,:,:), allocatable tke
 
double precision, dimension(:,:,:), allocatable eps
 
double precision, dimension(:,:), allocatable, target times
 derived data More...
 
double precision, dimension(:,:,:), allocatable pressure
 
double precision, dimension(:,:,:), allocatable theta
 
double precision, dimension(:,:,:), allocatable density
 
double precision, dimension(:,:), allocatable ti_zt
 time interpolated profiles More...
 
double precision, dimension(:,:), allocatable ti_tempc
 
double precision, dimension(:,:), allocatable ti_qw
 
double precision, dimension(:,:), allocatable ti_nc
 
double precision, dimension(:,:), allocatable ti_zd
 
double precision, dimension(:,:), allocatable ti_u
 
double precision, dimension(:,:), allocatable ti_v
 
double precision, dimension(:,:), allocatable ti_tke
 
double precision, dimension(:,:), allocatable ti_eps
 
double precision, dimension(:,:), allocatable ti_pressure
 
double precision, dimension(:,:), allocatable ti_theta
 
double precision, dimension(:,:), allocatable ti_density
 
double precision, dimension(:,:,:), allocatable coordinates_th
 additional variables More...
 
double precision, dimension(:,:,:), allocatable influence_param_th
 
double precision, dimension(:,:,:), allocatable coordinates_dyn
 
double precision, dimension(:,:,:), allocatable influence_param_dyn
 
integer id_u
 
integer id_v
 
integer id_tke
 
integer id_eps
 
integer id_theta
 
integer id_qw
 
integer id_nc
 
double precision, dimension(:), pointer times_sequence =>null()
 1D array of times at which profiles are given More...
 

Function/Subroutine Documentation

◆ activate_imbrication()

subroutine atimbr::activate_imbrication ( )

Prepare data for imbrication by reading meteo files.

Warning : the list of files is supposed to be "imbrication_files_list.txt"

◆ allocate_all()

subroutine atimbr::allocate_all ( )

Allocate variables adapted to the number of files and time step to be considered.

◆ altitude_interpolation()

subroutine atimbr::altitude_interpolation ( double precision, intent(in)  the_altitude,
double precision, dimension(:), intent(in)  the_altitudes,
double precision, dimension(:), intent(in)  the_profile,
double precision, intent(out)  interpolated_value 
)

interpolates in a profile at a given altitude

Parameters
[in]the_altitudecurrent height
[in]the_altitudesheight array
[in]the_profilethe profile
[out]interpolated_valueinterpolated profile

◆ bounds()

subroutine atimbr::bounds ( character*(length)  string,
integer  length,
integer  b,
integer  e 
)

Identification of the first and last non white character of a string.

Parameters
[in]stringthe input string
[in]lengthits length
[out]bnumber of the first non white character
[out]enumber of the last non white character

◆ check_altitudes()

subroutine atimbr::check_altitudes ( )

Check that the profiles vertical grids heights are strictly increasing.

◆ check_chronologies()

subroutine atimbr::check_chronologies ( )

Checks the time variables to ensure the chronology.

◆ check_positions()

subroutine atimbr::check_positions ( )

Check that the profiles position is the same over time.

◆ dump_interpolated_profiles()

subroutine atimbr::dump_interpolated_profiles ( )

Print the interpolated profiles for checking purposes.

◆ finalize_imbrication()

subroutine atimbr::finalize_imbrication ( )

Final step for deallocation.

◆ find_next_line()

subroutine atimbr::find_next_line ( integer  unilog,
character(line_len current_line,
character(line_len meteo_file,
integer  l_iostat 
)

Find next validated line.

Parameters
[in]uniloglogical unit number of the reading file
[out]current_linethe characters of the line
[in]meteo_filename of the 'meteo' file
[out]l_iostatlogical status of I/O following a read statement

◆ get_index()

subroutine atimbr::get_index ( double precision, dimension(:), intent(in)  the_array,
double precision, intent(in)  the_value,
integer, intent(out)  lower,
integer, intent(out)  upper 
)

Search for the position of a value in an array, assuming that the array is sorted in a strictly increasing order.

return if possible lower,upper such that :

  • the_array(lower) <= the_value <= the_array(upper) otherwise : lower==upper if the_value<the_array(first) or if the_value>the_array(last) lower> upper if none of the previous cases applies (anomaly)
    Parameters
    [in]the_arrayan array
    [in]the_valuea particular value
    [in]lowerthe index of the first membre of the array lower than the value
    [in]upperthe index of the first membre of the array greater than the value

◆ hydrostatic_pressure()

subroutine atimbr::hydrostatic_pressure ( )

Compute the hydrostastic pressure by Laplace integration.

◆ interpolate_all_profiles()

subroutine atimbr::interpolate_all_profiles ( double precision  the_time)

Time interpolation of all profiles -.

Parameters
[in]the_timecurrent time

◆ potential_temperature_and_density()

subroutine atimbr::potential_temperature_and_density ( )

Computes the potential_temperature_and_density profiles.

◆ read_files_list()

subroutine atimbr::read_files_list ( character(line_len a_file,
character(line_len), dimension(:), allocatable  the_list 
)

Reads a file having in each significative line a file name it returns then as 'the_list' the list of lines read a line is significative if it's first char is not / or # or ! The following 3 lines give an example from which one must remove the first two characters.

  • /list of files
  • profile_one.txt
  • profile_two.txt

    Beware that blank lines or lines starting with blanks+ comment_char are NOT ignored.

    Parameters
    [in]a_filethe file with list of file names
    [out]the_listthe list of file names

◆ read_meteo_file()

subroutine atimbr::read_meteo_file ( character(line_len meteo_file)

Reads a meteo_file for Code_Saturne Atmospheric Physics option.

They contain an arbitrary number (>=1) of sections having the following structure. Comment lines start with a slash / as first character

  • yyyy,dd,hh,mm,ss
  • xpos,ypos
  • ground pressure
  • nt (thermal profile dimension)
  • nt lines of
  • zt,tempC,qw(kg/kg),Ndrops(1/cm3)
  • nd (thermal profile dimension)
  • nd lines of
  • zd,u,v,k,eps

    WARNINGS: Beware that all dimensions nt,nd must be the same as the first one.

    Beware that blank lines or lines starting with blanks+ comment_char are NOT ignored.

    Parameters
    [in]meteo_file"meteo" file name

◆ red_tape()

subroutine atimbr::red_tape ( )

Compute radius of influence.

◆ summon_cressman()

subroutine atimbr::summon_cressman ( double precision  the_time)

Prepare for the cressman interpolation of the variables.

Parameters
[in]the_timecurrent time

◆ time_interpolation()

subroutine atimbr::time_interpolation ( double precision, intent(in)  the_time,
double precision, dimension(:), intent(in)  the_times,
double precision, dimension(:,:), intent(in)  the_profiles,
double precision, dimension(:), intent(out)  interpolated_profile 
)

Interpolates a "profile" at a given time. Given a series of profiles varying in time you get the profile interpolated from them at the given time.

Parameters
[in]the_timecurrent time
[in]the_timestimes array
[in]the_profilesinput profiles
[out]interpolated_profileoutput profile

◆ yo2j()

integer function atimbr::yo2j ( integer  year,
integer  ordinal 
)

Converts a (year,ordinal) date to julian calendar date for calculating time shifts.

Parameters
[in]year
[in]ordinalnumber of the day in the year e.g 1st january has ordinal 1 31 december 365 or 366