Commit c7186191c7dbca2fede9b413f9f5cdff5decb65d
1 parent
e0ac444a
Exists in
master
rrmag ...etc non transmis
Showing
3 changed files
with
127 additions
and
13 deletions
Show diff stats
maglib/src/.Modif.for.swp deleted
No preview for this file type
@@ -0,0 +1,123 @@ | @@ -0,0 +1,123 @@ | ||
1 | + subroutine getmag (iyear,imonth,iday,ihour,imin,isec, | ||
2 | + > magout, isatex, rrmag, thetr, phir, | ||
3 | + > tgl, flg, xlamb, ifail) | ||
4 | + | ||
5 | +c*FON Declaration des parametres | ||
6 | +c -------------------------- | ||
7 | +c | ||
8 | +c*********************************************************************** | ||
9 | +c* * | ||
10 | +c* DECLARATIONS * | ||
11 | +c* * | ||
12 | +c*********************************************************************** | ||
13 | +c* | ||
14 | + implicit none | ||
15 | +c | ||
16 | +c -------------------------------- | ||
17 | +c*FON rcs_id identificator declaration | ||
18 | +c -------------------------------- | ||
19 | +c | ||
20 | + character rcs_id*100 | ||
21 | +c | ||
22 | + | ||
23 | +c --------------------------- | ||
24 | +c*FON parameters declaration | ||
25 | +c --------------------------- | ||
26 | + integer iyear,imonth,iday,ihour,imin,isec | ||
27 | + integer isatex, magout | ||
28 | + double precision rrmag, thetr, phir | ||
29 | + double precision tgl, flg, xlamb | ||
30 | + integer ifail | ||
31 | +c ---------------------------- | ||
32 | +c*FON Common variables declaration | ||
33 | +c ---------------------------- | ||
34 | +c | ||
35 | + double precision pi,dpi,rad,deg,pid,xmu,rayt | ||
36 | +c | ||
37 | +c*COM pi : constant pi (equal to cos(-1.)) | ||
38 | +c*COM dpi : constant 2 * pi | ||
39 | +c*COM pid : constant pi / 2 | ||
40 | +c*COM rad : conversion value degrees ----> radians | ||
41 | +c*COM deg : conversion value radians ----> degrees | ||
42 | +c*COM xmu : earth gravity constant (km**3/sec**2) | ||
43 | +c*COM rayt : equatorial earth radius (km) | ||
44 | +c | ||
45 | + common/util/pi,dpi,rad,deg,pid,xmu,rayt | ||
46 | +c | ||
47 | +c --------------------------- | ||
48 | +c*FON Local variables declaration | ||
49 | +c --------------------------- | ||
50 | +c | ||
51 | + integer iposmg(15) | ||
52 | + integer ii | ||
53 | +c | ||
54 | + double precision rig(3,3),rgi(3,3),rgsm(3,3),rsmg(3,3) | ||
55 | + double precision rggsm(3,3),rgsmg(3,3),rgse(3,3),rseg(3,3) | ||
56 | + double precision rgdip(3,3),rdipg(3,3),rigsm(3,3) | ||
57 | + double precision rgsmi(3,3) | ||
58 | + double precision alfag,alfas,deltas,tilt | ||
59 | + double precision tetdip,phidip,xgsm,ygsm,zgsm,xgse,ygse,zgse | ||
60 | + double precision tglc,hsl,clatgmr,clongmr | ||
61 | + double precision clatgm,clongm, xlambr | ||
62 | + double precision year | ||
63 | +c | ||
64 | + | ||
65 | + SAVE rig,rgi,rgsm,rsmg | ||
66 | + SAVE rggsm,rgsmg,rgse,rseg | ||
67 | + SAVE rgdip,rdipg,rigsm | ||
68 | + SAVE rgsmi | ||
69 | + SAVE alfag,alfas,deltas,tilt | ||
70 | + SAVE tetdip,phidip,xgsm,ygsm,zgsm,xgse,ygse,zgse | ||
71 | + SAVE tglc,hsl,clatgmr,clongmr,xlambr | ||
72 | + SAVE year | ||
73 | +c | ||
74 | +c ---------------------------- | ||
75 | +c*FON Setting rcs_id identificator | ||
76 | +c ---------------------------- | ||
77 | +c | ||
78 | + data rcs_id /" | ||
79 | + >$id$"/ | ||
80 | + | ||
81 | +c | ||
82 | +c*********************************************************************** | ||
83 | +c* * | ||
84 | +c* BEGINING OF THE PROGRAM * | ||
85 | +c* * | ||
86 | +c*********************************************************************** | ||
87 | +c ------------------------- | ||
88 | +c*FON Constants initializations | ||
89 | +c ------------------------- | ||
90 | + write(*,*) 'rrmag,thetr,phir' | ||
91 | + write(*,*) rrmag,thetr,phir | ||
92 | +c | ||
93 | + call valfix(ifail) | ||
94 | +c | ||
95 | +c ---------------------------- | ||
96 | +c*FON Entering the test parameters | ||
97 | +c ---------------------------- | ||
98 | +c | ||
99 | +c -------------------------------------------------- | ||
100 | +c*FON Initialization of all the rotation matrices used | ||
101 | +c*FON by the geomagnetic calculations for the given year | ||
102 | +c -------------------------------------------------- | ||
103 | + | ||
104 | +c | ||
105 | + call inigeom(iyear,imonth,iday,ihour,imin,isec,year,alfag, | ||
106 | + > tetdip,phidip,alfas,deltas,rig,rgi,rgdip,rdipg, | ||
107 | + > rgsm,rsmg,tilt,rggsm,rgsmg,rgse,rseg,rigsm,rgsmi, | ||
108 | + > ifail) | ||
109 | + | ||
110 | +c ------------------------------------------------------------- | ||
111 | +c*FON Calculation of the position of the point in the magnetosphere | ||
112 | +c ------------------------------------------------------------- | ||
113 | +c | ||
114 | +c | ||
115 | + call posmag(magout,isatex,year,rrmag,thetr,phir,alfag, | ||
116 | + > alfas,deltas,tilt,rgsm,rggsm,rgsmg,rgdip,rgse, | ||
117 | + > tetdip,phidip,xgsm,ygsm,zgsm,xgse,ygse,zgse,tgl, | ||
118 | + > flg,xlambr,tglc,hsl,clatgmr,clongmr,iposmg,ifail) | ||
119 | + | ||
120 | + | ||
121 | +c return | ||
122 | + | ||
123 | + end |
maglib/src/include/maglib.hh
@@ -8,19 +8,10 @@ extern "C" { | @@ -8,19 +8,10 @@ extern "C" { | ||
8 | /* | 8 | /* |
9 | * Declaration des fonctions utilisees dans le kernel | 9 | * Declaration des fonctions utilisees dans le kernel |
10 | */ | 10 | */ |
11 | - | ||
12 | - void valfix_(int* iyr); | ||
13 | - | ||
14 | - void inigeom_(int* iyear, int* imonth,int* iday,int* ihour ,int* imin, int* isec, float year, | ||
15 | - float* alfag, float* tetdip, float* phidip, float* alfas,float* deltas, | ||
16 | - float rig[3][3], float rgi[3][3], float rgdip[3][3], float rdipg[3][3], float rgsm[3][3], float rsmg[3][3], float* tilt, | ||
17 | - float rggsm[3][3], float rgsmg[3][3], float rgse[3][3],float rseg[3][3], float rigsm[3][3], float rgsmi[3][3], int* ier); | ||
18 | - | ||
19 | - void posmag_(int* magout, int* isatex, float* year, float* rre, float* thetr, float* phir, float* alfag, float* alfas, | ||
20 | - float* deltas, float* tilt, float rgsm[3][3], float rggsm[3][3], float rgsmg[3][3], float rgdip[3][3], float rgse[3][3], | ||
21 | - float* tetdip, float* phidip, float* xgsm, float* ygsm, float* zgsm,float* xgse,float* ygse, float* zgse, | ||
22 | - float* tgl, float* flg, float* xlamb, float* tglc, float* hsl, float* clatgm, float* clongm, int iposmg[15], int* ier); | ||
23 | - | 11 | + |
12 | + void getmag_(int* iyear, int* imonth, int* iday, int* ihour, int* imin, int* isec, | ||
13 | + int* magout, int* isatex, float* rrmag_i, float* thetr_i, float* phir_i, | ||
14 | + float* tgl, float* flg, float* xlamb, int* ifail); | ||
24 | 15 | ||
25 | #ifdef __cplusplus | 16 | #ifdef __cplusplus |
26 | } | 17 | } |