@@ -17,7 +17,7 c usgs, ms 964, box 25046 federal center, denver, co 80225 | |||
|
17 | 17 | c |
|
18 | 18 | c =============================================================== |
|
19 | 19 | character*8 filmod(17) |
|
20 |
character* |
|
|
20 | c character*31 fqual | |
|
21 | 21 | dimension gh1(220), gh2(220), gha(224), ext(3), dtemod(17) |
|
22 | 22 | data ext /3*0./ |
|
23 | 23 | data filmod / 'dgrf45', 'dgrf50', |
@@ -26,7 +26,7 c =============================================================== | |||
|
26 | 26 | 3 'dgrf85', 'dgrf90', 'dgrf95', |
|
27 | 27 | 4 'dgrf00', 'dgrf05', 'dgrf10', |
|
28 | 28 | 5 'dgrf15', 'igrf20', 'igrf20s'/ |
|
29 | data fqual/"/bfmodel/"/ | |
|
29 | c data fqual/"/usr/local/lib/faraday/bfmodel/"/ | |
|
30 | 30 | data dtemod / 1945., 1950., 1955., 1960., |
|
31 | 31 | 1 1965., 1970., 1975., 1980., 1985., 1990., 1995., 2000., |
|
32 | 32 | 2 2005.,2010.,2015.,2020.,2025./ |
@@ -36,6 +36,13 c data a2/40680925./, b2/40408588./ | |||
|
36 | 36 | c |
|
37 | 37 | data rtd/57.29577951/ |
|
38 | 38 | data tmp/0./,lp/0/ |
|
39 | character(1024) :: fqual_temp | |
|
40 | character(:), allocatable :: fqual | |
|
41 | call get_path(fqual_temp) | |
|
42 | c write(*,*) "L_BEF: ", fqual_temp, "L_BEF_end" | |
|
43 | fqual = TRIM(fqual_temp) | |
|
44 | c write(*,*) "L: ", fqual, "L_end" | |
|
45 | ||
|
39 | 46 | flat=90. - theta*rtd |
|
40 | 47 | flon=rtd*phi |
|
41 | 48 | c*****if previous time is not equal to current time |
@@ -62,8 +69,9 c write(*,-)tm,l | |||
|
62 | 69 | if(l .ne. lp)then |
|
63 | 70 | c*********if previous epoch not the same, read in new coefs |
|
64 | 71 | c write(*,fmt='(" read coefs"))') |
|
65 | c write(*,*) fqual//filmod(l) | |
|
72 | c write(*,*) "filmod", fqual//filmod(l) | |
|
66 | 73 | call getshc2 (iu, fqual//filmod(l), nmax1, erad, gh1, ier) |
|
74 | c write(*,*) "AA: ", ier, filmod(l) | |
|
67 | 75 | if(ier .ne. 0)then |
|
68 | 76 | write(*,fmt='(" geobfield: read error=",i2," on ",a)') |
|
69 | 77 | 1 ier,filmod(l) |
@@ -87,6 +87,18 setup( | |||
|
87 | 87 | ], |
|
88 | 88 | ) |
|
89 | 89 | |
|
90 | main_path = os.getcwd() | |
|
91 | child_path = '/schainf/mkfact/bfmodel/' | |
|
92 | #print("main_path: ", main_path) | |
|
93 | my_str = ' '+"ppath = "+"\""+main_path+"\"\n" | |
|
94 | my_str_2 = ' '+"cpath = "+"\""+child_path+"\"" | |
|
95 | ||
|
96 | #''' | |
|
97 | with open('./schainf/mkfact/get_path_1.f', 'r') as path1: data1 = path1.read() | |
|
98 | with open('./schainf/mkfact/get_path_2.f', 'r') as path2: data2 = path2.read() | |
|
99 | with open('./schainf/mkfact/get_path.f', 'w') as final: final.write(data1+my_str+my_str_2+data2) | |
|
100 | #''' | |
|
101 | ||
|
90 | 102 | from numpy.distutils.core import Extension, setup |
|
91 | 103 | |
|
92 | 104 | setup(name='schainpy', |
@@ -97,7 +109,8 setup(name='schainpy', | |||
|
97 | 109 | "schainf/mkfact/lmdif1.f", |
|
98 | 110 | "schainf/mkfact/mkfact.f", |
|
99 | 111 | "schainf/mkfact/r1mach.f", |
|
100 |
"schainf/mkfact/bfield2.f" |
|
|
112 | "schainf/mkfact/bfield2.f", | |
|
113 | "schainf/mkfact/get_path.f"]) | |
|
101 | 114 | ] |
|
102 | 115 | ) |
|
103 | 116 |
General Comments 0
You need to be logged in to leave comments.
Login now