Clawpack git diffs...

===========
classic
===========
/Users/rjl/clawpack_src/clawpack_master/classic



===========
amrclaw
===========
/Users/rjl/clawpack_src/clawpack_master/amrclaw

diff --git a/tests/advection_2d_square/regression_data/claw_git_diffs.txt b/tests/advection_2d_square/regression_data/claw_git_diffs.txt
index 5d20b91..e69de29 100644
--- a/tests/advection_2d_square/regression_data/claw_git_diffs.txt
+++ b/tests/advection_2d_square/regression_data/claw_git_diffs.txt
@@ -1,49 +0,0 @@
-Clawpack git diffs...
-
-===========
-classic
-===========
-/Users/rjl/git/clawpack/classic
-
-
-
-===========
-amrclaw
-===========
-/Users/rjl/git/clawpack/amrclaw
-
-
-
-===========
-clawutil
-===========
-/Users/rjl/git/clawpack/clawutil
-
-
-
-===========
-pyclaw
-===========
-/Users/rjl/git/clawpack/pyclaw
-
-
-
-===========
-visclaw
-===========
-/Users/rjl/git/clawpack/visclaw
-
-
-
-===========
-riemann
-===========
-/Users/rjl/git/clawpack/riemann
-
-
-
-===========
-geoclaw
-===========
-/Users/rjl/git/clawpack/geoclaw
-
diff --git a/tests/advection_2d_square/regression_data/claw_git_status.txt b/tests/advection_2d_square/regression_data/claw_git_status.txt
index 1e3ae1c..15ca5bc 100644
--- a/tests/advection_2d_square/regression_data/claw_git_status.txt
+++ b/tests/advection_2d_square/regression_data/claw_git_status.txt
@@ -1,18 +1,18 @@
 Clawpack Git Status 
-Diffs can be found in /Users/rjl/git/clawpack/amrclaw/tests/advection_2d_square/regression_data/claw_git_diffs.txt
+Diffs can be found in /Users/rjl/clawpack_src/clawpack_master/amrclaw/tests/advection_2d_square/regression_data/claw_git_diffs.txt
 
-Sun, 09 Oct 2016 09:24:09 PDT
-$CLAW = /Users/rjl/git/clawpack
+Sun, 16 Feb 2020 17:55:54 PST
+$CLAW = /Users/rjl/clawpack_src/clawpack_master
 $FC = gfortran
 
 
 ===========
 classic
 ===========
-/Users/rjl/git/clawpack/classic
+/Users/rjl/clawpack_src/clawpack_master/classic
 
 --- last commit ---
-31c9723 Merge pull request #74 from rjleveque/regression_claw_git_status
+5546fec Merge pull request #86 from ClimateImpactLab/gitignore
 
 --- branch and status ---
 ## master...origin/master
@@ -21,34 +21,39 @@ classic
 ===========
 amrclaw
 ===========
-/Users/rjl/git/clawpack/amrclaw
+/Users/rjl/clawpack_src/clawpack_master/amrclaw
 
 --- last commit ---
-6e5519e added claw_git status files to a test
+7ce7cb4 Introduce new flagregions to replace regions
 
 --- branch and status ---
-## add_claw_git_status
+## flagregions
+ M tests/advection_2d_square/regression_data/claw_git_diffs.txt
+ M tests/advection_2d_square/regression_data/claw_git_status.txt
+ M tests/advection_2d_square/regression_data/gauge00001.txt
+ M tests/advection_2d_square/regression_data/gauge00002.txt
+ M tests/advection_2d_square/setrun.py
 
 
 ===========
 clawutil
 ===========
-/Users/rjl/git/clawpack/clawutil
+/Users/rjl/clawpack_src/clawpack_master/clawutil
 
 --- last commit ---
-bbc12d6 Merge pull request #105 from mandli/gauge-test-update
+5cd5031 add new rundata object of class amrclaw.FlagRegionData
 
 --- branch and status ---
-## master...origin/master
+## flagregions
 
 
 ===========
 pyclaw
 ===========
-/Users/rjl/git/clawpack/pyclaw
+/Users/rjl/clawpack_src/clawpack_master/pyclaw
 
 --- last commit ---
-314fd93 Merge pull request #541 from mandli/add-new-gauges
+83f3fe4 Merge pull request #639 from rjleveque/lagrangian_gauges
 
 --- branch and status ---
 ## master...origin/master
@@ -57,22 +62,22 @@ pyclaw
 ===========
 visclaw
 ===========
-/Users/rjl/git/clawpack/visclaw
+/Users/rjl/clawpack_src/clawpack_master/visclaw
 
 --- last commit ---
-72ee0db Merge pull request #187 from rjleveque/remove_ioff
+86d82e2 new gridtools.py module for dealing with AMR output
 
 --- branch and status ---
-## master...origin/master
+## gridtools
 
 
 ===========
 riemann
 ===========
-/Users/rjl/git/clawpack/riemann
+/Users/rjl/clawpack_src/clawpack_master/riemann
 
 --- last commit ---
-48a46d3 Merge pull request #113 from rjleveque/shallow_roe_needs_grav
+d7b4d72 Merge pull request #158 from ranocha/cubic
 
 --- branch and status ---
 ## master...origin/master
@@ -81,10 +86,13 @@ riemann
 ===========
 geoclaw
 ===========
-/Users/rjl/git/clawpack/geoclaw
+/Users/rjl/clawpack_src/clawpack_master/geoclaw
 
 --- last commit ---
-ac8b3e3 Merge pull request #230 from rjleveque/regression_data_copy_gauges
+842dbde remove un-needed import of reload
 
 --- branch and status ---
-## master...origin/master
+## fgmax_improvements
+ M src/2d/shallow/fgmax_module.f90
+ M src/2d/shallow/fgmax_read.f90
+ M src/python/geoclaw/fgmax_tools.py
diff --git a/tests/advection_2d_square/regression_data/gauge00001.txt b/tests/advection_2d_square/regression_data/gauge00001.txt
index 1350bce..5c41fd9 100644
--- a/tests/advection_2d_square/regression_data/gauge00001.txt
+++ b/tests/advection_2d_square/regression_data/gauge00001.txt
@@ -1,5 +1,5 @@
-# gauge_id=     1 location=(   0.6500000E+00   0.4000000E+00 ) num_eqn=  1
-# Columns: level time q(1 ... num_eqn)
+# gauge_id=     1 location=(  0.6500000000E+00  0.4000000000E+00 ) num_var=  1
+# level, time, q[  1], aux[]
    02  0.0000000E+00  0.1000000E+00
    02  0.8000000E-02  0.1000000E+00
    03  0.1600000E-01  0.1000000E+00
diff --git a/tests/advection_2d_square/regression_data/gauge00002.txt b/tests/advection_2d_square/regression_data/gauge00002.txt
index bef9d48..0452f50 100644
--- a/tests/advection_2d_square/regression_data/gauge00002.txt
+++ b/tests/advection_2d_square/regression_data/gauge00002.txt
@@ -1,5 +1,5 @@
-# gauge_id=     2 location=(   0.2000000E+00   0.8000000E+00 ) num_eqn=  1
-# Columns: level time q(1 ... num_eqn)
+# gauge_id=     2 location=(  0.2000000000E+00  0.8000000000E+00 ) num_var=  1
+# level, time, q[  1], aux[]
    01  0.0000000E+00  0.1000000E+00
    01  0.1600000E-01  0.1000000E+00
    01  0.3400000E-01  0.1000000E+00
@@ -18,18 +18,18 @@
    02  0.1690000E+00  0.1000000E+00
    02  0.1780000E+00  0.1025904E+00
    02  0.1870000E+00  0.1438362E+00
