| 
									
										
										
										
											2018-01-17 16:41:07 +00:00
										 |  |  | subroutine plotsave(swide,nw,nh,irow)
 | 
					
						
							| 
									
										
										
										
											2018-01-12 20:40:15 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-01-17 16:41:07 +00:00
										 |  |  |   real, dimension(:,:), allocatable :: sw
 | 
					
						
							|  |  |  |   real swide(0:nw-1)
 | 
					
						
							|  |  |  |   data nw0/-1/,nh0/-1/
 | 
					
						
							|  |  |  |   save nw0,nh0,sw
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-01-17 17:56:01 +00:00
										 |  |  |   if(irow.eq.-99) then
 | 
					
						
							|  |  |  |      if(allocated(sw)) deallocate(sw)
 | 
					
						
							| 
									
										
										
										
											2018-01-26 18:41:09 +00:00
										 |  |  |      go to 900
 | 
					
						
							| 
									
										
										
										
											2018-01-17 17:56:01 +00:00
										 |  |  |   endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-01-26 18:41:09 +00:00
										 |  |  |   if(nw.ne.nw0 .or. nh.ne.nh0 .or. (.not.allocated(sw))) then
 | 
					
						
							| 
									
										
										
										
											2018-01-17 18:08:15 +00:00
										 |  |  |      if(allocated(sw)) deallocate(sw)
 | 
					
						
							|  |  |  | !     if(nw0.ne.-1) deallocate(sw)
 | 
					
						
							| 
									
										
										
										
											2018-01-17 16:41:07 +00:00
										 |  |  |      allocate(sw(0:nw-1,0:nh-1))
 | 
					
						
							|  |  |  |      sw=0.
 | 
					
						
							|  |  |  |      nw0=nw
 | 
					
						
							|  |  |  |      nh0=nh
 | 
					
						
							|  |  |  |   endif
 | 
					
						
							| 
									
										
										
										
											2018-01-17 15:32:45 +00:00
										 |  |  |   df=12000.0/16384
 | 
					
						
							| 
									
										
										
										
											2018-01-12 20:40:15 +00:00
										 |  |  |   if(irow.lt.0) then
 | 
					
						
							| 
									
										
										
										
											2018-01-17 16:41:07 +00:00
										 |  |  | ! Push a new row of data into sw
 | 
					
						
							|  |  |  |      do j=nh-1,1,-1
 | 
					
						
							|  |  |  |         sw(0:nw-1,j)=sw(0:nw-1,j-1)
 | 
					
						
							| 
									
										
										
										
											2018-01-17 15:32:45 +00:00
										 |  |  |      enddo
 | 
					
						
							| 
									
										
										
										
											2018-01-17 16:41:07 +00:00
										 |  |  |      sw(0:nw-1,0)=swide
 | 
					
						
							| 
									
										
										
										
											2018-01-12 20:40:15 +00:00
										 |  |  |   else
 | 
					
						
							| 
									
										
										
										
											2018-01-17 16:41:07 +00:00
										 |  |  | ! Return the saved "irow" as swide(), for a waterfall replot.
 | 
					
						
							|  |  |  |      swide=sw(0:nw-1,irow)
 | 
					
						
							| 
									
										
										
										
											2018-01-12 20:40:15 +00:00
										 |  |  |   endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-01-26 18:41:09 +00:00
										 |  |  | 900 return
 | 
					
						
							| 
									
										
										
										
											2018-01-12 20:40:15 +00:00
										 |  |  | end subroutine plotsave
 |