IPIM
 All Classes Files Functions Variables Pages
Functions/Subroutines
lit_config.f90 File Reference

Functions/Subroutines

subroutine lit_config (temps_ref, tube_ref, Lshell_ref, simu)
 Read input configuration file. Done by master proc only. More...
 
subroutine traite_position (keyword, line)
 Decode a position line in configuration file. In config.run: keyword line
where:
. More...
 
subroutine genere_report ()
 
type(calendar) function init_date (line)
 Fonction de lecture de la date de simulation et conversion en bon format. More...
 
real function, dimension(3) pointage (mode, pos_ref, az, rnge)
 
subroutine decode_position (var, tab, mode)
 Decode a position word in configuration file. More...
 
subroutine create_simu_name (mode_geom, mode_output, i_tube, i_step, temps, tube, simu_name)
 Write simu output name. More...
 
integer function find_best_record (planet, Lmax, Lshell_list, latgeo_list, bsurf_list, fexp_list, zapex_list, tube)
 Find the best index that fit a tube description.
Earth and Jupiter
Find the index irec of Lshell_list so that Lshell_list(irec) nearest from tube%posref%L.
Venus and Mars
Find the index irec of latgeo_list so that latgeo_list(irec) nearest from tube%posref%latgeo.
Sun
Find the index irec of (bsurf_list,fexp_list,zapex_list) nearest from (tube%bsurf,tube%f_exp,tube%z_apex)
Suppose that arrays are not sorted but have same length. More...
 
subroutine decode_filename (folder, file_in, file_list)
 Decode filename keyword in lit_config. More...
 

Detailed Description

Author
Date
01.01.2011

Function/Subroutine Documentation

subroutine create_simu_name ( character (len=3), intent(in)  mode_geom,
character (len=3), intent(in)  mode_output,
integer, intent(in)  i_tube,
integer, intent(in)  i_step,
type(calendar), intent(in)  temps,
type(tube_description), intent(in)  tube,
character(len=*), intent(out)  simu_name 
)

Write simu output name.

Output name is like:
ENN_0001_0001_YYYYdoy_time_x_y
or
ENN_0001_0001_YYYYdoy_time_fexp_bsurf_zapex
where:

  • doy day of the year, coded on 3 int.
  • time day's time in seconds, coded on 7 int.
  • x first coordinate element, coded on 6.2 float.
  • y second coordinate element, coded on 6.2 float.
  • fexp expansion factor, coded on 7.1 ES.
  • bsurf surface magnetic field norm, coded on 7.1 ES.
  • zapex apex altitude, coded on 7.1 ES.

x,y = f(mode_geom)
MODE x y
GEO latgeo longeo
MAG latmag lonmag
INV L tmag
IMX L tmag
TMG latmag tmag
INP bsurf fexp zapex

Parameters
[in]mode_geomcharacter(len=3) GEO or MAG or TMG or INV or IMX
[in]mode_outputcharacter(len=3) E/N C/N P/N
[in]i_tube
[in]i_step
[in]tempstype(calendar)
[in]tubetype(tube_description)

Here is the caller graph for this function:

subroutine decode_filename ( character(len=*), intent(in)  folder,
character(len=*), intent(in)  file_in,
character(len=len_name), dimension(:), allocatable  file_list 
)

Decode filename keyword in lit_config.

  • filename: Just add filename to geometry file list.
  • basename[001-256]ext: Add all (existing) files in folder from basename001ext to basename256ext

Check if all filenames in list exist in folder before adding it to the returned list.

Returns
file_list List of existing input geometry files.

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine decode_position ( character(len=*)  var,
real, dimension(:), allocatable  tab,
character(len=3)  mode 
)

Decode a position word in configuration file.

Position word can have several forms:

  • Linear: LIN(x:y:z) | LIN(x:z) | LIN(n,x:z) | x:y:z | x:z | x
  • Ref?: REF(x,y,z)
  • Azimuth?: AZM(x) | AZM(x:y:z) | AZM(x:z) | AZM(n,x:z)
  • Range?: RNG(x:y:z) | RNG(x:z) | RNG(n,x:z)

