9.0
general documentation
Loading...
Searching...
No Matches
atimbr Module Reference

Data Types

interface  cs_f_atmo_get_pointers_imbrication

Functions/Subroutines

subroutine atmo_init_imbrication ()
 Map Fortran to C variables.
subroutine allocate_all ()
 Allocate variables adapted to the number of files and time step to be considered.
subroutine finalize_imbrication ()
 Final step for deallocation.
subroutine interpolate_all_profiles (the_time)
 Time interpolation of all profiles -.
subroutine dump_interpolated_profiles
 Print the interpolated profiles for checking purposes.
integer function yo2j (year, ordinal)
 Converts a (year,ordinal) date to julian calendar date for calculating time shifts.
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.
subroutine find_next_line (unilog, current_line, meteo_file, l_iostat)
 Find next validated line.
subroutine read_meteo_file (meteo_file)
 Reads a meteo_file for code_saturne Atmospheric Physics option.
subroutine check_chronologies
 Checks the time variables to ensure the chronology.
subroutine check_positions
 Check that the profiles position is the same over time.
subroutine check_altitudes
 Check that the profiles vertical grids heights are strictly increasing.
subroutine hydrostatic_pressure
 Compute the hydrostastic pressure by Laplace integration.
subroutine potential_temperature_and_density
 Computes the potential_temperature_and_density profiles.
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.
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.
subroutine altitude_interpolation (the_altitude, the_altitudes, the_profile, interpolated_value)
 interpolates in a profile at a given altitude
subroutine red_tape
 Compute radius of influence.
subroutine bounds (string, length, b, e)
 Identification of the first and last non white character of a string.
subroutine activate_imbrication ()
 Prepare data for imbrication by reading meteo files.
subroutine summon_cressman (the_time)
 Prepare for the cressman interpolation of the variables.

Variables

logical(c_bool), pointer imbrication_flag
 activation flag
logical(c_bool), pointer, save imbrication_verbose
logical(c_bool), pointer cressman_u
 Flags for activating the cressman interpolation for the boundary conditions.
logical(c_bool), pointer cressman_v
logical(c_bool), pointer cressman_tke
logical(c_bool), pointer cressman_eps
logical(c_bool), pointer cressman_theta
logical(c_bool), pointer cressman_qw
logical(c_bool), pointer cressman_nc
real(c_double), pointer vertical_influence_radius
 numerical parameters for the cressman interpolation formulas
real(c_double), pointer horizontal_influence_radius
integer line_len
 Parameter for "meteo" files.
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.
integer dynamical_profile_dim
integer sections_per_file
 Time sections per files.
integer, dimension(:,:), allocatable years
 read data from "meteo" files
integer, dimension(:,:), allocatable ordinals
integer, dimension(:,:), allocatable hours
integer, dimension(:,:), allocatable minutes
double precision, dimension(:,:), allocatable seconds
double precision, dimension(:,:), allocatable xpos
 Positions.
double precision, dimension(:,:), allocatable ypos
double precision, dimension(:,:), allocatable ground_pressure
double precision, dimension(:,:,:), allocatable zt
 Vertical grid for temperature and humidity variables.
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.
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
double precision, dimension(:,:,:), allocatable pressure
double precision, dimension(:,:,:), allocatable theta
double precision, dimension(:,:,:), allocatable density
double precision, dimension(:,:), allocatable ti_zt
 time interpolated profiles
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
double precision, dimension(:,:,:), allocatable influence_param_th
double precision, dimension(:,:,:), allocatable coordinates_dyn
double precision, dimension(:,:,:), allocatable influence_param_dyn
integer(c_int), pointer id_u
integer(c_int), pointer id_v
integer(c_int), pointer id_qw
integer(c_int), pointer id_nc
integer(c_int), pointer id_tke
integer(c_int), pointer id_eps
integer(c_int), pointer id_theta
double precision, dimension(:), pointer times_sequence =>null()
 1D array of times at which profiles are given

Function/Subroutine Documentation

◆ activate_imbrication()

subroutine 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 allocate_all

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

◆ altitude_interpolation()

subroutine 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

◆ atmo_init_imbrication()

subroutine atmo_init_imbrication

Map Fortran to C variables.

◆ bounds()

subroutine 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 check_altitudes

Check that the profiles vertical grids heights are strictly increasing.

◆ check_chronologies()

subroutine check_chronologies

Checks the time variables to ensure the chronology.

◆ check_positions()

subroutine check_positions

Check that the profiles position is the same over time.

◆ dump_interpolated_profiles()

subroutine dump_interpolated_profiles

Print the interpolated profiles for checking purposes.

◆ finalize_imbrication()

subroutine finalize_imbrication

Final step for deallocation.

◆ find_next_line()

subroutine 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 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 hydrostatic_pressure

Compute the hydrostastic pressure by Laplace integration.

◆ interpolate_all_profiles()

subroutine interpolate_all_profiles ( double precision the_time)

Time interpolation of all profiles -.

Parameters
[in]the_timecurrent time

◆ potential_temperature_and_density()

subroutine potential_temperature_and_density

Computes the potential_temperature_and_density profiles.

◆ read_files_list()

subroutine 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 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 red_tape

Compute radius of influence.

◆ summon_cressman()

subroutine summon_cressman ( real(c_double), value the_time)

Prepare for the cressman interpolation of the variables.

Parameters
[in]the_timecurrent time

◆ time_interpolation()

subroutine 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 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