Changeset 14840


Ignore:
Timestamp:
05/01/13 16:52:37 (12 years ago)
Author:
adhikari
Message:

CHG: some clean up

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/modules/GiaDeflectionCorex/ojrule.f

    r14768 r14840  
    55      parameter (npat = N3G)
    66      double precision yvalue(nhank),bcin(nhank)
    7 c SA :::::::::::::::::::::::::::::::::::::::::::::::::
    87      double precision wok, rpos
    9 c SA :::::::::::::::::::::::::::::::::::::::::::::::::
    108      double precision pset(7)
    11 c SA :::::::::::::::::::::::::::::::::::::::::::::::::
    129      double precision swok, asrpos, aswokm, distrad
    1310      common /blockrad/ distrad
    14 c SA :::::::::::::::::::::::::::::::::::::::::::::::::
     11c ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    1512      common /blockp/ pset
    1613      common /blocki/ INTERN
     
    1916      data zero /0.0d0/, one /1.0d0/, two /2.0d0/, three /3.0d0/,
    2017     1rescal/ 1.0d0/
    21       if(INTERN.ge.npat) INTERN = 0
    22       INTERN = INTERN + 1
     18c ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    2319      iprate = irate + 1
    24 c SA :::::::::::::::::::::::::::::::::::::::::::::::::
    2520      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
     21c ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
     22c rpose should be normalized wrt lithosphere thickness
     23c give r is normalized dist_rad :: r == dist_rad / h
     24c ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
     25      r = distrad / (pset(1) / 1.0d3)
    3026      rpos = r
    3127      ak = zero
    32 c
     28c ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    3329c form the yvalue's for the Simpson's rule formulas
    34 c
     30c ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    3531      do 425 ik = 1, nhank
    3632      ak = ak + dk
     
    3935      yvalue(ik) = bcin(ik) * rarg
    4036  425 continue
    41 c                                          correct to end point val. in Simp.
    42 c                                                                       Rule
    43       yvalue(nhank) = bcin(nhank) * rarg / two
    44 c
     37c ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
     38c correct to end point val. in Simp. Rule
     39c      yvalue(nhank) = bcin(nhank) * rarg / two
    4540c find the area under the curve using the Simpson's rule formulas
    46 c
     41c ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    4742      sumde = zero
    4843      do 300 int = 1, nhank
     
    5247      sumde = ( fide * yvalue(int) ) + sumde
    5348  300 continue
    54 c      wok(ir) = bath * sumde
    5549      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 :::::::::::::::::::::::::::::::::::::::::::::::::
     50c ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    7551      go to (1000,2000), iprate
    7652 1000 call wolfc(rpos,wok)
     
    7854 2000 call rates(rpos,wok)
    7955  999 return
    80 c SA :::::::::::::::::::::::::::::::::::::::::::::::::
     56
    8157      end
    82 c
     58c ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
     59
     60c ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    8361      subroutine wolfc(rpos,wok)
    8462      parameter (N3G = 1)
    8563      parameter (npat = N3G)
    86 c SA :::::::::::::::::::::::::::::::::::::::::::::::::
    8764      double precision wok, rpos
    88 c SA :::::::::::::::::::::::::::::::::::::::::::::::::
    8965      double precision pset(7)
    90 c SA :::::::::::::::::::::::::::::::::::::::::::::::::
    9166      double precision swok,asrpos, aswokm
    92 c SA :::::::::::::::::::::::::::::::::::::::::::::::::
    93 c     real swoki(80), sri(80), swoko(160), sro(160)
     67c ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    9468      common /blockp/ pset
    9569      common /blocki/ INTERN
    9670      common /blockn/ irate
    9771      common /blocks/ aswokm,asrpos,swok
    98 c
     72c ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    9973c make single prec. and return to dimensional units.
    100 c
     74c ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    10175      hscale = sngl(pset(1))
    10276      hsckm = hscale / 1.0e3
    103 c SA :::::::::::::::::::::::::::::::::::::::::::::::::
    104 c      do 45 i = 1, nrv
    10577      swok = hscale * sngl(wok)
    10678      asrpos = hsckm * sngl(rpos)
    10779      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
    12981      return
    13082      end
     83c ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    13184
     85c ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    13286      subroutine rates(rpos,wok)
    13387      parameter (N3G = 1)
    13488      parameter (npat = N3G)
    135 c SA :::::::::::::::::::::::::::::::::::::::::::::::::
    13689      double precision wok, rpos
    13790      double precision pset(7)
    13891      double precision swok, asrpos, aswokm
    139 c SA :::::::::::::::::::::::::::::::::::::::::::::::::
     92c ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    14093      common /blockp/ pset
    14194      common /blocki/ INTERN
    14295      common /blockn/ irate
    14396      common /blocks/ aswokm,asrpos,swok
     97c ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    14498      data ngyo /050201/
    14599      data ngyii /050201/
    146100      data yearco /3.15576d7/
    147 c     write(6,41) irate
    148 c  41 format(' irate in rates'/1h 1p1i10)
    149 c
     101c ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    150102c make single prec. and return to dimensional units.
    151 c
     103c ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    152104      hscale = sngl(pset(1))
    153105      hsckm = hscale / 1.0e3
    154 c SA :::::::::::::::::::::::::::::::::::::::::::::::::
    155 c      do 45 i = 1, nrv
    156106      swok = (hscale * yearco * 1.0e3 * sngl(wok))
    157107     1                  * ( sngl(pset(4))/ sngl(pset(2)) )
    158108      asrpos = hsckm * sngl(rpos)
    159109      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
    174111      return
    175112      end
Note: See TracChangeset for help on using the changeset viewer.