C### - DAEPACK v1.0 - Copyright (C) M.I.T. C### - DERIVATIVE COMPUTATION - subroutine tefuncad(nn,time,yy,yp,zzzderiv,zzzne,zzzirn,zzzjcn, $ zzziw) !!independent { yy } !!dependent { yp } implicit none double precision ptv double precision tcv double precision vovrl double precision tgas double precision flms double precision spwlk double precision uarlev double precision vlc integer i double precision esr double precision tcr double precision uar double precision flcoef double precision tesub8 double precision ess double precision tcs double precision utlc double precision uas double precision tprod double precision r2f double precision hwlk double precision swlk double precision fwr double precision esv double precision r1f double precision fws double precision dlp double precision dlr double precision agsp double precision dls double precision hwr double precision etv double precision hws double precision tkv double precision etr double precision vlr double precision cpflmx double precision ets double precision vls double precision tesub7 double precision utlr double precision tkr double precision vtr double precision utls double precision tks double precision vts double precision esc double precision tcc double precision uac double precision vvr double precision vtv double precision vvs integer nn double precision vpr double precision rg double precision xmns double precision twr double precision cpdh double precision tws double precision quc double precision etc double precision utvv double precision tcwr double precision vtc double precision tcws double precision rh double precision utvr double precision cpprmx double precision utvs double precision tmpfac integer isd double precision ptr double precision pr double precision pts double precision qur double precision time double precision qus double precision dlc double precision rr double precision ucvv double precision hzero double precision uclr double precision ucls double precision hst double precision vrng double precision fcm double precision xdel double precision vcv double precision ddist double precision bd double precision cg double precision cdist double precision tnext double precision cd double precision bg double precision htr integer ivst double precision spspan double precision ag double precision ad double precision xst double precision sfr double precision ah double precision uclc double precision tst double precision cvp double precision bh double precision ch double precision sspan double precision bvp double precision vtau double precision xvv double precision bdist double precision yp(nn) double precision xlr double precision vst double precision adist double precision avp double precision av double precision xls double precision xmv integer idv double precision xvr double precision xvs double precision xmw double precision vpos(12) double precision tlast double precision xmeas double precision ftm double precision xns double precision szero double precision ppr double precision yy(nn) double precision pps double precision hspan double precision fin(8) double precision xcmp(41) double precision crxr double precision xmws integer idvwlk double precision xlc double precision ucvr double precision ucvs double precision tesub7ad double precision tesub8ad external tesub7ad external tesub8ad COMMON /pv/ xmeas(41),xmv(12) COMMON /dvec/ idv(20) COMMON /teproc/ uclr(8),ucvr(8),utlr,utvr,xlr(8),xvr(8), $ etr,esr,tcr,tkr,dlr,vlr,vvr,vtr,ptr,ppr(8),crxr(8),rr(4), $ rh,fwr,twr,qur,hwr,uar,ucls(8),ucvs(8),utls,utvs,xls(8), $ xvs(8),ets,ess,tcs,tks,dls,vls,vvs,vts,pts,pps(8),fws, $ tws,qus,hws,uclc(8),utlc,xlc(8),etc,esc,tcc,dlc COMMON /teproc/ vlc,vtc,quc,ucvv(8),utvv,xvv(8),etv,esv, $ tcv,tkv,vtv,ptv,vcv(12),vrng(12),vtau(12),ftm(13),fcm(8,13), $ xst(8,13),xmws(13),hst(13),tst(13),sfr(8),cpflmx,cpprmx, $ cpdh,tcwr,tcws,htr(3),agsp,xdel(41),xns(41),tgas,tprod, $ vst(12),ivst(12) COMMON /wlk/ adist(12),bdist(12),cdist(12),ddist(12),tlast(12), $ tnext(12),hspan(12),hzero(12),sspan(12),szero(12),spspan(12), $ idvwlk(12) COMMON /const/ avp(8),bvp(8),cvp(8),ah(8),bh(8),ch(8),ag(8), $ bg(8),cg(8),av(8),ad(8),bd(8),cd(8),xmw(8) C### Additional arguments for partial derivative computation C### zzzderiv - partial derivative array stored in sparse matrix C### format, pattern contained in zzzirn and zzzjcn. C### zzzne - number of entries in zzzderiv. C### zzzirn - row numbers for entries in zzzderiv. C### zzzjcn - column numbers for entries in zzzderiv. double precision zzzderiv(*) integer zzzne,zzzirn(zzzne),zzzjcn(zzzne) C### zzziw - integer workspace array. integer zzziw(*) C### Define elemenary variables and adjoints double precision zzzv1,zzzvbar1 double precision zzzv2,zzzvbar2 double precision zzzv3,zzzvbar3 double precision zzzv4,zzzvbar4 double precision zzzv5,zzzvbar5 double precision zzzv6,zzzvbar6 double precision zzzv7,zzzvbar7 double precision zzzv8,zzzvbar8 double precision zzzv9,zzzvbar9 double precision zzzv10,zzzvbar10 double precision zzzv11,zzzvbar11 double precision zzzv12,zzzvbar12 double precision zzzv13,zzzvbar13 double precision zzzv14,zzzvbar14 double precision zzzv15,zzzvbar15 double precision zzzv16,zzzvbar16 double precision zzzv17,zzzvbar17 double precision zzzv18,zzzvbar18 double precision zzzv19,zzzvbar19 double precision zzzv20,zzzvbar20 double precision zzzv21,zzzvbar21 double precision zzzv22,zzzvbar22 double precision zzzv23,zzzvbar23 C### C### Temporary variables used for handling function calls double precision zzz1 C### Temporary variable offsets integer zzz1oft C### Active variable offsets and loop control variables integer ypoft integer yyoft integer xmeasoft integer xmvoft integer uclroft integer ucvroft integer utlroft integer utvroft integer xlroft integer xvroft integer etroft integer esroft integer tcroft integer tkroft integer dlroft integer vlroft integer vvroft integer vtroft integer ptroft integer pproft integer crxroft integer rroft integer rhoft integer fwroft integer twroft integer quroft integer hwroft integer uaroft integer uclsoft integer ucvsoft integer utlsoft integer utvsoft integer xlsoft integer xvsoft integer etsoft integer essoft integer tcsoft integer tksoft integer dlsoft integer vlsoft integer vvsoft integer vtsoft integer ptsoft integer ppsoft integer fwsoft integer twsoft integer qusoft integer hwsoft integer uclcoft integer utlcoft integer xlcoft integer etcoft integer escoft integer tccoft integer dlcoft integer vlcoft integer vtcoft integer qucoft integer ucvvoft integer utvvoft integer xvvoft integer etvoft integer esvoft integer tcvoft integer tkvoft integer vtvoft integer ptvoft integer vcvoft integer vrngoft integer vtauoft integer ftmoft integer fcmoft integer xstoft integer xmwsoft integer hstoft integer tstoft integer sfroft integer cpflmxoft integer cpprmxoft integer cpdhoft integer tcwroft integer tcwsoft integer htroft integer agspoft integer xdeloft integer xnsoft integer tgasoft integer tprodoft integer vstoft integer adistoft integer bdistoft integer cdistoft integer ddistoft integer tlastoft integer tnextoft integer hspanoft integer hzerooft integer sspanoft integer szerooft integer spspanoft integer avpoft integer bvpoft integer cvpoft integer ahoft integer bhoft integer choft integer agoft integer bgoft integer cgoft integer avoft integer adoft integer bdoft integer cdoft integer xmwoft integer hwlkoft integer swlkoft integer spwlkoft integer timeoft integer r1foft integer r2foft integer vposoft integer vproft integer uacoft integer dlpoft integer flmsoft integer proft integer flcoefoft integer tmpfacoft integer vovrloft integer finoft integer uarlevoft integer uasoft integer xmnsoft integer xcmpoft integer zzzn integer zzzm integer zzzi integer zzzindx C### Variable offsets for independent, dependent, and C### non-common block local active variables. ypoft=0 yyoft=ypoft+nn hwlkoft=yyoft+nn swlkoft=hwlkoft+1 spwlkoft=swlkoft+1 timeoft=spwlkoft+1 r1foft=timeoft+1 r2foft=r1foft+1 vposoft=r2foft+1 vproft=vposoft+12 uacoft=vproft+1 dlpoft=uacoft+1 flmsoft=dlpoft+1 proft=flmsoft+1 flcoefoft=proft+1 tmpfacoft=flcoefoft+1 vovrloft=tmpfacoft+1 finoft=vovrloft+1 uarlevoft=finoft+8 uasoft=uarlevoft+1 xmnsoft=uasoft+1 xcmpoft=xmnsoft+1 C### Temporary variable offsets zzz1oft=xcmpoft+41 C### Variable offsets for COMMON BLOCK pv xmeasoft=0 xmvoft=xmeasoft+41 C### Variable offsets for COMMON BLOCK dvec C### Variable offsets for COMMON BLOCK teproc uclroft=0 ucvroft=uclroft+8 utlroft=ucvroft+8 utvroft=utlroft+1 xlroft=utvroft+1 xvroft=xlroft+8 etroft=xvroft+8 esroft=etroft+1 tcroft=esroft+1 tkroft=tcroft+1 dlroft=tkroft+1 vlroft=dlroft+1 vvroft=vlroft+1 vtroft=vvroft+1 ptroft=vtroft+1 pproft=ptroft+1 crxroft=pproft+8 rroft=crxroft+8 rhoft=rroft+4 fwroft=rhoft+1 twroft=fwroft+1 quroft=twroft+1 hwroft=quroft+1 uaroft=hwroft+1 uclsoft=uaroft+1 ucvsoft=uclsoft+8 utlsoft=ucvsoft+8 utvsoft=utlsoft+1 xlsoft=utvsoft+1 xvsoft=xlsoft+8 etsoft=xvsoft+8 essoft=etsoft+1 tcsoft=essoft+1 tksoft=tcsoft+1 dlsoft=tksoft+1 vlsoft=dlsoft+1 vvsoft=vlsoft+1 vtsoft=vvsoft+1 ptsoft=vtsoft+1 ppsoft=ptsoft+1 fwsoft=ppsoft+8 twsoft=fwsoft+1 qusoft=twsoft+1 hwsoft=qusoft+1 uclcoft=hwsoft+1 utlcoft=uclcoft+8 xlcoft=utlcoft+1 etcoft=xlcoft+8 escoft=etcoft+1 tccoft=escoft+1 dlcoft=tccoft+1 C### Variable offsets for COMMON BLOCK teproc vlcoft=0 vtcoft=vlcoft+1 qucoft=vtcoft+1 ucvvoft=qucoft+1 utvvoft=ucvvoft+8 xvvoft=utvvoft+1 etvoft=xvvoft+8 esvoft=etvoft+1 tcvoft=esvoft+1 tkvoft=tcvoft+1 vtvoft=tkvoft+1 ptvoft=vtvoft+1 vcvoft=ptvoft+1 vrngoft=vcvoft+12 vtauoft=vrngoft+12 ftmoft=vtauoft+12 fcmoft=ftmoft+13 xstoft=fcmoft+8*13 xmwsoft=xstoft+8*13 hstoft=xmwsoft+13 tstoft=hstoft+13 sfroft=tstoft+13 cpflmxoft=sfroft+8 cpprmxoft=cpflmxoft+1 cpdhoft=cpprmxoft+1 tcwroft=cpdhoft+1 tcwsoft=tcwroft+1 htroft=tcwsoft+1 agspoft=htroft+3 xdeloft=agspoft+1 xnsoft=xdeloft+41 tgasoft=xnsoft+41 tprodoft=tgasoft+1 vstoft=tprodoft+1 C### Variable offsets for COMMON BLOCK wlk adistoft=0 bdistoft=adistoft+12 cdistoft=bdistoft+12 ddistoft=cdistoft+12 tlastoft=ddistoft+12 tnextoft=tlastoft+12 hspanoft=tnextoft+12 hzerooft=hspanoft+12 sspanoft=hzerooft+12 szerooft=sspanoft+12 spspanoft=szerooft+12 C### Variable offsets for COMMON BLOCK const avpoft=0 bvpoft=avpoft+8 cvpoft=bvpoft+8 ahoft=cvpoft+8 bhoft=ahoft+8 choft=bhoft+8 agoft=choft+8 bgoft=agoft+8 cgoft=bgoft+8 avoft=cgoft+8 adoft=avoft+8 bdoft=adoft+8 cdoft=bdoft+8 xmwoft=cdoft+8 C### Number of independent and dependent variables. zzzn=nn zzzm=nn C### Create SVM for functions/subroutines. call CREATESV(1,zzzn) call CREATESV(2,zzzn) call CREATESV(3,zzzn) call CREATESV(4,zzzn) call CREATESV(5,zzzn) call CREATESV(6,zzzn) call CREATESV(7,zzzn) call CREATESV(8,zzzn) call CREATESV(9,zzzn) call CREATESV(10,zzzn) C### Create SVM for COMMON BLOCK pv call CREATESV(11,zzzn) C### Create SVM for COMMON BLOCK randsd call CREATESV(12,zzzn) C### Create SVM for COMMON BLOCK const call CREATESV(13,zzzn) C### Create SVM for COMMON BLOCK dvec call CREATESV(14,zzzn) C### Create SVM for COMMON BLOCK teproc call CREATESV(15,zzzn) C### Create SVM for COMMON BLOCK wlk call CREATESV(16,zzzn) C### Construct mapping between independent variable offsets and indices zzzindx=0 do zzzi=1,nn zzzindx=zzzindx+1 zzziw(zzzindx)=yyoft+zzzi end do C### Initialize independent variable gradients to Cartesian basis vectors. call DSETIVCV(1,zzzn,zzziw) C### do 500 i=1,20 if(idv(i).gt.0)then idv(i)=1 else idv(i)=0 end if 500 continue idvwlk(1)=idv(8) idvwlk(2)=idv(8) idvwlk(3)=idv(9) idvwlk(4)=idv(10) idvwlk(5)=idv(11) idvwlk(6)=idv(12) idvwlk(7)=idv(13) idvwlk(8)=idv(13) idvwlk(9)=idv(16) idvwlk(10)=idv(17) idvwlk(11)=idv(18) idvwlk(12)=idv(20) do 900 i=1,9 if(time.ge.tnext(i))then C### Compute elementary variables zzzv1=tnext(i) zzzv2=tlast(i) zzzv3=zzzv1-zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=-zzzvbar3 zzzvbar1=zzzvbar3 C### hwlk=zzzv3 C### call DSVM2(hwlkoft+1,1, $ zzzvbar2,tlastoft+i,16, $ zzzvbar1,tnextoft+i,16) C### C### Compute elementary variables zzzv1=adist(i) zzzv2=hwlk zzzv3=bdist(i) zzzv4=cdist(i) zzzv5=ddist(i) zzzv6=zzzv2*zzzv5 zzzv7=zzzv4+zzzv6 zzzv8=zzzv2*zzzv7 zzzv9=zzzv3+zzzv8 zzzv10=zzzv2*zzzv9 zzzv11=zzzv1+zzzv10 C### Compute elementary partial derivatives zzzvbar11=1.0d0 zzzvbar10=zzzvbar11 zzzvbar9=zzzvbar10*zzzv2 zzzvbar8=zzzvbar9 zzzvbar7=zzzvbar8*zzzv2 zzzvbar6=zzzvbar7 zzzvbar5=zzzvbar6*zzzv2 zzzvbar2=zzzvbar6*zzzv5 zzzvbar4=zzzvbar7 zzzvbar2=zzzvbar2+zzzvbar8*zzzv7 zzzvbar3=zzzvbar9 zzzvbar2=zzzvbar2+zzzvbar10*zzzv9 zzzvbar1=zzzvbar11 C### swlk=zzzv11 C### call DSVM5(swlkoft+1,1, $ zzzvbar5,ddistoft+i,16, $ zzzvbar4,cdistoft+i,16, $ zzzvbar3,bdistoft+i,16, $ zzzvbar2,hwlkoft+1,1, $ zzzvbar1,adistoft+i,16) C### C### Compute elementary variables zzzv1=bdist(i) zzzv2=hwlk zzzv3=2.d0 zzzv4=cdist(i) zzzv5=zzzv3*zzzv4 zzzv6=3.d0 zzzv7=zzzv6*zzzv2 zzzv8=ddist(i) zzzv9=zzzv7*zzzv8 zzzv10=zzzv5+zzzv9 zzzv11=zzzv2*zzzv10 zzzv12=zzzv1+zzzv11 C### Compute elementary partial derivatives zzzvbar12=1.0d0 zzzvbar11=zzzvbar12 zzzvbar10=zzzvbar11*zzzv2 zzzvbar9=zzzvbar10 zzzvbar8=zzzvbar9*zzzv7 zzzvbar7=zzzvbar9*zzzv8 zzzvbar2=zzzvbar7*zzzv6 zzzvbar5=zzzvbar10 zzzvbar4=zzzvbar5*zzzv3 zzzvbar2=zzzvbar2+zzzvbar11*zzzv10 zzzvbar1=zzzvbar12 C### spwlk=zzzv12 C### call DSVM4(spwlkoft+1,1, $ zzzvbar8,ddistoft+i,16, $ zzzvbar4,cdistoft+i,16, $ zzzvbar2,hwlkoft+1,1, $ zzzvbar1,bdistoft+i,16) C### C### Compute elementary variables zzzv1=tnext(i) C### Compute elementary partial derivatives zzzvbar1=1.0d0 C### tlast(i)=zzzv1 C### call DSVM1(tlastoft+i,16, $ zzzvbar1,tnextoft+i,16) C### C### Save SVMs of arguments zzziw(1)=1 zzziw(2)=1 zzziw(3)=16 zzziw(4)=16 zzziw(5)=16 zzziw(6)=16 zzziw(7)=16 zzziw(8)=16 zzziw(9)=16 zzziw(10)=16 zzziw(11)=16 zzziw(12)=16 zzziw(13)=16 C### Save current offsets for use within embedded subroutine zzziw(14)=swlkoft zzziw(15)=spwlkoft zzziw(16)=adistoft+i-1 zzziw(17)=bdistoft+i-1 zzziw(18)=cdistoft+i-1 zzziw(19)=ddistoft+i-1 zzziw(20)=tlastoft+i-1 zzziw(21)=tnextoft+i-1 zzziw(22)=hspanoft+i-1 zzziw(23)=hzerooft+i-1 zzziw(24)=sspanoft+i-1 zzziw(25)=szerooft+i-1 zzziw(26)=spspanoft+i-1 C### Call modifed embedded subroutine call tesub5ad(swlk,spwlk,adist(i),bdist(i),cdist(i),ddist( $ i),tlast(i),tnext(i),hspan(i),hzero(i),sspan(i), $ szero(i),spspan(i),idvwlk(i),zzziw) C### end if 900 continue do 910 i=10,12 if(time.ge.tnext(i))then C### Compute elementary variables zzzv1=tnext(i) zzzv2=tlast(i) zzzv3=zzzv1-zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=-zzzvbar3 zzzvbar1=zzzvbar3 C### hwlk=zzzv3 C### call DSVM2(hwlkoft+1,1, $ zzzvbar2,tlastoft+i,16, $ zzzvbar1,tnextoft+i,16) C### C### Compute elementary variables zzzv1=adist(i) zzzv2=hwlk zzzv3=bdist(i) zzzv4=cdist(i) zzzv5=ddist(i) zzzv6=zzzv2*zzzv5 zzzv7=zzzv4+zzzv6 zzzv8=zzzv2*zzzv7 zzzv9=zzzv3+zzzv8 zzzv10=zzzv2*zzzv9 zzzv11=zzzv1+zzzv10 C### Compute elementary partial derivatives zzzvbar11=1.0d0 zzzvbar10=zzzvbar11 zzzvbar9=zzzvbar10*zzzv2 zzzvbar8=zzzvbar9 zzzvbar7=zzzvbar8*zzzv2 zzzvbar6=zzzvbar7 zzzvbar5=zzzvbar6*zzzv2 zzzvbar2=zzzvbar6*zzzv5 zzzvbar4=zzzvbar7 zzzvbar2=zzzvbar2+zzzvbar8*zzzv7 zzzvbar3=zzzvbar9 zzzvbar2=zzzvbar2+zzzvbar10*zzzv9 zzzvbar1=zzzvbar11 C### swlk=zzzv11 C### call DSVM5(swlkoft+1,1, $ zzzvbar5,ddistoft+i,16, $ zzzvbar4,cdistoft+i,16, $ zzzvbar3,bdistoft+i,16, $ zzzvbar2,hwlkoft+1,1, $ zzzvbar1,adistoft+i,16) C### C### Compute elementary variables zzzv1=bdist(i) zzzv2=hwlk zzzv3=2.d0 zzzv4=cdist(i) zzzv5=zzzv3*zzzv4 zzzv6=3.d0 zzzv7=zzzv6*zzzv2 zzzv8=ddist(i) zzzv9=zzzv7*zzzv8 zzzv10=zzzv5+zzzv9 zzzv11=zzzv2*zzzv10 zzzv12=zzzv1+zzzv11 C### Compute elementary partial derivatives zzzvbar12=1.0d0 zzzvbar11=zzzvbar12 zzzvbar10=zzzvbar11*zzzv2 zzzvbar9=zzzvbar10 zzzvbar8=zzzvbar9*zzzv7 zzzvbar7=zzzvbar9*zzzv8 zzzvbar2=zzzvbar7*zzzv6 zzzvbar5=zzzvbar10 zzzvbar4=zzzvbar5*zzzv3 zzzvbar2=zzzvbar2+zzzvbar11*zzzv10 zzzvbar1=zzzvbar12 C### spwlk=zzzv12 C### call DSVM4(spwlkoft+1,1, $ zzzvbar8,ddistoft+i,16, $ zzzvbar4,cdistoft+i,16, $ zzzvbar2,hwlkoft+1,1, $ zzzvbar1,bdistoft+i,16) C### C### Compute elementary variables zzzv1=tnext(i) C### Compute elementary partial derivatives zzzvbar1=1.0d0 C### tlast(i)=zzzv1 C### call DSVM1(tlastoft+i,16, $ zzzvbar1,tnextoft+i,16) C### if(swlk.gt.0.1d0)then C### Compute elementary variables zzzv1=swlk C### Compute elementary partial derivatives zzzvbar1=1.0d0 C### adist(i)=zzzv1 C### call DSVM1(adistoft+i,16, $ zzzvbar1,swlkoft+1,1) C### C### Compute elementary variables zzzv1=spwlk C### Compute elementary partial derivatives zzzvbar1=1.0d0 C### bdist(i)=zzzv1 C### call DSVM1(bdistoft+i,16, $ zzzvbar1,spwlkoft+1,1) C### C### Compute elementary variables zzzv1=3.d0 zzzv2=swlk zzzv3=zzzv1*zzzv2 zzzv4=0.2d0 zzzv5=spwlk zzzv6=zzzv4*zzzv5 zzzv7=zzzv3+zzzv6 zzzv8=-zzzv7 zzzv9=0.01d0 zzzv10=zzzv8/zzzv9 C### Compute elementary partial derivatives zzzvbar10=1.0d0 zzzvbar8=zzzvbar10/zzzv9 zzzvbar7=-zzzvbar8 zzzvbar6=zzzvbar7 zzzvbar5=zzzvbar6*zzzv4 zzzvbar3=zzzvbar7 zzzvbar2=zzzvbar3*zzzv1 C### cdist(i)=zzzv10 C### call DSVM2(cdistoft+i,16, $ zzzvbar5,spwlkoft+1,1, $ zzzvbar2,swlkoft+1,1) C### C### Compute elementary variables zzzv1=2.d0 zzzv2=swlk zzzv3=zzzv1*zzzv2 zzzv4=0.1d0 zzzv5=spwlk zzzv6=zzzv4*zzzv5 zzzv7=zzzv3+zzzv6 zzzv8=0.001d0 zzzv9=zzzv7/zzzv8 C### Compute elementary partial derivatives zzzvbar9=1.0d0 zzzvbar7=zzzvbar9/zzzv8 zzzvbar6=zzzvbar7 zzzvbar5=zzzvbar6*zzzv4 zzzvbar3=zzzvbar7 zzzvbar2=zzzvbar3*zzzv1 C### ddist(i)=zzzv9 C### call DSVM2(ddistoft+i,16, $ zzzvbar5,spwlkoft+1,1, $ zzzvbar2,swlkoft+1,1) C### C### Compute elementary variables zzzv1=tlast(i) zzzv2=0.1d0 zzzv3=zzzv1+zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar1=zzzvbar3 C### tnext(i)=zzzv3 C### call DSVM1(tnextoft+i,16, $ zzzvbar1,tlastoft+i,16) C### else isd=-1 C### Save argument SVMs in integer workspace zzziw(1)=1 C### Save current offsets for use within embedded function zzziw(2)=zzz1oft C### Call modifed non-intrinsic funciton zzz1=tesub7ad(isd,zzziw) C### C### Compute elementary variables zzzv1=hspan(i) zzzv2=zzz1 zzzv3=zzzv1*zzzv2 zzzv4=hzero(i) zzzv5=zzzv3+zzzv4 C### Compute elementary partial derivatives zzzvbar5=1.0d0 zzzvbar4=zzzvbar5 zzzvbar3=zzzvbar5 zzzvbar1=zzzvbar3*zzzv2 C### hwlk=zzzv5 C### call DSVM2(hwlkoft+1,1, $ zzzvbar4,hzerooft+i,16, $ zzzvbar1,hspanoft+i,16) C### adist(i)=0.d0 call SVZ(adistoft+i,16) C### bdist(i)=0.d0 call SVZ(bdistoft+i,16) C### C### Compute elementary variables zzzv1=idvwlk(i) zzzv2=dble(zzzv1) zzzv3=hwlk zzzv4=2 zzzv5=zzzv3**zzzv4 zzzv6=zzzv2/zzzv5 C### Compute elementary partial derivatives zzzvbar6=1.0d0 zzzvbar5=-zzzvbar6*zzzv6/zzzv5 zzzvbar3=zzzvbar5*zzzv4*zzzv3**(zzzv4-1.0d0) C### cdist(i)=zzzv6 C### call DSVM1(cdistoft+i,16, $ zzzvbar3,hwlkoft+1,1) C### ddist(i)=0.d0 call SVZ(ddistoft+i,16) C### C### Compute elementary variables zzzv1=tlast(i) zzzv2=hwlk zzzv3=zzzv1+zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=zzzvbar3 zzzvbar1=zzzvbar3 C### tnext(i)=zzzv3 C### call DSVM2(tnextoft+i,16, $ zzzvbar2,hwlkoft+1,1, $ zzzvbar1,tlastoft+i,16) C### end if end if 910 continue if(time.eq.0.d0)then do 950 i=1,12 C### Compute elementary variables zzzv1=szero(i) C### Compute elementary partial derivatives zzzvbar1=1.0d0 C### adist(i)=zzzv1 C### call DSVM1(adistoft+i,16, $ zzzvbar1,szerooft+i,16) C### bdist(i)=0.d0 call SVZ(bdistoft+i,16) C### cdist(i)=0.d0 call SVZ(cdistoft+i,16) C### ddist(i)=0.d0 call SVZ(ddistoft+i,16) C### tlast(i)=0.0d0 call SVZ(tlastoft+i,16) C### tnext(i)=0.1d0 call SVZ(tnextoft+i,16) C### 950 continue end if C### Save argument SVMs in integer workspace zzziw(1)=1 zzziw(2)=1 C### Save current offsets for use within embedded function zzziw(3)=timeoft zzziw(4)=zzz1oft C### Call modifed non-intrinsic funciton zzz1=tesub8ad(1,time,zzziw) C### C### Compute elementary variables zzzv1=zzz1 zzzv2=idv(1) zzzv3=0.03d0 zzzv4=zzzv2*zzzv3 zzzv5=zzzv1-zzzv4 zzzv6=idv(2) zzzv7=2.43719d-3 zzzv8=zzzv6*zzzv7 zzzv9=zzzv5-zzzv8 C### Compute elementary partial derivatives zzzvbar9=1.0d0 zzzvbar5=zzzvbar9 zzzvbar1=zzzvbar5 C### xst(1,4)=zzzv9 C### call DSVM1(xstoft+1+(4-1)*8,15, $ zzzvbar1,zzz1oft+1,1) C### C### Save argument SVMs in integer workspace zzziw(1)=1 zzziw(2)=1 C### Save current offsets for use within embedded function zzziw(3)=timeoft zzziw(4)=zzz1oft C### Call modifed non-intrinsic funciton zzz1=tesub8ad(2,time,zzziw) C### C### Compute elementary variables zzzv1=zzz1 zzzv2=idv(2) zzzv3=0.005d0 zzzv4=zzzv2*zzzv3 zzzv5=zzzv1+zzzv4 C### Compute elementary partial derivatives zzzvbar5=1.0d0 zzzvbar1=zzzvbar5 C### xst(2,4)=zzzv5 C### call DSVM1(xstoft+2+(4-1)*8,15, $ zzzvbar1,zzz1oft+1,1) C### C### Compute elementary variables zzzv1=1.d0 zzzv2=xst(1,4) zzzv3=zzzv1-zzzv2 zzzv4=xst(2,4) zzzv5=zzzv3-zzzv4 C### Compute elementary partial derivatives zzzvbar5=1.0d0 zzzvbar4=-zzzvbar5 zzzvbar3=zzzvbar5 zzzvbar2=-zzzvbar3 C### xst(3,4)=zzzv5 C### call DSVM2(xstoft+3+(4-1)*8,15, $ zzzvbar4,xstoft+2+(4-1)*8,15, $ zzzvbar2,xstoft+1+(4-1)*8,15) C### C### Save argument SVMs in integer workspace zzziw(1)=1 zzziw(2)=1 C### Save current offsets for use within embedded function zzziw(3)=timeoft zzziw(4)=zzz1oft C### Call modifed non-intrinsic funciton zzz1=tesub8ad(3,time,zzziw) C### C### Compute elementary variables zzzv1=zzz1 zzzv2=idv(3) zzzv3=5.d0 zzzv4=zzzv2*zzzv3 zzzv5=zzzv1+zzzv4 C### Compute elementary partial derivatives zzzvbar5=1.0d0 zzzvbar1=zzzvbar5 C### tst(1)=zzzv5 C### call DSVM1(tstoft+1,15, $ zzzvbar1,zzz1oft+1,1) C### C### Save argument SVMs in integer workspace zzziw(1)=1 zzziw(2)=1 C### Save current offsets for use within embedded function zzziw(3)=timeoft zzziw(4)=zzz1oft C### Call modifed non-intrinsic funciton zzz1=tesub8ad(4,time,zzziw) C### C### Compute elementary variables zzzv1=zzz1 C### Compute elementary partial derivatives zzzvbar1=1.0d0 C### tst(4)=zzzv1 C### call DSVM1(tstoft+4,15, $ zzzvbar1,zzz1oft+1,1) C### C### Save argument SVMs in integer workspace zzziw(1)=1 zzziw(2)=1 C### Save current offsets for use within embedded function zzziw(3)=timeoft zzziw(4)=zzz1oft C### Call modifed non-intrinsic funciton zzz1=tesub8ad(5,time,zzziw) C### C### Compute elementary variables zzzv1=zzz1 zzzv2=idv(4) zzzv3=5.d0 zzzv4=zzzv2*zzzv3 zzzv5=zzzv1+zzzv4 C### Compute elementary partial derivatives zzzvbar5=1.0d0 zzzvbar1=zzzvbar5 C### tcwr=zzzv5 C### call DSVM1(tcwroft+1,15, $ zzzvbar1,zzz1oft+1,1) C### C### Save argument SVMs in integer workspace zzziw(1)=1 zzziw(2)=1 C### Save current offsets for use within embedded function zzziw(3)=timeoft zzziw(4)=zzz1oft C### Call modifed non-intrinsic funciton zzz1=tesub8ad(6,time,zzziw) C### C### Compute elementary variables zzzv1=zzz1 zzzv2=idv(5) zzzv3=5.d0 zzzv4=zzzv2*zzzv3 zzzv5=zzzv1+zzzv4 C### Compute elementary partial derivatives zzzvbar5=1.0d0 zzzvbar1=zzzvbar5 C### tcws=zzzv5 C### call DSVM1(tcwsoft+1,15, $ zzzvbar1,zzz1oft+1,1) C### C### Save argument SVMs in integer workspace zzziw(1)=1 zzziw(2)=1 C### Save current offsets for use within embedded function zzziw(3)=timeoft zzziw(4)=zzz1oft C### Call modifed non-intrinsic funciton zzz1=tesub8ad(7,time,zzziw) C### C### Compute elementary variables zzzv1=zzz1 C### Compute elementary partial derivatives zzzvbar1=1.0d0 C### r1f=zzzv1 C### call DSVM1(r1foft+1,1, $ zzzvbar1,zzz1oft+1,1) C### C### Save argument SVMs in integer workspace zzziw(1)=1 zzziw(2)=1 C### Save current offsets for use within embedded function zzziw(3)=timeoft zzziw(4)=zzz1oft C### Call modifed non-intrinsic funciton zzz1=tesub8ad(8,time,zzziw) C### C### Compute elementary variables zzzv1=zzz1 C### Compute elementary partial derivatives zzzvbar1=1.0d0 C### r2f=zzzv1 C### call DSVM1(r2foft+1,1, $ zzzvbar1,zzz1oft+1,1) C### do 1010 i=1,3 C### Compute elementary variables zzzv1=yy(i) C### Compute elementary partial derivatives zzzvbar1=1.0d0 C### ucvr(i)=zzzv1 C### call DSVM1(ucvroft+i,15, $ zzzvbar1,yyoft+i,1) C### C### Compute elementary variables zzzv1=yy(i+9) C### Compute elementary partial derivatives zzzvbar1=1.0d0 C### ucvs(i)=zzzv1 C### call DSVM1(ucvsoft+i,15, $ zzzvbar1,yyoft+i+9,1) C### uclr(i)=0.0 call SVZ(uclroft+i,15) C### ucls(i)=0.0 call SVZ(uclsoft+i,15) C### 1010 continue do 1020 i=4,8 C### Compute elementary variables zzzv1=yy(i) C### Compute elementary partial derivatives zzzvbar1=1.0d0 C### uclr(i)=zzzv1 C### call DSVM1(uclroft+i,15, $ zzzvbar1,yyoft+i,1) C### C### Compute elementary variables zzzv1=yy(i+9) C### Compute elementary partial derivatives zzzvbar1=1.0d0 C### ucls(i)=zzzv1 C### call DSVM1(uclsoft+i,15, $ zzzvbar1,yyoft+i+9,1) C### 1020 continue do 1030 i=1,8 C### Compute elementary variables zzzv1=yy(i+18) C### Compute elementary partial derivatives zzzvbar1=1.0d0 C### uclc(i)=zzzv1 C### call DSVM1(uclcoft+i,15, $ zzzvbar1,yyoft+i+18,1) C### C### Compute elementary variables zzzv1=yy(i+27) C### Compute elementary partial derivatives zzzvbar1=1.0d0 C### ucvv(i)=zzzv1 C### call DSVM1(ucvvoft+i,15, $ zzzvbar1,yyoft+i+27,1) C### 1030 continue C### Compute elementary variables zzzv1=yy(9) C### Compute elementary partial derivatives zzzvbar1=1.0d0 C### etr=zzzv1 C### call DSVM1(etroft+1,15, $ zzzvbar1,yyoft+9,1) C### C### Compute elementary variables zzzv1=yy(18) C### Compute elementary partial derivatives zzzvbar1=1.0d0 C### ets=zzzv1 C### call DSVM1(etsoft+1,15, $ zzzvbar1,yyoft+18,1) C### C### Compute elementary variables zzzv1=yy(27) C### Compute elementary partial derivatives zzzvbar1=1.0d0 C### etc=zzzv1 C### call DSVM1(etcoft+1,15, $ zzzvbar1,yyoft+27,1) C### C### Compute elementary variables zzzv1=yy(36) C### Compute elementary partial derivatives zzzvbar1=1.0d0 C### etv=zzzv1 C### call DSVM1(etvoft+1,15, $ zzzvbar1,yyoft+36,1) C### C### Compute elementary variables zzzv1=yy(37) C### Compute elementary partial derivatives zzzvbar1=1.0d0 C### twr=zzzv1 C### call DSVM1(twroft+1,15, $ zzzvbar1,yyoft+37,1) C### C### Compute elementary variables zzzv1=yy(38) C### Compute elementary partial derivatives zzzvbar1=1.0d0 C### tws=zzzv1 C### call DSVM1(twsoft+1,15, $ zzzvbar1,yyoft+38,1) C### do 1035 i=1,12 C### Compute elementary variables zzzv1=yy(i+38) C### Compute elementary partial derivatives zzzvbar1=1.0d0 C### vpos(i)=zzzv1 C### call DSVM1(vposoft+i,1, $ zzzvbar1,yyoft+i+38,1) C### 1035 continue utlr=0.0 call SVZ(utlroft+1,15) C### utls=0.0 call SVZ(utlsoft+1,15) C### utlc=0.0 call SVZ(utlcoft+1,15) C### utvv=0.0 call SVZ(utvvoft+1,15) C### do 1040 i=1,8 C### Compute elementary variables zzzv1=utlr zzzv2=uclr(i) zzzv3=zzzv1+zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=zzzvbar3 zzzvbar1=zzzvbar3 C### utlr=zzzv3 C### call DSVM2(utlroft+1,15, $ zzzvbar2,uclroft+i,15, $ zzzvbar1,utlroft+1,15) C### C### Compute elementary variables zzzv1=utls zzzv2=ucls(i) zzzv3=zzzv1+zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=zzzvbar3 zzzvbar1=zzzvbar3 C### utls=zzzv3 C### call DSVM2(utlsoft+1,15, $ zzzvbar2,uclsoft+i,15, $ zzzvbar1,utlsoft+1,15) C### C### Compute elementary variables zzzv1=utlc zzzv2=uclc(i) zzzv3=zzzv1+zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=zzzvbar3 zzzvbar1=zzzvbar3 C### utlc=zzzv3 C### call DSVM2(utlcoft+1,15, $ zzzvbar2,uclcoft+i,15, $ zzzvbar1,utlcoft+1,15) C### C### Compute elementary variables zzzv1=utvv zzzv2=ucvv(i) zzzv3=zzzv1+zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=zzzvbar3 zzzvbar1=zzzvbar3 C### utvv=zzzv3 C### call DSVM2(utvvoft+1,15, $ zzzvbar2,ucvvoft+i,15, $ zzzvbar1,utvvoft+1,15) C### 1040 continue do 1050 i=1,8 C### Compute elementary variables zzzv1=uclr(i) zzzv2=utlr zzzv3=zzzv1/zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=-zzzvbar3*zzzv3/zzzv2 zzzvbar1=zzzvbar3/zzzv2 C### xlr(i)=zzzv3 C### call DSVM2(xlroft+i,15, $ zzzvbar2,utlroft+1,15, $ zzzvbar1,uclroft+i,15) C### C### Compute elementary variables zzzv1=ucls(i) zzzv2=utls zzzv3=zzzv1/zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=-zzzvbar3*zzzv3/zzzv2 zzzvbar1=zzzvbar3/zzzv2 C### xls(i)=zzzv3 C### call DSVM2(xlsoft+i,15, $ zzzvbar2,utlsoft+1,15, $ zzzvbar1,uclsoft+i,15) C### C### Compute elementary variables zzzv1=uclc(i) zzzv2=utlc zzzv3=zzzv1/zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=-zzzvbar3*zzzv3/zzzv2 zzzvbar1=zzzvbar3/zzzv2 C### xlc(i)=zzzv3 C### call DSVM2(xlcoft+i,15, $ zzzvbar2,utlcoft+1,15, $ zzzvbar1,uclcoft+i,15) C### C### Compute elementary variables zzzv1=ucvv(i) zzzv2=utvv zzzv3=zzzv1/zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=-zzzvbar3*zzzv3/zzzv2 zzzvbar1=zzzvbar3/zzzv2 C### xvv(i)=zzzv3 C### call DSVM2(xvvoft+i,15, $ zzzvbar2,utvvoft+1,15, $ zzzvbar1,ucvvoft+i,15) C### 1050 continue C### Compute elementary variables zzzv1=etr zzzv2=utlr zzzv3=zzzv1/zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=-zzzvbar3*zzzv3/zzzv2 zzzvbar1=zzzvbar3/zzzv2 C### esr=zzzv3 C### call DSVM2(esroft+1,15, $ zzzvbar2,utlroft+1,15, $ zzzvbar1,etroft+1,15) C### C### Compute elementary variables zzzv1=ets zzzv2=utls zzzv3=zzzv1/zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=-zzzvbar3*zzzv3/zzzv2 zzzvbar1=zzzvbar3/zzzv2 C### ess=zzzv3 C### call DSVM2(essoft+1,15, $ zzzvbar2,utlsoft+1,15, $ zzzvbar1,etsoft+1,15) C### C### Compute elementary variables zzzv1=etc zzzv2=utlc zzzv3=zzzv1/zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=-zzzvbar3*zzzv3/zzzv2 zzzvbar1=zzzvbar3/zzzv2 C### esc=zzzv3 C### call DSVM2(escoft+1,15, $ zzzvbar2,utlcoft+1,15, $ zzzvbar1,etcoft+1,15) C### C### Compute elementary variables zzzv1=etv zzzv2=utvv zzzv3=zzzv1/zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=-zzzvbar3*zzzv3/zzzv2 zzzvbar1=zzzvbar3/zzzv2 C### esv=zzzv3 C### call DSVM2(esvoft+1,15, $ zzzvbar2,utvvoft+1,15, $ zzzvbar1,etvoft+1,15) C### C### Save SVMs of arguments zzziw(1)=15 zzziw(2)=15 zzziw(3)=15 C### Save current offsets for use within embedded subroutine zzziw(4)=xlroft zzziw(5)=tcroft zzziw(6)=esroft C### Call modifed embedded subroutine call tesub2ad(xlr,tcr,esr,0,zzziw) C### C### Compute elementary variables zzzv1=tcr zzzv2=273.15 zzzv3=zzzv1+zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar1=zzzvbar3 C### tkr=zzzv3 C### call DSVM1(tkroft+1,15, $ zzzvbar1,tcroft+1,15) C### C### Save SVMs of arguments zzziw(1)=15 zzziw(2)=15 zzziw(3)=15 C### Save current offsets for use within embedded subroutine zzziw(4)=xlsoft zzziw(5)=tcsoft zzziw(6)=essoft C### Call modifed embedded subroutine call tesub2ad(xls,tcs,ess,0,zzziw) C### C### Compute elementary variables zzzv1=tcs zzzv2=273.15 zzzv3=zzzv1+zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar1=zzzvbar3 C### tks=zzzv3 C### call DSVM1(tksoft+1,15, $ zzzvbar1,tcsoft+1,15) C### C### Save SVMs of arguments zzziw(1)=15 zzziw(2)=15 zzziw(3)=15 C### Save current offsets for use within embedded subroutine zzziw(4)=xlcoft zzziw(5)=tccoft zzziw(6)=escoft C### Call modifed embedded subroutine call tesub2ad(xlc,tcc,esc,0,zzziw) C### C### Save SVMs of arguments zzziw(1)=15 zzziw(2)=15 zzziw(3)=15 C### Save current offsets for use within embedded subroutine zzziw(4)=xvvoft zzziw(5)=tcvoft zzziw(6)=esvoft C### Call modifed embedded subroutine call tesub2ad(xvv,tcv,esv,2,zzziw) C### C### Compute elementary variables zzzv1=tcv zzzv2=273.15 zzzv3=zzzv1+zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar1=zzzvbar3 C### tkv=zzzv3 C### call DSVM1(tkvoft+1,15, $ zzzvbar1,tcvoft+1,15) C### C### Save SVMs of arguments zzziw(1)=15 zzziw(2)=15 zzziw(3)=15 C### Save current offsets for use within embedded subroutine zzziw(4)=xlroft zzziw(5)=tcroft zzziw(6)=dlroft C### Call modifed embedded subroutine call tesub4ad(xlr,tcr,dlr,zzziw) C### C### Save SVMs of arguments zzziw(1)=15 zzziw(2)=15 zzziw(3)=15 C### Save current offsets for use within embedded subroutine zzziw(4)=xlsoft zzziw(5)=tcsoft zzziw(6)=dlsoft C### Call modifed embedded subroutine call tesub4ad(xls,tcs,dls,zzziw) C### C### Save SVMs of arguments zzziw(1)=15 zzziw(2)=15 zzziw(3)=15 C### Save current offsets for use within embedded subroutine zzziw(4)=xlcoft zzziw(5)=tccoft zzziw(6)=dlcoft C### Call modifed embedded subroutine call tesub4ad(xlc,tcc,dlc,zzziw) C### C### Compute elementary variables zzzv1=utlr zzzv2=dlr zzzv3=zzzv1/zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=-zzzvbar3*zzzv3/zzzv2 zzzvbar1=zzzvbar3/zzzv2 C### vlr=zzzv3 C### call DSVM2(vlroft+1,15, $ zzzvbar2,dlroft+1,15, $ zzzvbar1,utlroft+1,15) C### C### Compute elementary variables zzzv1=utls zzzv2=dls zzzv3=zzzv1/zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=-zzzvbar3*zzzv3/zzzv2 zzzvbar1=zzzvbar3/zzzv2 C### vls=zzzv3 C### call DSVM2(vlsoft+1,15, $ zzzvbar2,dlsoft+1,15, $ zzzvbar1,utlsoft+1,15) C### C### Compute elementary variables zzzv1=utlc zzzv2=dlc zzzv3=zzzv1/zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=-zzzvbar3*zzzv3/zzzv2 zzzvbar1=zzzvbar3/zzzv2 C### vlc=zzzv3 C### call DSVM2(vlcoft+1,15, $ zzzvbar2,dlcoft+1,15, $ zzzvbar1,utlcoft+1,15) C### C### Compute elementary variables zzzv1=vtr zzzv2=vlr zzzv3=zzzv1-zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=-zzzvbar3 zzzvbar1=zzzvbar3 C### vvr=zzzv3 C### call DSVM2(vvroft+1,15, $ zzzvbar2,vlroft+1,15, $ zzzvbar1,vtroft+1,15) C### C### Compute elementary variables zzzv1=vts zzzv2=vls zzzv3=zzzv1-zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=-zzzvbar3 zzzvbar1=zzzvbar3 C### vvs=zzzv3 C### call DSVM2(vvsoft+1,15, $ zzzvbar2,vlsoft+1,15, $ zzzvbar1,vtsoft+1,15) C### rg=998.9 ptr=0.0 call SVZ(ptroft+1,15) C### pts=0.0 call SVZ(ptsoft+1,15) C### do 1110 i=1,3 C### Compute elementary variables zzzv1=ucvr(i) zzzv2=rg zzzv3=zzzv1*zzzv2 zzzv4=tkr zzzv5=zzzv3*zzzv4 zzzv6=vvr zzzv7=zzzv5/zzzv6 C### Compute elementary partial derivatives zzzvbar7=1.0d0 zzzvbar6=-zzzvbar7*zzzv7/zzzv6 zzzvbar5=zzzvbar7/zzzv6 zzzvbar4=zzzvbar5*zzzv3 zzzvbar3=zzzvbar5*zzzv4 zzzvbar1=zzzvbar3*zzzv2 C### ppr(i)=zzzv7 C### call DSVM3(pproft+i,15, $ zzzvbar6,vvroft+1,15, $ zzzvbar4,tkroft+1,15, $ zzzvbar1,ucvroft+i,15) C### C### Compute elementary variables zzzv1=ptr zzzv2=ppr(i) zzzv3=zzzv1+zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=zzzvbar3 zzzvbar1=zzzvbar3 C### ptr=zzzv3 C### call DSVM2(ptroft+1,15, $ zzzvbar2,pproft+i,15, $ zzzvbar1,ptroft+1,15) C### C### Compute elementary variables zzzv1=ucvs(i) zzzv2=rg zzzv3=zzzv1*zzzv2 zzzv4=tks zzzv5=zzzv3*zzzv4 zzzv6=vvs zzzv7=zzzv5/zzzv6 C### Compute elementary partial derivatives zzzvbar7=1.0d0 zzzvbar6=-zzzvbar7*zzzv7/zzzv6 zzzvbar5=zzzvbar7/zzzv6 zzzvbar4=zzzvbar5*zzzv3 zzzvbar3=zzzvbar5*zzzv4 zzzvbar1=zzzvbar3*zzzv2 C### pps(i)=zzzv7 C### call DSVM3(ppsoft+i,15, $ zzzvbar6,vvsoft+1,15, $ zzzvbar4,tksoft+1,15, $ zzzvbar1,ucvsoft+i,15) C### C### Compute elementary variables zzzv1=pts zzzv2=pps(i) zzzv3=zzzv1+zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=zzzvbar3 zzzvbar1=zzzvbar3 C### pts=zzzv3 C### call DSVM2(ptsoft+1,15, $ zzzvbar2,ppsoft+i,15, $ zzzvbar1,ptsoft+1,15) C### 1110 continue do 1120 i=4,8 C### Compute elementary variables zzzv1=avp(i) zzzv2=bvp(i) zzzv3=tcr zzzv4=cvp(i) zzzv5=zzzv3+zzzv4 zzzv6=zzzv2/zzzv5 zzzv7=zzzv1+zzzv6 zzzv8=dexp(zzzv7) C### Compute elementary partial derivatives zzzvbar8=1.0d0 zzzvbar7=zzzvbar8*zzzv8 zzzvbar6=zzzvbar7 zzzvbar5=-zzzvbar6*zzzv6/zzzv5 zzzvbar4=zzzvbar5 zzzvbar3=zzzvbar5 zzzvbar2=zzzvbar6/zzzv5 zzzvbar1=zzzvbar7 C### vpr=zzzv8 C### call DSVM4(vproft+1,1, $ zzzvbar4,cvpoft+i,13, $ zzzvbar3,tcroft+1,15, $ zzzvbar2,bvpoft+i,13, $ zzzvbar1,avpoft+i,13) C### C### Compute elementary variables zzzv1=vpr zzzv2=xlr(i) zzzv3=zzzv1*zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=zzzvbar3*zzzv1 zzzvbar1=zzzvbar3*zzzv2 C### ppr(i)=zzzv3 C### call DSVM2(pproft+i,15, $ zzzvbar2,xlroft+i,15, $ zzzvbar1,vproft+1,1) C### C### Compute elementary variables zzzv1=ptr zzzv2=ppr(i) zzzv3=zzzv1+zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=zzzvbar3 zzzvbar1=zzzvbar3 C### ptr=zzzv3 C### call DSVM2(ptroft+1,15, $ zzzvbar2,pproft+i,15, $ zzzvbar1,ptroft+1,15) C### C### Compute elementary variables zzzv1=avp(i) zzzv2=bvp(i) zzzv3=tcs zzzv4=cvp(i) zzzv5=zzzv3+zzzv4 zzzv6=zzzv2/zzzv5 zzzv7=zzzv1+zzzv6 zzzv8=dexp(zzzv7) C### Compute elementary partial derivatives zzzvbar8=1.0d0 zzzvbar7=zzzvbar8*zzzv8 zzzvbar6=zzzvbar7 zzzvbar5=-zzzvbar6*zzzv6/zzzv5 zzzvbar4=zzzvbar5 zzzvbar3=zzzvbar5 zzzvbar2=zzzvbar6/zzzv5 zzzvbar1=zzzvbar7 C### vpr=zzzv8 C### call DSVM4(vproft+1,1, $ zzzvbar4,cvpoft+i,13, $ zzzvbar3,tcsoft+1,15, $ zzzvbar2,bvpoft+i,13, $ zzzvbar1,avpoft+i,13) C### C### Compute elementary variables zzzv1=vpr zzzv2=xls(i) zzzv3=zzzv1*zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=zzzvbar3*zzzv1 zzzvbar1=zzzvbar3*zzzv2 C### pps(i)=zzzv3 C### call DSVM2(ppsoft+i,15, $ zzzvbar2,xlsoft+i,15, $ zzzvbar1,vproft+1,1) C### C### Compute elementary variables zzzv1=pts zzzv2=pps(i) zzzv3=zzzv1+zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=zzzvbar3 zzzvbar1=zzzvbar3 C### pts=zzzv3 C### call DSVM2(ptsoft+1,15, $ zzzvbar2,ppsoft+i,15, $ zzzvbar1,ptsoft+1,15) C### 1120 continue C### Compute elementary variables zzzv1=utvv zzzv2=rg zzzv3=zzzv1*zzzv2 zzzv4=tkv zzzv5=zzzv3*zzzv4 zzzv6=vtv zzzv7=zzzv5/zzzv6 C### Compute elementary partial derivatives zzzvbar7=1.0d0 zzzvbar6=-zzzvbar7*zzzv7/zzzv6 zzzvbar5=zzzvbar7/zzzv6 zzzvbar4=zzzvbar5*zzzv3 zzzvbar3=zzzvbar5*zzzv4 zzzvbar1=zzzvbar3*zzzv2 C### ptv=zzzv7 C### call DSVM3(ptvoft+1,15, $ zzzvbar6,vtvoft+1,15, $ zzzvbar4,tkvoft+1,15, $ zzzvbar1,utvvoft+1,15) C### do 1130 i=1,8 C### Compute elementary variables zzzv1=ppr(i) zzzv2=ptr zzzv3=zzzv1/zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=-zzzvbar3*zzzv3/zzzv2 zzzvbar1=zzzvbar3/zzzv2 C### xvr(i)=zzzv3 C### call DSVM2(xvroft+i,15, $ zzzvbar2,ptroft+1,15, $ zzzvbar1,pproft+i,15) C### C### Compute elementary variables zzzv1=pps(i) zzzv2=pts zzzv3=zzzv1/zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=-zzzvbar3*zzzv3/zzzv2 zzzvbar1=zzzvbar3/zzzv2 C### xvs(i)=zzzv3 C### call DSVM2(xvsoft+i,15, $ zzzvbar2,ptsoft+1,15, $ zzzvbar1,ppsoft+i,15) C### 1130 continue C### Compute elementary variables zzzv1=ptr zzzv2=vvr zzzv3=zzzv1*zzzv2 zzzv4=rg zzzv5=zzzv3/zzzv4 zzzv6=tkr zzzv7=zzzv5/zzzv6 C### Compute elementary partial derivatives zzzvbar7=1.0d0 zzzvbar6=-zzzvbar7*zzzv7/zzzv6 zzzvbar5=zzzvbar7/zzzv6 zzzvbar3=zzzvbar5/zzzv4 zzzvbar2=zzzvbar3*zzzv1 zzzvbar1=zzzvbar3*zzzv2 C### utvr=zzzv7 C### call DSVM3(utvroft+1,15, $ zzzvbar6,tkroft+1,15, $ zzzvbar2,vvroft+1,15, $ zzzvbar1,ptroft+1,15) C### C### Compute elementary variables zzzv1=pts zzzv2=vvs zzzv3=zzzv1*zzzv2 zzzv4=rg zzzv5=zzzv3/zzzv4 zzzv6=tks zzzv7=zzzv5/zzzv6 C### Compute elementary partial derivatives zzzvbar7=1.0d0 zzzvbar6=-zzzvbar7*zzzv7/zzzv6 zzzvbar5=zzzvbar7/zzzv6 zzzvbar3=zzzvbar5/zzzv4 zzzvbar2=zzzvbar3*zzzv1 zzzvbar1=zzzvbar3*zzzv2 C### utvs=zzzv7 C### call DSVM3(utvsoft+1,15, $ zzzvbar6,tksoft+1,15, $ zzzvbar2,vvsoft+1,15, $ zzzvbar1,ptsoft+1,15) C### do 1140 i=4,8 C### Compute elementary variables zzzv1=utvr zzzv2=xvr(i) zzzv3=zzzv1*zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=zzzvbar3*zzzv1 zzzvbar1=zzzvbar3*zzzv2 C### ucvr(i)=zzzv3 C### call DSVM2(ucvroft+i,15, $ zzzvbar2,xvroft+i,15, $ zzzvbar1,utvroft+1,15) C### C### Compute elementary variables zzzv1=utvs zzzv2=xvs(i) zzzv3=zzzv1*zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=zzzvbar3*zzzv1 zzzvbar1=zzzvbar3*zzzv2 C### ucvs(i)=zzzv3 C### call DSVM2(ucvsoft+i,15, $ zzzvbar2,xvsoft+i,15, $ zzzvbar1,utvsoft+1,15) C### 1140 continue C### Compute elementary variables zzzv1=31.5859536 zzzv2=40000.0 zzzv3=1.987 zzzv4=zzzv2/zzzv3 zzzv5=tkr zzzv6=zzzv4/zzzv5 zzzv7=zzzv1-zzzv6 zzzv8=dexp(zzzv7) zzzv9=r1f zzzv10=zzzv8*zzzv9 C### Compute elementary partial derivatives zzzvbar10=1.0d0 zzzvbar9=zzzvbar10*zzzv8 zzzvbar8=zzzvbar10*zzzv9 zzzvbar7=zzzvbar8*zzzv8 zzzvbar6=-zzzvbar7 zzzvbar5=-zzzvbar6*zzzv6/zzzv5 C### rr(1)=zzzv10 C### call DSVM2(rroft+1,15, $ zzzvbar9,r1foft+1,1, $ zzzvbar5,tkroft+1,15) C### C### Compute elementary variables zzzv1=3.00094014 zzzv2=20000.0 zzzv3=1.987 zzzv4=zzzv2/zzzv3 zzzv5=tkr zzzv6=zzzv4/zzzv5 zzzv7=zzzv1-zzzv6 zzzv8=dexp(zzzv7) zzzv9=r2f zzzv10=zzzv8*zzzv9 C### Compute elementary partial derivatives zzzvbar10=1.0d0 zzzvbar9=zzzvbar10*zzzv8 zzzvbar8=zzzvbar10*zzzv9 zzzvbar7=zzzvbar8*zzzv8 zzzvbar6=-zzzvbar7 zzzvbar5=-zzzvbar6*zzzv6/zzzv5 C### rr(2)=zzzv10 C### call DSVM2(rroft+2,15, $ zzzvbar9,r2foft+1,1, $ zzzvbar5,tkroft+1,15) C### C### Compute elementary variables zzzv1=53.4060443 zzzv2=60000.0 zzzv3=1.987 zzzv4=zzzv2/zzzv3 zzzv5=tkr zzzv6=zzzv4/zzzv5 zzzv7=zzzv1-zzzv6 zzzv8=dexp(zzzv7) C### Compute elementary partial derivatives zzzvbar8=1.0d0 zzzvbar7=zzzvbar8*zzzv8 zzzvbar6=-zzzvbar7 zzzvbar5=-zzzvbar6*zzzv6/zzzv5 C### rr(3)=zzzv8 C### call DSVM1(rroft+3,15, $ zzzvbar5,tkroft+1,15) C### C### Compute elementary variables zzzv1=rr(3) zzzv2=0.767488334d0 zzzv3=zzzv1*zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar1=zzzvbar3*zzzv2 C### rr(4)=zzzv3 C### call DSVM1(rroft+4,15, $ zzzvbar1,rroft+3,15) C### if(ppr(1).gt.0.0.and.ppr(3).gt.0.0)then C### Compute elementary variables zzzv1=ppr(1) zzzv2=1.1544 zzzv3=zzzv1**zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar1=zzzvbar3*zzzv2*zzzv1**(zzzv2-1.0d0) C### r1f=zzzv3 C### call DSVM1(r1foft+1,1, $ zzzvbar1,pproft+1,15) C### C### Compute elementary variables zzzv1=ppr(3) zzzv2=0.3735 zzzv3=zzzv1**zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar1=zzzvbar3*zzzv2*zzzv1**(zzzv2-1.0d0) C### r2f=zzzv3 C### call DSVM1(r2foft+1,1, $ zzzvbar1,pproft+3,15) C### C### Compute elementary variables zzzv1=rr(1) zzzv2=r1f zzzv3=zzzv1*zzzv2 zzzv4=r2f zzzv5=zzzv3*zzzv4 zzzv6=ppr(4) zzzv7=zzzv5*zzzv6 C### Compute elementary partial derivatives zzzvbar7=1.0d0 zzzvbar6=zzzvbar7*zzzv5 zzzvbar5=zzzvbar7*zzzv6 zzzvbar4=zzzvbar5*zzzv3 zzzvbar3=zzzvbar5*zzzv4 zzzvbar2=zzzvbar3*zzzv1 zzzvbar1=zzzvbar3*zzzv2 C### rr(1)=zzzv7 C### call DSVM4(rroft+1,15, $ zzzvbar6,pproft+4,15, $ zzzvbar4,r2foft+1,1, $ zzzvbar2,r1foft+1,1, $ zzzvbar1,rroft+1,15) C### C### Compute elementary variables zzzv1=rr(2) zzzv2=r1f zzzv3=zzzv1*zzzv2 zzzv4=r2f zzzv5=zzzv3*zzzv4 zzzv6=ppr(5) zzzv7=zzzv5*zzzv6 C### Compute elementary partial derivatives zzzvbar7=1.0d0 zzzvbar6=zzzvbar7*zzzv5 zzzvbar5=zzzvbar7*zzzv6 zzzvbar4=zzzvbar5*zzzv3 zzzvbar3=zzzvbar5*zzzv4 zzzvbar2=zzzvbar3*zzzv1 zzzvbar1=zzzvbar3*zzzv2 C### rr(2)=zzzv7 C### call DSVM4(rroft+2,15, $ zzzvbar6,pproft+5,15, $ zzzvbar4,r2foft+1,1, $ zzzvbar2,r1foft+1,1, $ zzzvbar1,rroft+2,15) C### else rr(1)=0.0 call SVZ(rroft+1,15) C### rr(2)=0.0 call SVZ(rroft+2,15) C### end if C### Compute elementary variables zzzv1=rr(3) zzzv2=ppr(1) zzzv3=zzzv1*zzzv2 zzzv4=ppr(5) zzzv5=zzzv3*zzzv4 C### Compute elementary partial derivatives zzzvbar5=1.0d0 zzzvbar4=zzzvbar5*zzzv3 zzzvbar3=zzzvbar5*zzzv4 zzzvbar2=zzzvbar3*zzzv1 zzzvbar1=zzzvbar3*zzzv2 C### rr(3)=zzzv5 C### call DSVM3(rroft+3,15, $ zzzvbar4,pproft+5,15, $ zzzvbar2,pproft+1,15, $ zzzvbar1,rroft+3,15) C### C### Compute elementary variables zzzv1=rr(4) zzzv2=ppr(1) zzzv3=zzzv1*zzzv2 zzzv4=ppr(4) zzzv5=zzzv3*zzzv4 C### Compute elementary partial derivatives zzzvbar5=1.0d0 zzzvbar4=zzzvbar5*zzzv3 zzzvbar3=zzzvbar5*zzzv4 zzzvbar2=zzzvbar3*zzzv1 zzzvbar1=zzzvbar3*zzzv2 C### rr(4)=zzzv5 C### call DSVM3(rroft+4,15, $ zzzvbar4,pproft+4,15, $ zzzvbar2,pproft+1,15, $ zzzvbar1,rroft+4,15) C### do 1200 i=1,4 C### Compute elementary variables zzzv1=rr(i) zzzv2=vvr zzzv3=zzzv1*zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=zzzvbar3*zzzv1 zzzvbar1=zzzvbar3*zzzv2 C### rr(i)=zzzv3 C### call DSVM2(rroft+i,15, $ zzzvbar2,vvroft+1,15, $ zzzvbar1,rroft+i,15) C### 1200 continue C### Compute elementary variables zzzv1=rr(1) zzzv2=-zzzv1 zzzv3=rr(2) zzzv4=zzzv2-zzzv3 zzzv5=rr(3) zzzv6=zzzv4-zzzv5 C### Compute elementary partial derivatives zzzvbar6=1.0d0 zzzvbar5=-zzzvbar6 zzzvbar4=zzzvbar6 zzzvbar3=-zzzvbar4 zzzvbar2=zzzvbar4 zzzvbar1=-zzzvbar2 C### crxr(1)=zzzv6 C### call DSVM3(crxroft+1,15, $ zzzvbar5,rroft+3,15, $ zzzvbar3,rroft+2,15, $ zzzvbar1,rroft+1,15) C### C### Compute elementary variables zzzv1=rr(1) zzzv2=-zzzv1 zzzv3=rr(2) zzzv4=zzzv2-zzzv3 C### Compute elementary partial derivatives zzzvbar4=1.0d0 zzzvbar3=-zzzvbar4 zzzvbar2=zzzvbar4 zzzvbar1=-zzzvbar2 C### crxr(3)=zzzv4 C### call DSVM2(crxroft+3,15, $ zzzvbar3,rroft+2,15, $ zzzvbar1,rroft+1,15) C### C### Compute elementary variables zzzv1=rr(1) zzzv2=-zzzv1 zzzv3=1.5d0 zzzv4=rr(4) zzzv5=zzzv3*zzzv4 zzzv6=zzzv2-zzzv5 C### Compute elementary partial derivatives zzzvbar6=1.0d0 zzzvbar5=-zzzvbar6 zzzvbar4=zzzvbar5*zzzv3 zzzvbar2=zzzvbar6 zzzvbar1=-zzzvbar2 C### crxr(4)=zzzv6 C### call DSVM2(crxroft+4,15, $ zzzvbar4,rroft+4,15, $ zzzvbar1,rroft+1,15) C### C### Compute elementary variables zzzv1=rr(2) zzzv2=-zzzv1 zzzv3=rr(3) zzzv4=zzzv2-zzzv3 C### Compute elementary partial derivatives zzzvbar4=1.0d0 zzzvbar3=-zzzvbar4 zzzvbar2=zzzvbar4 zzzvbar1=-zzzvbar2 C### crxr(5)=zzzv4 C### call DSVM2(crxroft+5,15, $ zzzvbar3,rroft+3,15, $ zzzvbar1,rroft+2,15) C### C### Compute elementary variables zzzv1=rr(3) zzzv2=rr(4) zzzv3=zzzv1+zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=zzzvbar3 zzzvbar1=zzzvbar3 C### crxr(6)=zzzv3 C### call DSVM2(crxroft+6,15, $ zzzvbar2,rroft+4,15, $ zzzvbar1,rroft+3,15) C### C### Compute elementary variables zzzv1=rr(1) C### Compute elementary partial derivatives zzzvbar1=1.0d0 C### crxr(7)=zzzv1 C### call DSVM1(crxroft+7,15, $ zzzvbar1,rroft+1,15) C### C### Compute elementary variables zzzv1=rr(2) C### Compute elementary partial derivatives zzzvbar1=1.0d0 C### crxr(8)=zzzv1 C### call DSVM1(crxroft+8,15, $ zzzvbar1,rroft+2,15) C### C### Compute elementary variables zzzv1=rr(1) zzzv2=htr(1) zzzv3=zzzv1*zzzv2 zzzv4=rr(2) zzzv5=htr(2) zzzv6=zzzv4*zzzv5 zzzv7=zzzv3+zzzv6 C### Compute elementary partial derivatives zzzvbar7=1.0d0 zzzvbar6=zzzvbar7 zzzvbar5=zzzvbar6*zzzv4 zzzvbar4=zzzvbar6*zzzv5 zzzvbar3=zzzvbar7 zzzvbar2=zzzvbar3*zzzv1 zzzvbar1=zzzvbar3*zzzv2 C### rh=zzzv7 C### call DSVM4(rhoft+1,15, $ zzzvbar5,htroft+2,15, $ zzzvbar4,rroft+2,15, $ zzzvbar2,htroft+1,15, $ zzzvbar1,rroft+1,15) C### xmws(1)=0.0 call SVZ(xmwsoft+1,15) C### xmws(2)=0.0 call SVZ(xmwsoft+2,15) C### xmws(6)=0.0 call SVZ(xmwsoft+6,15) C### xmws(8)=0.0 call SVZ(xmwsoft+8,15) C### xmws(9)=0.0 call SVZ(xmwsoft+9,15) C### xmws(10)=0.0 call SVZ(xmwsoft+10,15) C### do 2010 i=1,8 C### Compute elementary variables zzzv1=xvv(i) C### Compute elementary partial derivatives zzzvbar1=1.0d0 C### xst(i,6)=zzzv1 C### call DSVM1(xstoft+i+(6-1)*8,15, $ zzzvbar1,xvvoft+i,15) C### C### Compute elementary variables zzzv1=xvr(i) C### Compute elementary partial derivatives zzzvbar1=1.0d0 C### xst(i,8)=zzzv1 C### call DSVM1(xstoft+i+(8-1)*8,15, $ zzzvbar1,xvroft+i,15) C### C### Compute elementary variables zzzv1=xvs(i) C### Compute elementary partial derivatives zzzvbar1=1.0d0 C### xst(i,9)=zzzv1 C### call DSVM1(xstoft+i+(9-1)*8,15, $ zzzvbar1,xvsoft+i,15) C### C### Compute elementary variables zzzv1=xvs(i) C### Compute elementary partial derivatives zzzvbar1=1.0d0 C### xst(i,10)=zzzv1 C### call DSVM1(xstoft+i+(10-1)*8,15, $ zzzvbar1,xvsoft+i,15) C### C### Compute elementary variables zzzv1=xls(i) C### Compute elementary partial derivatives zzzvbar1=1.0d0 C### xst(i,11)=zzzv1 C### call DSVM1(xstoft+i+(11-1)*8,15, $ zzzvbar1,xlsoft+i,15) C### C### Compute elementary variables zzzv1=xlc(i) C### Compute elementary partial derivatives zzzvbar1=1.0d0 C### xst(i,13)=zzzv1 C### call DSVM1(xstoft+i+(13-1)*8,15, $ zzzvbar1,xlcoft+i,15) C### C### Compute elementary variables zzzv1=xmws(1) zzzv2=xst(i,1) zzzv3=xmw(i) zzzv4=zzzv2*zzzv3 zzzv5=zzzv1+zzzv4 C### Compute elementary partial derivatives zzzvbar5=1.0d0 zzzvbar4=zzzvbar5 zzzvbar3=zzzvbar4*zzzv2 zzzvbar2=zzzvbar4*zzzv3 zzzvbar1=zzzvbar5 C### xmws(1)=zzzv5 C### call DSVM3(xmwsoft+1,15, $ zzzvbar3,xmwoft+i,13, $ zzzvbar2,xstoft+i+(1-1)*8,15, $ zzzvbar1,xmwsoft+1,15) C### C### Compute elementary variables zzzv1=xmws(2) zzzv2=xst(i,2) zzzv3=xmw(i) zzzv4=zzzv2*zzzv3 zzzv5=zzzv1+zzzv4 C### Compute elementary partial derivatives zzzvbar5=1.0d0 zzzvbar4=zzzvbar5 zzzvbar3=zzzvbar4*zzzv2 zzzvbar2=zzzvbar4*zzzv3 zzzvbar1=zzzvbar5 C### xmws(2)=zzzv5 C### call DSVM3(xmwsoft+2,15, $ zzzvbar3,xmwoft+i,13, $ zzzvbar2,xstoft+i+(2-1)*8,15, $ zzzvbar1,xmwsoft+2,15) C### C### Compute elementary variables zzzv1=xmws(6) zzzv2=xst(i,6) zzzv3=xmw(i) zzzv4=zzzv2*zzzv3 zzzv5=zzzv1+zzzv4 C### Compute elementary partial derivatives zzzvbar5=1.0d0 zzzvbar4=zzzvbar5 zzzvbar3=zzzvbar4*zzzv2 zzzvbar2=zzzvbar4*zzzv3 zzzvbar1=zzzvbar5 C### xmws(6)=zzzv5 C### call DSVM3(xmwsoft+6,15, $ zzzvbar3,xmwoft+i,13, $ zzzvbar2,xstoft+i+(6-1)*8,15, $ zzzvbar1,xmwsoft+6,15) C### C### Compute elementary variables zzzv1=xmws(8) zzzv2=xst(i,8) zzzv3=xmw(i) zzzv4=zzzv2*zzzv3 zzzv5=zzzv1+zzzv4 C### Compute elementary partial derivatives zzzvbar5=1.0d0 zzzvbar4=zzzvbar5 zzzvbar3=zzzvbar4*zzzv2 zzzvbar2=zzzvbar4*zzzv3 zzzvbar1=zzzvbar5 C### xmws(8)=zzzv5 C### call DSVM3(xmwsoft+8,15, $ zzzvbar3,xmwoft+i,13, $ zzzvbar2,xstoft+i+(8-1)*8,15, $ zzzvbar1,xmwsoft+8,15) C### C### Compute elementary variables zzzv1=xmws(9) zzzv2=xst(i,9) zzzv3=xmw(i) zzzv4=zzzv2*zzzv3 zzzv5=zzzv1+zzzv4 C### Compute elementary partial derivatives zzzvbar5=1.0d0 zzzvbar4=zzzvbar5 zzzvbar3=zzzvbar4*zzzv2 zzzvbar2=zzzvbar4*zzzv3 zzzvbar1=zzzvbar5 C### xmws(9)=zzzv5 C### call DSVM3(xmwsoft+9,15, $ zzzvbar3,xmwoft+i,13, $ zzzvbar2,xstoft+i+(9-1)*8,15, $ zzzvbar1,xmwsoft+9,15) C### C### Compute elementary variables zzzv1=xmws(10) zzzv2=xst(i,10) zzzv3=xmw(i) zzzv4=zzzv2*zzzv3 zzzv5=zzzv1+zzzv4 C### Compute elementary partial derivatives zzzvbar5=1.0d0 zzzvbar4=zzzvbar5 zzzvbar3=zzzvbar4*zzzv2 zzzvbar2=zzzvbar4*zzzv3 zzzvbar1=zzzvbar5 C### xmws(10)=zzzv5 C### call DSVM3(xmwsoft+10,15, $ zzzvbar3,xmwoft+i,13, $ zzzvbar2,xstoft+i+(10-1)*8,15, $ zzzvbar1,xmwsoft+10,15) C### 2010 continue C### Compute elementary variables zzzv1=tcv C### Compute elementary partial derivatives zzzvbar1=1.0d0 C### tst(6)=zzzv1 C### call DSVM1(tstoft+6,15, $ zzzvbar1,tcvoft+1,15) C### C### Compute elementary variables zzzv1=tcr C### Compute elementary partial derivatives zzzvbar1=1.0d0 C### tst(8)=zzzv1 C### call DSVM1(tstoft+8,15, $ zzzvbar1,tcroft+1,15) C### C### Compute elementary variables zzzv1=tcs C### Compute elementary partial derivatives zzzvbar1=1.0d0 C### tst(9)=zzzv1 C### call DSVM1(tstoft+9,15, $ zzzvbar1,tcsoft+1,15) C### C### Compute elementary variables zzzv1=tcs C### Compute elementary partial derivatives zzzvbar1=1.0d0 C### tst(10)=zzzv1 C### call DSVM1(tstoft+10,15, $ zzzvbar1,tcsoft+1,15) C### C### Compute elementary variables zzzv1=tcs C### Compute elementary partial derivatives zzzvbar1=1.0d0 C### tst(11)=zzzv1 C### call DSVM1(tstoft+11,15, $ zzzvbar1,tcsoft+1,15) C### C### Compute elementary variables zzzv1=tcc C### Compute elementary partial derivatives zzzvbar1=1.0d0 C### tst(13)=zzzv1 C### call DSVM1(tstoft+13,15, $ zzzvbar1,tccoft+1,15) C### C### Save SVMs of arguments zzziw(1)=15 zzziw(2)=15 zzziw(3)=15 C### Save current offsets for use within embedded subroutine zzziw(4)=xstoft+1+(1-1)*8-1 zzziw(5)=tstoft+1-1 zzziw(6)=hstoft+1-1 C### Call modifed embedded subroutine call tesub1ad(xst(1,1),tst(1),hst(1),1,zzziw) C### C### Save SVMs of arguments zzziw(1)=15 zzziw(2)=15 zzziw(3)=15 C### Save current offsets for use within embedded subroutine zzziw(4)=xstoft+1+(2-1)*8-1 zzziw(5)=tstoft+2-1 zzziw(6)=hstoft+2-1 C### Call modifed embedded subroutine call tesub1ad(xst(1,2),tst(2),hst(2),1,zzziw) C### C### Save SVMs of arguments zzziw(1)=15 zzziw(2)=15 zzziw(3)=15 C### Save current offsets for use within embedded subroutine zzziw(4)=xstoft+1+(3-1)*8-1 zzziw(5)=tstoft+3-1 zzziw(6)=hstoft+3-1 C### Call modifed embedded subroutine call tesub1ad(xst(1,3),tst(3),hst(3),1,zzziw) C### C### Save SVMs of arguments zzziw(1)=15 zzziw(2)=15 zzziw(3)=15 C### Save current offsets for use within embedded subroutine zzziw(4)=xstoft+1+(4-1)*8-1 zzziw(5)=tstoft+4-1 zzziw(6)=hstoft+4-1 C### Call modifed embedded subroutine call tesub1ad(xst(1,4),tst(4),hst(4),1,zzziw) C### C### Save SVMs of arguments zzziw(1)=15 zzziw(2)=15 zzziw(3)=15 C### Save current offsets for use within embedded subroutine zzziw(4)=xstoft+1+(6-1)*8-1 zzziw(5)=tstoft+6-1 zzziw(6)=hstoft+6-1 C### Call modifed embedded subroutine call tesub1ad(xst(1,6),tst(6),hst(6),1,zzziw) C### C### Save SVMs of arguments zzziw(1)=15 zzziw(2)=15 zzziw(3)=15 C### Save current offsets for use within embedded subroutine zzziw(4)=xstoft+1+(8-1)*8-1 zzziw(5)=tstoft+8-1 zzziw(6)=hstoft+8-1 C### Call modifed embedded subroutine call tesub1ad(xst(1,8),tst(8),hst(8),1,zzziw) C### C### Save SVMs of arguments zzziw(1)=15 zzziw(2)=15 zzziw(3)=15 C### Save current offsets for use within embedded subroutine zzziw(4)=xstoft+1+(9-1)*8-1 zzziw(5)=tstoft+9-1 zzziw(6)=hstoft+9-1 C### Call modifed embedded subroutine call tesub1ad(xst(1,9),tst(9),hst(9),1,zzziw) C### C### Compute elementary variables zzzv1=hst(9) C### Compute elementary partial derivatives zzzvbar1=1.0d0 C### hst(10)=zzzv1 C### call DSVM1(hstoft+10,15, $ zzzvbar1,hstoft+9,15) C### C### Save SVMs of arguments zzziw(1)=15 zzziw(2)=15 zzziw(3)=15 C### Save current offsets for use within embedded subroutine zzziw(4)=xstoft+1+(11-1)*8-1 zzziw(5)=tstoft+11-1 zzziw(6)=hstoft+11-1 C### Call modifed embedded subroutine call tesub1ad(xst(1,11),tst(11),hst(11),0,zzziw) C### C### Save SVMs of arguments zzziw(1)=15 zzziw(2)=15 zzziw(3)=15 C### Save current offsets for use within embedded subroutine zzziw(4)=xstoft+1+(13-1)*8-1 zzziw(5)=tstoft+13-1 zzziw(6)=hstoft+13-1 C### Call modifed embedded subroutine call tesub1ad(xst(1,13),tst(13),hst(13),0,zzziw) C### C### Compute elementary variables zzzv1=vpos(1) zzzv2=vrng(1) zzzv3=zzzv1*zzzv2 zzzv4=100.0 zzzv5=zzzv3/zzzv4 C### Compute elementary partial derivatives zzzvbar5=1.0d0 zzzvbar3=zzzvbar5/zzzv4 zzzvbar2=zzzvbar3*zzzv1 zzzvbar1=zzzvbar3*zzzv2 C### ftm(1)=zzzv5 C### call DSVM2(ftmoft+1,15, $ zzzvbar2,vrngoft+1,15, $ zzzvbar1,vposoft+1,1) C### C### Compute elementary variables zzzv1=vpos(2) zzzv2=vrng(2) zzzv3=zzzv1*zzzv2 zzzv4=100.0 zzzv5=zzzv3/zzzv4 C### Compute elementary partial derivatives zzzvbar5=1.0d0 zzzvbar3=zzzvbar5/zzzv4 zzzvbar2=zzzvbar3*zzzv1 zzzvbar1=zzzvbar3*zzzv2 C### ftm(2)=zzzv5 C### call DSVM2(ftmoft+2,15, $ zzzvbar2,vrngoft+2,15, $ zzzvbar1,vposoft+2,1) C### C### Compute elementary variables zzzv1=vpos(3) zzzv2=1.d0 zzzv3=idv(6) zzzv4=zzzv2-zzzv3 zzzv5=zzzv1*zzzv4 zzzv6=vrng(3) zzzv7=zzzv5*zzzv6 zzzv8=100.0 zzzv9=zzzv7/zzzv8 C### Compute elementary partial derivatives zzzvbar9=1.0d0 zzzvbar7=zzzvbar9/zzzv8 zzzvbar6=zzzvbar7*zzzv5 zzzvbar5=zzzvbar7*zzzv6 zzzvbar1=zzzvbar5*zzzv4 C### ftm(3)=zzzv9 C### call DSVM2(ftmoft+3,15, $ zzzvbar6,vrngoft+3,15, $ zzzvbar1,vposoft+3,1) C### C### Compute elementary variables zzzv1=vpos(4) zzzv2=1.d0 zzzv3=idv(7) zzzv4=0.2d0 zzzv5=zzzv3*zzzv4 zzzv6=zzzv2-zzzv5 zzzv7=zzzv1*zzzv6 zzzv8=vrng(4) zzzv9=zzzv7*zzzv8 zzzv10=100.0 zzzv11=zzzv9/zzzv10 zzzv12=1.d-10 zzzv13=zzzv11+zzzv12 C### Compute elementary partial derivatives zzzvbar13=1.0d0 zzzvbar11=zzzvbar13 zzzvbar9=zzzvbar11/zzzv10 zzzvbar8=zzzvbar9*zzzv7 zzzvbar7=zzzvbar9*zzzv8 zzzvbar1=zzzvbar7*zzzv6 C### ftm(4)=zzzv13 C### call DSVM2(ftmoft+4,15, $ zzzvbar8,vrngoft+4,15, $ zzzvbar1,vposoft+4,1) C### C### Compute elementary variables zzzv1=vpos(7) zzzv2=vrng(7) zzzv3=zzzv1*zzzv2 zzzv4=100.0 zzzv5=zzzv3/zzzv4 C### Compute elementary partial derivatives zzzvbar5=1.0d0 zzzvbar3=zzzvbar5/zzzv4 zzzvbar2=zzzvbar3*zzzv1 zzzvbar1=zzzvbar3*zzzv2 C### ftm(11)=zzzv5 C### call DSVM2(ftmoft+11,15, $ zzzvbar2,vrngoft+7,15, $ zzzvbar1,vposoft+7,1) C### C### Compute elementary variables zzzv1=vpos(8) zzzv2=vrng(8) zzzv3=zzzv1*zzzv2 zzzv4=100.0 zzzv5=zzzv3/zzzv4 C### Compute elementary partial derivatives zzzvbar5=1.0d0 zzzvbar3=zzzvbar5/zzzv4 zzzvbar2=zzzvbar3*zzzv1 zzzvbar1=zzzvbar3*zzzv2 C### ftm(13)=zzzv5 C### call DSVM2(ftmoft+13,15, $ zzzvbar2,vrngoft+8,15, $ zzzvbar1,vposoft+8,1) C### C### Save argument SVMs in integer workspace zzziw(1)=1 zzziw(2)=1 C### Save current offsets for use within embedded function zzziw(3)=timeoft zzziw(4)=zzz1oft C### Call modifed non-intrinsic funciton zzz1=tesub8ad(9,time,zzziw) C### C### Compute elementary variables zzzv1=vpos(9) zzzv2=vrng(9) zzzv3=zzzv1*zzzv2 zzzv4=1.d0 zzzv5=zzz1 zzzv6=zzzv4+zzzv5 zzzv7=zzzv3*zzzv6 zzzv8=100.0 zzzv9=zzzv7/zzzv8 C### Compute elementary partial derivatives zzzvbar9=1.0d0 zzzvbar7=zzzvbar9/zzzv8 zzzvbar6=zzzvbar7*zzzv3 zzzvbar5=zzzvbar6 zzzvbar3=zzzvbar7*zzzv6 zzzvbar2=zzzvbar3*zzzv1 zzzvbar1=zzzvbar3*zzzv2 C### uac=zzzv9 C### call DSVM3(uacoft+1,1, $ zzzvbar5,zzz1oft+1,1, $ zzzvbar2,vrngoft+9,15, $ zzzvbar1,vposoft+9,1) C### C### Compute elementary variables zzzv1=vpos(10) zzzv2=vrng(10) zzzv3=zzzv1*zzzv2 zzzv4=100.0 zzzv5=zzzv3/zzzv4 C### Compute elementary partial derivatives zzzvbar5=1.0d0 zzzvbar3=zzzvbar5/zzzv4 zzzvbar2=zzzvbar3*zzzv1 zzzvbar1=zzzvbar3*zzzv2 C### fwr=zzzv5 C### call DSVM2(fwroft+1,15, $ zzzvbar2,vrngoft+10,15, $ zzzvbar1,vposoft+10,1) C### C### Compute elementary variables zzzv1=vpos(11) zzzv2=vrng(11) zzzv3=zzzv1*zzzv2 zzzv4=100.0 zzzv5=zzzv3/zzzv4 C### Compute elementary partial derivatives zzzvbar5=1.0d0 zzzvbar3=zzzvbar5/zzzv4 zzzvbar2=zzzvbar3*zzzv1 zzzvbar1=zzzvbar3*zzzv2 C### fws=zzzv5 C### call DSVM2(fwsoft+1,15, $ zzzvbar2,vrngoft+11,15, $ zzzvbar1,vposoft+11,1) C### C### Compute elementary variables zzzv1=vpos(12) zzzv2=150.0 zzzv3=zzzv1+zzzv2 zzzv4=100.0 zzzv5=zzzv3/zzzv4 C### Compute elementary partial derivatives zzzvbar5=1.0d0 zzzvbar3=zzzvbar5/zzzv4 zzzvbar1=zzzvbar3 C### agsp=zzzv5 C### call DSVM1(agspoft+1,15, $ zzzvbar1,vposoft+12,1) C### C### Compute elementary variables zzzv1=ptv zzzv2=ptr zzzv3=zzzv1-zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=-zzzvbar3 zzzvbar1=zzzvbar3 C### dlp=zzzv3 C### call DSVM2(dlpoft+1,1, $ zzzvbar2,ptroft+1,15, $ zzzvbar1,ptvoft+1,15) C### if(dlp.lt.0.0)then dlp=0.0 call SVZ(dlpoft+1,1) C### end if C### Compute elementary variables zzzv1=1937.6d0 zzzv2=dlp zzzv3=dsqrt(zzzv2) zzzv4=zzzv1*zzzv3 C### Compute elementary partial derivatives zzzvbar4=1.0d0 zzzvbar3=zzzvbar4*zzzv1 zzzvbar2=zzzvbar3*0.50d0/dsqrt(zzzv2) C### flms=zzzv4 C### call DSVM1(flmsoft+1,1, $ zzzvbar2,dlpoft+1,1) C### C### Compute elementary variables zzzv1=flms zzzv2=xmws(6) zzzv3=zzzv1/zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=-zzzvbar3*zzzv3/zzzv2 zzzvbar1=zzzvbar3/zzzv2 C### ftm(6)=zzzv3 C### call DSVM2(ftmoft+6,15, $ zzzvbar2,xmwsoft+6,15, $ zzzvbar1,flmsoft+1,1) C### C### Compute elementary variables zzzv1=ptr zzzv2=pts zzzv3=zzzv1-zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=-zzzvbar3 zzzvbar1=zzzvbar3 C### dlp=zzzv3 C### call DSVM2(dlpoft+1,1, $ zzzvbar2,ptsoft+1,15, $ zzzvbar1,ptroft+1,15) C### if(dlp.lt.0.0)then dlp=0.0 call SVZ(dlpoft+1,1) C### end if C### Save argument SVMs in integer workspace zzziw(1)=1 zzziw(2)=1 C### Save current offsets for use within embedded function zzziw(3)=timeoft zzziw(4)=zzz1oft C### Call modifed non-intrinsic funciton zzz1=tesub8ad(12,time,zzziw) C### C### Compute elementary variables zzzv1=4574.21d0 zzzv2=dlp zzzv3=dsqrt(zzzv2) zzzv4=zzzv1*zzzv3 zzzv5=1.d0 zzzv6=0.25d0 zzzv7=zzz1 zzzv8=zzzv6*zzzv7 zzzv9=zzzv5-zzzv8 zzzv10=zzzv4*zzzv9 C### Compute elementary partial derivatives zzzvbar10=1.0d0 zzzvbar9=zzzvbar10*zzzv4 zzzvbar8=-zzzvbar9 zzzvbar7=zzzvbar8*zzzv6 zzzvbar4=zzzvbar10*zzzv9 zzzvbar3=zzzvbar4*zzzv1 zzzvbar2=zzzvbar3*0.50d0/dsqrt(zzzv2) C### flms=zzzv10 C### call DSVM2(flmsoft+1,1, $ zzzvbar7,zzz1oft+1,1, $ zzzvbar2,dlpoft+1,1) C### C### Compute elementary variables zzzv1=flms zzzv2=xmws(8) zzzv3=zzzv1/zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=-zzzvbar3*zzzv3/zzzv2 zzzvbar1=zzzvbar3/zzzv2 C### ftm(8)=zzzv3 C### call DSVM2(ftmoft+8,15, $ zzzvbar2,xmwsoft+8,15, $ zzzvbar1,flmsoft+1,1) C### C### Compute elementary variables zzzv1=pts zzzv2=760.0 zzzv3=zzzv1-zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar1=zzzvbar3 C### dlp=zzzv3 C### call DSVM1(dlpoft+1,1, $ zzzvbar1,ptsoft+1,15) C### if(dlp.lt.0.0)then dlp=0.0 call SVZ(dlpoft+1,1) C### end if C### Compute elementary variables zzzv1=vpos(6) zzzv2=0.151169d0 zzzv3=zzzv1*zzzv2 zzzv4=dlp zzzv5=dsqrt(zzzv4) zzzv6=zzzv3*zzzv5 C### Compute elementary partial derivatives zzzvbar6=1.0d0 zzzvbar5=zzzvbar6*zzzv3 zzzvbar4=zzzvbar5*0.50d0/dsqrt(zzzv4) zzzvbar3=zzzvbar6*zzzv5 zzzvbar1=zzzvbar3*zzzv2 C### flms=zzzv6 C### call DSVM2(flmsoft+1,1, $ zzzvbar4,dlpoft+1,1, $ zzzvbar1,vposoft+6,1) C### C### Compute elementary variables zzzv1=flms zzzv2=xmws(10) zzzv3=zzzv1/zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=-zzzvbar3*zzzv3/zzzv2 zzzvbar1=zzzvbar3/zzzv2 C### ftm(10)=zzzv3 C### call DSVM2(ftmoft+10,15, $ zzzvbar2,xmwsoft+10,15, $ zzzvbar1,flmsoft+1,1) C### C### Compute elementary variables zzzv1=ptv zzzv2=pts zzzv3=zzzv1/zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=-zzzvbar3*zzzv3/zzzv2 zzzvbar1=zzzvbar3/zzzv2 C### pr=zzzv3 C### call DSVM2(proft+1,1, $ zzzvbar2,ptsoft+1,15, $ zzzvbar1,ptvoft+1,15) C### if(pr.lt.1.0)then pr=1.0 call SVZ(proft+1,1) C### end if if(pr.gt.cpprmx)then C### Compute elementary variables zzzv1=cpprmx C### Compute elementary partial derivatives zzzvbar1=1.0d0 C### pr=zzzv1 C### call DSVM1(proft+1,1, $ zzzvbar1,cpprmxoft+1,15) C### end if C### Compute elementary variables zzzv1=cpflmx zzzv2=1.197d0 zzzv3=zzzv1/zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar1=zzzvbar3/zzzv2 C### flcoef=zzzv3 C### call DSVM1(flcoefoft+1,1, $ zzzvbar1,cpflmxoft+1,15) C### C### Compute elementary variables zzzv1=cpflmx zzzv2=flcoef zzzv3=1.0 zzzv4=pr zzzv5=3 zzzv6=zzzv4**zzzv5 zzzv7=zzzv3-zzzv6 zzzv8=zzzv2*zzzv7 zzzv9=zzzv1+zzzv8 C### Compute elementary partial derivatives zzzvbar9=1.0d0 zzzvbar8=zzzvbar9 zzzvbar7=zzzvbar8*zzzv2 zzzvbar6=-zzzvbar7 zzzvbar4=zzzvbar6*zzzv5*zzzv4**(zzzv5-1.0d0) zzzvbar2=zzzvbar8*zzzv7 zzzvbar1=zzzvbar9 C### flms=zzzv9 C### call DSVM3(flmsoft+1,1, $ zzzvbar4,proft+1,1, $ zzzvbar2,flcoefoft+1,1, $ zzzvbar1,cpflmxoft+1,15) C### C### Compute elementary variables zzzv1=flms zzzv2=tcs zzzv3=273.15d0 zzzv4=zzzv2+zzzv3 zzzv5=zzzv1*zzzv4 zzzv6=1.8d-6 zzzv7=zzzv5*zzzv6 zzzv8=1.9872d0 zzzv9=zzzv7*zzzv8 zzzv10=ptv zzzv11=pts zzzv12=zzzv10-zzzv11 zzzv13=zzzv9*zzzv12 zzzv14=xmws(9) zzzv15=zzzv14*zzzv11 zzzv16=zzzv13/zzzv15 C### Compute elementary partial derivatives zzzvbar16=1.0d0 zzzvbar15=-zzzvbar16*zzzv16/zzzv15 zzzvbar11=zzzvbar15*zzzv14 zzzvbar14=zzzvbar15*zzzv11 zzzvbar13=zzzvbar16/zzzv15 zzzvbar12=zzzvbar13*zzzv9 zzzvbar11=zzzvbar11-zzzvbar12 zzzvbar10=zzzvbar12 zzzvbar9=zzzvbar13*zzzv12 zzzvbar7=zzzvbar9*zzzv8 zzzvbar5=zzzvbar7*zzzv6 zzzvbar4=zzzvbar5*zzzv1 zzzvbar2=zzzvbar4 zzzvbar1=zzzvbar5*zzzv4 C### cpdh=zzzv16 C### call DSVM5(cpdhoft+1,15, $ zzzvbar14,xmwsoft+9,15, $ zzzvbar11,ptsoft+1,15, $ zzzvbar10,ptvoft+1,15, $ zzzvbar2,tcsoft+1,15, $ zzzvbar1,flmsoft+1,1) C### C### Compute elementary variables zzzv1=ptv zzzv2=pts zzzv3=zzzv1-zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=-zzzvbar3 zzzvbar1=zzzvbar3 C### dlp=zzzv3 C### call DSVM2(dlpoft+1,1, $ zzzvbar2,ptsoft+1,15, $ zzzvbar1,ptvoft+1,15) C### if(dlp.lt.0.0)then dlp=0.0 call SVZ(dlpoft+1,1) C### end if C### Compute elementary variables zzzv1=flms zzzv2=vpos(5) zzzv3=53.349d0 zzzv4=zzzv2*zzzv3 zzzv5=dlp zzzv6=dsqrt(zzzv5) zzzv7=zzzv4*zzzv6 zzzv8=zzzv1-zzzv7 C### Compute elementary partial derivatives zzzvbar8=1.0d0 zzzvbar7=-zzzvbar8 zzzvbar6=zzzvbar7*zzzv4 zzzvbar5=zzzvbar6*0.50d0/dsqrt(zzzv5) zzzvbar4=zzzvbar7*zzzv6 zzzvbar2=zzzvbar4*zzzv3 zzzvbar1=zzzvbar8 C### flms=zzzv8 C### call DSVM3(flmsoft+1,1, $ zzzvbar5,dlpoft+1,1, $ zzzvbar2,vposoft+5,1, $ zzzvbar1,flmsoft+1,1) C### if(flms.lt.1.d-3)then flms=1.d-3 call SVZ(flmsoft+1,1) C### end if C### Compute elementary variables zzzv1=flms zzzv2=xmws(9) zzzv3=zzzv1/zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=-zzzvbar3*zzzv3/zzzv2 zzzvbar1=zzzvbar3/zzzv2 C### ftm(9)=zzzv3 C### call DSVM2(ftmoft+9,15, $ zzzvbar2,xmwsoft+9,15, $ zzzvbar1,flmsoft+1,1) C### C### Compute elementary variables zzzv1=hst(9) zzzv2=cpdh zzzv3=ftm(9) zzzv4=zzzv2/zzzv3 zzzv5=zzzv1+zzzv4 C### Compute elementary partial derivatives zzzvbar5=1.0d0 zzzvbar4=zzzvbar5 zzzvbar3=-zzzvbar4*zzzv4/zzzv3 zzzvbar2=zzzvbar4/zzzv3 zzzvbar1=zzzvbar5 C### hst(9)=zzzv5 C### call DSVM3(hstoft+9,15, $ zzzvbar3,ftmoft+9,15, $ zzzvbar2,cpdhoft+1,15, $ zzzvbar1,hstoft+9,15) C### do 5020 i=1,8 C### Compute elementary variables zzzv1=xst(i,1) zzzv2=ftm(1) zzzv3=zzzv1*zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=zzzvbar3*zzzv1 zzzvbar1=zzzvbar3*zzzv2 C### fcm(i,1)=zzzv3 C### call DSVM2(fcmoft+i+(1-1)*8,15, $ zzzvbar2,ftmoft+1,15, $ zzzvbar1,xstoft+i+(1-1)*8,15) C### C### Compute elementary variables zzzv1=xst(i,2) zzzv2=ftm(2) zzzv3=zzzv1*zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=zzzvbar3*zzzv1 zzzvbar1=zzzvbar3*zzzv2 C### fcm(i,2)=zzzv3 C### call DSVM2(fcmoft+i+(2-1)*8,15, $ zzzvbar2,ftmoft+2,15, $ zzzvbar1,xstoft+i+(2-1)*8,15) C### C### Compute elementary variables zzzv1=xst(i,3) zzzv2=ftm(3) zzzv3=zzzv1*zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=zzzvbar3*zzzv1 zzzvbar1=zzzvbar3*zzzv2 C### fcm(i,3)=zzzv3 C### call DSVM2(fcmoft+i+(3-1)*8,15, $ zzzvbar2,ftmoft+3,15, $ zzzvbar1,xstoft+i+(3-1)*8,15) C### C### Compute elementary variables zzzv1=xst(i,4) zzzv2=ftm(4) zzzv3=zzzv1*zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=zzzvbar3*zzzv1 zzzvbar1=zzzvbar3*zzzv2 C### fcm(i,4)=zzzv3 C### call DSVM2(fcmoft+i+(4-1)*8,15, $ zzzvbar2,ftmoft+4,15, $ zzzvbar1,xstoft+i+(4-1)*8,15) C### C### Compute elementary variables zzzv1=xst(i,6) zzzv2=ftm(6) zzzv3=zzzv1*zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=zzzvbar3*zzzv1 zzzvbar1=zzzvbar3*zzzv2 C### fcm(i,6)=zzzv3 C### call DSVM2(fcmoft+i+(6-1)*8,15, $ zzzvbar2,ftmoft+6,15, $ zzzvbar1,xstoft+i+(6-1)*8,15) C### C### Compute elementary variables zzzv1=xst(i,8) zzzv2=ftm(8) zzzv3=zzzv1*zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=zzzvbar3*zzzv1 zzzvbar1=zzzvbar3*zzzv2 C### fcm(i,8)=zzzv3 C### call DSVM2(fcmoft+i+(8-1)*8,15, $ zzzvbar2,ftmoft+8,15, $ zzzvbar1,xstoft+i+(8-1)*8,15) C### C### Compute elementary variables zzzv1=xst(i,9) zzzv2=ftm(9) zzzv3=zzzv1*zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=zzzvbar3*zzzv1 zzzvbar1=zzzvbar3*zzzv2 C### fcm(i,9)=zzzv3 C### call DSVM2(fcmoft+i+(9-1)*8,15, $ zzzvbar2,ftmoft+9,15, $ zzzvbar1,xstoft+i+(9-1)*8,15) C### C### Compute elementary variables zzzv1=xst(i,10) zzzv2=ftm(10) zzzv3=zzzv1*zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=zzzvbar3*zzzv1 zzzvbar1=zzzvbar3*zzzv2 C### fcm(i,10)=zzzv3 C### call DSVM2(fcmoft+i+(10-1)*8,15, $ zzzvbar2,ftmoft+10,15, $ zzzvbar1,xstoft+i+(10-1)*8,15) C### C### Compute elementary variables zzzv1=xst(i,11) zzzv2=ftm(11) zzzv3=zzzv1*zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=zzzvbar3*zzzv1 zzzvbar1=zzzvbar3*zzzv2 C### fcm(i,11)=zzzv3 C### call DSVM2(fcmoft+i+(11-1)*8,15, $ zzzvbar2,ftmoft+11,15, $ zzzvbar1,xstoft+i+(11-1)*8,15) C### C### Compute elementary variables zzzv1=xst(i,13) zzzv2=ftm(13) zzzv3=zzzv1*zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=zzzvbar3*zzzv1 zzzvbar1=zzzvbar3*zzzv2 C### fcm(i,13)=zzzv3 C### call DSVM2(fcmoft+i+(13-1)*8,15, $ zzzvbar2,ftmoft+13,15, $ zzzvbar1,xstoft+i+(13-1)*8,15) C### 5020 continue if(ftm(11).gt.0.1)then if(tcc.gt.170.)then C### Compute elementary variables zzzv1=tcc zzzv2=120.262 zzzv3=zzzv1-zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar1=zzzvbar3 C### tmpfac=zzzv3 C### call DSVM1(tmpfacoft+1,1, $ zzzvbar1,tccoft+1,15) C### else if(tcc.lt.5.292)then tmpfac=0.1 call SVZ(tmpfacoft+1,1) C### else C### Compute elementary variables zzzv1=363.744 zzzv2=177. zzzv3=tcc zzzv4=zzzv2-zzzv3 zzzv5=zzzv1/zzzv4 zzzv6=2.22579488 zzzv7=zzzv5-zzzv6 C### Compute elementary partial derivatives zzzvbar7=1.0d0 zzzvbar5=zzzvbar7 zzzvbar4=-zzzvbar5*zzzv5/zzzv4 zzzvbar3=-zzzvbar4 C### tmpfac=zzzv7 C### call DSVM1(tmpfacoft+1,1, $ zzzvbar3,tccoft+1,15) C### end if end if C### Compute elementary variables zzzv1=ftm(4) zzzv2=ftm(11) zzzv3=zzzv1/zzzv2 zzzv4=tmpfac zzzv5=zzzv3*zzzv4 C### Compute elementary partial derivatives zzzvbar5=1.0d0 zzzvbar4=zzzvbar5*zzzv3 zzzvbar3=zzzvbar5*zzzv4 zzzvbar2=-zzzvbar3*zzzv3/zzzv2 zzzvbar1=zzzvbar3/zzzv2 C### vovrl=zzzv5 C### call DSVM3(vovrloft+1,1, $ zzzvbar4,tmpfacoft+1,1, $ zzzvbar2,ftmoft+11,15, $ zzzvbar1,ftmoft+4,15) C### C### Compute elementary variables zzzv1=8.5010 zzzv2=vovrl zzzv3=zzzv1*zzzv2 zzzv4=1.0 zzzv5=8.5010 zzzv6=zzzv5*zzzv2 zzzv7=zzzv4+zzzv6 zzzv8=zzzv3/zzzv7 C### Compute elementary partial derivatives zzzvbar8=1.0d0 zzzvbar7=-zzzvbar8*zzzv8/zzzv7 zzzvbar6=zzzvbar7 zzzvbar2=zzzvbar6*zzzv5 zzzvbar3=zzzvbar8/zzzv7 zzzvbar2=zzzvbar2+zzzvbar3*zzzv1 C### sfr(4)=zzzv8 C### call DSVM1(sfroft+4,15, $ zzzvbar2,vovrloft+1,1) C### C### Compute elementary variables zzzv1=11.402 zzzv2=vovrl zzzv3=zzzv1*zzzv2 zzzv4=1.0 zzzv5=11.402 zzzv6=zzzv5*zzzv2 zzzv7=zzzv4+zzzv6 zzzv8=zzzv3/zzzv7 C### Compute elementary partial derivatives zzzvbar8=1.0d0 zzzvbar7=-zzzvbar8*zzzv8/zzzv7 zzzvbar6=zzzvbar7 zzzvbar2=zzzvbar6*zzzv5 zzzvbar3=zzzvbar8/zzzv7 zzzvbar2=zzzvbar2+zzzvbar3*zzzv1 C### sfr(5)=zzzv8 C### call DSVM1(sfroft+5,15, $ zzzvbar2,vovrloft+1,1) C### C### Compute elementary variables zzzv1=11.795 zzzv2=vovrl zzzv3=zzzv1*zzzv2 zzzv4=1.0 zzzv5=11.795 zzzv6=zzzv5*zzzv2 zzzv7=zzzv4+zzzv6 zzzv8=zzzv3/zzzv7 C### Compute elementary partial derivatives zzzvbar8=1.0d0 zzzvbar7=-zzzvbar8*zzzv8/zzzv7 zzzvbar6=zzzvbar7 zzzvbar2=zzzvbar6*zzzv5 zzzvbar3=zzzvbar8/zzzv7 zzzvbar2=zzzvbar2+zzzvbar3*zzzv1 C### sfr(6)=zzzv8 C### call DSVM1(sfroft+6,15, $ zzzvbar2,vovrloft+1,1) C### C### Compute elementary variables zzzv1=0.0480 zzzv2=vovrl zzzv3=zzzv1*zzzv2 zzzv4=1.0 zzzv5=0.0480 zzzv6=zzzv5*zzzv2 zzzv7=zzzv4+zzzv6 zzzv8=zzzv3/zzzv7 C### Compute elementary partial derivatives zzzvbar8=1.0d0 zzzvbar7=-zzzvbar8*zzzv8/zzzv7 zzzvbar6=zzzvbar7 zzzvbar2=zzzvbar6*zzzv5 zzzvbar3=zzzvbar8/zzzv7 zzzvbar2=zzzvbar2+zzzvbar3*zzzv1 C### sfr(7)=zzzv8 C### call DSVM1(sfroft+7,15, $ zzzvbar2,vovrloft+1,1) C### C### Compute elementary variables zzzv1=0.0242 zzzv2=vovrl zzzv3=zzzv1*zzzv2 zzzv4=1.0 zzzv5=0.0242 zzzv6=zzzv5*zzzv2 zzzv7=zzzv4+zzzv6 zzzv8=zzzv3/zzzv7 C### Compute elementary partial derivatives zzzvbar8=1.0d0 zzzvbar7=-zzzvbar8*zzzv8/zzzv7 zzzvbar6=zzzvbar7 zzzvbar2=zzzvbar6*zzzv5 zzzvbar3=zzzvbar8/zzzv7 zzzvbar2=zzzvbar2+zzzvbar3*zzzv1 C### sfr(8)=zzzv8 C### call DSVM1(sfroft+8,15, $ zzzvbar2,vovrloft+1,1) C### else sfr(4)=0.9999 call SVZ(sfroft+4,15) C### sfr(5)=0.999 call SVZ(sfroft+5,15) C### sfr(6)=0.999 call SVZ(sfroft+6,15) C### sfr(7)=0.99 call SVZ(sfroft+7,15) C### sfr(8)=0.98 call SVZ(sfroft+8,15) C### end if do 6010 i=1,8 fin(i)=0.0 call SVZ(finoft+i,1) C### C### Compute elementary variables zzzv1=fin(i) zzzv2=fcm(i,4) zzzv3=zzzv1+zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=zzzvbar3 zzzvbar1=zzzvbar3 C### fin(i)=zzzv3 C### call DSVM2(finoft+i,1, $ zzzvbar2,fcmoft+i+(4-1)*8,15, $ zzzvbar1,finoft+i,1) C### C### Compute elementary variables zzzv1=fin(i) zzzv2=fcm(i,11) zzzv3=zzzv1+zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=zzzvbar3 zzzvbar1=zzzvbar3 C### fin(i)=zzzv3 C### call DSVM2(finoft+i,1, $ zzzvbar2,fcmoft+i+(11-1)*8,15, $ zzzvbar1,finoft+i,1) C### 6010 continue ftm(5)=0.0 call SVZ(ftmoft+5,15) C### ftm(12)=0.0 call SVZ(ftmoft+12,15) C### do 6020 i=1,8 C### Compute elementary variables zzzv1=sfr(i) zzzv2=fin(i) zzzv3=zzzv1*zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=zzzvbar3*zzzv1 zzzvbar1=zzzvbar3*zzzv2 C### fcm(i,5)=zzzv3 C### call DSVM2(fcmoft+i+(5-1)*8,15, $ zzzvbar2,finoft+i,1, $ zzzvbar1,sfroft+i,15) C### C### Compute elementary variables zzzv1=fin(i) zzzv2=fcm(i,5) zzzv3=zzzv1-zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=-zzzvbar3 zzzvbar1=zzzvbar3 C### fcm(i,12)=zzzv3 C### call DSVM2(fcmoft+i+(12-1)*8,15, $ zzzvbar2,fcmoft+i+(5-1)*8,15, $ zzzvbar1,finoft+i,1) C### C### Compute elementary variables zzzv1=ftm(5) zzzv2=fcm(i,5) zzzv3=zzzv1+zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=zzzvbar3 zzzvbar1=zzzvbar3 C### ftm(5)=zzzv3 C### call DSVM2(ftmoft+5,15, $ zzzvbar2,fcmoft+i+(5-1)*8,15, $ zzzvbar1,ftmoft+5,15) C### C### Compute elementary variables zzzv1=ftm(12) zzzv2=fcm(i,12) zzzv3=zzzv1+zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=zzzvbar3 zzzvbar1=zzzvbar3 C### ftm(12)=zzzv3 C### call DSVM2(ftmoft+12,15, $ zzzvbar2,fcmoft+i+(12-1)*8,15, $ zzzvbar1,ftmoft+12,15) C### 6020 continue do 6030 i=1,8 C### Compute elementary variables zzzv1=fcm(i,5) zzzv2=ftm(5) zzzv3=zzzv1/zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=-zzzvbar3*zzzv3/zzzv2 zzzvbar1=zzzvbar3/zzzv2 C### xst(i,5)=zzzv3 C### call DSVM2(xstoft+i+(5-1)*8,15, $ zzzvbar2,ftmoft+5,15, $ zzzvbar1,fcmoft+i+(5-1)*8,15) C### C### Compute elementary variables zzzv1=fcm(i,12) zzzv2=ftm(12) zzzv3=zzzv1/zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=-zzzvbar3*zzzv3/zzzv2 zzzvbar1=zzzvbar3/zzzv2 C### xst(i,12)=zzzv3 C### call DSVM2(xstoft+i+(12-1)*8,15, $ zzzvbar2,ftmoft+12,15, $ zzzvbar1,fcmoft+i+(12-1)*8,15) C### 6030 continue C### Compute elementary variables zzzv1=tcc C### Compute elementary partial derivatives zzzvbar1=1.0d0 C### tst(5)=zzzv1 C### call DSVM1(tstoft+5,15, $ zzzvbar1,tccoft+1,15) C### C### Compute elementary variables zzzv1=tcc C### Compute elementary partial derivatives zzzvbar1=1.0d0 C### tst(12)=zzzv1 C### call DSVM1(tstoft+12,15, $ zzzvbar1,tccoft+1,15) C### C### Save SVMs of arguments zzziw(1)=15 zzziw(2)=15 zzziw(3)=15 C### Save current offsets for use within embedded subroutine zzziw(4)=xstoft+1+(5-1)*8-1 zzziw(5)=tstoft+5-1 zzziw(6)=hstoft+5-1 C### Call modifed embedded subroutine call tesub1ad(xst(1,5),tst(5),hst(5),1,zzziw) C### C### Save SVMs of arguments zzziw(1)=15 zzziw(2)=15 zzziw(3)=15 C### Save current offsets for use within embedded subroutine zzziw(4)=xstoft+1+(12-1)*8-1 zzziw(5)=tstoft+12-1 zzziw(6)=hstoft+12-1 C### Call modifed embedded subroutine call tesub1ad(xst(1,12),tst(12),hst(12),0,zzziw) C### C### Compute elementary variables zzzv1=ftm(6) C### Compute elementary partial derivatives zzzvbar1=1.0d0 C### ftm(7)=zzzv1 C### call DSVM1(ftmoft+7,15, $ zzzvbar1,ftmoft+6,15) C### C### Compute elementary variables zzzv1=hst(6) C### Compute elementary partial derivatives zzzvbar1=1.0d0 C### hst(7)=zzzv1 C### call DSVM1(hstoft+7,15, $ zzzvbar1,hstoft+6,15) C### C### Compute elementary variables zzzv1=tst(6) C### Compute elementary partial derivatives zzzvbar1=1.0d0 C### tst(7)=zzzv1 C### call DSVM1(tstoft+7,15, $ zzzvbar1,tstoft+6,15) C### do 6130 i=1,8 C### Compute elementary variables zzzv1=xst(i,6) C### Compute elementary partial derivatives zzzvbar1=1.0d0 C### xst(i,7)=zzzv1 C### call DSVM1(xstoft+i+(7-1)*8,15, $ zzzvbar1,xstoft+i+(6-1)*8,15) C### C### Compute elementary variables zzzv1=fcm(i,6) C### Compute elementary partial derivatives zzzvbar1=1.0d0 C### fcm(i,7)=zzzv1 C### call DSVM1(fcmoft+i+(7-1)*8,15, $ zzzvbar1,fcmoft+i+(6-1)*8,15) C### 6130 continue if(vlr/7.8.gt.50.0)then uarlev=1.0 call SVZ(uarlevoft+1,1) C### else if(vlr/7.8.lt.10.0)then uarlev=0.0 call SVZ(uarlevoft+1,1) C### else C### Compute elementary variables zzzv1=0.025 zzzv2=vlr zzzv3=zzzv1*zzzv2 zzzv4=7.8 zzzv5=zzzv3/zzzv4 zzzv6=0.25 zzzv7=zzzv5-zzzv6 C### Compute elementary partial derivatives zzzvbar7=1.0d0 zzzvbar5=zzzvbar7 zzzvbar3=zzzvbar5/zzzv4 zzzvbar2=zzzvbar3*zzzv1 C### uarlev=zzzv7 C### call DSVM1(uarlevoft+1,1, $ zzzvbar2,vlroft+1,15) C### end if end if C### Compute elementary variables zzzv1=uarlev zzzv2=0.5 zzzv3=-zzzv2 zzzv4=agsp zzzv5=2 zzzv6=zzzv4**zzzv5 zzzv7=zzzv3*zzzv6 zzzv8=2.75 zzzv9=zzzv8*zzzv4 zzzv10=zzzv7+zzzv9 zzzv11=2.5 zzzv12=zzzv10-zzzv11 zzzv13=zzzv1*zzzv12 zzzv14=855490.d-6 zzzv15=zzzv13*zzzv14 C### Compute elementary partial derivatives zzzvbar15=1.0d0 zzzvbar13=zzzvbar15*zzzv14 zzzvbar12=zzzvbar13*zzzv1 zzzvbar10=zzzvbar12 zzzvbar9=zzzvbar10 zzzvbar4=zzzvbar9*zzzv8 zzzvbar7=zzzvbar10 zzzvbar6=zzzvbar7*zzzv3 zzzvbar4=zzzvbar4+zzzvbar6*zzzv5*zzzv4**(zzzv5-1.0d0) zzzvbar1=zzzvbar13*zzzv12 C### uar=zzzv15 C### call DSVM2(uaroft+1,15, $ zzzvbar4,agspoft+1,15, $ zzzvbar1,uarlevoft+1,1) C### C### Save argument SVMs in integer workspace zzziw(1)=1 zzziw(2)=1 C### Save current offsets for use within embedded function zzziw(3)=timeoft zzziw(4)=zzz1oft C### Call modifed non-intrinsic funciton zzz1=tesub8ad(10,time,zzziw) C### C### Compute elementary variables zzzv1=uar zzzv2=twr zzzv3=tcr zzzv4=zzzv2-zzzv3 zzzv5=zzzv1*zzzv4 zzzv6=1.d0 zzzv7=0.35d0 zzzv8=zzz1 zzzv9=zzzv7*zzzv8 zzzv10=zzzv6-zzzv9 zzzv11=zzzv5*zzzv10 C### Compute elementary partial derivatives zzzvbar11=1.0d0 zzzvbar10=zzzvbar11*zzzv5 zzzvbar9=-zzzvbar10 zzzvbar8=zzzvbar9*zzzv7 zzzvbar5=zzzvbar11*zzzv10 zzzvbar4=zzzvbar5*zzzv1 zzzvbar3=-zzzvbar4 zzzvbar2=zzzvbar4 zzzvbar1=zzzvbar5*zzzv4 C### qur=zzzv11 C### call DSVM4(quroft+1,15, $ zzzvbar8,zzz1oft+1,1, $ zzzvbar3,tcroft+1,15, $ zzzvbar2,twroft+1,15, $ zzzvbar1,uaroft+1,15) C### C### Compute elementary variables zzzv1=0.404655 zzzv2=1.0 zzzv3=1.0 zzzv4=1.0 zzzv5=ftm(8) zzzv6=3528.73 zzzv7=zzzv5/zzzv6 zzzv8=4 zzzv9=zzzv7**zzzv8 zzzv10=zzzv4+zzzv9 zzzv11=zzzv3/zzzv10 zzzv12=zzzv2-zzzv11 zzzv13=zzzv1*zzzv12 C### Compute elementary partial derivatives zzzvbar13=1.0d0 zzzvbar12=zzzvbar13*zzzv1 zzzvbar11=-zzzvbar12 zzzvbar10=-zzzvbar11*zzzv11/zzzv10 zzzvbar9=zzzvbar10 zzzvbar7=zzzvbar9*zzzv8*zzzv7**(zzzv8-1.0d0) zzzvbar5=zzzvbar7/zzzv6 C### uas=zzzv13 C### call DSVM1(uasoft+1,1, $ zzzvbar5,ftmoft+8,15) C### C### Save argument SVMs in integer workspace zzziw(1)=1 zzziw(2)=1 C### Save current offsets for use within embedded function zzziw(3)=timeoft zzziw(4)=zzz1oft C### Call modifed non-intrinsic funciton zzz1=tesub8ad(11,time,zzziw) C### C### Compute elementary variables zzzv1=uas zzzv2=tws zzzv3=tst(8) zzzv4=zzzv2-zzzv3 zzzv5=zzzv1*zzzv4 zzzv6=1.d0 zzzv7=0.25d0 zzzv8=zzz1 zzzv9=zzzv7*zzzv8 zzzv10=zzzv6-zzzv9 zzzv11=zzzv5*zzzv10 C### Compute elementary partial derivatives zzzvbar11=1.0d0 zzzvbar10=zzzvbar11*zzzv5 zzzvbar9=-zzzvbar10 zzzvbar8=zzzvbar9*zzzv7 zzzvbar5=zzzvbar11*zzzv10 zzzvbar4=zzzvbar5*zzzv1 zzzvbar3=-zzzvbar4 zzzvbar2=zzzvbar4 zzzvbar1=zzzvbar5*zzzv4 C### qus=zzzv11 C### call DSVM4(qusoft+1,15, $ zzzvbar8,zzz1oft+1,1, $ zzzvbar3,tstoft+8,15, $ zzzvbar2,twsoft+1,15, $ zzzvbar1,uasoft+1,1) C### quc=0.d0 call SVZ(qucoft+1,15) C### if(tcc.lt.100.)then C### Compute elementary variables zzzv1=uac zzzv2=100.0 zzzv3=tcc zzzv4=zzzv2-zzzv3 zzzv5=zzzv1*zzzv4 C### Compute elementary partial derivatives zzzvbar5=1.0d0 zzzvbar4=zzzvbar5*zzzv1 zzzvbar3=-zzzvbar4 zzzvbar1=zzzvbar5*zzzv4 C### quc=zzzv5 C### call DSVM2(qucoft+1,15, $ zzzvbar3,tccoft+1,15, $ zzzvbar1,uacoft+1,1) C### end if C### Compute elementary variables zzzv1=ftm(3) zzzv2=0.359 zzzv3=zzzv1*zzzv2 zzzv4=35.3145 zzzv5=zzzv3/zzzv4 C### Compute elementary partial derivatives zzzvbar5=1.0d0 zzzvbar3=zzzvbar5/zzzv4 zzzvbar1=zzzvbar3*zzzv2 C### xmeas(1)=zzzv5 C### call DSVM1(xmeasoft+1,11, $ zzzvbar1,ftmoft+3,15) C### C### Compute elementary variables zzzv1=ftm(1) zzzv2=xmws(1) zzzv3=zzzv1*zzzv2 zzzv4=0.454 zzzv5=zzzv3*zzzv4 C### Compute elementary partial derivatives zzzvbar5=1.0d0 zzzvbar3=zzzvbar5*zzzv4 zzzvbar2=zzzvbar3*zzzv1 zzzvbar1=zzzvbar3*zzzv2 C### xmeas(2)=zzzv5 C### call DSVM2(xmeasoft+2,11, $ zzzvbar2,xmwsoft+1,15, $ zzzvbar1,ftmoft+1,15) C### C### Compute elementary variables zzzv1=ftm(2) zzzv2=xmws(2) zzzv3=zzzv1*zzzv2 zzzv4=0.454 zzzv5=zzzv3*zzzv4 C### Compute elementary partial derivatives zzzvbar5=1.0d0 zzzvbar3=zzzvbar5*zzzv4 zzzvbar2=zzzvbar3*zzzv1 zzzvbar1=zzzvbar3*zzzv2 C### xmeas(3)=zzzv5 C### call DSVM2(xmeasoft+3,11, $ zzzvbar2,xmwsoft+2,15, $ zzzvbar1,ftmoft+2,15) C### C### Compute elementary variables zzzv1=ftm(4) zzzv2=0.359 zzzv3=zzzv1*zzzv2 zzzv4=35.3145 zzzv5=zzzv3/zzzv4 C### Compute elementary partial derivatives zzzvbar5=1.0d0 zzzvbar3=zzzvbar5/zzzv4 zzzvbar1=zzzvbar3*zzzv2 C### xmeas(4)=zzzv5 C### call DSVM1(xmeasoft+4,11, $ zzzvbar1,ftmoft+4,15) C### C### Compute elementary variables zzzv1=ftm(9) zzzv2=0.359 zzzv3=zzzv1*zzzv2 zzzv4=35.3145 zzzv5=zzzv3/zzzv4 C### Compute elementary partial derivatives zzzvbar5=1.0d0 zzzvbar3=zzzvbar5/zzzv4 zzzvbar1=zzzvbar3*zzzv2 C### xmeas(5)=zzzv5 C### call DSVM1(xmeasoft+5,11, $ zzzvbar1,ftmoft+9,15) C### C### Compute elementary variables zzzv1=ftm(6) zzzv2=0.359 zzzv3=zzzv1*zzzv2 zzzv4=35.3145 zzzv5=zzzv3/zzzv4 C### Compute elementary partial derivatives zzzvbar5=1.0d0 zzzvbar3=zzzvbar5/zzzv4 zzzvbar1=zzzvbar3*zzzv2 C### xmeas(6)=zzzv5 C### call DSVM1(xmeasoft+6,11, $ zzzvbar1,ftmoft+6,15) C### C### Compute elementary variables zzzv1=ptr zzzv2=760.0 zzzv3=zzzv1-zzzv2 zzzv4=760.0 zzzv5=zzzv3/zzzv4 zzzv6=101.325 zzzv7=zzzv5*zzzv6 C### Compute elementary partial derivatives zzzvbar7=1.0d0 zzzvbar5=zzzvbar7*zzzv6 zzzvbar3=zzzvbar5/zzzv4 zzzvbar1=zzzvbar3 C### xmeas(7)=zzzv7 C### call DSVM1(xmeasoft+7,11, $ zzzvbar1,ptroft+1,15) C### C### Compute elementary variables zzzv1=vlr zzzv2=84.6 zzzv3=zzzv1-zzzv2 zzzv4=666.7 zzzv5=zzzv3/zzzv4 zzzv6=100.0 zzzv7=zzzv5*zzzv6 C### Compute elementary partial derivatives zzzvbar7=1.0d0 zzzvbar5=zzzvbar7*zzzv6 zzzvbar3=zzzvbar5/zzzv4 zzzvbar1=zzzvbar3 C### xmeas(8)=zzzv7 C### call DSVM1(xmeasoft+8,11, $ zzzvbar1,vlroft+1,15) C### C### Compute elementary variables zzzv1=tcr C### Compute elementary partial derivatives zzzvbar1=1.0d0 C### xmeas(9)=zzzv1 C### call DSVM1(xmeasoft+9,11, $ zzzvbar1,tcroft+1,15) C### C### Compute elementary variables zzzv1=ftm(10) zzzv2=0.359 zzzv3=zzzv1*zzzv2 zzzv4=35.3145 zzzv5=zzzv3/zzzv4 C### Compute elementary partial derivatives zzzvbar5=1.0d0 zzzvbar3=zzzvbar5/zzzv4 zzzvbar1=zzzvbar3*zzzv2 C### xmeas(10)=zzzv5 C### call DSVM1(xmeasoft+10,11, $ zzzvbar1,ftmoft+10,15) C### C### Compute elementary variables zzzv1=tcs C### Compute elementary partial derivatives zzzvbar1=1.0d0 C### xmeas(11)=zzzv1 C### call DSVM1(xmeasoft+11,11, $ zzzvbar1,tcsoft+1,15) C### C### Compute elementary variables zzzv1=vls zzzv2=27.5 zzzv3=zzzv1-zzzv2 zzzv4=290.0 zzzv5=zzzv3/zzzv4 zzzv6=100.0 zzzv7=zzzv5*zzzv6 C### Compute elementary partial derivatives zzzvbar7=1.0d0 zzzvbar5=zzzvbar7*zzzv6 zzzvbar3=zzzvbar5/zzzv4 zzzvbar1=zzzvbar3 C### xmeas(12)=zzzv7 C### call DSVM1(xmeasoft+12,11, $ zzzvbar1,vlsoft+1,15) C### C### Compute elementary variables zzzv1=pts zzzv2=760.0 zzzv3=zzzv1-zzzv2 zzzv4=760.0 zzzv5=zzzv3/zzzv4 zzzv6=101.325 zzzv7=zzzv5*zzzv6 C### Compute elementary partial derivatives zzzvbar7=1.0d0 zzzvbar5=zzzvbar7*zzzv6 zzzvbar3=zzzvbar5/zzzv4 zzzvbar1=zzzvbar3 C### xmeas(13)=zzzv7 C### call DSVM1(xmeasoft+13,11, $ zzzvbar1,ptsoft+1,15) C### C### Compute elementary variables zzzv1=ftm(11) zzzv2=dls zzzv3=zzzv1/zzzv2 zzzv4=35.3145 zzzv5=zzzv3/zzzv4 C### Compute elementary partial derivatives zzzvbar5=1.0d0 zzzvbar3=zzzvbar5/zzzv4 zzzvbar2=-zzzvbar3*zzzv3/zzzv2 zzzvbar1=zzzvbar3/zzzv2 C### xmeas(14)=zzzv5 C### call DSVM2(xmeasoft+14,11, $ zzzvbar2,dlsoft+1,15, $ zzzvbar1,ftmoft+11,15) C### C### Compute elementary variables zzzv1=vlc zzzv2=78.25 zzzv3=zzzv1-zzzv2 zzzv4=vtc zzzv5=zzzv3/zzzv4 zzzv6=100.0 zzzv7=zzzv5*zzzv6 C### Compute elementary partial derivatives zzzvbar7=1.0d0 zzzvbar5=zzzvbar7*zzzv6 zzzvbar4=-zzzvbar5*zzzv5/zzzv4 zzzvbar3=zzzvbar5/zzzv4 zzzvbar1=zzzvbar3 C### xmeas(15)=zzzv7 C### call DSVM2(xmeasoft+15,11, $ zzzvbar4,vtcoft+1,15, $ zzzvbar1,vlcoft+1,15) C### C### Compute elementary variables zzzv1=ptv zzzv2=760.0 zzzv3=zzzv1-zzzv2 zzzv4=760.0 zzzv5=zzzv3/zzzv4 zzzv6=101.325 zzzv7=zzzv5*zzzv6 C### Compute elementary partial derivatives zzzvbar7=1.0d0 zzzvbar5=zzzvbar7*zzzv6 zzzvbar3=zzzvbar5/zzzv4 zzzvbar1=zzzvbar3 C### xmeas(16)=zzzv7 C### call DSVM1(xmeasoft+16,11, $ zzzvbar1,ptvoft+1,15) C### C### Compute elementary variables zzzv1=ftm(13) zzzv2=dlc zzzv3=zzzv1/zzzv2 zzzv4=35.3145 zzzv5=zzzv3/zzzv4 C### Compute elementary partial derivatives zzzvbar5=1.0d0 zzzvbar3=zzzvbar5/zzzv4 zzzvbar2=-zzzvbar3*zzzv3/zzzv2 zzzvbar1=zzzvbar3/zzzv2 C### xmeas(17)=zzzv5 C### call DSVM2(xmeasoft+17,11, $ zzzvbar2,dlcoft+1,15, $ zzzvbar1,ftmoft+13,15) C### C### Compute elementary variables zzzv1=tcc C### Compute elementary partial derivatives zzzvbar1=1.0d0 C### xmeas(18)=zzzv1 C### call DSVM1(xmeasoft+18,11, $ zzzvbar1,tccoft+1,15) C### C### Compute elementary variables zzzv1=quc zzzv2=1.04d3 zzzv3=zzzv1*zzzv2 zzzv4=0.454 zzzv5=zzzv3*zzzv4 C### Compute elementary partial derivatives zzzvbar5=1.0d0 zzzvbar3=zzzvbar5*zzzv4 zzzvbar1=zzzvbar3*zzzv2 C### xmeas(19)=zzzv5 C### call DSVM1(xmeasoft+19,11, $ zzzvbar1,qucoft+1,15) C### C### Compute elementary variables zzzv1=cpdh zzzv2=0.0003927d6 zzzv3=zzzv1*zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar1=zzzvbar3*zzzv2 C### xmeas(20)=zzzv3 C### call DSVM1(xmeasoft+20,11, $ zzzvbar1,cpdhoft+1,15) C### C### Compute elementary variables zzzv1=cpdh zzzv2=0.29307d3 zzzv3=zzzv1*zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar1=zzzvbar3*zzzv2 C### xmeas(20)=zzzv3 C### call DSVM1(xmeasoft+20,11, $ zzzvbar1,cpdhoft+1,15) C### C### Compute elementary variables zzzv1=twr C### Compute elementary partial derivatives zzzvbar1=1.0d0 C### xmeas(21)=zzzv1 C### call DSVM1(xmeasoft+21,11, $ zzzvbar1,twroft+1,15) C### C### Compute elementary variables zzzv1=tws C### Compute elementary partial derivatives zzzvbar1=1.0d0 C### xmeas(22)=zzzv1 C### call DSVM1(xmeasoft+22,11, $ zzzvbar1,twsoft+1,15) C### isd=0 if(xmeas(7).gt.3000.0)then isd=1 end if if(vlr/35.3145.gt.24.0)then isd=1 end if if(vlr/35.3145.lt.2.0)then isd=1 end if if(xmeas(9).gt.175.0)then isd=1 end if if(vls/35.3145.gt.12.0)then isd=1 end if if(vls/35.3145.lt.1.0)then isd=1 end if if(vlc/35.3145.gt.8.0)then isd=1 end if if(vlc/35.3145.lt.1.0)then isd=1 end if if(time.gt.0.0.and.isd.eq.0)then do 6500 i=1,22 C### Save SVMs of arguments zzziw(1)=15 zzziw(2)=1 C### Save current offsets for use within embedded subroutine zzziw(3)=xnsoft+i-1 zzziw(4)=xmnsoft C### Call modifed embedded subroutine call tesub6ad(xns(i),xmns,zzziw) C### C### Compute elementary variables zzzv1=xmeas(i) zzzv2=xmns zzzv3=zzzv1+zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=zzzvbar3 zzzvbar1=zzzvbar3 C### xmeas(i)=zzzv3 C### call DSVM2(xmeasoft+i,11, $ zzzvbar2,xmnsoft+1,1, $ zzzvbar1,xmeasoft+i,11) C### 6500 continue end if C### Compute elementary variables zzzv1=xst(1,7) zzzv2=100.0 zzzv3=zzzv1*zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar1=zzzvbar3*zzzv2 C### xcmp(23)=zzzv3 C### call DSVM1(xcmpoft+23,1, $ zzzvbar1,xstoft+1+(7-1)*8,15) C### C### Compute elementary variables zzzv1=xst(2,7) zzzv2=100.0 zzzv3=zzzv1*zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar1=zzzvbar3*zzzv2 C### xcmp(24)=zzzv3 C### call DSVM1(xcmpoft+24,1, $ zzzvbar1,xstoft+2+(7-1)*8,15) C### C### Compute elementary variables zzzv1=xst(3,7) zzzv2=100.0 zzzv3=zzzv1*zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar1=zzzvbar3*zzzv2 C### xcmp(25)=zzzv3 C### call DSVM1(xcmpoft+25,1, $ zzzvbar1,xstoft+3+(7-1)*8,15) C### C### Compute elementary variables zzzv1=xst(4,7) zzzv2=100.0 zzzv3=zzzv1*zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar1=zzzvbar3*zzzv2 C### xcmp(26)=zzzv3 C### call DSVM1(xcmpoft+26,1, $ zzzvbar1,xstoft+4+(7-1)*8,15) C### C### Compute elementary variables zzzv1=xst(5,7) zzzv2=100.0 zzzv3=zzzv1*zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar1=zzzvbar3*zzzv2 C### xcmp(27)=zzzv3 C### call DSVM1(xcmpoft+27,1, $ zzzvbar1,xstoft+5+(7-1)*8,15) C### C### Compute elementary variables zzzv1=xst(6,7) zzzv2=100.0 zzzv3=zzzv1*zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar1=zzzvbar3*zzzv2 C### xcmp(28)=zzzv3 C### call DSVM1(xcmpoft+28,1, $ zzzvbar1,xstoft+6+(7-1)*8,15) C### C### Compute elementary variables zzzv1=xst(1,10) zzzv2=100.0 zzzv3=zzzv1*zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar1=zzzvbar3*zzzv2 C### xcmp(29)=zzzv3 C### call DSVM1(xcmpoft+29,1, $ zzzvbar1,xstoft+1+(10-1)*8,15) C### C### Compute elementary variables zzzv1=xst(2,10) zzzv2=100.0 zzzv3=zzzv1*zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar1=zzzvbar3*zzzv2 C### xcmp(30)=zzzv3 C### call DSVM1(xcmpoft+30,1, $ zzzvbar1,xstoft+2+(10-1)*8,15) C### C### Compute elementary variables zzzv1=xst(3,10) zzzv2=100.0 zzzv3=zzzv1*zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar1=zzzvbar3*zzzv2 C### xcmp(31)=zzzv3 C### call DSVM1(xcmpoft+31,1, $ zzzvbar1,xstoft+3+(10-1)*8,15) C### C### Compute elementary variables zzzv1=xst(4,10) zzzv2=100.0 zzzv3=zzzv1*zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar1=zzzvbar3*zzzv2 C### xcmp(32)=zzzv3 C### call DSVM1(xcmpoft+32,1, $ zzzvbar1,xstoft+4+(10-1)*8,15) C### C### Compute elementary variables zzzv1=xst(5,10) zzzv2=100.0 zzzv3=zzzv1*zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar1=zzzvbar3*zzzv2 C### xcmp(33)=zzzv3 C### call DSVM1(xcmpoft+33,1, $ zzzvbar1,xstoft+5+(10-1)*8,15) C### C### Compute elementary variables zzzv1=xst(6,10) zzzv2=100.0 zzzv3=zzzv1*zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar1=zzzvbar3*zzzv2 C### xcmp(34)=zzzv3 C### call DSVM1(xcmpoft+34,1, $ zzzvbar1,xstoft+6+(10-1)*8,15) C### C### Compute elementary variables zzzv1=xst(7,10) zzzv2=100.0 zzzv3=zzzv1*zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar1=zzzvbar3*zzzv2 C### xcmp(35)=zzzv3 C### call DSVM1(xcmpoft+35,1, $ zzzvbar1,xstoft+7+(10-1)*8,15) C### C### Compute elementary variables zzzv1=xst(8,10) zzzv2=100.0 zzzv3=zzzv1*zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar1=zzzvbar3*zzzv2 C### xcmp(36)=zzzv3 C### call DSVM1(xcmpoft+36,1, $ zzzvbar1,xstoft+8+(10-1)*8,15) C### C### Compute elementary variables zzzv1=xst(4,13) zzzv2=100.0 zzzv3=zzzv1*zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar1=zzzvbar3*zzzv2 C### xcmp(37)=zzzv3 C### call DSVM1(xcmpoft+37,1, $ zzzvbar1,xstoft+4+(13-1)*8,15) C### C### Compute elementary variables zzzv1=xst(5,13) zzzv2=100.0 zzzv3=zzzv1*zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar1=zzzvbar3*zzzv2 C### xcmp(38)=zzzv3 C### call DSVM1(xcmpoft+38,1, $ zzzvbar1,xstoft+5+(13-1)*8,15) C### C### Compute elementary variables zzzv1=xst(6,13) zzzv2=100.0 zzzv3=zzzv1*zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar1=zzzvbar3*zzzv2 C### xcmp(39)=zzzv3 C### call DSVM1(xcmpoft+39,1, $ zzzvbar1,xstoft+6+(13-1)*8,15) C### C### Compute elementary variables zzzv1=xst(7,13) zzzv2=100.0 zzzv3=zzzv1*zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar1=zzzvbar3*zzzv2 C### xcmp(40)=zzzv3 C### call DSVM1(xcmpoft+40,1, $ zzzvbar1,xstoft+7+(13-1)*8,15) C### C### Compute elementary variables zzzv1=xst(8,13) zzzv2=100.0 zzzv3=zzzv1*zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar1=zzzvbar3*zzzv2 C### xcmp(41)=zzzv3 C### call DSVM1(xcmpoft+41,1, $ zzzvbar1,xstoft+8+(13-1)*8,15) C### if(time.eq.0.d0)then do 7010 i=23,41 C### Compute elementary variables zzzv1=xcmp(i) C### Compute elementary partial derivatives zzzvbar1=1.0d0 C### xdel(i)=zzzv1 C### call DSVM1(xdeloft+i,15, $ zzzvbar1,xcmpoft+i,1) C### C### Compute elementary variables zzzv1=xcmp(i) C### Compute elementary partial derivatives zzzvbar1=1.0d0 C### xmeas(i)=zzzv1 C### call DSVM1(xmeasoft+i,11, $ zzzvbar1,xcmpoft+i,1) C### 7010 continue tgas=0.1 call SVZ(tgasoft+1,15) C### tprod=0.25 call SVZ(tprodoft+1,15) C### end if if(time.ge.tgas)then do 7020 i=23,36 C### Compute elementary variables zzzv1=xdel(i) C### Compute elementary partial derivatives zzzvbar1=1.0d0 C### xmeas(i)=zzzv1 C### call DSVM1(xmeasoft+i,11, $ zzzvbar1,xdeloft+i,15) C### C### Save SVMs of arguments zzziw(1)=15 zzziw(2)=1 C### Save current offsets for use within embedded subroutine zzziw(3)=xnsoft+i-1 zzziw(4)=xmnsoft C### Call modifed embedded subroutine call tesub6ad(xns(i),xmns,zzziw) C### C### Compute elementary variables zzzv1=xmeas(i) zzzv2=xmns zzzv3=zzzv1+zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=zzzvbar3 zzzvbar1=zzzvbar3 C### xmeas(i)=zzzv3 C### call DSVM2(xmeasoft+i,11, $ zzzvbar2,xmnsoft+1,1, $ zzzvbar1,xmeasoft+i,11) C### C### Compute elementary variables zzzv1=xcmp(i) C### Compute elementary partial derivatives zzzvbar1=1.0d0 C### xdel(i)=zzzv1 C### call DSVM1(xdeloft+i,15, $ zzzvbar1,xcmpoft+i,1) C### 7020 continue C### Compute elementary variables zzzv1=tgas zzzv2=0.1 zzzv3=zzzv1+zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar1=zzzvbar3 C### tgas=zzzv3 C### call DSVM1(tgasoft+1,15, $ zzzvbar1,tgasoft+1,15) C### end if if(time.ge.tprod)then do 7030 i=37,41 C### Compute elementary variables zzzv1=xdel(i) C### Compute elementary partial derivatives zzzvbar1=1.0d0 C### xmeas(i)=zzzv1 C### call DSVM1(xmeasoft+i,11, $ zzzvbar1,xdeloft+i,15) C### C### Save SVMs of arguments zzziw(1)=15 zzziw(2)=1 C### Save current offsets for use within embedded subroutine zzziw(3)=xnsoft+i-1 zzziw(4)=xmnsoft C### Call modifed embedded subroutine call tesub6ad(xns(i),xmns,zzziw) C### C### Compute elementary variables zzzv1=xmeas(i) zzzv2=xmns zzzv3=zzzv1+zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=zzzvbar3 zzzvbar1=zzzvbar3 C### xmeas(i)=zzzv3 C### call DSVM2(xmeasoft+i,11, $ zzzvbar2,xmnsoft+1,1, $ zzzvbar1,xmeasoft+i,11) C### C### Compute elementary variables zzzv1=xcmp(i) C### Compute elementary partial derivatives zzzvbar1=1.0d0 C### xdel(i)=zzzv1 C### call DSVM1(xdeloft+i,15, $ zzzvbar1,xcmpoft+i,1) C### 7030 continue C### Compute elementary variables zzzv1=tprod zzzv2=0.25 zzzv3=zzzv1+zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar1=zzzvbar3 C### tprod=zzzv3 C### call DSVM1(tprodoft+1,15, $ zzzvbar1,tprodoft+1,15) C### end if do 9010 i=1,8 C### Compute elementary variables zzzv1=fcm(i,7) zzzv2=fcm(i,8) zzzv3=zzzv1-zzzv2 zzzv4=crxr(i) zzzv5=zzzv3+zzzv4 C### Compute elementary partial derivatives zzzvbar5=1.0d0 zzzvbar4=zzzvbar5 zzzvbar3=zzzvbar5 zzzvbar2=-zzzvbar3 zzzvbar1=zzzvbar3 C### yp(i)=zzzv5 C### call DSVM3(ypoft+i,1, $ zzzvbar4,crxroft+i,15, $ zzzvbar2,fcmoft+i+(8-1)*8,15, $ zzzvbar1,fcmoft+i+(7-1)*8,15) C### C### Compute elementary variables zzzv1=fcm(i,8) zzzv2=fcm(i,9) zzzv3=zzzv1-zzzv2 zzzv4=fcm(i,10) zzzv5=zzzv3-zzzv4 zzzv6=fcm(i,11) zzzv7=zzzv5-zzzv6 C### Compute elementary partial derivatives zzzvbar7=1.0d0 zzzvbar6=-zzzvbar7 zzzvbar5=zzzvbar7 zzzvbar4=-zzzvbar5 zzzvbar3=zzzvbar5 zzzvbar2=-zzzvbar3 zzzvbar1=zzzvbar3 C### yp(i+9)=zzzv7 C### call DSVM4(ypoft+i+9,1, $ zzzvbar6,fcmoft+i+(11-1)*8,15, $ zzzvbar4,fcmoft+i+(10-1)*8,15, $ zzzvbar2,fcmoft+i+(9-1)*8,15, $ zzzvbar1,fcmoft+i+(8-1)*8,15) C### C### Compute elementary variables zzzv1=fcm(i,12) zzzv2=fcm(i,13) zzzv3=zzzv1-zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=-zzzvbar3 zzzvbar1=zzzvbar3 C### yp(i+18)=zzzv3 C### call DSVM2(ypoft+i+18,1, $ zzzvbar2,fcmoft+i+(13-1)*8,15, $ zzzvbar1,fcmoft+i+(12-1)*8,15) C### C### Compute elementary variables zzzv1=fcm(i,1) zzzv2=fcm(i,2) zzzv3=zzzv1+zzzv2 zzzv4=fcm(i,3) zzzv5=zzzv3+zzzv4 zzzv6=fcm(i,5) zzzv7=zzzv5+zzzv6 zzzv8=fcm(i,9) zzzv9=zzzv7+zzzv8 zzzv10=fcm(i,6) zzzv11=zzzv9-zzzv10 C### Compute elementary partial derivatives zzzvbar11=1.0d0 zzzvbar10=-zzzvbar11 zzzvbar9=zzzvbar11 zzzvbar8=zzzvbar9 zzzvbar7=zzzvbar9 zzzvbar6=zzzvbar7 zzzvbar5=zzzvbar7 zzzvbar4=zzzvbar5 zzzvbar3=zzzvbar5 zzzvbar2=zzzvbar3 zzzvbar1=zzzvbar3 C### yp(i+27)=zzzv11 C### call DSVM6(ypoft+i+27,1, $ zzzvbar10,fcmoft+i+(6-1)*8,15, $ zzzvbar8,fcmoft+i+(9-1)*8,15, $ zzzvbar6,fcmoft+i+(5-1)*8,15, $ zzzvbar4,fcmoft+i+(3-1)*8,15, $ zzzvbar2,fcmoft+i+(2-1)*8,15, $ zzzvbar1,fcmoft+i+(1-1)*8,15) C### 9010 continue C### Compute elementary variables zzzv1=hst(7) zzzv2=ftm(7) zzzv3=zzzv1*zzzv2 zzzv4=hst(8) zzzv5=ftm(8) zzzv6=zzzv4*zzzv5 zzzv7=zzzv3-zzzv6 zzzv8=rh zzzv9=zzzv7+zzzv8 zzzv10=qur zzzv11=zzzv9+zzzv10 C### Compute elementary partial derivatives zzzvbar11=1.0d0 zzzvbar10=zzzvbar11 zzzvbar9=zzzvbar11 zzzvbar8=zzzvbar9 zzzvbar7=zzzvbar9 zzzvbar6=-zzzvbar7 zzzvbar5=zzzvbar6*zzzv4 zzzvbar4=zzzvbar6*zzzv5 zzzvbar3=zzzvbar7 zzzvbar2=zzzvbar3*zzzv1 zzzvbar1=zzzvbar3*zzzv2 C### yp(9)=zzzv11 C### call DSVM6(ypoft+9,1, $ zzzvbar10,quroft+1,15, $ zzzvbar8,rhoft+1,15, $ zzzvbar5,ftmoft+8,15, $ zzzvbar4,hstoft+8,15, $ zzzvbar2,ftmoft+7,15, $ zzzvbar1,hstoft+7,15) C### C### Compute elementary variables zzzv1=hst(8) zzzv2=ftm(8) zzzv3=zzzv1*zzzv2 zzzv4=hst(9) zzzv5=ftm(9) zzzv6=zzzv4*zzzv5 zzzv7=zzzv3-zzzv6 zzzv8=hst(10) zzzv9=ftm(10) zzzv10=zzzv8*zzzv9 zzzv11=zzzv7-zzzv10 zzzv12=hst(11) zzzv13=ftm(11) zzzv14=zzzv12*zzzv13 zzzv15=zzzv11-zzzv14 zzzv16=qus zzzv17=zzzv15+zzzv16 C### Compute elementary partial derivatives zzzvbar17=1.0d0 zzzvbar16=zzzvbar17 zzzvbar15=zzzvbar17 zzzvbar14=-zzzvbar15 zzzvbar13=zzzvbar14*zzzv12 zzzvbar12=zzzvbar14*zzzv13 zzzvbar11=zzzvbar15 zzzvbar10=-zzzvbar11 zzzvbar9=zzzvbar10*zzzv8 zzzvbar8=zzzvbar10*zzzv9 zzzvbar7=zzzvbar11 zzzvbar6=-zzzvbar7 zzzvbar5=zzzvbar6*zzzv4 zzzvbar4=zzzvbar6*zzzv5 zzzvbar3=zzzvbar7 zzzvbar2=zzzvbar3*zzzv1 zzzvbar1=zzzvbar3*zzzv2 C### yp(18)=zzzv17 C### call DSVM9(ypoft+18,1, $ zzzvbar16,qusoft+1,15, $ zzzvbar13,ftmoft+11,15, $ zzzvbar12,hstoft+11,15, $ zzzvbar9,ftmoft+10,15, $ zzzvbar8,hstoft+10,15, $ zzzvbar5,ftmoft+9,15, $ zzzvbar4,hstoft+9,15, $ zzzvbar2,ftmoft+8,15, $ zzzvbar1,hstoft+8,15) C### C### Compute elementary variables zzzv1=hst(4) zzzv2=ftm(4) zzzv3=zzzv1*zzzv2 zzzv4=hst(11) zzzv5=ftm(11) zzzv6=zzzv4*zzzv5 zzzv7=zzzv3+zzzv6 zzzv8=hst(5) zzzv9=ftm(5) zzzv10=zzzv8*zzzv9 zzzv11=zzzv7-zzzv10 zzzv12=hst(13) zzzv13=ftm(13) zzzv14=zzzv12*zzzv13 zzzv15=zzzv11-zzzv14 zzzv16=quc zzzv17=zzzv15+zzzv16 C### Compute elementary partial derivatives zzzvbar17=1.0d0 zzzvbar16=zzzvbar17 zzzvbar15=zzzvbar17 zzzvbar14=-zzzvbar15 zzzvbar13=zzzvbar14*zzzv12 zzzvbar12=zzzvbar14*zzzv13 zzzvbar11=zzzvbar15 zzzvbar10=-zzzvbar11 zzzvbar9=zzzvbar10*zzzv8 zzzvbar8=zzzvbar10*zzzv9 zzzvbar7=zzzvbar11 zzzvbar6=zzzvbar7 zzzvbar5=zzzvbar6*zzzv4 zzzvbar4=zzzvbar6*zzzv5 zzzvbar3=zzzvbar7 zzzvbar2=zzzvbar3*zzzv1 zzzvbar1=zzzvbar3*zzzv2 C### yp(27)=zzzv17 C### call DSVM9(ypoft+27,1, $ zzzvbar16,qucoft+1,15, $ zzzvbar13,ftmoft+13,15, $ zzzvbar12,hstoft+13,15, $ zzzvbar9,ftmoft+5,15, $ zzzvbar8,hstoft+5,15, $ zzzvbar5,ftmoft+11,15, $ zzzvbar4,hstoft+11,15, $ zzzvbar2,ftmoft+4,15, $ zzzvbar1,hstoft+4,15) C### C### Compute elementary variables zzzv1=hst(1) zzzv2=ftm(1) zzzv3=zzzv1*zzzv2 zzzv4=hst(2) zzzv5=ftm(2) zzzv6=zzzv4*zzzv5 zzzv7=zzzv3+zzzv6 zzzv8=hst(3) zzzv9=ftm(3) zzzv10=zzzv8*zzzv9 zzzv11=zzzv7+zzzv10 zzzv12=hst(5) zzzv13=ftm(5) zzzv14=zzzv12*zzzv13 zzzv15=zzzv11+zzzv14 zzzv16=hst(9) zzzv17=ftm(9) zzzv18=zzzv16*zzzv17 zzzv19=zzzv15+zzzv18 zzzv20=hst(6) zzzv21=ftm(6) zzzv22=zzzv20*zzzv21 zzzv23=zzzv19-zzzv22 C### Compute elementary partial derivatives zzzvbar23=1.0d0 zzzvbar22=-zzzvbar23 zzzvbar21=zzzvbar22*zzzv20 zzzvbar20=zzzvbar22*zzzv21 zzzvbar19=zzzvbar23 zzzvbar18=zzzvbar19 zzzvbar17=zzzvbar18*zzzv16 zzzvbar16=zzzvbar18*zzzv17 zzzvbar15=zzzvbar19 zzzvbar14=zzzvbar15 zzzvbar13=zzzvbar14*zzzv12 zzzvbar12=zzzvbar14*zzzv13 zzzvbar11=zzzvbar15 zzzvbar10=zzzvbar11 zzzvbar9=zzzvbar10*zzzv8 zzzvbar8=zzzvbar10*zzzv9 zzzvbar7=zzzvbar11 zzzvbar6=zzzvbar7 zzzvbar5=zzzvbar6*zzzv4 zzzvbar4=zzzvbar6*zzzv5 zzzvbar3=zzzvbar7 zzzvbar2=zzzvbar3*zzzv1 zzzvbar1=zzzvbar3*zzzv2 C### yp(36)=zzzv23 C### call DSVM(12,ypoft+36,1, $ zzzvbar21,ftmoft+6,15, $ zzzvbar20,hstoft+6,15, $ zzzvbar17,ftmoft+9,15, $ zzzvbar16,hstoft+9,15, $ zzzvbar13,ftmoft+5,15, $ zzzvbar12,hstoft+5,15, $ zzzvbar9,ftmoft+3,15, $ zzzvbar8,hstoft+3,15, $ zzzvbar5,ftmoft+2,15, $ zzzvbar4,hstoft+2,15, $ zzzvbar2,ftmoft+1,15, $ zzzvbar1,hstoft+1,15) C### C### Compute elementary variables zzzv1=fwr zzzv2=500.53 zzzv3=zzzv1*zzzv2 zzzv4=tcwr zzzv5=twr zzzv6=zzzv4-zzzv5 zzzv7=zzzv3*zzzv6 zzzv8=qur zzzv9=1.d6 zzzv10=zzzv8*zzzv9 zzzv11=1.8 zzzv12=zzzv10/zzzv11 zzzv13=zzzv7-zzzv12 zzzv14=hwr zzzv15=zzzv13/zzzv14 C### Compute elementary partial derivatives zzzvbar15=1.0d0 zzzvbar14=-zzzvbar15*zzzv15/zzzv14 zzzvbar13=zzzvbar15/zzzv14 zzzvbar12=-zzzvbar13 zzzvbar10=zzzvbar12/zzzv11 zzzvbar8=zzzvbar10*zzzv9 zzzvbar7=zzzvbar13 zzzvbar6=zzzvbar7*zzzv3 zzzvbar5=-zzzvbar6 zzzvbar4=zzzvbar6 zzzvbar3=zzzvbar7*zzzv6 zzzvbar1=zzzvbar3*zzzv2 C### yp(37)=zzzv15 C### call DSVM5(ypoft+37,1, $ zzzvbar14,hwroft+1,15, $ zzzvbar8,quroft+1,15, $ zzzvbar5,twroft+1,15, $ zzzvbar4,tcwroft+1,15, $ zzzvbar1,fwroft+1,15) C### C### Compute elementary variables zzzv1=fws zzzv2=500.53 zzzv3=zzzv1*zzzv2 zzzv4=tcws zzzv5=tws zzzv6=zzzv4-zzzv5 zzzv7=zzzv3*zzzv6 zzzv8=qus zzzv9=1.d6 zzzv10=zzzv8*zzzv9 zzzv11=1.8 zzzv12=zzzv10/zzzv11 zzzv13=zzzv7-zzzv12 zzzv14=hws zzzv15=zzzv13/zzzv14 C### Compute elementary partial derivatives zzzvbar15=1.0d0 zzzvbar14=-zzzvbar15*zzzv15/zzzv14 zzzvbar13=zzzvbar15/zzzv14 zzzvbar12=-zzzvbar13 zzzvbar10=zzzvbar12/zzzv11 zzzvbar8=zzzvbar10*zzzv9 zzzvbar7=zzzvbar13 zzzvbar6=zzzvbar7*zzzv3 zzzvbar5=-zzzvbar6 zzzvbar4=zzzvbar6 zzzvbar3=zzzvbar7*zzzv6 zzzvbar1=zzzvbar3*zzzv2 C### yp(38)=zzzv15 C### call DSVM5(ypoft+38,1, $ zzzvbar14,hwsoft+1,15, $ zzzvbar8,qusoft+1,15, $ zzzvbar5,twsoft+1,15, $ zzzvbar4,tcwsoft+1,15, $ zzzvbar1,fwsoft+1,15) C### ivst(10)=idv(14) ivst(11)=idv(15) ivst(5)=idv(19) ivst(7)=idv(19) ivst(8)=idv(19) ivst(9)=idv(19) do 9020 i=1,12 if(time.eq.0.d0.or.dabs(vcv(i)-xmv(i)).gt.vst(i)*ivst(i))then C### Compute elementary variables zzzv1=xmv(i) C### Compute elementary partial derivatives zzzvbar1=1.0d0 C### vcv(i)=zzzv1 C### call DSVM1(vcvoft+i,15, $ zzzvbar1,xmvoft+i,11) C### end if if(vcv(i).lt.0.0)then vcv(i)=0.0 call SVZ(vcvoft+i,15) C### end if if(vcv(i).gt.100.0)then vcv(i)=100.0 call SVZ(vcvoft+i,15) C### end if C### Compute elementary variables zzzv1=vcv(i) zzzv2=vpos(i) zzzv3=zzzv1-zzzv2 zzzv4=vtau(i) zzzv5=zzzv3/zzzv4 C### Compute elementary partial derivatives zzzvbar5=1.0d0 zzzvbar4=-zzzvbar5*zzzv5/zzzv4 zzzvbar3=zzzvbar5/zzzv4 zzzvbar2=-zzzvbar3 zzzvbar1=zzzvbar3 C### yp(i+38)=zzzv5 C### call DSVM3(ypoft+i+38,1, $ zzzvbar4,vtauoft+i,15, $ zzzvbar2,vposoft+i,1, $ zzzvbar1,vcvoft+i,15) C### 9020 continue if(isd.ne.0)then do 9030 i=1,nn yp(i)=0.0 call SVZ(ypoft+i,1) C### 9030 continue end if goto 11111 C### Construct derivative matrix and sparsity pattern before returning. 11111 continue C### Construct mapping between dependent variable offsets and indices zzzindx=0 do zzzi=1,nn zzzindx=zzzindx+1 zzziw(zzzindx)=ypoft+zzzi end do call DCPRVS(1,zzzm,zzziw,zzzderiv,zzzne,zzzirn,zzzjcn) C### Delete SVM for functions/subroutines. call DELETESV(1) call DELETESV(2) call DELETESV(3) call DELETESV(4) call DELETESV(5) call DELETESV(6) call DELETESV(7) call DELETESV(8) call DELETESV(9) call DELETESV(10) C### Delete SVM for COMMON BLOCK pv call DELETESV(11) C### Delete SVM for COMMON BLOCK randsd call DELETESV(12) C### Delete SVM for COMMON BLOCK const call DELETESV(13) C### Delete SVM for COMMON BLOCK dvec call DELETESV(14) C### Delete SVM for COMMON BLOCK teproc call DELETESV(15) C### Delete SVM for COMMON BLOCK wlk call DELETESV(16) C### Done return end C### subroutine tesub5ad(s,sp,adist,bdist,cdist,ddist,tlast,tnext, $ hspan,hzero,sspan,szero,spspan,idvflag,zzziw) implicit none double precision sp double precision hzero double precision h integer i double precision ddist double precision cdist double precision tnext double precision spspan double precision s double precision s1 double precision tesub7 double precision sspan double precision bdist double precision s1p double precision adist double precision tlast double precision szero double precision hspan integer idvflag double precision tesub7ad external tesub7ad C### Additional arguments for partial derivative construction C### zzziw - integer workspace integer zzziw(*) C### Define elemenary variables and adjoints double precision zzzv1,zzzvbar1 double precision zzzv2,zzzvbar2 double precision zzzv3,zzzvbar3 double precision zzzv4,zzzvbar4 double precision zzzv5,zzzvbar5 double precision zzzv6,zzzvbar6 double precision zzzv7,zzzvbar7 double precision zzzv8,zzzvbar8 double precision zzzv9,zzzvbar9 double precision zzzv10,zzzvbar10 double precision zzzv11,zzzvbar11 double precision zzzv12,zzzvbar12 double precision zzzv13,zzzvbar13 double precision zzzv14,zzzvbar14 double precision zzzv15,zzzvbar15 double precision zzzv16,zzzvbar16 double precision zzzv17,zzzvbar17 C### C### Temporary variables used for handling function calls double precision zzz1 C### Temporary variable offsets integer zzz1oft C### Active variable offsets and loop control variables integer soft integer spoft integer adistoft integer bdistoft integer cdistoft integer ddistoft integer tlastoft integer tnextoft integer hspanoft integer hzerooft integer sspanoft integer szerooft integer spspanoft integer hoft integer s1oft integer s1poft integer zzzsvm1 integer zzzsvm2 integer zzzsvm3 integer zzzsvm4 integer zzzsvm5 integer zzzsvm6 integer zzzsvm7 integer zzzsvm8 integer zzzsvm9 integer zzzsvm10 integer zzzsvm11 integer zzzsvm12 integer zzzsvm13 C### zzzsvm1=zzziw(1) zzzsvm2=zzziw(2) zzzsvm3=zzziw(3) zzzsvm4=zzziw(4) zzzsvm5=zzziw(5) zzzsvm6=zzziw(6) zzzsvm7=zzziw(7) zzzsvm8=zzziw(8) zzzsvm9=zzziw(9) zzzsvm10=zzziw(10) zzzsvm11=zzziw(11) zzzsvm12=zzziw(12) zzzsvm13=zzziw(13) C### C### Compute offsets for arguments and local non-common C### block active variables soft=zzziw(14) spoft=zzziw(15) adistoft=zzziw(16) bdistoft=zzziw(17) cdistoft=zzziw(18) ddistoft=zzziw(19) tlastoft=zzziw(20) tnextoft=zzziw(21) hspanoft=zzziw(22) hzerooft=zzziw(23) sspanoft=zzziw(24) szerooft=zzziw(25) spspanoft=zzziw(26) C### hoft=0 s1oft=hoft+1 s1poft=s1oft+1 zzz1oft=s1poft+1 C### C### i=-1 C### Save argument SVMs in integer workspace zzziw(1)=7 C### Save current offsets for use within embedded function zzziw(2)=zzz1oft C### Call modifed non-intrinsic funciton zzz1=tesub7ad(i,zzziw) C### C### Compute elementary variables zzzv1=hspan zzzv2=zzz1 zzzv3=zzzv1*zzzv2 zzzv4=hzero zzzv5=zzzv3+zzzv4 C### Compute elementary partial derivatives zzzvbar5=1.0d0 zzzvbar4=zzzvbar5 zzzvbar3=zzzvbar5 zzzvbar1=zzzvbar3*zzzv2 C### h=zzzv5 C### call DSVM2(hoft+1,7, $ zzzvbar4,hzerooft+1,zzzsvm10, $ zzzvbar1,hspanoft+1,zzzsvm9) C### C### Save argument SVMs in integer workspace zzziw(1)=7 C### Save current offsets for use within embedded function zzziw(2)=zzz1oft C### Call modifed non-intrinsic funciton zzz1=tesub7ad(i,zzziw) C### C### Compute elementary variables zzzv1=sspan zzzv2=zzz1 zzzv3=zzzv1*zzzv2 zzzv4=idvflag zzzv5=zzzv3*zzzv4 zzzv6=szero zzzv7=zzzv5+zzzv6 C### Compute elementary partial derivatives zzzvbar7=1.0d0 zzzvbar6=zzzvbar7 zzzvbar5=zzzvbar7 zzzvbar3=zzzvbar5*zzzv4 zzzvbar1=zzzvbar3*zzzv2 C### s1=zzzv7 C### call DSVM2(s1oft+1,7, $ zzzvbar6,szerooft+1,zzzsvm12, $ zzzvbar1,sspanoft+1,zzzsvm11) C### C### Save argument SVMs in integer workspace zzziw(1)=7 C### Save current offsets for use within embedded function zzziw(2)=zzz1oft C### Call modifed non-intrinsic funciton zzz1=tesub7ad(i,zzziw) C### C### Compute elementary variables zzzv1=spspan zzzv2=zzz1 zzzv3=zzzv1*zzzv2 zzzv4=idvflag zzzv5=zzzv3*zzzv4 C### Compute elementary partial derivatives zzzvbar5=1.0d0 zzzvbar3=zzzvbar5*zzzv4 zzzvbar1=zzzvbar3*zzzv2 C### s1p=zzzv5 C### call DSVM1(s1poft+1,7, $ zzzvbar1,spspanoft+1,zzzsvm13) C### C### Compute elementary variables zzzv1=s C### Compute elementary partial derivatives zzzvbar1=1.0d0 C### adist=zzzv1 C### call DSVM1(adistoft+1,zzzsvm3, $ zzzvbar1,soft+1,zzzsvm1) C### C### Compute elementary variables zzzv1=sp C### Compute elementary partial derivatives zzzvbar1=1.0d0 C### bdist=zzzv1 C### call DSVM1(bdistoft+1,zzzsvm4, $ zzzvbar1,spoft+1,zzzsvm2) C### C### Compute elementary variables zzzv1=3.d0 zzzv2=s1 zzzv3=s zzzv4=zzzv2-zzzv3 zzzv5=zzzv1*zzzv4 zzzv6=h zzzv7=s1p zzzv8=2.d0 zzzv9=sp zzzv10=zzzv8*zzzv9 zzzv11=zzzv7+zzzv10 zzzv12=zzzv6*zzzv11 zzzv13=zzzv5-zzzv12 zzzv14=2 zzzv15=zzzv6**zzzv14 zzzv16=zzzv13/zzzv15 C### Compute elementary partial derivatives zzzvbar16=1.0d0 zzzvbar15=-zzzvbar16*zzzv16/zzzv15 zzzvbar6=zzzvbar15*zzzv14*zzzv6**(zzzv14-1.0d0) zzzvbar13=zzzvbar16/zzzv15 zzzvbar12=-zzzvbar13 zzzvbar11=zzzvbar12*zzzv6 zzzvbar10=zzzvbar11 zzzvbar9=zzzvbar10*zzzv8 zzzvbar7=zzzvbar11 zzzvbar6=zzzvbar6+zzzvbar12*zzzv11 zzzvbar5=zzzvbar13 zzzvbar4=zzzvbar5*zzzv1 zzzvbar3=-zzzvbar4 zzzvbar2=zzzvbar4 C### cdist=zzzv16 C### call DSVM5(cdistoft+1,zzzsvm5, $ zzzvbar9,spoft+1,zzzsvm2, $ zzzvbar7,s1poft+1,7, $ zzzvbar6,hoft+1,7, $ zzzvbar3,soft+1,zzzsvm1, $ zzzvbar2,s1oft+1,7) C### C### Compute elementary variables zzzv1=2.d0 zzzv2=s zzzv3=s1 zzzv4=zzzv2-zzzv3 zzzv5=zzzv1*zzzv4 zzzv6=h zzzv7=s1p zzzv8=sp zzzv9=zzzv7+zzzv8 zzzv10=zzzv6*zzzv9 zzzv11=zzzv5+zzzv10 zzzv12=3 zzzv13=zzzv6**zzzv12 zzzv14=zzzv11/zzzv13 C### Compute elementary partial derivatives zzzvbar14=1.0d0 zzzvbar13=-zzzvbar14*zzzv14/zzzv13 zzzvbar6=zzzvbar13*zzzv12*zzzv6**(zzzv12-1.0d0) zzzvbar11=zzzvbar14/zzzv13 zzzvbar10=zzzvbar11 zzzvbar9=zzzvbar10*zzzv6 zzzvbar8=zzzvbar9 zzzvbar7=zzzvbar9 zzzvbar6=zzzvbar6+zzzvbar10*zzzv9 zzzvbar5=zzzvbar11 zzzvbar4=zzzvbar5*zzzv1 zzzvbar3=-zzzvbar4 zzzvbar2=zzzvbar4 C### ddist=zzzv14 C### call DSVM5(ddistoft+1,zzzsvm6, $ zzzvbar8,spoft+1,zzzsvm2, $ zzzvbar7,s1poft+1,7, $ zzzvbar6,hoft+1,7, $ zzzvbar3,s1oft+1,7, $ zzzvbar2,soft+1,zzzsvm1) C### C### Compute elementary variables zzzv1=tlast zzzv2=h zzzv3=zzzv1+zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=zzzvbar3 zzzvbar1=zzzvbar3 C### tnext=zzzv3 C### call DSVM2(tnextoft+1,zzzsvm8, $ zzzvbar2,hoft+1,7, $ zzzvbar1,tlastoft+1,zzzsvm7) C### goto 11111 11111 continue C### Done return end C### double precision function tesub7ad(i,zzziw) implicit none double precision g integer i double precision dmod double precision tesub7 COMMON /randsd/ g C### Additional arguments for partial derivative construction C### zzziw - integer workspace integer zzziw(*) C### Define elemenary variables and adjoints double precision zzzv1,zzzvbar1 double precision zzzv2,zzzvbar2 double precision zzzv3,zzzvbar3 double precision zzzv4,zzzvbar4 double precision zzzv5,zzzvbar5 double precision zzzv6,zzzvbar6 double precision zzzv7,zzzvbar7 C### C### Active variable offsets and loop control variables integer goft integer tesub7oft integer zzzsvm1 C### zzzsvm1=zzziw(1) C### Compute offsets for arguments and local non-common C### block active varaibles tesub7oft=zzziw(2) C### C### Variable offsets for COMMON BLOCK randsd goft=0 C### Compute elementary variables zzzv1=g zzzv2=9228907.d0 zzzv3=zzzv1*zzzv2 zzzv4=4294967296.d0 zzzv5=dmod(zzzv3,zzzv4) C### Compute elementary partial derivatives zzzvbar5=1.0d0 zzzvbar3=0.0d0 zzzvbar1=zzzvbar3*zzzv2 C### g=zzzv5 C### call DSVM1(goft+1,12, $ zzzvbar1,goft+1,12) C### if(i.ge.0)then C### Compute elementary variables zzzv1=g zzzv2=4294967296.d0 zzzv3=zzzv1/zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar1=zzzvbar3/zzzv2 C### tesub7=zzzv3 C### call DSVM1(tesub7oft+1,zzzsvm1, $ zzzvbar1,goft+1,12) C### end if if(i.lt.0)then C### Compute elementary variables zzzv1=2.d0 zzzv2=g zzzv3=zzzv1*zzzv2 zzzv4=4294967296.d0 zzzv5=zzzv3/zzzv4 zzzv6=1.d0 zzzv7=zzzv5-zzzv6 C### Compute elementary partial derivatives zzzvbar7=1.0d0 zzzvbar5=zzzvbar7 zzzvbar3=zzzvbar5/zzzv4 zzzvbar2=zzzvbar3*zzzv1 C### tesub7=zzzv7 C### call DSVM1(tesub7oft+1,zzzsvm1, $ zzzvbar2,goft+1,12) C### end if goto 11111 11111 continue C### tesub7ad=tesub7 C### Done return end C### double precision function tesub8ad(i,t,zzziw) implicit none double precision h integer i double precision t double precision hzero double precision ddist double precision cdist double precision tnext double precision spspan double precision sspan double precision bdist double precision adist double precision tlast double precision szero double precision hspan integer idvwlk double precision tesub8 COMMON /wlk/ adist(12),bdist(12),cdist(12),ddist(12),tlast(12), $ tnext(12),hspan(12),hzero(12),sspan(12),szero(12),spspan(12), $ idvwlk(12) C### Additional arguments for partial derivative construction C### zzziw - integer workspace integer zzziw(*) C### Define elemenary variables and adjoints double precision zzzv1,zzzvbar1 double precision zzzv2,zzzvbar2 double precision zzzv3,zzzvbar3 double precision zzzv4,zzzvbar4 double precision zzzv5,zzzvbar5 double precision zzzv6,zzzvbar6 double precision zzzv7,zzzvbar7 double precision zzzv8,zzzvbar8 double precision zzzv9,zzzvbar9 double precision zzzv10,zzzvbar10 double precision zzzv11,zzzvbar11 double precision zzzv12,zzzvbar12 double precision zzzv13,zzzvbar13 C### C### Active variable offsets and loop control variables integer toft integer adistoft integer bdistoft integer cdistoft integer ddistoft integer tlastoft integer tnextoft integer hspanoft integer hzerooft integer sspanoft integer szerooft integer spspanoft integer hoft integer tesub8oft integer zzzsvm1 integer zzzsvm2 C### zzzsvm1=zzziw(1) zzzsvm2=zzziw(2) C### Compute offsets for arguments and local non-common C### block active varaibles toft=zzziw(3) tesub8oft=zzziw(4) C### hoft=0 C### Variable offsets for COMMON BLOCK wlk adistoft=0 bdistoft=adistoft+12 cdistoft=bdistoft+12 ddistoft=cdistoft+12 tlastoft=ddistoft+12 tnextoft=tlastoft+12 hspanoft=tnextoft+12 hzerooft=hspanoft+12 sspanoft=hzerooft+12 szerooft=sspanoft+12 spspanoft=szerooft+12 C### Compute elementary variables zzzv1=t zzzv2=tlast(i) zzzv3=zzzv1-zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=-zzzvbar3 zzzvbar1=zzzvbar3 C### h=zzzv3 C### call DSVM2(hoft+1,2, $ zzzvbar2,tlastoft+i,16, $ zzzvbar1,toft+1,zzzsvm1) C### C### Compute elementary variables zzzv1=adist(i) zzzv2=h zzzv3=bdist(i) zzzv4=cdist(i) zzzv5=ddist(i) zzzv6=zzzv2*zzzv5 zzzv7=zzzv4+zzzv6 zzzv8=zzzv2*zzzv7 zzzv9=zzzv3+zzzv8 zzzv10=zzzv2*zzzv9 zzzv11=zzzv1+zzzv10 C### Compute elementary partial derivatives zzzvbar11=1.0d0 zzzvbar10=zzzvbar11 zzzvbar9=zzzvbar10*zzzv2 zzzvbar8=zzzvbar9 zzzvbar7=zzzvbar8*zzzv2 zzzvbar6=zzzvbar7 zzzvbar5=zzzvbar6*zzzv2 zzzvbar2=zzzvbar6*zzzv5 zzzvbar4=zzzvbar7 zzzvbar2=zzzvbar2+zzzvbar8*zzzv7 zzzvbar3=zzzvbar9 zzzvbar2=zzzvbar2+zzzvbar10*zzzv9 zzzvbar1=zzzvbar11 C### tesub8=zzzv11 C### call DSVM5(tesub8oft+1,zzzsvm2, $ zzzvbar5,ddistoft+i,16, $ zzzvbar4,cdistoft+i,16, $ zzzvbar3,bdistoft+i,16, $ zzzvbar2,hoft+1,2, $ zzzvbar1,adistoft+i,16) C### goto 11111 11111 continue C### tesub8ad=tesub8 C### Done return end C### subroutine tesub2ad(z,t,h,ity,zzziw) implicit none double precision h integer j double precision err integer ity double precision dh double precision htest double precision tin double precision t double precision dt double precision bd double precision cg double precision cd double precision bg double precision ag double precision ad double precision ah double precision z(8) double precision cvp double precision bh double precision ch double precision bvp double precision avp double precision av double precision xmw COMMON /const/ avp(8),bvp(8),cvp(8),ah(8),bh(8),ch(8),ag(8), $ bg(8),cg(8),av(8),ad(8),bd(8),cd(8),xmw(8) C### Additional arguments for partial derivative construction C### zzziw - integer workspace integer zzziw(*) C### Define elemenary variables and adjoints double precision zzzv1,zzzvbar1 double precision zzzv2,zzzvbar2 double precision zzzv3,zzzvbar3 double precision zzzv4,zzzvbar4 C### C### Active variable offsets and loop control variables integer zoft integer toft integer hoft integer avpoft integer bvpoft integer cvpoft integer ahoft integer bhoft integer choft integer agoft integer bgoft integer cgoft integer avoft integer adoft integer bdoft integer cdoft integer xmwoft integer tinoft integer htestoft integer erroft integer dhoft integer dtoft integer zzzsvm1 integer zzzsvm2 integer zzzsvm3 C### zzzsvm1=zzziw(1) zzzsvm2=zzziw(2) zzzsvm3=zzziw(3) C### C### Compute offsets for arguments and local non-common C### block active variables zoft=zzziw(4) toft=zzziw(5) hoft=zzziw(6) C### tinoft=0 htestoft=tinoft+1 erroft=htestoft+1 dhoft=erroft+1 dtoft=dhoft+1 C### C### Variable offsets for COMMON BLOCK const avpoft=0 bvpoft=avpoft+8 cvpoft=bvpoft+8 ahoft=cvpoft+8 bhoft=ahoft+8 choft=bhoft+8 agoft=choft+8 bgoft=agoft+8 cgoft=bgoft+8 avoft=cgoft+8 adoft=avoft+8 bdoft=adoft+8 cdoft=bdoft+8 xmwoft=cdoft+8 C### C### Compute elementary variables zzzv1=t C### Compute elementary partial derivatives zzzvbar1=1.0d0 C### tin=zzzv1 C### call DSVM1(tinoft+1,4, $ zzzvbar1,toft+1,zzzsvm2) C### do 250 j=1,100 C### Save SVMs of arguments zzziw(1)=zzzsvm1 zzziw(2)=zzzsvm2 zzziw(3)=4 C### Save current offsets for use within embedded subroutine zzziw(4)=zoft zzziw(5)=toft zzziw(6)=htestoft C### Call modifed embedded subroutine call tesub1ad(z,t,htest,ity,zzziw) C### C### Compute elementary variables zzzv1=htest zzzv2=h zzzv3=zzzv1-zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=-zzzvbar3 zzzvbar1=zzzvbar3 C### err=zzzv3 C### call DSVM2(erroft+1,4, $ zzzvbar2,hoft+1,zzzsvm3, $ zzzvbar1,htestoft+1,4) C### C### Save SVMs of arguments zzziw(1)=zzzsvm1 zzziw(2)=zzzsvm2 zzziw(3)=4 C### Save current offsets for use within embedded subroutine zzziw(4)=zoft zzziw(5)=toft zzziw(6)=dhoft C### Call modifed embedded subroutine call tesub3ad(z,t,dh,ity,zzziw) C### C### Compute elementary variables zzzv1=err zzzv2=-zzzv1 zzzv3=dh zzzv4=zzzv2/zzzv3 C### Compute elementary partial derivatives zzzvbar4=1.0d0 zzzvbar3=-zzzvbar4*zzzv4/zzzv3 zzzvbar2=zzzvbar4/zzzv3 zzzvbar1=-zzzvbar2 C### dt=zzzv4 C### call DSVM2(dtoft+1,4, $ zzzvbar3,dhoft+1,4, $ zzzvbar1,erroft+1,4) C### C### Compute elementary variables zzzv1=t zzzv2=dt zzzv3=zzzv1+zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=zzzvbar3 zzzvbar1=zzzvbar3 C### t=zzzv3 C### call DSVM2(toft+1,zzzsvm2, $ zzzvbar2,dtoft+1,4, $ zzzvbar1,toft+1,zzzsvm2) C### if(dabs(dt).lt.1.d-12)then goto 300 end if 250 continue C### Compute elementary variables zzzv1=tin C### Compute elementary partial derivatives zzzvbar1=1.0d0 C### t=zzzv1 C### call DSVM1(toft+1,zzzsvm2, $ zzzvbar1,tinoft+1,4) C### 300 continue goto 11111 11111 continue C### Done return end C### subroutine tesub1ad(z,t,h,ity,zzziw) implicit none double precision h integer i integer ity double precision r double precision t double precision hi double precision bd double precision cg double precision cd double precision bg double precision ag double precision ad double precision ah double precision z(8) double precision cvp double precision bh double precision ch double precision bvp double precision avp double precision av double precision xmw COMMON /const/ avp(8),bvp(8),cvp(8),ah(8),bh(8),ch(8),ag(8), $ bg(8),cg(8),av(8),ad(8),bd(8),cd(8),xmw(8) C### Additional arguments for partial derivative construction C### zzziw - integer workspace integer zzziw(*) C### Define elemenary variables and adjoints double precision zzzv1,zzzvbar1 double precision zzzv2,zzzvbar2 double precision zzzv3,zzzvbar3 double precision zzzv4,zzzvbar4 double precision zzzv5,zzzvbar5 double precision zzzv6,zzzvbar6 double precision zzzv7,zzzvbar7 double precision zzzv8,zzzvbar8 double precision zzzv9,zzzvbar9 double precision zzzv10,zzzvbar10 double precision zzzv11,zzzvbar11 double precision zzzv12,zzzvbar12 double precision zzzv13,zzzvbar13 double precision zzzv14,zzzvbar14 double precision zzzv15,zzzvbar15 double precision zzzv16,zzzvbar16 double precision zzzv17,zzzvbar17 C### C### Active variable offsets and loop control variables integer zoft integer toft integer hoft integer avpoft integer bvpoft integer cvpoft integer ahoft integer bhoft integer choft integer agoft integer bgoft integer cgoft integer avoft integer adoft integer bdoft integer cdoft integer xmwoft integer hioft integer zzzsvm1 integer zzzsvm2 integer zzzsvm3 C### zzzsvm1=zzziw(1) zzzsvm2=zzziw(2) zzzsvm3=zzziw(3) C### C### Compute offsets for arguments and local non-common C### block active variables zoft=zzziw(4) toft=zzziw(5) hoft=zzziw(6) C### hioft=0 C### C### Variable offsets for COMMON BLOCK const avpoft=0 bvpoft=avpoft+8 cvpoft=bvpoft+8 ahoft=cvpoft+8 bhoft=ahoft+8 choft=bhoft+8 agoft=choft+8 bgoft=agoft+8 cgoft=bgoft+8 avoft=cgoft+8 adoft=avoft+8 bdoft=adoft+8 cdoft=bdoft+8 xmwoft=cdoft+8 C### if(ity.eq.0)then h=0.0d0 call SVZ(hoft+1,zzzsvm3) C### do 100 i=1,8 C### Compute elementary variables zzzv1=t zzzv2=ah(i) zzzv3=bh(i) zzzv4=zzzv3*zzzv1 zzzv5=2.d0 zzzv6=zzzv4/zzzv5 zzzv7=zzzv2+zzzv6 zzzv8=ch(i) zzzv9=2 zzzv10=zzzv1**zzzv9 zzzv11=zzzv8*zzzv10 zzzv12=3.d0 zzzv13=zzzv11/zzzv12 zzzv14=zzzv7+zzzv13 zzzv15=zzzv1*zzzv14 C### Compute elementary partial derivatives zzzvbar15=1.0d0 zzzvbar14=zzzvbar15*zzzv1 zzzvbar13=zzzvbar14 zzzvbar11=zzzvbar13/zzzv12 zzzvbar10=zzzvbar11*zzzv8 zzzvbar1=zzzvbar10*zzzv9*zzzv1**(zzzv9-1.0d0) zzzvbar8=zzzvbar11*zzzv10 zzzvbar7=zzzvbar14 zzzvbar6=zzzvbar7 zzzvbar4=zzzvbar6/zzzv5 zzzvbar1=zzzvbar1+zzzvbar4*zzzv3 zzzvbar3=zzzvbar4*zzzv1 zzzvbar2=zzzvbar7 zzzvbar1=zzzvbar1+zzzvbar15*zzzv14 C### hi=zzzv15 C### call DSVM4(hioft+1,3, $ zzzvbar8,choft+i,13, $ zzzvbar3,bhoft+i,13, $ zzzvbar2,ahoft+i,13, $ zzzvbar1,toft+1,zzzsvm2) C### C### Compute elementary variables zzzv1=1.8d0 zzzv2=hi zzzv3=zzzv1*zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=zzzvbar3*zzzv1 C### hi=zzzv3 C### call DSVM1(hioft+1,3, $ zzzvbar2,hioft+1,3) C### C### Compute elementary variables zzzv1=h zzzv2=z(i) zzzv3=xmw(i) zzzv4=zzzv2*zzzv3 zzzv5=hi zzzv6=zzzv4*zzzv5 zzzv7=zzzv1+zzzv6 C### Compute elementary partial derivatives zzzvbar7=1.0d0 zzzvbar6=zzzvbar7 zzzvbar5=zzzvbar6*zzzv4 zzzvbar4=zzzvbar6*zzzv5 zzzvbar3=zzzvbar4*zzzv2 zzzvbar2=zzzvbar4*zzzv3 zzzvbar1=zzzvbar7 C### h=zzzv7 C### call DSVM4(hoft+1,zzzsvm3, $ zzzvbar5,hioft+1,3, $ zzzvbar3,xmwoft+i,13, $ zzzvbar2,zoft+i,zzzsvm1, $ zzzvbar1,hoft+1,zzzsvm3) C### 100 continue else h=0.0d0 call SVZ(hoft+1,zzzsvm3) C### do 200 i=1,8 C### Compute elementary variables zzzv1=t zzzv2=ag(i) zzzv3=bg(i) zzzv4=zzzv3*zzzv1 zzzv5=2.d0 zzzv6=zzzv4/zzzv5 zzzv7=zzzv2+zzzv6 zzzv8=cg(i) zzzv9=2 zzzv10=zzzv1**zzzv9 zzzv11=zzzv8*zzzv10 zzzv12=3.d0 zzzv13=zzzv11/zzzv12 zzzv14=zzzv7+zzzv13 zzzv15=zzzv1*zzzv14 C### Compute elementary partial derivatives zzzvbar15=1.0d0 zzzvbar14=zzzvbar15*zzzv1 zzzvbar13=zzzvbar14 zzzvbar11=zzzvbar13/zzzv12 zzzvbar10=zzzvbar11*zzzv8 zzzvbar1=zzzvbar10*zzzv9*zzzv1**(zzzv9-1.0d0) zzzvbar8=zzzvbar11*zzzv10 zzzvbar7=zzzvbar14 zzzvbar6=zzzvbar7 zzzvbar4=zzzvbar6/zzzv5 zzzvbar1=zzzvbar1+zzzvbar4*zzzv3 zzzvbar3=zzzvbar4*zzzv1 zzzvbar2=zzzvbar7 zzzvbar1=zzzvbar1+zzzvbar15*zzzv14 C### hi=zzzv15 C### call DSVM4(hioft+1,3, $ zzzvbar8,cgoft+i,13, $ zzzvbar3,bgoft+i,13, $ zzzvbar2,agoft+i,13, $ zzzvbar1,toft+1,zzzsvm2) C### C### Compute elementary variables zzzv1=1.8d0 zzzv2=hi zzzv3=zzzv1*zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=zzzvbar3*zzzv1 C### hi=zzzv3 C### call DSVM1(hioft+1,3, $ zzzvbar2,hioft+1,3) C### C### Compute elementary variables zzzv1=hi zzzv2=av(i) zzzv3=zzzv1+zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=zzzvbar3 zzzvbar1=zzzvbar3 C### hi=zzzv3 C### call DSVM2(hioft+1,3, $ zzzvbar2,avoft+i,13, $ zzzvbar1,hioft+1,3) C### C### Compute elementary variables zzzv1=h zzzv2=z(i) zzzv3=xmw(i) zzzv4=zzzv2*zzzv3 zzzv5=hi zzzv6=zzzv4*zzzv5 zzzv7=zzzv1+zzzv6 C### Compute elementary partial derivatives zzzvbar7=1.0d0 zzzvbar6=zzzvbar7 zzzvbar5=zzzvbar6*zzzv4 zzzvbar4=zzzvbar6*zzzv5 zzzvbar3=zzzvbar4*zzzv2 zzzvbar2=zzzvbar4*zzzv3 zzzvbar1=zzzvbar7 C### h=zzzv7 C### call DSVM4(hoft+1,zzzsvm3, $ zzzvbar5,hioft+1,3, $ zzzvbar3,xmwoft+i,13, $ zzzvbar2,zoft+i,zzzsvm1, $ zzzvbar1,hoft+1,zzzsvm3) C### 200 continue end if if(ity.eq.2)then r=3.57696d0/1.d6 C### Compute elementary variables zzzv1=h zzzv2=r zzzv3=t zzzv4=273.15 zzzv5=zzzv3+zzzv4 zzzv6=zzzv2*zzzv5 zzzv7=zzzv1-zzzv6 C### Compute elementary partial derivatives zzzvbar7=1.0d0 zzzvbar6=-zzzvbar7 zzzvbar5=zzzvbar6*zzzv2 zzzvbar3=zzzvbar5 zzzvbar1=zzzvbar7 C### h=zzzv7 C### call DSVM2(hoft+1,zzzsvm3, $ zzzvbar3,toft+1,zzzsvm2, $ zzzvbar1,hoft+1,zzzsvm3) C### end if goto 11111 11111 continue C### Done return end C### subroutine tesub3ad(z,t,dh,ity,zzziw) implicit none integer i integer ity double precision dh double precision r double precision t double precision dhi double precision bd double precision cg double precision cd double precision bg double precision ag double precision ad double precision ah double precision z(8) double precision cvp double precision bh double precision ch double precision bvp double precision avp double precision av double precision xmw COMMON /const/ avp(8),bvp(8),cvp(8),ah(8),bh(8),ch(8),ag(8), $ bg(8),cg(8),av(8),ad(8),bd(8),cd(8),xmw(8) C### Additional arguments for partial derivative construction C### zzziw - integer workspace integer zzziw(*) C### Define elemenary variables and adjoints double precision zzzv1,zzzvbar1 double precision zzzv2,zzzvbar2 double precision zzzv3,zzzvbar3 double precision zzzv4,zzzvbar4 double precision zzzv5,zzzvbar5 double precision zzzv6,zzzvbar6 double precision zzzv7,zzzvbar7 double precision zzzv8,zzzvbar8 double precision zzzv9,zzzvbar9 double precision zzzv10,zzzvbar10 double precision zzzv11,zzzvbar11 C### C### Active variable offsets and loop control variables integer zoft integer toft integer dhoft integer avpoft integer bvpoft integer cvpoft integer ahoft integer bhoft integer choft integer agoft integer bgoft integer cgoft integer avoft integer adoft integer bdoft integer cdoft integer xmwoft integer dhioft integer zzzsvm1 integer zzzsvm2 integer zzzsvm3 C### zzzsvm1=zzziw(1) zzzsvm2=zzziw(2) zzzsvm3=zzziw(3) C### C### Compute offsets for arguments and local non-common C### block active variables zoft=zzziw(4) toft=zzziw(5) dhoft=zzziw(6) C### dhioft=0 C### C### Variable offsets for COMMON BLOCK const avpoft=0 bvpoft=avpoft+8 cvpoft=bvpoft+8 ahoft=cvpoft+8 bhoft=ahoft+8 choft=bhoft+8 agoft=choft+8 bgoft=agoft+8 cgoft=bgoft+8 avoft=cgoft+8 adoft=avoft+8 bdoft=adoft+8 cdoft=bdoft+8 xmwoft=cdoft+8 C### if(ity.eq.0)then dh=0.0d0 call SVZ(dhoft+1,zzzsvm3) C### do 100 i=1,8 C### Compute elementary variables zzzv1=ah(i) zzzv2=bh(i) zzzv3=t zzzv4=zzzv2*zzzv3 zzzv5=zzzv1+zzzv4 zzzv6=ch(i) zzzv7=2 zzzv8=zzzv3**zzzv7 zzzv9=zzzv6*zzzv8 zzzv10=zzzv5+zzzv9 C### Compute elementary partial derivatives zzzvbar10=1.0d0 zzzvbar9=zzzvbar10 zzzvbar8=zzzvbar9*zzzv6 zzzvbar3=zzzvbar8*zzzv7*zzzv3**(zzzv7-1.0d0) zzzvbar6=zzzvbar9*zzzv8 zzzvbar5=zzzvbar10 zzzvbar4=zzzvbar5 zzzvbar3=zzzvbar3+zzzvbar4*zzzv2 zzzvbar2=zzzvbar4*zzzv3 zzzvbar1=zzzvbar5 C### dhi=zzzv10 C### call DSVM4(dhioft+1,5, $ zzzvbar6,choft+i,13, $ zzzvbar3,toft+1,zzzsvm2, $ zzzvbar2,bhoft+i,13, $ zzzvbar1,ahoft+i,13) C### C### Compute elementary variables zzzv1=1.8d0 zzzv2=dhi zzzv3=zzzv1*zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=zzzvbar3*zzzv1 C### dhi=zzzv3 C### call DSVM1(dhioft+1,5, $ zzzvbar2,dhioft+1,5) C### C### Compute elementary variables zzzv1=dh zzzv2=z(i) zzzv3=xmw(i) zzzv4=zzzv2*zzzv3 zzzv5=dhi zzzv6=zzzv4*zzzv5 zzzv7=zzzv1+zzzv6 C### Compute elementary partial derivatives zzzvbar7=1.0d0 zzzvbar6=zzzvbar7 zzzvbar5=zzzvbar6*zzzv4 zzzvbar4=zzzvbar6*zzzv5 zzzvbar3=zzzvbar4*zzzv2 zzzvbar2=zzzvbar4*zzzv3 zzzvbar1=zzzvbar7 C### dh=zzzv7 C### call DSVM4(dhoft+1,zzzsvm3, $ zzzvbar5,dhioft+1,5, $ zzzvbar3,xmwoft+i,13, $ zzzvbar2,zoft+i,zzzsvm1, $ zzzvbar1,dhoft+1,zzzsvm3) C### 100 continue else dh=0.0d0 call SVZ(dhoft+1,zzzsvm3) C### do 200 i=1,8 C### Compute elementary variables zzzv1=ag(i) zzzv2=bg(i) zzzv3=t zzzv4=zzzv2*zzzv3 zzzv5=zzzv1+zzzv4 zzzv6=cg(i) zzzv7=2 zzzv8=zzzv3**zzzv7 zzzv9=zzzv6*zzzv8 zzzv10=zzzv5+zzzv9 C### Compute elementary partial derivatives zzzvbar10=1.0d0 zzzvbar9=zzzvbar10 zzzvbar8=zzzvbar9*zzzv6 zzzvbar3=zzzvbar8*zzzv7*zzzv3**(zzzv7-1.0d0) zzzvbar6=zzzvbar9*zzzv8 zzzvbar5=zzzvbar10 zzzvbar4=zzzvbar5 zzzvbar3=zzzvbar3+zzzvbar4*zzzv2 zzzvbar2=zzzvbar4*zzzv3 zzzvbar1=zzzvbar5 C### dhi=zzzv10 C### call DSVM4(dhioft+1,5, $ zzzvbar6,cgoft+i,13, $ zzzvbar3,toft+1,zzzsvm2, $ zzzvbar2,bgoft+i,13, $ zzzvbar1,agoft+i,13) C### C### Compute elementary variables zzzv1=1.8d0 zzzv2=dhi zzzv3=zzzv1*zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=zzzvbar3*zzzv1 C### dhi=zzzv3 C### call DSVM1(dhioft+1,5, $ zzzvbar2,dhioft+1,5) C### C### Compute elementary variables zzzv1=dh zzzv2=z(i) zzzv3=xmw(i) zzzv4=zzzv2*zzzv3 zzzv5=dhi zzzv6=zzzv4*zzzv5 zzzv7=zzzv1+zzzv6 C### Compute elementary partial derivatives zzzvbar7=1.0d0 zzzvbar6=zzzvbar7 zzzvbar5=zzzvbar6*zzzv4 zzzvbar4=zzzvbar6*zzzv5 zzzvbar3=zzzvbar4*zzzv2 zzzvbar2=zzzvbar4*zzzv3 zzzvbar1=zzzvbar7 C### dh=zzzv7 C### call DSVM4(dhoft+1,zzzsvm3, $ zzzvbar5,dhioft+1,5, $ zzzvbar3,xmwoft+i,13, $ zzzvbar2,zoft+i,zzzsvm1, $ zzzvbar1,dhoft+1,zzzsvm3) C### 200 continue end if if(ity.eq.2)then r=3.57696d0/1.d6 C### Compute elementary variables zzzv1=dh zzzv2=r zzzv3=zzzv1-zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar1=zzzvbar3 C### dh=zzzv3 C### call DSVM1(dhoft+1,zzzsvm3, $ zzzvbar1,dhoft+1,zzzsvm3) C### end if goto 11111 11111 continue C### Done return end C### subroutine tesub4ad(x,t,r,zzziw) implicit none integer i double precision r double precision t double precision v double precision bd double precision cg double precision cd double precision bg double precision ag double precision ad double precision x(8) double precision ah double precision cvp double precision bh double precision ch double precision bvp double precision avp double precision av double precision xmw COMMON /const/ avp(8),bvp(8),cvp(8),ah(8),bh(8),ch(8),ag(8), $ bg(8),cg(8),av(8),ad(8),bd(8),cd(8),xmw(8) C### Additional arguments for partial derivative construction C### zzziw - integer workspace integer zzziw(*) C### Define elemenary variables and adjoints double precision zzzv1,zzzvbar1 double precision zzzv2,zzzvbar2 double precision zzzv3,zzzvbar3 double precision zzzv4,zzzvbar4 double precision zzzv5,zzzvbar5 double precision zzzv6,zzzvbar6 double precision zzzv7,zzzvbar7 double precision zzzv8,zzzvbar8 double precision zzzv9,zzzvbar9 double precision zzzv10,zzzvbar10 double precision zzzv11,zzzvbar11 double precision zzzv12,zzzvbar12 double precision zzzv13,zzzvbar13 double precision zzzv14,zzzvbar14 double precision zzzv15,zzzvbar15 C### C### Active variable offsets and loop control variables integer xoft integer toft integer roft integer avpoft integer bvpoft integer cvpoft integer ahoft integer bhoft integer choft integer agoft integer bgoft integer cgoft integer avoft integer adoft integer bdoft integer cdoft integer xmwoft integer voft integer zzzsvm1 integer zzzsvm2 integer zzzsvm3 C### zzzsvm1=zzziw(1) zzzsvm2=zzziw(2) zzzsvm3=zzziw(3) C### C### Compute offsets for arguments and local non-common C### block active variables xoft=zzziw(4) toft=zzziw(5) roft=zzziw(6) C### voft=0 C### C### Variable offsets for COMMON BLOCK const avpoft=0 bvpoft=avpoft+8 cvpoft=bvpoft+8 ahoft=cvpoft+8 bhoft=ahoft+8 choft=bhoft+8 agoft=choft+8 bgoft=agoft+8 cgoft=bgoft+8 avoft=cgoft+8 adoft=avoft+8 bdoft=adoft+8 cdoft=bdoft+8 xmwoft=cdoft+8 C### v=0.0 call SVZ(voft+1,6) C### do 10 i=1,8 C### Compute elementary variables zzzv1=v zzzv2=x(i) zzzv3=xmw(i) zzzv4=zzzv2*zzzv3 zzzv5=ad(i) zzzv6=bd(i) zzzv7=cd(i) zzzv8=t zzzv9=zzzv7*zzzv8 zzzv10=zzzv6+zzzv9 zzzv11=zzzv10*zzzv8 zzzv12=zzzv5+zzzv11 zzzv13=zzzv4/zzzv12 zzzv14=zzzv1+zzzv13 C### Compute elementary partial derivatives zzzvbar14=1.0d0 zzzvbar13=zzzvbar14 zzzvbar12=-zzzvbar13*zzzv13/zzzv12 zzzvbar11=zzzvbar12 zzzvbar8=zzzvbar11*zzzv10 zzzvbar10=zzzvbar11*zzzv8 zzzvbar9=zzzvbar10 zzzvbar8=zzzvbar8+zzzvbar9*zzzv7 zzzvbar7=zzzvbar9*zzzv8 zzzvbar6=zzzvbar10 zzzvbar5=zzzvbar12 zzzvbar4=zzzvbar13/zzzv12 zzzvbar3=zzzvbar4*zzzv2 zzzvbar2=zzzvbar4*zzzv3 zzzvbar1=zzzvbar14 C### v=zzzv14 C### call DSVM7(voft+1,6, $ zzzvbar8,toft+1,zzzsvm2, $ zzzvbar7,cdoft+i,13, $ zzzvbar6,bdoft+i,13, $ zzzvbar5,adoft+i,13, $ zzzvbar3,xmwoft+i,13, $ zzzvbar2,xoft+i,zzzsvm1, $ zzzvbar1,voft+1,6) C### 10 continue C### Compute elementary variables zzzv1=1.0 zzzv2=v zzzv3=zzzv1/zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar2=-zzzvbar3*zzzv3/zzzv2 C### r=zzzv3 C### call DSVM1(roft+1,zzzsvm3, $ zzzvbar2,voft+1,6) C### goto 11111 11111 continue C### Done return end C### subroutine tesub6ad(std,x,zzziw) implicit none integer i double precision std double precision x double precision tesub7 double precision tesub7ad external tesub7ad C### Additional arguments for partial derivative construction C### zzziw - integer workspace integer zzziw(*) C### Define elemenary variables and adjoints double precision zzzv1,zzzvbar1 double precision zzzv2,zzzvbar2 double precision zzzv3,zzzvbar3 double precision zzzv4,zzzvbar4 double precision zzzv5,zzzvbar5 C### C### Temporary variables used for handling function calls double precision zzz1 C### Temporary variable offsets integer zzz1oft C### Active variable offsets and loop control variables integer stdoft integer xoft integer zzzsvm1 integer zzzsvm2 C### zzzsvm1=zzziw(1) zzzsvm2=zzziw(2) C### C### Compute offsets for arguments and local non-common C### block active variables stdoft=zzziw(3) xoft=zzziw(4) C### zzz1oft=0 C### C### x=0.d0 call SVZ(xoft+1,zzzsvm2) C### do 2 i=1,12 C### Save argument SVMs in integer workspace zzziw(1)=8 C### Save current offsets for use within embedded function zzziw(2)=zzz1oft C### Call modifed non-intrinsic funciton zzz1=tesub7ad(i,zzziw) C### C### Compute elementary variables zzzv1=x zzzv2=zzz1 zzzv3=zzzv1+zzzv2 C### Compute elementary partial derivatives zzzvbar3=1.0d0 zzzvbar1=zzzvbar3 C### x=zzzv3 C### call DSVM1(xoft+1,zzzsvm2, $ zzzvbar1,xoft+1,zzzsvm2) C### 2 continue C### Compute elementary variables zzzv1=x zzzv2=6.d0 zzzv3=zzzv1-zzzv2 zzzv4=std zzzv5=zzzv3*zzzv4 C### Compute elementary partial derivatives zzzvbar5=1.0d0 zzzvbar4=zzzvbar5*zzzv3 zzzvbar3=zzzvbar5*zzzv4 zzzvbar1=zzzvbar3 C### x=zzzv5 C### call DSVM2(xoft+1,zzzsvm2, $ zzzvbar4,stdoft+1,zzzsvm1, $ zzzvbar1,xoft+1,zzzsvm2) C### goto 11111 11111 continue C### Done return end