c write(*,*) 'Field: ',gfunc(1:20) c write(*,*) 'File: ',gdfile(1:30) c write(*,*) 'Date: ',gdatim(1:20) c write(*,*) 'Level: ',glevel(1:20) write(*,*) 'Running medium range ensemble processing' write(*,*) 'Running short range ensemble processing' write(*,*) 'Including the mode calculation in stats' write(*,*) 'Number of input weights read in= ',i-1 write(*,*) 'Weight read in= ',j,wgt(j) write(*,*) 'Default weight= ',j,wgt(j) c write(*,*) 'here 1' c write(*,*) 'here 2' c write(*,*) 'AD: infiles = ',infiles ccccccc write(*,*) 'GDFILE: ',gdfile(1:40) write(*,*) ' ::: ------ ::: ' write(*,*) 'Field: ',gfunc(1:20) c write(*,*) 'Date: ',gdatim(1:20) write(*,*) 'Level: ',glevel(1:20) write(*,*) 'Vcord: ',gvcord(1:30) write(*,*) 'GEMPAK name: ',gemfld(1:20) write(*,15) 'Min, Max: ',min,max write(*,*) 'Calc mean...y/n: ',qmean(1:1) write(*,*) 'Dump members...y/n: ',qindiv(1:1) cc write(*,*) 'Skip precip type for short-range ensemble' c write(*,*) 'Skip precip type for medium-range ensemble' write(*,*) 'SCAPE not calculated in MREF.' write(*,*) 'SCAPE not calculated in MREF.' c need to accumulate and write pcpn if >= F24. write(*,*) 'Precip is not available.' c need to accumulate and write pcpn if >= F12. write(*,*) 'Precip is not available.' c need to accumulate and write pcpn if >= F06. write(*,*) 'Six hour precip is not available.' write(*,*) 'Three hour precip not in GFS ensemble.' write(*,*) 'Three hour precip not in GFS ensemble.' write(*,*) 'One hour precip not in GFS ensemble.' write(*,*) 'One hour precip not in GFS ensemble.' c write(*,*) gfunc(1:20),gfuncd(1:20) c write(*,*) glevel(1:20),gleveld(1:20) c write(*,*) gvcord(1:20),gvcordd(1:20) c write(*,*) "Do not need to read gridded data again!" c write(*,*) "Do not need to read gridded data again!" c write(*,*) 'AD: gdfile = ',gdfile write(*,*) 'Looking for the grid directly from the mean file!' write(*,*) 'Field: ',gfunc(1:20) c write(*,*) 'Date: ',gdatim(1:20) write(*,*) 'Level: ',glevel(1:20) write(*,*) 'Vcord: ',gvcord(1:30) write(*,*) 'GEMPAK name: ',gemfld(1:20) c write(*,*) 'Date: ',gdatim(1:20) write(*,*) 'GDFILE: ',gdfile c write(*,*) 'here 1' c write(*,*) 'here 2' c6/14/2005 write(*,*) 'here 2a, proj,garea= ',proj,' ',garea c6/14/2005 write(*,*) 'gdatim,ier= ',gdatim,ier c6/14/2005 write(*,*) 'gdatm2,ier= ',gdatm2,ier c6/14/2005 write(*,*) 'dgfixa ier= ',ier c write(*,*) 'here 2b' c write(*,*) 'here 3' c6/14/2005 write(*,*) 'here 2b, projo,gareao= ',projout,' ',garout c6/14/2005 write(*,*) 'iret= ',iret,' ',projout,' ',garout c6/14/2005 write(*,*) 'kx,ky,ix1,iy1,ix2,iy2= ', c6/14/2005 write(*,*) 'kx,ky,iret= ',kx,ky,iret c write(*,*) 'here 4' write(*,*)'Not ready to calculate accumulated pcpn.' write(*,*)'Pcpn from file: ',gdpcpf(1:60) write(*,*)'Not ready to calculate accumulated pcpn.' write(*,*)'Pcpn from file: ',gdpcpf(1:60) write(*,*)'One hour pcpn is not available.' write(*,*)'Pcpn from file1: ',gdfile(1:60) write(*,*)' Time and field: ',gdatim(1:3),' ',pfld1 if(iret.ne.0) write(*,*) 'WARNING...ERROR IN PCPN...' write(*,*)'Pcpn from file2: ',gdpcpf(1:60) write(*,*)' Time and field: ',pcptim(1:3),' ',pfld2 if(iret.ne.0) write(*,*) 'WARNING...ERROR IN PCPN...' &write(*,*) 'Special approximation for RSM pcpn...' write(*,*)'Not ready to calculate accumulated pcpn.' write(*,*)'Pcpn from file: ',gdpcpf(1:60) write(*,*)'Not ready to calculate accumulated pcpn.' write(*,*)'Pcpn from file: ',gdpcpf(1:60) write(*,*)'Not ready to calculate accumulated pcpn.' write(*,*)'Pcpn from file: ',gdpcpf(1:60) c if(k.eq.4000) write(*,*)'p,t,td= ', c if(k.eq.4000) write(*,*)'p,t,td= ', cdrb write(*,*) '255:0 MUCAPE not found...try 180:0 CAPE' write(*,*) '180:0 MUCAPE not found...try surface CAPE' write(*,*) 'Surface CAPE not found...just set CAPE to 0.' write(*,*) 'special = ',special c write(*,*)'k,u,v,alpha= ',k,upru(i,k),uprv(i,k),uprt(i,k) write(*,*) 'Attempt to read hail area file...' write(*,*) 'SCAPE flag file found...read flags.' c write(*,*) '1st,last in row= ',ikcnt+1,ikcnt+kx c if(jx.eq.141.and.iy.eq.58) write(*,*) uprt(i,k), c write(*,*) 'call nrt for point x,y: ',jx,iy write(*,*) 'special = ',special write(*,*) 'ilayers = ',ilayers c write(*,*) 'geoz,grid',geoz(i,k),grid(k) write(*,*) 'terr special = ',special write(*,*) 'MUCAPE not found...derecho parm set to 0' c write(*,*) 'Assuming highcape routine already called' write(*,*) 'looping k from ibeginc to iendinc' c write(*,*) 'AD Calculating derecho parm' c write(*,*) 'AD calculating mean wind' write(*,*) 'geoz,sfcz',geoz(j,k),sfcz(k) write(*,*) 'dz = ',dz write(*,*) 'gz,sz',geoz(j,k),geoz(j-1,k) write(*,*) 'du,dv,dz,dcnt',du,dv,dz,dcnt c write(*,*) 'AD: wmean= ',wmean c write(*,*) 'AD calculating 6km shr' c write(*,*),'AD: dz,gz,sz ',dz,geoz(j,k),sfcz(k) c write(*,*) 'AD: dz,gz,gz1 ',dz,geoz(j,k),geoz(j-1,k) c write(*,*), 'AD: ip6 = ', ip6 c write(*,*) 'AD: finalizing shear' c write(*,*) 'AD: ip6 = ',ip6 c write(*,*) 'AD: calc decho mem ',imem c write(*,*) 'AD: ending loop, k= ',k write(*,*)'Pcpn from file: ',gdpcpf(1:60) write(*,*)'Pcpn from file: ',gdpcpf(1:60) write(*,*) 'Attempt to read hail area file...' write(*,*) 'HICAPE flag file found...read flags now.' c write(*,*) 'Begin reading data...' c write(*,*) 'Done reading data...' write(*,*) 'terr special = ',special c write(*,*) 'isfc,ipstop= ',isfc,ipstop c write(*,*) 'imixmax,tpar,ppar,dpar=',imixmax,tpar,ppar,dpar c if(hicape.gt.0.)write(*,*) 'hicape= ',hicape c write(*,*) 'k,hicape2,hipres2= ',k,hicape2,hipres2, c write(*,*) 'k,tpar,ppar,dpar= ',k,dbtpar,dbppar,dbdpar c write(*,*) 'i,t,p,d= ',in,dbt(in),dbp(in),dbd(in) write(*,*) 'terr special = ',special c write(*,*) 'here' c write(*,*) 'sfct,tgnd,min,consnow= ', c write(*,*) 'here... k= ',k,grid(k) c if(k.eq.13796)write(*,*) 'k,melt,qm,qa,snodep,swdn,swup c if(k.eq.13796)write(*,*) k,grid(k),qmelt,qavbl, if(k.eq.13796)write(*,*) if(k.eq.13796)write(*,*) iroad,k,grid(k),qmelt,qavbl, write(*,*) 'Attempt to read hail area file...' write(*,*) 'HICAPE flag file found...read flags now.' c6/14/2005 write(*,*) '1. kx,ky,iret= ',kx,ky,iret ! 6/14/2005 c6/14/2005 write(*,*) '2. kx,ky,iret= ',kx,ky,iret ! 6/14/2005 c if(k.eq.4000) write(*,*)'p,t,td= ', c if(k.eq.500) write(*,*) 'i,k,omeg= ',grid(k) write(*,*) 'Attempt to read hail area file...' write(*,*) 'PTYPE flag file found...reading flags now.' c write(*,*) 'Grid Point= ',k c write(*,*) 'k= ',k c write(*,*)phail(jjj),thail(jjj),tdhail(jjj),dirhail(jjj) write(*,*) 'Use previously calculated shear...' write(*,*) 'special = ',special c write(*,*) 'AD: geoz,terr ',geoz(i,k),terr(i) c write(*,*) 'dzfind set to 3000' c write(*,*) 'dz being set to 0' c write(*,*) 'dz set to 0' c write(*,*) 'in j=istart,ilayers-1 i,j= ',i,j c write(*,*) 'in j eq istart if statement' c write(*,*) 'geoz,terr ',geoz(j,i),terr(i) c write(*,*) 'dz set to geoz - terr',dz c write(*,*) 'in j eq istart else statement' c write(*,*) 'dz,gz1,gz ',dz,geoz(j+1,i),geoz(j,i) c write(*,*) 'dz ge dzfind, skipping to next' c write(*,*) 'AD: Did not find zagl data' c write(*,*) 'AD: du,dv = ',du,dv write(*,*) c write(*,*) timarr(1); stop'testing' c write(*,*) 'time array= ',timarr(1) write(*,*) 'Can not find the grid you requested' c write(*,*) 'grid(50*50)= ',grid(50*50) write(*,*) 'Member number acquired... ',imem c write(*,*) 'Corner data... 1,1; kx,1; 1,ky; kx,ky' c write(*,*) grd(1,1,imem),grd(kx,1,imem), write(*,*) ' ' write(*,*) 'Number of ensemble files: ',imem write(*,*) 'This forecast hour: ',gdatim(1:20) write(*,*) 'gdatm= ',gdatm(1)(1:20) write(*,*) 'GEMPAK data transfer OK...' write(*,*) 'Working with individual members...' write(*,*) '!!! Account for missing timelagged Eta now !!!' c gemgrd is the grid to send over to gempak write program... write(*,*) 'Dumping: ', parm(1:10) write(*,*) 'GEMPAK grid write error (code): ', write(*,*) '-4 = file not open' write(*,*) '-5 = no write access' write(*,*) '-6 = read/write error' write(*,*) '-9 = invalid grid size' write(*,*) '-10 = grid already exists' write(*,*) '-11 = grid file is full' write(*,*) 'Calculate mean and standard deviation...' write(*,*) 'Dumping: ', parm(1:10) c gemgrd is the grid to send over to gempak write program... write(*,*) 'GEMPAK grid write error (code): ', write(*,*) '-4 = file not open' write(*,*) '-5 = no write access' write(*,*) '-6 = read/write error' write(*,*) '-9 = invalid grid size' write(*,*) '-10 = grid already exists' write(*,*) '-11 = grid file is full' write(*,*) 'Dumping: ', parm(1:len_trim(parm)) c gemgrd is the grid to send over to gempak write program... write(*,*) 'GEMPAK grid write error (code): ', write(*,*) '-4 = file not open' write(*,*) '-5 = no write access' write(*,*) '-6 = read/write error' write(*,*) '-9 = invalid grid size' write(*,*) '-10 = grid already exists' write(*,*) '-11 = grid file is full' write(*,*) 'Dumping: ', parm(1:10) c gemgrd is the grid to send over to gempak write program... write(*,*) 'GEMPAK grid write error (code): ', write(*,*) '-4 = file not open' write(*,*) '-5 = no write access' write(*,*) '-6 = read/write error' write(*,*) '-9 = invalid grid size' write(*,*) '-10 = grid already exists' write(*,*) '-11 = grid file is full' write(*,*) 'Dumping: ', parm(1:10) c gemgrd is the grid to send over to gempak write program... write(*,*) 'GEMPAK grid write error (code): ', write(*,*) '-4 = file not open' write(*,*) '-5 = no write access' write(*,*) '-6 = read/write error' write(*,*) '-9 = invalid grid size' write(*,*) '-10 = grid already exists' write(*,*) '-11 = grid file is full' write(*,*) 'Dumping: ', parm(1:10) c gemgrd is the grid to send over to gempak write program... write(*,*) 'GEMPAK grid write error (code): ', write(*,*) '-4 = file not open' write(*,*) '-5 = no write access' write(*,*) '-6 = read/write error' write(*,*) '-9 = invalid grid size' write(*,*) '-10 = grid already exists' write(*,*) '-11 = grid file is full' write(*,*) 'Calculate skew and kurtosis...' write(*,*) 'Dumping: ', parm(1:10) c gemgrd is the grid to send over to gempak write program... write(*,*) 'GEMPAK grid write error (code): ', write(*,*) '-4 = file not open' write(*,*) '-5 = no write access' write(*,*) '-6 = read/write error' write(*,*) '-9 = invalid grid size' write(*,*) '-10 = grid already exists' write(*,*) '-11 = grid file is full' write(*,*) 'Dumping: ', parm(1:10) c gemgrd is the grid to send over to gempak write program... write(*,*) 'GEMPAK grid write error (code): ', write(*,*) '-4 = file not open' write(*,*) '-5 = no write access' write(*,*) '-6 = read/write error' write(*,*) '-9 = invalid grid size' write(*,*) '-10 = grid already exists' write(*,*) '-11 = grid file is full' write(*,*) 'Calculate probability matching...' write(*,*) 'Dumping: ', parm(1:10) c gemgrd is the grid to send over to gempak write program... write(*,*) 'GEMPAK grid write error (code): ', write(*,*) '-4 = file not open' write(*,*) '-5 = no write access' write(*,*) '-6 = read/write error' write(*,*) '-9 = invalid grid size' write(*,*) '-10 = grid already exists' write(*,*) '-11 = grid file is full' write(*,*) 'Calculate median...' write(*,*) 'Dumping: ', parm(1:10) c gemgrd is the grid to send over to gempak write program... write(*,*) 'GEMPAK grid write error (code): ', write(*,*) '-4 = file not open' write(*,*) '-5 = no write access' write(*,*) '-6 = read/write error' write(*,*) '-9 = invalid grid size' write(*,*) '-10 = grid already exists' write(*,*) '-11 = grid file is full' write(*,*) 'Dumping: ', parm(1:10) c gemgrd is the grid to send over to gempak write program... write(*,*) 'GEMPAK grid write error (code): ', write(*,*) '-4 = file not open' write(*,*) '-5 = no write access' write(*,*) '-6 = read/write error' write(*,*) '-9 = invalid grid size' write(*,*) '-10 = grid already exists' write(*,*) '-11 = grid file is full' write(*,*) 'Calculate mode...' c if(i.eq.90.and.j.eq.40) write(*,*) c if(i.eq.91.and.j.eq.40) write(*,*) c if(i.eq.90.and.j.eq.41) write(*,*) c if(i.eq.91.and.j.eq.41) write(*,*) write(*,*) 'Dumping: ', parm(1:10) c gemgrd is the grid to send over to gempak write program... write(*,*) 'GEMPAK grid write error (code): ', write(*,*) '-4 = file not open' write(*,*) '-5 = no write access' write(*,*) '-6 = read/write error' write(*,*) '-9 = invalid grid size' write(*,*) '-10 = grid already exists' write(*,*) '-11 = grid file is full' write(*,*) 'Calculate minimum...' write(*,*) 'Dumping: ', parm(1:10) c gemgrd is the grid to send over to gempak write program... write(*,*) 'GEMPAK grid write error (code): ', write(*,*) '-4 = file not open' write(*,*) '-5 = no write access' write(*,*) '-6 = read/write error' write(*,*) '-9 = invalid grid size' write(*,*) '-10 = grid already exists' write(*,*) '-11 = grid file is full' write(*,*) 'Dumping: ', parm(1:10) c gemgrd is the grid to send over to gempak write program... write(*,*) 'GEMPAK grid write error (code): ', write(*,*) '-4 = file not open' write(*,*) '-5 = no write access' write(*,*) '-6 = read/write error' write(*,*) '-9 = invalid grid size' write(*,*) '-10 = grid already exists' write(*,*) '-11 = grid file is full' write(*,*) 'Calculate maximum...' write(*,*) 'Dumping: ', parm(1:10) c gemgrd is the grid to send over to gempak write program... write(*,*) 'GEMPAK grid write error (code): ', write(*,*) '-4 = file not open' write(*,*) '-5 = no write access' write(*,*) '-6 = read/write error' write(*,*) '-9 = invalid grid size' write(*,*) '-10 = grid already exists' write(*,*) '-11 = grid file is full' write(*,*) 'Dumping: ', parm(1:10) c gemgrd is the grid to send over to gempak write program... write(*,*) 'GEMPAK grid write error (code): ', write(*,*) '-4 = file not open' write(*,*) '-5 = no write access' write(*,*) '-6 = read/write error' write(*,*) '-9 = invalid grid size' write(*,*) '-10 = grid already exists' write(*,*) '-11 = grid file is full' write(*,*) 'No probabilistic calculations...' write(*,*) 'Calculate probabilistic information...' c & write(*,*) i,j,k,min,max,prob(i,j),grd(i,j,k),cnta(i,j) write(*,*) 'Dumping: ', parm(1:10) c gemgrd is the grid to send over to gempak write program... write(*,*) 'GEMPAK grid write error (code): ', write(*,*) '-4 = file not open' write(*,*) '-5 = no write access' write(*,*) '-6 = read/write error' write(*,*) '-9 = invalid grid size' write(*,*) '-10 = grid already exists' write(*,*) '-11 = grid file is full' write(*,*) ' ' write(*,*)'** ENSEMBLE FIELDS NOW AVAILABLE IN GEMPAK **' write(*,*) ' ' c write(*,*) 'GEMPAK initialized OK...' c write(*,*) 'GEMPAK initialization error (code): ', write(*,*) 'GEMPAK grid navigation OK...' write(*,*) 'GEMPAK grid navigation error (code): ', c write(*,*) 'name,nsize,block,asize,anal,headsz,max,gnum=', write(*,*) 'GEMPAK grid created OK...' write(*,*) 'GEMPAK grid opened OK...' write(*,*) 'GEMPAK grid open error (code): ', c write(*,*) 'Enter the temperature (C)' c write(*,*) 'Enter the pressure (mb)' c write(*,*) 'Enter the dew point (C)' c write(*,*) 'Enter the height of the mountain to lift the' c write(*,*) 'parcel over (m)' c write(*,*) 'Enter the percent of condensed water removed by ' c write(*,*) 'precipitation during ascent. (For homework, ' c write(*,*) 'you should enter 100 %) ' c write(*,*) 'Initial data entered: T, P, Q, Td= ', c write(*,*) 'td,eg,wg,rh= ',tdc2,eg,wg,test c write(*,*) '** Solutions to Question 3, Part A: ' c write(*,*) ' ' c write(*,*) ' 1. = ',pin, ' in HG' c write(*,*) ' 2. = ',pkp, ' kPA' c write(*,*) ' 3. = ',qkg, ' kg/kg' c write(*,*) ' 4. = ',rg, ' g/kg' c write(*,*) ' 5. = ',rkg-qkg,' kg/kg or ',rg-qg, ' g/kg' c write(*,*) ' which is ',(rg/qg)*100. -100.,' %' c write(*,*) ' 6. = ',tf, ' F' c write(*,*) ' 7. = ',tk, ' K' c write(*,*) ' 8. = ',tvc, ' C' c write(*,*) ' 9. = ',r, ' J/kgK' c write(*,*) '10. = Gas Law: ',rho,' kg/m**3' c write(*,*) ' Pg 8 Approx: ',rho8,' kg/m**3' c write(*,*) '11. = ',ekpa, ' kPA' c write(*,*) '12. = ',pkp-ekpa, ' kPA' c write(*,*) '13. = ',eskpa, ' kPA' c write(*,*) ' Alternate formula for Es= ',esmb2/10.0, ' kPA' c write(*,*) '14. = ',eskpa-ekpa, ' kPA' c write(*,*) '15. = ',rh, ' %' c write(*,*) '16. = Formula from page 7: ',qskg7*1000.,' g/kg' c write(*,*) ' (Exact) equation 8a: ',qskg8a*1000.,' g/kg' c write(*,*) ' (Approx) equation 8b: ',qskg8b*1000.,' g/kg' c write(*,*) 'Differences between the exact and approximate' c write(*,*) 'equations 8a and 8b are due to ignoring the affect' c write(*,*) 'of the (partial) vapor pressure contribution to the' c write(*,*) 'total pressure in 8b, ie, Ptot >> Vapor P. The reason' c write(*,*) 'the formula from page 7 is slightly different is' c write(*,*) 'because it was calculated from the RH, which was' c write(*,*) 'calculated here using the vapor and saturation' c write(*,*) 'vapor pressures, which are not exact.' c write(*,*) '17. = ',tdc,' C' c write(*,*) ' Iterative tech. for Td= ',tdc2, ' C' c write(*,*) '18. = ',lv,' MJ/kg' c write(*,*) '19. = ',dqsdt*1000.0,' g/kgK' c write(*,*) '20. = Dry adiabatic lapse rate: ',lrd*1000.,' C/km' c write(*,*) ' Sat. adiabatic lapse rate: ',lrm*1000.,' C/km' c write(*,*) '21. = Pot. Temp: ',theta,' K = ',theta-273.155,' C' c write(*,*) ' Virt. Pot. Temp: ',thetav,' K = ', c write(*,*) 'lcl= ',lcl c write(*,*) 'early exit due to thetae condition...',pmb,' mb' c write(*,309) 't,td,p,h,te,rh = ',newt,newtd,newp,newh, cc write(*,*) '*** ABOVE LINE IS LCL ***' c write(*,*) 'Did not converge on RH' c write(*,*) ' ' c write(*,*) '** Solutions to Question 3, Part b: ' c write(*,*) ' ' c write(*,*) '22. = ',liftm,' m (from dry adiabatic lapse rate)' c write(*,*) ' ',liftmh,' m (from hypsometric equation)' c write(*,*) '23. = ',newp/10.,' kPA' c write(*,*) '24. = ','Temp = ',newt,' C' c write(*,*) ' ','Dew pt= ',newtd, ' C' c write(*,*) ' ','Virt T= ',newtv, ' C' c write(*,*) '25. = ','Pot. temp = ',newth-273.155,' C' c write(*,*) ' ','Virt Pot. temp= ',newthv-273.155,' C' c write(*,*) '26. = ',newq*1000.,' g/kg' c write(*,*) '27. = ',newdq*1000.0,' g/kgK' c write(*,*) '28. = ',newrh,' %' c write(*,*) '29. = ',newe/10.0,' kPA' c write(*,*) '30. = ',newlv,' MJ/kg' c write(*,*) '31. = ',newlrm*1000.,' C/km' c write(*,*) 'FYI...thetae= ',thetae c write(*,*) 'e,p,t,r= ',newe,newp,newt,newr c write(*,*) 'newt,newtv= ',newt,newtv c write(*,309) 't,td,p,h,te,rh = ',newt,newtd,newp,newh, c write(*,*) pup(i),tvup(i) c write(*,*) 'pres= ',rp c write(*,*) 'upcnt,ipcnt,newcnt= ',upcnt,ipcnt,ipcnt+upcnt-1 c write(*,*)'tvj,tvj+1,pj,pj+1,p,tv= ',tvenv(j), c write(*,*) 'lcl,lfc,cin,cape,eqlvl= ',plcl,lfc,cin,cape, c write(*,*) ' ' c write(*,*) '******************************************* ' c write(*,*) 'Read in vertical wind (w) or set to zero (z)?' c write(*,*) 'i,p,wet bulb= ',i,ppp(i),wet(i),ttt(i)-ddd(i) c write(*,714) 'ibot,itop,dp,dpgap,dep1,dep2,p1,p2= ', c write(*,*) 'dp,dpgap,dpgap2= ',dp,dpgap,dpgap2 c write(*,*) 'istart,istop= ',ibot,itop c write(*,*) 'TOTAL Cloud layer= ',ppp(ibot),' to ',ppp(itop) c write(*,*) 'Precip Type (none)= ',ptype c write(*,*) 'i,wet,snow,ice= ',i,wet(i),snow,ice c write(*,*) 'snow,ice= ',snow,ice c write(*,*) 'here' c write(*,*) 'Precip Type (snow)= ',ptype c write(*,*) 'Precip Type (freezing rain)= ',ptype c write(*,*) 'freeze,frzlvl,i,wet= ',freeze,frzlvl,i,wet(i) c write(*,*) 'Number of 0 degC crossings= ',frzlvl c write(*,*) 'Precip Type (rain)= ',ptype c write(*,*) 'Precip Type (snow)= ',ptype c write(*,*) 'i,wet= ',i,wet(i) c write(*,*) 'Total depth of warm layer (m)= ',ztot c write(*,*) 'Average temp of warm layer (C)= ',tave c write(*,*) 'Average UVV in warm layer (cm/s)= ',wave c write(*,*) 'Precip Type (freezing rain)= ',ptype c write(*,*) 'Precip Type (rain)= ',ptype c write(*,*) 'Precip Type (ice pellets)= ',ptype c write(*,*) 'Precip Type (rain)= ',ptype c write(*,*) 'Precip Type (mixed)= ',ptype c write(*,*) 'Precip Type (rain)= ',ptype c write(*,*) 'Warning...did not identify a precipation type!' c write(*,*) 'Residence time in warm layer is= ', tres c write(*,*) 'ta,tmelt= ',ta,tmelt*coef c write(*,*) 'Time to melt droplet= ',tmelt c write(*,*) 'Tao coefficient= ',tao c write(*,*) 'Probability of total melting= ',frrain c write(*,*) 'Probability of ice pellets= ',sleet c write(*,*) 'a,ir,a-ir= ',a,ir,a-ir c write(*,*) 'ka, lv*dv= ',ka*(tenv - amb), c write(*,*)'tenv,amb,rhosenv,rhosa= ',tenv,amb,rhosenv,rhosa c write(*,*) 'lhs,rhs,diff= ',lhs,rhs,diff write(*,*) 'Warning...could not find level to calc shear' write(*,*) 'Looking for pstart,peq2= ',pstart,peq2 c write(*,*) 'i,pres= ',ibug,prcape(ibug) c write(*,*) 'Enter t,td,and p to calculate dcape from...' c write(*,*) '(Level should be above the surface and saturated)' c write(*,*) 'T,Td,Tw= ',ttt(i),ddd(i),wetbulb c write(*,*) 'p,theta-w= ',ppp(i),wetbulb c write(*,*) 'LCL= ',lcl c write(*,*) 'CIN= ',cin c write(*,*) 'LFC= ',lfc c write(*,*) 'CAPE= ',cape c write(*,*) 'Eqlvl, Temp= ', eqlvl, teql c write(*,*) 'Enter the temperature (C)' c write(*,*) 'Enter the pressure (mb)' c write(*,*) 'Enter the dew point (C)' c write(*,*) 'Enter the height of the mountain to lift the' c write(*,*) 'parcel over (m)' c write(*,*) 'Enter the percent of condensed water removed by ' c write(*,*) 'precipitation during ascent. (For homework, ' c write(*,*) 'you should enter 100 %) ' c write(*,*) 'Initial data entered: T, P, Q, Td= ', c write(*,*) 'td,eg,wg,rh= ',tdc2,eg,wg,test c write(*,*) '** Solutions to Question 3, Part A: ' c write(*,*) ' ' c write(*,*) ' 1. = ',pin, ' in HG' c write(*,*) ' 2. = ',pkp, ' kPA' c write(*,*) ' 3. = ',qkg, ' kg/kg' c write(*,*) ' 4. = ',rg, ' g/kg' c write(*,*) ' 5. = ',rkg-qkg,' kg/kg or ',rg-qg, ' g/kg' c write(*,*) ' which is ',(rg/qg)*100. -100.,' %' c write(*,*) ' 6. = ',tf, ' F' c write(*,*) ' 7. = ',tk, ' K' c write(*,*) ' 8. = ',tvc, ' C' c write(*,*) ' 9. = ',r, ' J/kgK' c write(*,*) '10. = Gas Law: ',rho,' kg/m**3' c write(*,*) ' Pg 8 Approx: ',rho8,' kg/m**3' c write(*,*) '11. = ',ekpa, ' kPA' c write(*,*) '12. = ',pkp-ekpa, ' kPA' c write(*,*) '13. = ',eskpa, ' kPA' c write(*,*) ' Alternate formula for Es= ',esmb2/10.0, ' kPA' c write(*,*) '14. = ',eskpa-ekpa, ' kPA' c write(*,*) '15. = ',rh, ' %' c write(*,*) '16. = Formula from page 7: ',qskg7*1000.,' g/kg' c write(*,*) ' (Exact) equation 8a: ',qskg8a*1000.,' g/kg' c write(*,*) ' (Approx) equation 8b: ',qskg8b*1000.,' g/kg' c write(*,*) 'Differences between the exact and approximate' c write(*,*) 'equations 8a and 8b are due to ignoring the affect' c write(*,*) 'of the (partial) vapor pressure contribution to the' c write(*,*) 'total pressure in 8b, ie, Ptot >> Vapor P. The reason' c write(*,*) 'the formula from page 7 is slightly different is' c write(*,*) 'because it was calculated from the RH, which was' c write(*,*) 'calculated here using the vapor and saturation' c write(*,*) 'vapor pressures, which are not exact.' c write(*,*) '17. = ',tdc,' C' c write(*,*) ' Iterative tech. for Td= ',tdc2, ' C' c write(*,*) '18. = ',lv,' MJ/kg' c write(*,*) '19. = ',dqsdt*1000.0,' g/kgK' c write(*,*) '20. = Dry adiabatic lapse rate: ',lrd*1000.,' C/km' c write(*,*) ' Sat. adiabatic lapse rate: ',lrm*1000.,' C/km' c write(*,*) '21. = Pot. Temp: ',theta,' K = ',theta-273.155,' C' c write(*,*) ' Virt. Pot. Temp: ',thetav,' K = ', c write(*,*) 'lcl= ',lcl c write(*,309) 't,td,p,h,te,rh = ',newt,newtd,newp,newh, cc write(*,*) '*** ABOVE LINE IS LCL ***' c write(*,*) 'Did not converge on RH' c write(*,*) ' ' c write(*,*) '** Solutions to Question 3, Part b: ' c write(*,*) ' ' c write(*,*) '22. = ',liftm,' m (from dry adiabatic lapse rate)' c write(*,*) ' ',liftmh,' m (from hypsometric equation)' c write(*,*) '23. = ',newp/10.,' kPA' c write(*,*) '24. = ','Temp = ',newt,' C' c write(*,*) ' ','Dew pt= ',newtd, ' C' c write(*,*) ' ','Virt T= ',newtv, ' C' c write(*,*) '25. = ','Pot. temp = ',newth-273.155,' C' c write(*,*) ' ','Virt Pot. temp= ',newthv-273.155,' C' c write(*,*) '26. = ',newq*1000.,' g/kg' c write(*,*) '27. = ',newdq*1000.0,' g/kgK' c write(*,*) '28. = ',newrh,' %' c write(*,*) '29. = ',newe/10.0,' kPA' c write(*,*) '30. = ',newlv,' MJ/kg' c write(*,*) '31. = ',newlrm*1000.,' C/km' c write(*,*) 'FYI...thetae= ',thetae c write(*,*) 'e,p,t,r= ',newe,newp,newt,newr c write(*,*) 'newt,newtv,newp= ',newt,newtv,newp c write(*,309) 't,td,p,h,te,rh = ',newt,newtd,newp,newh, c write(*,*) pup(i),tvup(i) c write(*,*)'tvj,tvj+1,pj,pj+1,p,tv= ',tvenv(j), c write(*,*)'tvj,tvj+1,pj,pj+1,p,tv= ',tvenv(j), c write(*,*) 'lcl,lfc,cin,cape,eqlvl= ',plcl,lfc,cin,cape, c write(*,*) ' ' c write(*,*) '******************************************* ' c write(*,*) ' ' c write(*,*) ' UPDRAFT ' c write(*,*) 'Enter the number of layers to mix as the parcel...' c write(*,*) 'LCL= ',lcl c write(*,*) 'T LCL= ',tlcl c write(*,*) 'CIN= ',cin c write(*,*) 'LFC= ',lfc c write(*,*) 'CAPE= ',cape c write(*,*) 'Eqlvl, Temp= ', eqlvl, teql c write(*,*) 'Rainfall= ',pcpn, ' mm or ',pcpn/25.4,' in' c write(*,*) ' ' c write(*,*) ' DOWNDRAFT ' c write(*,*) 'LCL= ',lcl c write(*,*) 'CIN= ',cin c write(*,*) 'LFC= ',lfc c write(*,*) 'DCAPE= ',cape c write(*,*) 'Eqlvl, Temp= ', eqlvl c write(*,*) 'Evaporation= ',evap, ' mm or ',evap/25.4,' in' c write(*,*) 'Lvl of total evap= ',evlvl c write(*,*) 'Max gust (mph)= ',((2.*cape)**0.5)*2.24,' + sfc wnd' c write(*,*) 'No downdraft to calculate' c write(*,*) 'Enter the temperature (C)' c write(*,*) 'Enter the pressure (mb)' c write(*,*) 'Enter the dew point (C)' c write(*,*) 'Enter the height of the mountain to lift the' c write(*,*) 'parcel over (m)' c write(*,*) 'Enter the percent of condensed water removed by ' c write(*,*) 'precipitation during ascent. (For homework, ' c write(*,*) 'you should enter 100 %) ' c write(*,*) 'Initial data entered: T, P, Q, Td= ', c write(*,*) 'td,eg,wg,rh= ',tdc2,eg,wg,test c write(*,*) '** Solutions to Question 3, Part A: ' c write(*,*) ' ' c write(*,*) ' 1. = ',pin, ' in HG' c write(*,*) ' 2. = ',pkp, ' kPA' c write(*,*) ' 3. = ',qkg, ' kg/kg' c write(*,*) ' 4. = ',rg, ' g/kg' c write(*,*) ' 5. = ',rkg-qkg,' kg/kg or ',rg-qg, ' g/kg' c write(*,*) ' which is ',(rg/qg)*100. -100.,' %' c write(*,*) ' 6. = ',tf, ' F' c write(*,*) ' 7. = ',tk, ' K' c write(*,*) ' 8. = ',tvc, ' C' c write(*,*) ' 9. = ',r, ' J/kgK' c write(*,*) '10. = Gas Law: ',rho,' kg/m**3' c write(*,*) ' Pg 8 Approx: ',rho8,' kg/m**3' c write(*,*) '11. = ',ekpa, ' kPA' c write(*,*) '12. = ',pkp-ekpa, ' kPA' c write(*,*) '13. = ',eskpa, ' kPA' c write(*,*) ' Alternate formula for Es= ',esmb2/10.0, ' kPA' c write(*,*) '14. = ',eskpa-ekpa, ' kPA' c write(*,*) '15. = ',rh, ' %' c write(*,*) '16. = Formula from page 7: ',qskg7*1000.,' g/kg' c write(*,*) ' (Exact) equation 8a: ',qskg8a*1000.,' g/kg' c write(*,*) ' (Approx) equation 8b: ',qskg8b*1000.,' g/kg' c write(*,*) 'Differences between the exact and approximate' c write(*,*) 'equations 8a and 8b are due to ignoring the affect' c write(*,*) 'of the (partial) vapor pressure contribution to the' c write(*,*) 'total pressure in 8b, ie, Ptot >> Vapor P. The reason' c write(*,*) 'the formula from page 7 is slightly different is' c write(*,*) 'because it was calculated from the RH, which was' c write(*,*) 'calculated here using the vapor and saturation' c write(*,*) 'vapor pressures, which are not exact.' c write(*,*) '17. = ',tdc,' C' c write(*,*) ' Iterative tech. for Td= ',tdc2, ' C' c write(*,*) '18. = ',lv,' MJ/kg' c write(*,*) '19. = ',dqsdt*1000.0,' g/kgK' c write(*,*) '20. = Dry adiabatic lapse rate: ',lrd*1000.,' C/km' c write(*,*) ' Sat. adiabatic lapse rate: ',lrm*1000.,' C/km' c write(*,*) '21. = Pot. Temp: ',theta,' K = ',theta-273.155,' C' c write(*,*) ' Virt. Pot. Temp: ',thetav,' K = ', c write(*,*) 'lcl= ',lcl c write(*,309) 't,td,p,h,te,rh = ',newt,newtd,newp,newh, cc write(*,*) '*** ABOVE LINE IS LCL ***' c write(*,*) 'Did not converge on RH' c write(*,*) ' ' c write(*,*) '** Solutions to Question 3, Part b: ' c write(*,*) ' ' c write(*,*) '22. = ',liftm,' m (from dry adiabatic lapse rate)' c write(*,*) ' ',liftmh,' m (from hypsometric equation)' c write(*,*) '23. = ',newp/10.,' kPA' c write(*,*) '24. = ','Temp = ',newt,' C' c write(*,*) ' ','Dew pt= ',newtd, ' C' c write(*,*) ' ','Virt T= ',newtv, ' C' c write(*,*) '25. = ','Pot. temp = ',newth-273.155,' C' c write(*,*) ' ','Virt Pot. temp= ',newthv-273.155,' C' c write(*,*) '26. = ',newq*1000.,' g/kg' c write(*,*) '27. = ',newdq*1000.0,' g/kgK' c write(*,*) '28. = ',newrh,' %' c write(*,*) '29. = ',newe/10.0,' kPA' c write(*,*) '30. = ',newlv,' MJ/kg' c write(*,*) '31. = ',newlrm*1000.,' C/km' c write(*,*) 'FYI...thetae= ',thetae c write(*,*) 'e,p,t,r= ',newe,newp,newt,newr c write(*,*) 'newt,newtv,newp= ',newt,newtv,newp c write(*,309) 't,td,p,h,te,rh = ',newt,newtd,newp,newh, c write(*,*) pup(i),tvup(i) c write(*,*)'tvj,tvj+1,pj,pj+1,p,tv= ',tvenv(j), c write(*,*)'tvj,tvj+1,pj,pj+1,p,tv= ',tvenv(j), c write(*,*) 'parcel q, env q= ',qlost,qsenvi c write(*,*) 'p,t,e= ',pup(i),tvup(i),liq c write(*,*) 'All precip has now evaporated!!!' c write(*,*) 'pres= ',pup(jj) c write(*,*) 'evap= ',liq c write(*,*) 'lcl,lfc,cin,cape,eqlvl= ',plcl,lfc,cin,cape, c write(*,*) ' ' c write(*,*) '******************************************* ' c write(*,*) 'Enter the temperature (C)' c write(*,*) 'Enter the pressure (mb)' c write(*,*) 'Enter the dew point (C)' c write(*,*) 'Enter the height of the mountain to lift the' c write(*,*) 'parcel over (m)' c write(*,*) 'Enter the percent of condensed water removed by ' c write(*,*) 'precipitation during ascent. (For homework, ' c write(*,*) 'you should enter 100 %) ' c write(*,*) 'Initial data entered: T, P, Q, Td= ', c write(*,*) 'td,eg,wg,rh= ',tdc2,eg,wg,test c write(*,*) '** Solutions to Question 3, Part A: ' c write(*,*) ' ' c write(*,*) ' 1. = ',pin, ' in HG' c write(*,*) ' 2. = ',pkp, ' kPA' c write(*,*) ' 3. = ',qkg, ' kg/kg' c write(*,*) ' 4. = ',rg, ' g/kg' c write(*,*) ' 5. = ',rkg-qkg,' kg/kg or ',rg-qg, ' g/kg' c write(*,*) ' which is ',(rg/qg)*100. -100.,' %' c write(*,*) ' 6. = ',tf, ' F' c write(*,*) ' 7. = ',tk, ' K' c write(*,*) ' 8. = ',tvc, ' C' c write(*,*) ' 9. = ',r, ' J/kgK' c write(*,*) '10. = Gas Law: ',rho,' kg/m**3' c write(*,*) ' Pg 8 Approx: ',rho8,' kg/m**3' c write(*,*) '11. = ',ekpa, ' kPA' c write(*,*) '12. = ',pkp-ekpa, ' kPA' c write(*,*) '13. = ',eskpa, ' kPA' c write(*,*) ' Alternate formula for Es= ',esmb2/10.0, ' kPA' c write(*,*) '14. = ',eskpa-ekpa, ' kPA' c write(*,*) '15. = ',rh, ' %' c write(*,*) '16. = Formula from page 7: ',qskg7*1000.,' g/kg' c write(*,*) ' (Exact) equation 8a: ',qskg8a*1000.,' g/kg' c write(*,*) ' (Approx) equation 8b: ',qskg8b*1000.,' g/kg' c write(*,*) 'Differences between the exact and approximate' c write(*,*) 'equations 8a and 8b are due to ignoring the affect' c write(*,*) 'of the (partial) vapor pressure contribution to the' c write(*,*) 'total pressure in 8b, ie, Ptot >> Vapor P. The reason' c write(*,*) 'the formula from page 7 is slightly different is' c write(*,*) 'because it was calculated from the RH, which was' c write(*,*) 'calculated here using the vapor and saturation' c write(*,*) 'vapor pressures, which are not exact.' c write(*,*) '17. = ',tdc,' C' c write(*,*) ' Iterative tech. for Td= ',tdc2, ' C' c write(*,*) '18. = ',lv,' MJ/kg' c write(*,*) '19. = ',dqsdt*1000.0,' g/kgK' c write(*,*) '20. = Dry adiabatic lapse rate: ',lrd*1000.,' C/km' c write(*,*) ' Sat. adiabatic lapse rate: ',lrm*1000.,' C/km' c write(*,*) '21. = Pot. Temp: ',theta,' K = ',theta-273.155,' C' c write(*,*) ' Virt. Pot. Temp: ',thetav,' K = ', c write(*,*) 'lcl= ',lcl c write(*,309) 't,td,p,h,te,rh = ',newt,newtd,newp,newh, cc write(*,*) '*** ABOVE LINE IS LCL ***' c write(*,*) 'Did not converge on RH' c write(*,*) ' ' c write(*,*) '** Solutions to Question 3, Part b: ' c write(*,*) ' ' c write(*,*) '22. = ',liftm,' m (from dry adiabatic lapse rate)' c write(*,*) ' ',liftmh,' m (from hypsometric equation)' c write(*,*) '23. = ',newp/10.,' kPA' c write(*,*) '24. = ','Temp = ',newt,' C' c write(*,*) ' ','Dew pt= ',newtd, ' C' c write(*,*) ' ','Virt T= ',newtv, ' C' c write(*,*) '25. = ','Pot. temp = ',newth-273.155,' C' c write(*,*) ' ','Virt Pot. temp= ',newthv-273.155,' C' c write(*,*) '26. = ',newq*1000.,' g/kg' c write(*,*) '27. = ',newdq*1000.0,' g/kgK' c write(*,*) '28. = ',newrh,' %' c write(*,*) '29. = ',newe/10.0,' kPA' c write(*,*) '30. = ',newlv,' MJ/kg' c write(*,*) '31. = ',newlrm*1000.,' C/km' c write(*,*) 'FYI...thetae= ',thetae c write(*,*) 'e,p,t,r= ',newe,newp,newt,newr c write(*,*) 'newt,newtv= ',newt,newtv c write(*,309) 't,td,p,h,te,rh = ',newt,newtd,newp,newh, c write(*,*) pup(i),tvup(i) c write(*,*) 'pres= ',rp c write(*,*) 'upcnt,ipcnt,newcnt= ',upcnt,ipcnt,ipcnt+upcnt-1 c write(*,*) i,pup(i) c write(*,*)'tvj,tvj+1,pj,pj+1,p,tv= ',tvenv(j), c write(*,*) 'p,cin,cin2= ',pup(i),cin,cin2,tvpar,envtv c write(*,*) 'q,p,rain(in)= ',qup(i)*1000.,pup(i),liq/25.4 c write(*,*) ' ' c write(*,*) 'rain (in)= ',liq/25.4 c write(*,*) 'lcl,lfc,cin,cape,eqlvl= ',plcl,lfc,cin,cape, c write(*,*) ' ' c write(*,*) '******************************************* ' c write(*,*) 'Enter the file with the data...' c write(*,*) 'rannum= ',rannum c write(*,*) 'Number of points read in: ',n c write(*,*) 'Unsorted data points: 1-',n c write(*,72) i,data(i),i c write(*,*) 'Sorted data points: 1-',n c write(*,72) i,data(i),indxdat(i) c write(*,*) est(i) c write(*,*) 'mode fnd= ',tie,px(i) c write(*,*) ' ' c write(*,73) 'The mode is estimated to be: ',modef c write(*,73) 'The width of the window used was: ',float(j) c write(*,*) ' ' c write(*,*) 'Members used in mode= ',indxdat(i) c write(*,*) 'runs= ',runs ccc write(*,*) 'Enter albedo,julian day, lat, lon (-degW)...' c write(*,*) 'For example, in paper I used: .40 180 33.43' c write(*,*) 'Note: PHX=33.43; TUS=32.11)' ccc write(*,*) 'Enter tenths of low, mid, and high clouds...' ccc write(*,*) 'For example, enter: 0 2 2' ccc write(*,*) '(Completely overcast is: 10 10 10)' ccc write(*,*) 'Enter boundary layer temperature, Tw (degF)...' ccc write(*,*) 'Enter ground temperature, Tg (degF)...' write(*,*) '** Calculations based on: ' write(*,*) 'Solar Constant= ',solcon write(*,*) 'Day= ',aveday write(*,*) 'Time= ',time write(*,*) 'Albedo= ',albedo write(*,*) 'Latitude= ',latpt write(*,*) 'Longitude= ',lonpt write(*,*) 'Low cloud percent= ',frlow*100. write(*,*) 'Mid cloud percent= ',frmid*100. write(*,*) 'High cloud percent= ',frhig*100. write(*,*) ' ' ccc write(*,7)'Time,srad,irad,net,sapr=',itime,sradmax,irad,net,sapr c write(*,*)'sinpsi,tk,sda= ',sinpsi,tk,sda c write(*,*)' ' cccccccc write(*,*) 'Time= ',itime, ' Insolation= ',sradmax c write(*,100) (store(i),i=1,24) c write(*,*) 'Required= ',numpts(1:3) c write(*,*) 'x,y,z,newx,newy,newz,omega= ', cc write(*,*) 'Bisection not converging...quit trying.' c write(*,45)'icnt2,icnt,sorig,snew,res,daxis,dint,ilef,ibot= ', c write(*,*) rintu,rintv,alpha,res(icnt),sorig2,jx,iy,timerun c write(*,*) 'daxis,dispx,dispy= ',daxis,dispx,dispy c write(*,*) 'sorig,snew,min,rjx,riy,rxtmp,rytmp,minx,miny= ', c write(*,*) 'model runtime= ',timerun c write(*,*) 'newlat,timestep= ',newlat,timerun c write(*,*) 'daxis,dispx,dispy= ',daxis,dispx,dispy c write(*,*) 'sorig,snew,min,rjx,riy,rxtmp,rytmp,minx,miny= ', c write(*,*) 'reset= ',dt,omega,alpha,rjx,riy,rkz,sprev c write(*,*) 'need to look at timestep...' c write(*,*) 'alpha,alphap,gamma= ',alpha,alphap,gamma c write(*,*) 'ALPHA OK...' c write the output trajectory to disk for plotting... ccccc write(7,*) '9999' ccccc write(7,*) jx,iy ccccc write(7,333) plat(i),plon(i),pp(i),tm(i),td(i) c write(*,*) 'i,p,t,td,scape= ',i,pp(i),tm(i),td(i),hicape c write(*,*) 'i,p,t,td,cp,cn,lcl,lfc= ',i,pp(i),tm(i),td(i), c write(*,*) 'Enter lat,lon: ' c write(*,*) 'xlat,xlong= ',xlat,xlong c write(*,*) 'iy,jx= ',y,x c write(*,*) i,stcprm(i)