Changeset 14840
- Timestamp:
- 05/01/13 16:52:37 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/modules/GiaDeflectionCorex/ojrule.f
r14768 r14840 5 5 parameter (npat = N3G) 6 6 double precision yvalue(nhank),bcin(nhank) 7 c SA :::::::::::::::::::::::::::::::::::::::::::::::::8 7 double precision wok, rpos 9 c SA :::::::::::::::::::::::::::::::::::::::::::::::::10 8 double precision pset(7) 11 c SA :::::::::::::::::::::::::::::::::::::::::::::::::12 9 double precision swok, asrpos, aswokm, distrad 13 10 common /blockrad/ distrad 14 c SA:::::::::::::::::::::::::::::::::::::::::::::::::11 c :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 15 12 common /blockp/ pset 16 13 common /blocki/ INTERN … … 19 16 data zero /0.0d0/, one /1.0d0/, two /2.0d0/, three /3.0d0/, 20 17 1rescal/ 1.0d0/ 21 if(INTERN.ge.npat) INTERN = 0 22 INTERN = INTERN + 1 18 c :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 23 19 iprate = irate + 1 24 c SA :::::::::::::::::::::::::::::::::::::::::::::::::25 20 bath = dk / three 26 c SA :::: rpose should be normalized wrt lithosphere thickness = 100 km 27 c SA :: give r is normalized dist_rad :: r == dist_rad / h 28 c write(6,*) irate, distrad 29 r = distrad / 100.00 21 c :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 22 c rpose should be normalized wrt lithosphere thickness 23 c give r is normalized dist_rad :: r == dist_rad / h 24 c :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 25 r = distrad / (pset(1) / 1.0d3) 30 26 rpos = r 31 27 ak = zero 32 c 28 c :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 33 29 c form the yvalue's for the Simpson's rule formulas 34 c 30 c :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 35 31 do 425 ik = 1, nhank 36 32 ak = ak + dk … … 39 35 yvalue(ik) = bcin(ik) * rarg 40 36 425 continue 41 c correct to end point val. in Simp. 42 c Rule 43 yvalue(nhank) = bcin(nhank) * rarg / two 44 c 37 c :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 38 c correct to end point val. in Simp. Rule 39 c yvalue(nhank) = bcin(nhank) * rarg / two 45 40 c find the area under the curve using the Simpson's rule formulas 46 c 41 c :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 47 42 sumde = zero 48 43 do 300 int = 1, nhank … … 52 47 sumde = ( fide * yvalue(int) ) + sumde 53 48 300 continue 54 c wok(ir) = bath * sumde55 49 wok = bath * sumde 56 c 450 continue 57 c 58 c SA ::::::::::::::::::::::::::::::::::::::::::::::::: 59 c SA close(33) 60 c SA 61 c call dvecpr(wok,nrv,'wok',79,0,0) 62 c SA write(6,71) ak,bcin(nhank) 63 c SA 71 format(' OJRULE ak last bcin'/1h ,1p2d16.8) 64 c SA write(6,72) r, bath 65 c SA 72 format(' OJRULE r bath'/1h ,1p2d16.8) 66 c SA write(6,70) fide,sumde 67 c SA 70 format(' OJRULE fide sumde'/1h ,1p2d16.8) 68 c 69 c double loop concluded and now for some single prec. IO: 70 c 71 c wolfc.f does w vs. r for 1 values of t 72 c rates.f does w dot vs. r for 1 value of t 73 c 74 c SA ::::::::::::::::::::::::::::::::::::::::::::::::: 50 c :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 75 51 go to (1000,2000), iprate 76 52 1000 call wolfc(rpos,wok) … … 78 54 2000 call rates(rpos,wok) 79 55 999 return 80 c SA ::::::::::::::::::::::::::::::::::::::::::::::::: 56 81 57 end 82 c 58 c :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 59 60 c :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 83 61 subroutine wolfc(rpos,wok) 84 62 parameter (N3G = 1) 85 63 parameter (npat = N3G) 86 c SA :::::::::::::::::::::::::::::::::::::::::::::::::87 64 double precision wok, rpos 88 c SA :::::::::::::::::::::::::::::::::::::::::::::::::89 65 double precision pset(7) 90 c SA :::::::::::::::::::::::::::::::::::::::::::::::::91 66 double precision swok,asrpos, aswokm 92 c SA ::::::::::::::::::::::::::::::::::::::::::::::::: 93 c real swoki(80), sri(80), swoko(160), sro(160) 67 c :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 94 68 common /blockp/ pset 95 69 common /blocki/ INTERN 96 70 common /blockn/ irate 97 71 common /blocks/ aswokm,asrpos,swok 98 c 72 c :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 99 73 c make single prec. and return to dimensional units. 100 c 74 c :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 101 75 hscale = sngl(pset(1)) 102 76 hsckm = hscale / 1.0e3 103 c SA :::::::::::::::::::::::::::::::::::::::::::::::::104 c do 45 i = 1, nrv105 77 swok = hscale * sngl(wok) 106 78 asrpos = hsckm * sngl(rpos) 107 79 aswokm = swok 108 c 45 continue 109 c SA ::::::::::::::::::::::::::::::::::::::::::::::::: 110 c 111 c Like Wolf (1985), do "inside" and "outside" curves seperately. 112 c 113 c do 70 i = 1,80 114 c swoki(i) = swok(i) 115 c sri(i) = asrpos(i) 116 c 70 continue 117 c do 80 i = 81, nrv 118 c ic2 = i - 80 119 c swoko(ic2) = swok(i) 120 c sro(ic2) = asrpos(i) 121 c 80 continue 122 c 123 c and the second "outside" plot 124 c 125 c call svecpr(swoki,80,'swoki in meters',79,0,0) 126 c call svecpr(swoko,160,'swoko in meters',79,0,0) 127 c call svecpr(sri,80,'sri in km',79,0,0) 128 c call svecpr(sro,160,'sro in km',79,0,0) 80 129 81 return 130 82 end 83 c :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 131 84 85 c :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 132 86 subroutine rates(rpos,wok) 133 87 parameter (N3G = 1) 134 88 parameter (npat = N3G) 135 c SA :::::::::::::::::::::::::::::::::::::::::::::::::136 89 double precision wok, rpos 137 90 double precision pset(7) 138 91 double precision swok, asrpos, aswokm 139 c SA:::::::::::::::::::::::::::::::::::::::::::::::::92 c :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 140 93 common /blockp/ pset 141 94 common /blocki/ INTERN 142 95 common /blockn/ irate 143 96 common /blocks/ aswokm,asrpos,swok 97 c :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 144 98 data ngyo /050201/ 145 99 data ngyii /050201/ 146 100 data yearco /3.15576d7/ 147 c write(6,41) irate 148 c 41 format(' irate in rates'/1h 1p1i10) 149 c 101 c :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 150 102 c make single prec. and return to dimensional units. 151 c 103 c :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 152 104 hscale = sngl(pset(1)) 153 105 hsckm = hscale / 1.0e3 154 c SA :::::::::::::::::::::::::::::::::::::::::::::::::155 c do 45 i = 1, nrv156 106 swok = (hscale * yearco * 1.0e3 * sngl(wok)) 157 107 1 * ( sngl(pset(4))/ sngl(pset(2)) ) 158 108 asrpos = hsckm * sngl(rpos) 159 109 aswokm = swok 160 c 45 continue 161 c SA ::::::::::::::::::::::::::::::::::::::::::::::::: 162 c SA: write displacement (w) in file #39 163 c SA: call svecpr(asrpos,nrv,'asrpos in rates - km',79,0,0) 164 c 165 c Like Wolf (1985), do "inside" and "outside" curves separately. 166 c 167 c INP = INTERN - 1 168 c if(INP.gt.6) INP = 6 169 c 170 c next call ploting . 171 c 172 c call dvecpr(pset,7,'pset in ojrule',79,0,0) 173 c call svecpr(swok,nrv,'swok in rates - mm per yr',79,0,0) 110 174 111 return 175 112 end
Note:
See TracChangeset
for help on using the changeset viewer.