Format is the following:

  • LIN(x:y:z): [x,z] dx = y
  • LIN(x:z) : [x:z] dx = 1
  • LIN(n,x:z): [x:z] n values
  • x:y:z : [x:z] dx = y
  • x:z : [x:z] dx = 1
  • x : [x,x]
    Parameters
    [out]tabarray with position
    [out]modeLIN or REF or AZM or RNG

Here is the caller graph for this function:

integer function find_best_record ( character(len=*), intent(in)  planet,
real*8, intent(in)  Lmax,
real, dimension(:), intent(in)  Lshell_list,
real, dimension(:), intent(in)  latgeo_list,
real, dimension(:), intent(in)  bsurf_list,
real, dimension(:), intent(in)  fexp_list,
real, dimension(:), intent(in)  zapex_list,
type(tube_description), intent(in)  tube 
)

Find the best index that fit a tube description.
Earth and Jupiter
Find the index irec of Lshell_list so that Lshell_list(irec) nearest from tube%posref%L.
Venus and Mars
Find the index irec of latgeo_list so that latgeo_list(irec) nearest from tube%posref%latgeo.
Sun
Find the index irec of (bsurf_list,fexp_list,zapex_list) nearest from (tube%bsurf,tube%f_exp,tube%z_apex)
Suppose that arrays are not sorted but have same length.

Returns
index of input arrays where the nearest element from input tube is.

Here is the caller graph for this function:

type(calendar) function lit_config::init_date ( character(len=*)  line)

Fonction de lecture de la date de simulation et conversion en bon format.

Returns
temps type(calendar)

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine lit_config ( type(time_global), dimension(:), allocatable  temps_ref,
type(tube_description), dimension(:), allocatable  tube_ref,
real, dimension(:), allocatable  Lshell_ref,
type(mode_simu), dimension(:), allocatable  simu 
)

Read input configuration file. Done by master proc only.

Parameters
[out]tube_refAll tubes present for the simulation. Tubes present in config file (tube_wanted) + convected tubes (if any).
[out]simuAll mode_simu needed for the simulation. Simu(0) is the one read from file.in. Simu(i_tube) contains info for i_tube-th tube.
[out]temps_refAll time_global needed for the simulation. Temps_ref(0) is the one read from file.in. Temps_ref(i_tube) contains info for i_tube-th tube.

simu(i_tube)%name: defined by create_simu_name.
simu(i_tube)%ishell: defined by find_best_record.

Author

INI file.ini OLD/NEW

RES date_in

SIM duration dt dt_output solve

IMM dt_imm

KIN dt_kin iflg_sol iflg_prc

ELC ipot icur iprc

CNV dt_conv duration_before duration_after

CCT file_cct

DAT data_dir

POT filename (must be in dir.input)

CUR filename (must be in dir.input)

GEF filename

XXX See traite_position

About GEF keyword.
If geometry file present (keyword GEF), call correct_fieldline on this file to write it on the good format.

About CCT keyword.
Not available for the moment with geometry file.

About OLD keyword.
Not available for the moment with geometry file.

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine lit_config::traite_position ( character(len=3), intent(in)  keyword,
character(len=len_name)  line 
)

Decode a position line in configuration file. In config.run: keyword line
where:
.

  • keyword = GEO | INV | MAG | TMG | IMX
  • line = varx vary varz
  • var*: see decode_position

Different keywords:

  • MAG Magnetic coordinates of a reference position
  • INV Invariante coordinates of a reference position
  • IMX Invariante coordinates of a reference point defined in relation to an Lmax at stagnation time
  • TMG Local magnetic coordiantes of a reference position
  • GEO Geographic coordinates of a reference position

Here the format:

  • MAG lonmag latmag Rmag-Re_mag_km
  • INV tmag L Rmag-Re_mag_km
  • IMX tmag Lmx Rmag-Re_mag_km (Lmx: L max at stagnation point, L: Lmax2Lmlt(Lmx,tmag))
  • TMG tmag latmag Rmag-Re_mag_km
  • GEO longeo latgeo alt
    Returns
    pos_dat: pos_config type pointer.

Here is the call graph for this function:

Here is the caller graph for this function: