Changeset 14768
- Timestamp:
- 04/26/13 13:57:09 (12 years ago)
- Location:
- issm/trunk-jpl/src/c/modules/GiaDeflectionCorex
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/modules/GiaDeflectionCorex/GiaDeflectionCorex.cpp
r14752 r14768 37 37 38 38 struct blocky{ 39 double zhload[Ntime] [N3G];39 double zhload[Ntime]; 40 40 }; 41 41 42 struct blockn{ 43 int irate; 44 }; 45 46 struct blockrad{ 47 double distrad; 48 }; 49 50 struct blocks{ 51 double aswokm; 52 double asrpos; 53 double swok; 54 }; 42 55 43 56 extern "C" { 44 int distme_( int* pidisk,int* piedge,int* pisolt); 57 int distme_( int* pidisk,int* piedge); 58 int what0_( int* pidisk,int* piedge); 45 59 extern struct blockp blockp_; 46 60 extern struct blockt blockt_; 47 61 extern struct blocko blocko_; 48 62 extern struct blocky blocky_; 63 extern struct blockn blockn_; 64 extern struct blockrad blockrad_; 65 extern struct blocks blocks_; 49 66 } 67 50 68 /*}}}*/ 51 69 … … 58 76 int iedge=1; //c iedge ......... = 1 square-edged, = 2 elliptical disc x-section (see naruse.f) 59 77 int idisk=1; // disk # 60 int i solt=1002;78 int irate=0; // =0 fetch w solution (m) only; =1 dw/dt (mm/yr) only 61 79 62 80 /*intermediary: */ … … 84 102 /*some debug info: */ 85 103 int disk_id; 86 /*}}}*/87 104 105 /*}}}*/ 106 88 107 /*Recover material parameters and loading history: see GiaDeflectionCoreArgs for more details {{{*/ 89 108 ri=arguments->ri; … … 104 123 /*}}}*/ 105 124 106 /*Documentation for pset coming from naruse.f: 107 c pset(1) ....... h (thickness of elastic lithosphere in km) 108 c pset(2) ....... viscosity of sub-layer in Pa*s 109 c pset(3) ....... elastic rigidity of lithosphere in dynes/cm^2 110 c pset(4) ....... elastic rigidity of sub-lithosphere in dynes/cm^2 111 c pset(5) ....... density of lithosphere in gm/cc 112 c pset(6) ....... density of sub-lithosphere in gm/cc 113 c pset(7) ....... =dset(1) 114 c dset(1) ....... disk radius in km 125 // Now, let's set pset from the data that we got in input to GiaDeflectionCorex: 115 126 116 Now, let's set pset from the data that we got in input to GiaDeflectionCorex:117 */118 127 blockp_.pset[0]=lithosphere_thickness; 119 128 blockp_.pset[1]=mantle_viscosity; … … 123 132 blockp_.pset[5]=mantle_density; 124 133 blockp_.pset[6]=re; 125 blocko_.rhoi=rho_ice; 134 // blocko_.rhoi=rho_ice; // use this for non-benchmark experiments 135 // blockp_.pset[6]=800000.0; // for testing benchmark, should be in meters 136 blocko_.rhoi=1000.0; // use this for benchmark not rho_ice = 917 kg m^-3 126 137 127 138 /*loading history: */ 128 blocky_.zhload[0][0]=current_he; 129 blocky_.zhload[1][0]=current_he; 139 blocky_.zhload[0]=current_he; 140 blocky_.zhload[1]=current_he; 141 // blocky_.zhload[0]=3000; // for testing benchmark 142 // blocky_.zhload[1]=3000; // for testing benchmark 130 143 131 144 /*times: */ 132 blockt_.time[0]= 0.1;133 blockt_.time[1]=2 000;134 blockt_.time[2]= 1000;145 blockt_.time[0]=1.e-4; // in kyr 146 blockt_.time[1]=2500e+0; // in kyr 147 blockt_.time[2]=2400e+0; // control this for benchmark experiments 135 148 149 /*irate: */ 150 blockn_.irate=irate; 151 152 /*radial distance of i-th element: */ 153 blockrad_.distrad=ri/1000.0; // in km 154 // blockrad_.distrad=500.0; // for testing benchmark 136 155 137 156 /*Call distme driver: */ 138 distme_(&idisk,&iedge,&isolt); 157 distme_(&idisk,&iedge); 158 159 /*Call what0 driver: */ 160 what0_(&idisk,&iedge); 139 161 140 //printf("disk id: %i bi: [%g,%g] dmi: [%g,%g] \n",disk_id,blockt_.bi[0], blockt_.bi[1],blockt_.dmi[0],blockt_.dmi[1]); 162 /*this is the solution: */ 163 wi = blocks_.aswokm; 141 164 142 165 /*allocate output pointer: */ 143 166 *pwi=wi; 167 168 // printf("wi: %g deflection: %g \n",wi,blocks_.aswokm); 169 144 170 } -
issm/trunk-jpl/src/c/modules/GiaDeflectionCorex/distme.f
r14739 r14768 1 subroutine distme(idisk,iedge ,isolt)1 subroutine distme(idisk,iedge) 2 2 implicit double precision (a-h,o-y) 3 3 parameter (N3G = 1) … … 8 8 double precision time(Ntimp),dmi(Ntime),bi(Ntime),dumbt(Ntimp) 9 9 double precision hload(Ntime),qpat(Ntime),qt(Ntime) 10 real zradii(N3G),zhload(N3G,Ntime)10 double precision zradii(N3G),zhload(Ntime),rhoi,distrad 11 11 common /blockp/ pset 12 common /blockrad/ distrad 12 13 common /blockt/ time,bi,dmi 14 common /blocky/ zhload 13 15 common /blocko/ rhoi,hload 14 common /blocky/ zhload15 16 data g /9.832186d0/, yearco /3.15576d7/, eradm/6.371d6/ 16 17 data dpi /3.1415926535897932d0/, dzero/0.0d0/ … … 23 24 dumbt(k) = time(k) 24 25 776 continue 26 c write(6,*) time(1), time(2), time(3) 27 c write(6,*) zhload(1), zhload(2), distrad, rhoi 28 c write(6,*) pset(1), pset(2), pset(3), pset(4), pset(5), pset(6) 29 c write(6,*) pset(7) 25 30 c call dvecpr(time,Ntime,'::::: time @ distme.f :::::',79,0,0) 26 31 c :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 27 32 do 39 itime = 1, Ntime 28 hload(itime) = dble( zhload(i disk,itime) )33 hload(itime) = dble( zhload(itime) ) 29 34 39 continue 30 35 c :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: … … 38 43 bi(i) = hload(i-1) - ( dmi(i)*dumbt(i-1) ) 39 44 70 continue 45 c write(6,*) zhload(1,1), zhload(1,2) 40 46 c call dvecpr(hload,Ntime,'::::: hload @ distme.f :::::',79,0,0) 41 47 c call dvecpr(dmi,Ntime,'::::: load slope @ distme.f :::::',79,0,0) -
issm/trunk-jpl/src/c/modules/GiaDeflectionCorex/freed.f
r14739 r14768 6 6 1ac11 7 7 common /blockz/ zkp 8 common /blockn/ ngx,ngy,irate8 common /blockn/ irate 9 9 data zero /0.0d0/, g /9.832186d0/ 10 10 c :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -
issm/trunk-jpl/src/c/modules/GiaDeflectionCorex/ojrule.f
r14739 r14768 1 subroutine ojrule(dk, endr,bcin)1 subroutine ojrule(dk,bcin) 2 2 implicit double precision(a-h,o-z) 3 3 parameter (nhank = 1024) 4 parameter (nrv = 91)5 4 parameter (N3G = 1) 6 5 parameter (npat = N3G) … … 11 10 double precision pset(7) 12 11 c SA ::::::::::::::::::::::::::::::::::::::::::::::::: 13 real swok, asrpos, aswokm(npat), dist_rad14 common /block Rad/ dist_rad12 double precision swok, asrpos, aswokm, distrad 13 common /blockrad/ distrad 15 14 c SA ::::::::::::::::::::::::::::::::::::::::::::::::: 16 15 common /blockp/ pset 17 16 common /blocki/ INTERN 18 common /blockn/ ngx,ngy,irate17 common /blockn/ irate 19 18 common /blocks/ aswokm,asrpos,swok 20 19 data zero /0.0d0/, one /1.0d0/, two /2.0d0/, three /3.0d0/, … … 22 21 if(INTERN.ge.npat) INTERN = 0 23 22 INTERN = INTERN + 1 24 c write(6,9099) INTERN25 c9099 format(' INTERN'/1h 1p1i10)26 23 iprate = irate + 1 27 c28 c Brute force integration for the inverse29 c Hankel transform. (Actually this is Simpson's rule)30 c31 c SA: open an output file32 c SA: open(unit=33,file='outputs/r',status='new')33 c34 24 c SA ::::::::::::::::::::::::::::::::::::::::::::::::: 35 c here I just compute for given r36 c dr = endr/dfloat(nrv)37 25 bath = dk / three 38 c r = zero39 c do 450 ir = 1, nrv40 c r = r + dr41 c rpos(ir) = r42 26 c SA :::: rpose should be normalized wrt lithosphere thickness = 100 km 43 27 c SA :: give r is normalized dist_rad :: r == dist_rad / h 44 r = dist_rad / 100.00 28 c write(6,*) irate, distrad 29 r = distrad / 100.00 45 30 rpos = r 46 31 ak = zero … … 97 82 c 98 83 subroutine wolfc(rpos,wok) 99 parameter (nrv = 91)100 84 parameter (N3G = 1) 101 85 parameter (npat = N3G) … … 105 89 double precision pset(7) 106 90 c SA ::::::::::::::::::::::::::::::::::::::::::::::::: 107 real swok,asrpos, aswokm(npat)91 double precision swok,asrpos, aswokm 108 92 c SA ::::::::::::::::::::::::::::::::::::::::::::::::: 109 93 c real swoki(80), sri(80), swoko(160), sro(160) 110 94 common /blockp/ pset 111 95 common /blocki/ INTERN 112 common /blockn/ ngx,ngy,irate96 common /blockn/ irate 113 97 common /blocks/ aswokm,asrpos,swok 114 98 c … … 121 105 swok = hscale * sngl(wok) 122 106 asrpos = hsckm * sngl(rpos) 123 aswokm (INTERN)= swok107 aswokm = swok 124 108 c 45 continue 125 109 c SA ::::::::::::::::::::::::::::::::::::::::::::::::: … … 147 131 148 132 subroutine rates(rpos,wok) 149 parameter (nrv = 91)150 133 parameter (N3G = 1) 151 134 parameter (npat = N3G) 152 135 c SA ::::::::::::::::::::::::::::::::::::::::::::::::: 153 136 double precision wok, rpos 154 c SA :::::::::::::::::::::::::::::::::::::::::::::::::155 137 double precision pset(7) 156 c SA ::::::::::::::::::::::::::::::::::::::::::::::::: 157 real swok, asrpos, aswokm(npat) 138 double precision swok, asrpos, aswokm 158 139 c SA ::::::::::::::::::::::::::::::::::::::::::::::::: 159 140 common /blockp/ pset 160 141 common /blocki/ INTERN 161 common /blockn/ ngx,ngy,irate142 common /blockn/ irate 162 143 common /blocks/ aswokm,asrpos,swok 163 144 data ngyo /050201/ … … 176 157 1 * ( sngl(pset(4))/ sngl(pset(2)) ) 177 158 asrpos = hsckm * sngl(rpos) 178 aswokm (INTERN)= swok159 aswokm = swok 179 160 c 45 continue 180 161 c SA ::::::::::::::::::::::::::::::::::::::::::::::::: … … 184 165 c Like Wolf (1985), do "inside" and "outside" curves separately. 185 166 c 186 INP = INTERN - 1187 if(INP.gt.6) INP = 6167 c INP = INTERN - 1 168 c if(INP.gt.6) INP = 6 188 169 c 189 170 c next call ploting . 190 171 c 191 call dvecpr(pset,7,'pset in ojrule',79,0,0)192 call svecpr(swok,nrv,'swok in rates - mm per yr',79,0,0)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) 193 174 return 194 175 end -
issm/trunk-jpl/src/c/modules/GiaDeflectionCorex/qwise.f
r14739 r14768 2 2 implicit double precision (a-h,o-z) 3 3 double precision decay(2) 4 common /blockn/ ngx,ngy,irate4 common /blockn/ irate 5 5 iprate = irate + 1 6 6 c :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -
issm/trunk-jpl/src/c/modules/GiaDeflectionCorex/stot.f
r14739 r14768 3 3 parameter (Nafter = 1) 4 4 parameter (Ntime = 2) 5 parameter (nhank = 2048)5 parameter (nhank = 1024) 6 6 parameter (Ntimp = Ntime + Nafter) 7 7 double precision decay(2) -
issm/trunk-jpl/src/c/modules/GiaDeflectionCorex/what0.f
r14739 r14768 1 subroutine what0(idisk,i check,iedge,endr)1 subroutine what0(idisk,iedge) 2 2 implicit double precision (a-h,o-z) 3 parameter (nhank = 2048)3 parameter (nhank = 1024) 4 4 parameter (N = nhank/2) 5 5 double precision dekay1(nhank),dekay2(nhank),amp0(nhank), … … 10 10 c double precision trsl(Nrsl) 11 11 integer maxk 12 c double precision aswokm, asrpos, swok 13 c common /blocks/ aswokm,asrpos,swok 12 14 common /blockp/ pset 13 15 common /blockz/ zkp … … 36 38 dk = endk/dfloat(nhank) 37 39 c 38 if(icheck.eq.3) go to 99940 c if(icheck.eq.3) go to 999 39 41 if(idisk.gt.1) go to 7001 40 42 ak = zero … … 121 123 c for each of N3G disks in "aswokm(nrv,N3G)" . 122 124 c 123 call ojrule(dk, endr,bcin)125 call ojrule(dk,bcin) 124 126 go to 999 125 127 c9499 tspan = trsl(irsl) … … 136 138 9000 continue 137 139 c write(6,1) bcin(nhank),zksamp(nhank) 138 call ojrule(dk, endr,bcin)140 call ojrule(dk,bcin) 139 141 c call dvecpr(cinner,nhank,'cinner at time t',79,0,0) 140 142 c call dvecpr(bcin,nhank,'bcin at time t',79,0,0)
Note:
See TracChangeset
for help on using the changeset viewer.