-   02  0.1960000E+00  0.2672578E+00
-   02  0.2050000E+00  0.3566284E+00
-   02  0.2140000E+00  0.3229898E+00
-   02  0.2230000E+00  0.2369748E+00
-   02  0.2320000E+00  0.1687937E+00
-   02  0.2410000E+00  0.1299988E+00
-   02  0.2500000E+00  0.1118038E+00
-   02  0.2590000E+00  0.1044821E+00
-   02  0.2680000E+00  0.1016730E+00
-   02  0.2770000E+00  0.1005772E+00
-   02  0.2860000E+00  0.1001800E+00
-   02  0.2950000E+00  0.1000516E+00
+   02  0.1960000E+00  0.2672631E+00
+   02  0.2050000E+00  0.3567026E+00
+   02  0.2140000E+00  0.3222721E+00
+   02  0.2230000E+00  0.2357051E+00
+   02  0.2320000E+00  0.1696756E+00
+   02  0.2410000E+00  0.1317749E+00
+   02  0.2500000E+00  0.1131165E+00
+   02  0.2590000E+00  0.1049792E+00
+   02  0.2680000E+00  0.1017527E+00
+   02  0.2770000E+00  0.1005750E+00
+   02  0.2860000E+00  0.1001767E+00
+   02  0.2950000E+00  0.1000511E+00
    02  0.3040000E+00  0.1000140E+00
    02  0.3130000E+00  0.1000036E+00
    02  0.3220000E+00  0.1000009E+00
diff --git a/tests/advection_2d_square/setrun.py b/tests/advection_2d_square/setrun.py
index 2c35185..7553f4d 100644
--- a/tests/advection_2d_square/setrun.py
+++ b/tests/advection_2d_square/setrun.py
@@ -126,8 +126,8 @@ def setrun(claw_pkg='amrclaw'):
  
     elif clawdata.output_style == 3:
         # Output every step_interval timesteps over total_steps timesteps:
-        clawdata.output_step_interval = 2
-        clawdata.total_steps = 4
+        clawdata.output_step_interval = 1
+        clawdata.total_steps = 25
         clawdata.output_t0 = True  # output at initial (or restart) time?
         
 
@@ -320,8 +320,41 @@ def setrun(claw_pkg='amrclaw'):
     rundata.regiondata.regions = []
     # to specify regions of refinement append lines of the form
     #  [minlevel,maxlevel,t1,t2,x1,x2,y1,y2]
-    rundata.regiondata.regions.append([1,1,0,1e10,0.,1.,0.,1.])
-    rundata.regiondata.regions.append([1,3,0,1e10,0.,1.,0.,0.7])
+    #rundata.regiondata.regions.append([1,1,0,1e10,0.,1.,0.,1.])
+    #rundata.regiondata.regions.append([1,3,0,1e10,0.,1.,0.,0.7])
+
+    # ---------------
+    # NEW flagregions
+    # ---------------
+
+    flagregions = rundata.flagregiondata.flagregions  # initialized to []
+
+    # now append as many flagregions as desired to this list:
+    from clawpack.amrclaw.data import FlagRegion
+
+    # The entire domain restricted to level 1 for illustration:
+    # Note that this is a rectangle specified in the new way:
+    # (other regions below will force/allow more refinement)
+    flagregion = FlagRegion(num_dim=2)
+    flagregion.name = 'Region_domain'
+    flagregion.minlevel = 1
+    flagregion.maxlevel = 1
+    flagregion.t1 = 0.
+    flagregion.t2 = 1e9
+    flagregion.spatial_region_type = 1  # Rectangle
+    flagregion.spatial_region = [0.,1.,0.,1.]  # = [x1,x2,y1,y2]
+    flagregions.append(flagregion)
+
+    # Another rectangle specified in the new way:
+    flagregion = FlagRegion(num_dim=2)
+    flagregion.name = 'Region_3levels'
+    flagregion.minlevel = 1
+    flagregion.maxlevel = 3
+    flagregion.t1 = 0.
+    flagregion.t2 = 1e9
+    flagregion.spatial_region_type = 1  # Rectangle
+    flagregion.spatial_region = [0.,1.,0.,0.7]
+    flagregions.append(flagregion)
 
 
     #  ----- For developers ----- 


