V3FIT
data_parameters.f
Go to the documentation of this file.
1 !*******************************************************************************
4 !
5 ! Note separating the Doxygen comment block here so detailed decription is
6 ! found in the Module not the file.
7 !
9 !*******************************************************************************
11  USE file_opts, only: path_length
12 
13  IMPLICIT NONE
14 
15 !*******************************************************************************
16 ! module parameters
17 !*******************************************************************************
19  INTEGER, PARAMETER :: data_short_name_length = 30
21  INTEGER, PARAMETER :: data_name_length = 80
22 
26  INTEGER, PARAMETER :: data_no_id = -1
27 
29  INTEGER, PARAMETER :: data_max_indices = 2
30 
31 ! MPI task parameters.
33  INTEGER, PARAMETER :: mpi_jacobian_task = 0
35  INTEGER, PARAMETER :: mpi_equilibrium_task = 1
37  INTEGER, PARAMETER :: mpi_mgrid_task = 2
39  INTEGER, PARAMETER :: mpi_sync_task = 3
41  INTEGER, PARAMETER :: mpi_step_task = 4
43  INTEGER, PARAMETER :: mpi_quit_task = 5
44 
46  CHARACTER (len=*), PARAMETER :: dir_prefix = 'process_dir'
48  INTEGER, PARAMETER :: dir_prefix_len = 14
49 
52  INTEGER, PARAMETER :: max_sxrem_profiles = 10
55  INTEGER, PARAMETER :: max_gaussprocess = 2 + max_sxrem_profiles
56 
57  CONTAINS
58 !*******************************************************************************
59 ! UTILITY SUBROUTINES
60 !*******************************************************************************
61 !-------------------------------------------------------------------------------
69 !-------------------------------------------------------------------------------
70  FUNCTION filename_base(filename)
71 
72  IMPLICIT NONE
73 
74 ! Declare Arguments
75  CHARACTER (len=path_length) :: filename_base
76  CHARACTER (len=*), INTENT(in) :: filename
77 
78 ! Start of executable code
79  IF ((filename(1:4) .eq. 'v3fi') .and. &
80  & (filename(6:6) .eq. '.')) THEN
81  filename_base = trim(filename(7:len_trim(filename)))
82  ELSE
83  filename_base = trim(filename)
84  END IF
85 
86  END FUNCTION
87 
88 !-------------------------------------------------------------------------------
95 !-------------------------------------------------------------------------------
96  FUNCTION process_dir(rank)
97 
98  IMPLICIT NONE
99 
100 ! Declare Arguments
101  CHARACTER (len=dir_prefix_len) :: process_dir
102  INTEGER, INTENT(in) :: rank
103 
104 ! Start of executable code
105  IF (rank .lt. 10) THEN
106  WRITE (process_dir, 1000) dir_prefix, rank
107  ELSE
108  WRITE (process_dir, 1001) dir_prefix, rank
109  END IF
110 
111 ! Support up to 99 directories. Need to add leading zeros to avoid spaces.
112 1000 FORMAT(a11,'_0',i1)
113 1001 FORMAT(a11,'_',i2)
114 
115  END FUNCTION
116 
117  END MODULE
data_parameters::mpi_step_task
integer, parameter mpi_step_task
Run the step task.
Definition: data_parameters.f:41
data_parameters::dir_prefix_len
integer, parameter dir_prefix_len
Directory string length.
Definition: data_parameters.f:48
data_parameters::mpi_mgrid_task
integer, parameter mpi_mgrid_task
Run the mgrid task.
Definition: data_parameters.f:37
data_parameters::max_sxrem_profiles
integer, parameter max_sxrem_profiles
Maximum sxrem profiles. Warning do not change this value before reading model_state::model_state_sxre...
Definition: data_parameters.f:52
data_parameters::data_max_indices
integer, parameter data_max_indices
Max number of parameter indicies.
Definition: data_parameters.f:29
data_parameters::mpi_quit_task
integer, parameter mpi_quit_task
Quit child process task.
Definition: data_parameters.f:43
data_parameters::max_gaussprocess
integer, parameter max_gaussprocess
Maximum number of Gaussian Process signals. Total number of auxillary profiles.
Definition: data_parameters.f:55
data_parameters::data_no_id
integer, parameter data_no_id
Default parameter id specifiying no id.
Definition: data_parameters.f:26
data_parameters::process_dir
character(len=dir_prefix_len) function process_dir(rank)
Generates a directory name.
Definition: data_parameters.f:97
file_opts
Contains cross platform routines for manipulating files on the file system. Defines a functions to mo...
Definition: file_opts.f:13
data_parameters::dir_prefix
character(len= *), parameter dir_prefix
Directory prefix name.
Definition: data_parameters.f:46
data_parameters::mpi_sync_task
integer, parameter mpi_sync_task
Run the sync task.
Definition: data_parameters.f:39
data_parameters
This modules contains parameters used by equilibrium models.
Definition: data_parameters.f:10
data_parameters::data_short_name_length
integer, parameter data_short_name_length
Maximum length of short data strings.
Definition: data_parameters.f:19
data_parameters::data_name_length
integer, parameter data_name_length
Maximum length of data strings.
Definition: data_parameters.f:21
data_parameters::filename_base
character(len=path_length) function filename_base(filename)
Generates a base filename.
Definition: data_parameters.f:71
data_parameters::mpi_jacobian_task
integer, parameter mpi_jacobian_task
Compute the jacobian task.
Definition: data_parameters.f:33
file_opts::path_length
integer, parameter path_length
Length of file paths.
Definition: file_opts.f:22
data_parameters::mpi_equilibrium_task
integer, parameter mpi_equilibrium_task
Run the equilibrium task.
Definition: data_parameters.f:35