-
Notifications
You must be signed in to change notification settings - Fork 37
Expand file tree
/
Copy pathio.f90
More file actions
110 lines (91 loc) · 3.92 KB
/
Copy pathio.f90
File metadata and controls
110 lines (91 loc) · 3.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
module io
!! HANDLES INPUT AND OUTPUT OF PLASMA STATE PARAMETERS (NOT GRID INPUTS)
use, intrinsic :: iso_fortran_env, only : stderr=>error_unit
use gemini3d_config, only : gemini_cfg
use phys_consts, only : kB,ms,pi,lsp,wp,lwave, comp_lvl
use mpimod, only: mpi_cfg, tag=>gemini_mpi
use grid, only : gridflag,lx1,lx2,lx3,lx2all, lx3all
use gemini_work_def, only: gemini_work
implicit none (type, external)
private
public :: create_outdir, &
input_plasma, output_plasma, input_plasma_currents, &
create_outdir_mag, output_magfields, &
output_aur, output_cond, &
find_milestone
interface !< aurora.f90
module subroutine output_aur(outdir,flagglow,ymd,UTsec,iver, out_format)
character(*), intent(in) :: outdir, out_format
integer, intent(in) :: flagglow
integer, dimension(3), intent(in) :: ymd
real(wp), intent(in) :: UTsec
real(wp), dimension(:,:,:), intent(in) :: iver
end subroutine output_aur
end interface
interface !< cond.f90
module subroutine output_cond(outdir, ymd, UTsec, sig0, sigP, sigH, out_format)
character(*), intent(in) :: outdir, out_format
integer, dimension(3), intent(in) :: ymd
real(wp), intent(in) :: UTsec
real(wp), dimension(:,:,:), intent(in) :: sig0, sigP, sigH
end subroutine output_cond
end interface
interface !< mag.f90
module subroutine create_outdir_mag(outdir,fieldpointfile)
character(*), intent(in) :: outdir
character(*), intent(in) :: fieldpointfile
end subroutine create_outdir_mag
module subroutine output_magfields(outdir,ymd,UTsec,Br,Btheta,Bphi, out_format)
character(*), intent(in) :: outdir, out_format
integer, intent(in) :: ymd(3)
real(wp), intent(in) :: UTsec
real(wp), dimension(:), intent(in) :: Br,Btheta,Bphi
end subroutine output_magfields
end interface
interface !< plasma.f90
module subroutine input_plasma(out_dir, x1,x2,x3all,indatsize,indatfile,ns,vs1,Ts,Phi,Phiall)
character(*), intent(in) :: out_dir
real(wp), dimension(-1:), intent(in) :: x1, x2, x3all
character(*), intent(in) :: indatsize, indatfile
real(wp), dimension(-1:,-1:,-1:,:), intent(inout) :: ns,vs1,Ts
!! intent(out)
real(wp), dimension(-1:,-1:,-1:), intent(inout) :: Phi
!! intent(out)
real(wp), dimension(:,:,:), pointer, intent(inout) :: Phiall
!! intent(out)
end subroutine input_plasma
module subroutine input_plasma_currents(outdir,out_format,flagoutput,ymd,UTsec,J1,J2,J3)
character(*), intent(in) :: outdir, out_format
integer, intent(in) :: flagoutput
integer, dimension(3), intent(in) :: ymd
real(wp), intent(in) :: UTsec
real(wp), dimension(-1:,-1:,-1:), intent(inout) :: J1,J2,J3
!! intent(out)
end subroutine input_plasma_currents
module subroutine output_plasma(outdir,flagoutput,ymd,UTsec,vs2,vs3,ns,vs1,Ts,Phiall,J1,J2,J3, out_format, user_output)
character(*), intent(in) :: outdir, out_format
integer, intent(in) :: flagoutput
integer, dimension(3), intent(in) :: ymd
real(wp), intent(in) :: UTsec
real(wp), dimension(-1:,-1:,-1:,:), intent(in) :: vs2,vs3,ns,vs1,Ts
real(wp), dimension(:,:,:), pointer, intent(inout) :: Phiall !these jokers may not be allocated, but this is allowed as of f2003
real(wp), dimension(-1:,-1:,-1:), intent(in) :: J1,J2,J3
real(wp), dimension(1:,1:,1:,1:), intent(in) :: user_output
end subroutine output_plasma
end interface
interface !< output.f90
module subroutine create_outdir(cfg)
class(gemini_cfg), intent(in) :: cfg
end subroutine create_outdir
end interface
interface !< milestone.f90
module subroutine find_milestone(cfg, tmile,ymdmile,UTsecmile,filemile)
class(gemini_cfg), intent(in) :: cfg
real(wp), intent(out) :: tmile
!! time elapsed from beginning of the simulation to the milestone
integer, dimension(3), intent(out) :: ymdmile
real(wp), intent(out) :: UTsecmile
character(:), allocatable, intent(out) :: filemile
end subroutine find_milestone
end interface
end module io