-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwrite_header.f
More file actions
36 lines (26 loc) · 874 Bytes
/
write_header.f
File metadata and controls
36 lines (26 loc) · 874 Bytes
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
subroutine write_header( fname )
include 'sam.h'
character( *) fname
pointer(ipr, rdat)
pointer(ipi, idat)
real rdat(L_params)
integer idat(L_params)
ipr = loc(xL)
ipi = loc(Nx)
i_beg=1; i_dat=n_inputs_r; i_end=i_beg+i_dat-1
values(i_beg:i_end) = rdat(1:i_dat)
i_beg=i_end+1; i_dat=n_inputs_i; i_end=i_beg+i_dat-1
values(i_beg:i_end) = idat(1:i_dat)
ipr = loc(time)
ipi = loc(nt)
i_beg=i_end+1; i_dat=n_dynpar_r; i_end=i_beg+i_dat-1
values(i_beg:i_end) = rdat(1:i_dat)
i_beg=i_end+1; i_dat=n_dynpar_i; i_end=i_beg+i_dat-1
values(i_beg:i_end) = idat(1:i_dat)
open(newunit=i_unit,file=fname)
do i=1, n_params
write(i_unit,*) labels(i), values(i)
end do
close(i_unit)
return
end