===========
clawutil
===========
/Users/rjl/clawpack_src/clawpack_master/clawutil



===========
pyclaw
===========
/Users/rjl/clawpack_src/clawpack_master/pyclaw



===========
visclaw
===========
/Users/rjl/clawpack_src/clawpack_master/visclaw



===========
riemann
===========
/Users/rjl/clawpack_src/clawpack_master/riemann



===========
geoclaw
===========
/Users/rjl/clawpack_src/clawpack_master/geoclaw

diff --git a/src/2d/shallow/fgmax_module.f90 b/src/2d/shallow/fgmax_module.f90
index e98df80..95728bd 100644
--- a/src/2d/shallow/fgmax_module.f90
+++ b/src/2d/shallow/fgmax_module.f90
@@ -72,7 +72,8 @@ module fgmax_module
         integer :: nx,ny
         integer, allocatable, dimension(:,:) :: index
         
-        
+        ! interp_order = 0 for pw constant, 1 for bilinear:
+        integer :: interp_order
         
     end type
 
diff --git a/src/2d/shallow/fgmax_read.f90 b/src/2d/shallow/fgmax_read.f90
index 1758af4..26756ce 100644
--- a/src/2d/shallow/fgmax_read.f90
+++ b/src/2d/shallow/fgmax_read.f90
@@ -70,6 +70,7 @@ subroutine fgmax_read(fgmax_unit,ifg)
     read(fgmax_unit,*) fg%dt_check  
     read(fgmax_unit,*) fg%min_level_check
     read(fgmax_unit,*) fg%arrival_tol
+    read(fgmax_unit,*) fg%interp_order
     read(fgmax_unit,*) point_style
     fg%point_style = point_style
     
diff --git a/src/python/geoclaw/fgmax_tools.py b/src/python/geoclaw/fgmax_tools.py
index 0410cb9..dd4daa5 100644
--- a/src/python/geoclaw/fgmax_tools.py
+++ b/src/python/geoclaw/fgmax_tools.py
@@ -37,6 +37,7 @@ class FGmaxGrid(object):
         self.dt_check = 10.     # target time (sec) increment between updating 
                                 # max values
         self.min_level_check = None    # which levels to monitor max on
+        self.interp_order = 0    # 0 for pw const, 1 for bilinear
         self.arrival_tol = 1.e-2       # tolerance for flagging arrival
         #self.input_file_name = 'fgmax.txt'  # file for GeoClaw input data
         self.fgno = 1  # FG number
@@ -113,13 +114,14 @@ class FGmaxGrid(object):
         self.dt_check = float(fgmax_input[2].split()[0])
         self.min_level_check = int(fgmax_input[3].split()[0])
         self.arrival_tol = float(fgmax_input[4].split()[0])
-        self.point_style = point_style = int(fgmax_input[5].split()[0])
+        self.interp_order = int(fgmax_input[5].split()[0])
+        self.point_style = point_style = int(fgmax_input[6].split()[0])
         print('Reading input for fgno=%i, point_style = %i ' \
                 % (self.fgno, self.point_style))
         if point_style == 0:
-            self.npts = npts = int(fgmax_input[6].split()[0])
+            self.npts = npts = int(fgmax_input[7].split()[0])
             if npts == 0:
-                self.xy_fname = fgmax_input[7][1:-2]  # strip quotes
+                self.xy_fname = fgmax_input[8][1:-2]  # strip quotes
                 xy = numpy.loadtxt(self.xy_fname, skiprows=1)
                 self.X = xy[:,0]
                 self.Y = xy[:,1]
@@ -131,7 +133,7 @@ class FGmaxGrid(object):
                 print('Read %i x,y points from \n    %s' % (npts, self.xy_fname))
             else:
                 X = []; Y = []
