summaryrefslogtreecommitdiff
path: root/lib/plotsave.f90
diff options
context:
space:
mode:
authorChristoph Berg <myon@debian.org>2026-04-07 19:02:45 +0200
committerChristoph Berg <myon@debian.org>2026-04-07 19:02:45 +0200
commitf647d78463c1250ce9c99af664615fafccf5e959 (patch)
tree5b00428cef68aef1c9d407e2d4535687422419b6 /lib/plotsave.f90
parent0a13f1fdb9928b6d012569dd65f7f6ef18fac2f8 (diff)
New upstream version 3.0.0upstream/3.0.0
Diffstat (limited to 'lib/plotsave.f90')
-rw-r--r--[-rwxr-xr-x]lib/plotsave.f9068
1 files changed, 34 insertions, 34 deletions
diff --git a/lib/plotsave.f90 b/lib/plotsave.f90
index 5c34a306..ee1a41cf 100755..100644
--- a/lib/plotsave.f90
+++ b/lib/plotsave.f90
@@ -1,34 +1,34 @@
-subroutine plotsave(swide,nw,nh,irow)
-
- real, dimension(:,:), allocatable :: sw
- real swide(0:nw-1)
- data nw0/-1/,nh0/-1/
- save nw0,nh0,sw
-
- if(irow.eq.-99) then
- if(allocated(sw)) deallocate(sw)
- go to 900
- endif
-
- if(nw.ne.nw0 .or. nh.ne.nh0 .or. (.not.allocated(sw))) then
- if(allocated(sw)) deallocate(sw)
-! if(nw0.ne.-1) deallocate(sw)
- allocate(sw(0:nw-1,0:nh-1))
- sw=0.
- nw0=nw
- nh0=nh
- endif
- df=12000.0/16384
- if(irow.lt.0) then
-! 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)
- enddo
- sw(0:nw-1,0)=swide
- else
-! Return the saved "irow" as swide(), for a waterfall replot.
- swide=sw(0:nw-1,irow)
- endif
-
-900 return
-end subroutine plotsave
+subroutine plotsave(swide,nw,nh,irow)
+
+ real, dimension(:,:), allocatable :: sw
+ real swide(0:nw-1)
+ data nw0/-1/,nh0/-1/
+ save nw0,nh0,sw
+
+ if(irow.eq.-99) then
+ if(allocated(sw)) deallocate(sw)
+ go to 900
+ endif
+
+ if(nw.ne.nw0 .or. nh.ne.nh0 .or. (.not.allocated(sw))) then
+ if(allocated(sw)) deallocate(sw)
+! if(nw0.ne.-1) deallocate(sw)
+ allocate(sw(0:nw-1,0:nh-1))
+ sw=0.
+ nw0=nw
+ nh0=nh
+ endif
+ df=12000.0/16384
+ if(irow.lt.0) then
+! 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)
+ enddo
+ sw(0:nw-1,0)=swide
+ else
+! Return the saved "irow" as swide(), for a waterfall replot.
+ swide=sw(0:nw-1,irow)
+ endif
+
+900 return
+end subroutine plotsave