-                for k in range(7,7+npts):
+                for k in range(8,8+npts):
                     xk = float(fgmax_input[k].split()[0])
                     yk = float(fgmax_input[k].split()[1])
                     X.append(xk)
@@ -139,31 +141,31 @@ class FGmaxGrid(object):
                 self.X = numpy.array(X)
                 self.Y = numpy.array(Y)
         elif point_style == 1:
-            self.npts = npts = int(fgmax_input[6].split()[0])
-            self.x1 = float(fgmax_input[7].split()[0])
-            self.y1 = float(fgmax_input[7].split()[1])
-            self.x2 = float(fgmax_input[8].split()[0])
-            self.y2 = float(fgmax_input[8].split()[1])
+            self.npts = npts = int(fgmax_input[7].split()[0])
+            self.x1 = float(fgmax_input[8].split()[0])
+            self.y1 = float(fgmax_input[8].split()[1])
+            self.x2 = float(fgmax_input[9].split()[0])
+            self.y2 = float(fgmax_input[9].split()[1])
         elif point_style == 2:
-            self.nx = nx = int(fgmax_input[6].split()[0])
-            self.ny = ny = int(fgmax_input[6].split()[1])
-            self.x1 = float(fgmax_input[7].split()[0])
-            self.y1 = float(fgmax_input[7].split()[1])
-            self.x2 = float(fgmax_input[8].split()[0])
-            self.y2 = float(fgmax_input[8].split()[1])
+            self.nx = nx = int(fgmax_input[7].split()[0])
+            self.ny = ny = int(fgmax_input[7].split()[1])
+            self.x1 = float(fgmax_input[8].split()[0])
+            self.y1 = float(fgmax_input[8].split()[1])
+            self.x2 = float(fgmax_input[9].split()[0])
+            self.y2 = float(fgmax_input[9].split()[1])
         elif point_style == 3:
-            self.n12 = n12 = int(fgmax_input[6].split()[0])
-            self.n23 = n23 = int(fgmax_input[6].split()[1])
-            self.x1 = float(fgmax_input[7].split()[0])
-            self.y1 = float(fgmax_input[7].split()[1])
-            self.x2 = float(fgmax_input[8].split()[0])
-            self.y2 = float(fgmax_input[8].split()[1])
-            self.x3 = float(fgmax_input[9].split()[0])
-            self.y3 = float(fgmax_input[9].split()[1])
-            self.x4 = float(fgmax_input[10].split()[0])
-            self.y4 = float(fgmax_input[10].split()[1])
+            self.n12 = n12 = int(fgmax_input[7].split()[0])
+            self.n23 = n23 = int(fgmax_input[7].split()[1])
+            self.x1 = float(fgmax_input[8].split()[0])
+            self.y1 = float(fgmax_input[8].split()[1])
+            self.x2 = float(fgmax_input[9].split()[0])
+            self.y2 = float(fgmax_input[9].split()[1])
+            self.x3 = float(fgmax_input[10].split()[0])
+            self.y3 = float(fgmax_input[10].split()[1])
+            self.x4 = float(fgmax_input[11].split()[0])
+            self.y4 = float(fgmax_input[11].split()[1])
         elif point_style == 4:
-            self.xy_fname = fgmax_input[6][1:-2]  # strip quotes
+            self.xy_fname = fgmax_input[7][1:-2]  # strip quotes
             ## Need to read in topotype 3 file and set self.npts
             # xy = numpy.loadtxt(self.xy_fname, skiprows=1)
             # self.X = xy[:,0]
@@ -195,6 +197,8 @@ class FGmaxGrid(object):
                             % (self.min_level_check,12*" "))
 
         fid.write("%16.10e            # arrival_tol\n" % self.arrival_tol)
+        fid.write("%i %s              # interp_order\n" \
+                            % (self.interp_order,12*" "))
         fid.write("%i %s              # point_style\n" \
                             % (self.point_style,12*" "))
 
