diff --git a/autotest/test_swf_dfw.py b/autotest/test_chf_dfw.py similarity index 90% rename from autotest/test_swf_dfw.py rename to autotest/test_chf_dfw.py index aa5cbf1edb2..6dd2bd6aeb6 100644 --- a/autotest/test_swf_dfw.py +++ b/autotest/test_chf_dfw.py @@ -25,7 +25,7 @@ from framework import TestFramework cases = [ - "swf-dfw01", + "chf-dfw01", ] @@ -48,7 +48,7 @@ def build_models(idx, test): outer_dvclose=1.0e-7, inner_dvclose=1.0e-8, ) - swf = flopy.mf6.ModflowSwf( + chf = flopy.mf6.ModflowChf( sim, modelname=name, save_flows=True, print_flows=True ) @@ -63,8 +63,8 @@ def build_models(idx, test): nodes = len(cell2d) nvert = len(vertices) - disv1d = flopy.mf6.ModflowSwfdisv1D( - swf, + disv1d = flopy.mf6.ModflowChfdisv1D( + chf, nodes=nodes, nvert=nvert, length=dx, @@ -75,27 +75,27 @@ def build_models(idx, test): cell2d=cell2d, ) - dfw = flopy.mf6.ModflowSwfdfw( - swf, + dfw = flopy.mf6.ModflowChfdfw( + chf, print_flows=True, save_flows=True, manningsn=0.035, idcxs=0, ) - sto = flopy.mf6.ModflowSwfsto( - swf, + sto = flopy.mf6.ModflowChfsto( + chf, save_flows=True, ) - ic = flopy.mf6.ModflowSwfic(swf, strt=1.0) + ic = flopy.mf6.ModflowChfic(chf, strt=1.0) xfraction = [0.0, 0.0, 1.0, 1.0] height = [100.0, 0.0, 0.0, 100.0] mannfraction = [1.0, 1.0, 1.0, 1.0] cxsdata = list(zip(xfraction, height, mannfraction)) - cxs = flopy.mf6.ModflowSwfcxs( - swf, + cxs = flopy.mf6.ModflowChfcxs( + chf, nsections=1, npoints=4, packagedata=[(0, 4)], @@ -103,8 +103,8 @@ def build_models(idx, test): ) # output control - oc = flopy.mf6.ModflowSwfoc( - swf, + oc = flopy.mf6.ModflowChfoc( + chf, budget_filerecord=f"{name}.bud", stage_filerecord=f"{name}.stage", saverecord=[ @@ -135,16 +135,16 @@ def build_models(idx, test): } else: flw_spd = {0: flw_list} - flw = flopy.mf6.ModflowSwfflw( - swf, + flw = flopy.mf6.ModflowChfflw( + chf, maxbound=maxbound, print_input=True, print_flows=True, stress_period_data=flw_spd, ) - chd = flopy.mf6.ModflowSwfchd( - swf, + chd = flopy.mf6.ModflowChfchd( + chf, maxbound=1, print_input=True, print_flows=True, diff --git a/autotest/test_swf_dfw_beg2022.py b/autotest/test_chf_dfw_beg2022.py similarity index 92% rename from autotest/test_swf_dfw_beg2022.py rename to autotest/test_chf_dfw_beg2022.py index aba011a86fa..c1caf5acacc 100644 --- a/autotest/test_swf_dfw_beg2022.py +++ b/autotest/test_chf_dfw_beg2022.py @@ -19,14 +19,14 @@ from framework import TestFramework cases = [ - "swf-beg2022", + "chf-beg2022", ] data_path = project_root_path / "autotest/data/beg2022/" def build_models(idx, test): sim_ws = test.workspace - name = "swfmodel" + name = "chfmodel" sim = flopy.mf6.MFSimulation( sim_name=name, version="mf6", @@ -59,7 +59,7 @@ def build_models(idx, test): outer_dvclose=1.0e-4, inner_dvclose=1.0e-4, ) - swf = flopy.mf6.ModflowSwf(sim, modelname=name, save_flows=True) + chf = flopy.mf6.ModflowChf(sim, modelname=name, save_flows=True) total_length = 21000 dx = 1000.0 @@ -76,8 +76,8 @@ def build_models(idx, test): x = np.linspace(dx / 2, total_length - dx / 2, nreach) z = (total_length - x) * slope - disv1d = flopy.mf6.ModflowSwfdisv1D( - swf, + disv1d = flopy.mf6.ModflowChfdisv1D( + chf, nodes=nodes, nvert=nvert, length=dx, @@ -88,8 +88,8 @@ def build_models(idx, test): cell2d=cell2d, ) - dfw = flopy.mf6.ModflowSwfdfw( - swf, + dfw = flopy.mf6.ModflowChfdfw( + chf, central_in_space=True, print_flows=True, save_flows=True, @@ -97,8 +97,8 @@ def build_models(idx, test): idcxs=0, ) - sto = flopy.mf6.ModflowSwfsto( - swf, + sto = flopy.mf6.ModflowChfsto( + chf, save_flows=True, steady_state={0: True, 1: False}, transient={0: False, 1: True}, @@ -106,15 +106,15 @@ def build_models(idx, test): water_depth = 4.0 strt = z + water_depth - ic = flopy.mf6.ModflowSwfic(swf, strt=strt) + ic = flopy.mf6.ModflowChfic(chf, strt=strt) xfraction = np.array([0.0, 0.0, 10.0, 15.0, 25.0, 30.0, 40.0, 40.0]) / 40.0 height = [40.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 40.0] npts = len(height) mannfraction = npts * [1.0] cxsdata = list(zip(xfraction, height, mannfraction)) - cxs = flopy.mf6.ModflowSwfcxs( - swf, + cxs = flopy.mf6.ModflowChfcxs( + chf, nsections=1, npoints=npts, packagedata=[(0, npts)], @@ -122,8 +122,8 @@ def build_models(idx, test): ) # output control - oc = flopy.mf6.ModflowSwfoc( - swf, + oc = flopy.mf6.ModflowChfoc( + chf, budget_filerecord=f"{name}.bud", stage_filerecord=f"{name}.stage", saverecord=[ @@ -147,8 +147,8 @@ def build_models(idx, test): flwlist = [ [(0,), "reach1"], ] - flw = flopy.mf6.ModflowSwfflw( - swf, + flw = flopy.mf6.ModflowChfflw( + chf, maxbound=len(flwlist), print_input=True, print_flows=True, @@ -164,8 +164,8 @@ def build_models(idx, test): interpolation_methodrecord=interpolation_methodrecord, ) - chd = flopy.mf6.ModflowSwfchd( - swf, + chd = flopy.mf6.ModflowChfchd( + chf, maxbound=1, print_input=True, print_flows=True, @@ -189,7 +189,7 @@ def make_plot(test, mfsim): df_mfswr = df_mfswr.loc[df_mfswr["TOTTIME"] > 86400] print(df_mfswr) - fpth = test.workspace / "swfmodel.bud" + fpth = test.workspace / "chfmodel.bud" budobj = flopy.utils.binaryfile.CellBudgetFile(fpth, precision="double") flowja = budobj.get_data(text="FLOW-JA-FACE") qstorage = budobj.get_data(text="STORAGE") @@ -228,11 +228,11 @@ def make_plot(test, mfsim): plt.xlabel("time, in hours") plt.ylabel("flow, in meters cubed per second") plt.legend() - fname = test.workspace / "swfmodel.flow.png" + fname = test.workspace / "chfmodel.flow.png" plt.savefig(fname) # read and plot stages - fpth = test.workspace / "swfmodel.stage" + fpth = test.workspace / "chfmodel.stage" qobj = flopy.utils.HeadFile(fpth, precision="double", text="STAGE") stage = qobj.get_alldata() @@ -251,7 +251,7 @@ def make_plot(test, mfsim): plt.xlabel("time, in hours") plt.ylabel("stage, in meters") plt.legend() - fname = test.workspace / "swfmodel.stage.png" + fname = test.workspace / "chfmodel.stage.png" plt.savefig(fname) return @@ -268,7 +268,7 @@ def check_output(idx, test): make_plot(test, sim) # assign name - name = "swfmodel" + name = "chfmodel" # read the binary grid file fpth = test.workspace / f"{name}.disv1d.grb" diff --git a/autotest/test_swf_dfw_bowl.py b/autotest/test_chf_dfw_bowl.py similarity index 86% rename from autotest/test_swf_dfw_bowl.py rename to autotest/test_chf_dfw_bowl.py index 74b98c8be35..073affc38d3 100644 --- a/autotest/test_swf_dfw_bowl.py +++ b/autotest/test_chf_dfw_bowl.py @@ -18,8 +18,8 @@ from framework import TestFramework cases = [ - "swf-bowl01", - "swf-bowl02", + "chf-bowl01", + "chf-bowl02", ] inflow_location = ["middle", "left"] @@ -41,7 +41,7 @@ def build_models(idx, test): for i in range(nper): tdis_rc.append((perlen[i], nstp[i], tsmult[i])) - name = "swf" + name = "chf" # build MODFLOW 6 files ws = test.workspace @@ -54,17 +54,17 @@ def build_models(idx, test): ) # surface water model - swfname = f"{name}_model" - swf = flopy.mf6.ModflowSwf( + chfname = f"{name}_model" + chf = flopy.mf6.ModflowChf( sim, - modelname=swfname, + modelname=chfname, save_flows=True, newtonoptions="newton underrelaxation", ) nouter, ninner = 200, 50 hclose, rclose, relax = 1e-8, 1e-8, 1.0 - imsswf = flopy.mf6.ModflowIms( + imschf = flopy.mf6.ModflowIms( sim, print_option="summary", outer_dvclose=hclose, @@ -84,10 +84,10 @@ def build_models(idx, test): # backtracking_tolerance=1.0, # backtracking_reduction_factor=0.3, # backtracking_residual_limit=100.0, - csv_outer_output_filerecord=f"{swfname}.ims.outer.csv", - filename=f"{swfname}.ims", + csv_outer_output_filerecord=f"{chfname}.ims.outer.csv", + filename=f"{chfname}.ims", ) - sim.register_ims_package(imsswf, [swf.name]) + sim.register_ims_package(imschf, [chf.name]) vertices = [] vertices = [[j, j * dx, 0.0] for j in range(nreach + 1)] @@ -97,8 +97,8 @@ def build_models(idx, test): nodes = len(cell2d) nvert = len(vertices) - disv1d = flopy.mf6.ModflowSwfdisv1D( - swf, + disv1d = flopy.mf6.ModflowChfdisv1D( + chf, nodes=nodes, nvert=nvert, length=dx, @@ -109,8 +109,8 @@ def build_models(idx, test): cell2d=cell2d, ) - dfw = flopy.mf6.ModflowSwfdfw( - swf, + dfw = flopy.mf6.ModflowChfdfw( + chf, print_flows=True, save_flows=True, manningsn=0.035, @@ -118,7 +118,7 @@ def build_models(idx, test): ) # note: for specifying zero-based reach number, put reach number in tuple - fname = f"{swfname}.zdg.obs.csv" + fname = f"{chfname}.zdg.obs.csv" zdg_obs = { fname: [ ("OUTFLOW1", "ZDG", (0,)), @@ -134,21 +134,21 @@ def build_models(idx, test): spd = [((nreach - 1,), idcxs, width, slope, rough)] if inflow_location[idx] == "middle": spd.append((0, idcxs, width, slope, rough)) - zdg = flopy.mf6.ModflowSwfzdg( - swf, + zdg = flopy.mf6.ModflowChfzdg( + chf, observations=zdg_obs, print_input=True, maxbound=len(spd), stress_period_data=spd, ) - sto = flopy.mf6.ModflowSwfsto( - swf, + sto = flopy.mf6.ModflowChfsto( + chf, save_flows=True, ) - ic = flopy.mf6.ModflowSwfic( - swf, + ic = flopy.mf6.ModflowChfic( + chf, strt=strt, ) @@ -156,8 +156,8 @@ def build_models(idx, test): height = [100.0, 0.0, 0.0, 100.0] mannfraction = [1.0, 1.0, 1.0, 1.0] cxsdata = list(zip(xfraction, height, mannfraction)) - cxs = flopy.mf6.ModflowSwfcxs( - swf, + cxs = flopy.mf6.ModflowChfcxs( + chf, nsections=1, npoints=4, packagedata=[(0, 4)], @@ -165,10 +165,10 @@ def build_models(idx, test): ) # output control - oc = flopy.mf6.ModflowSwfoc( - swf, - budget_filerecord=f"{swfname}.bud", - stage_filerecord=f"{swfname}.stage", + oc = flopy.mf6.ModflowChfoc( + chf, + budget_filerecord=f"{chfname}.bud", + stage_filerecord=f"{chfname}.stage", saverecord=[ ("STAGE", "ALL"), ("BUDGET", "ALL"), @@ -187,8 +187,8 @@ def build_models(idx, test): else: raise Exception(f"invalid inflow location {inflow_location[idx]}") qinflow = dx * 1.0 / 86400.0 - flw = flopy.mf6.ModflowSwfflw( - swf, + flw = flopy.mf6.ModflowChfflw( + chf, maxbound=1, print_input=True, print_flows=True, @@ -201,10 +201,10 @@ def build_models(idx, test): def check_output(idx, test): print(f"evaluating model for case {idx}...") - swfname = "swf_model" + chfname = "chf_model" # ensure outflow on left and right is the same - fpth = test.workspace / f"{swfname}.zdg.obs.csv" + fpth = test.workspace / f"{chfname}.zdg.obs.csv" obsvals = np.genfromtxt(fpth, names=True, delimiter=",") diff = obsvals["OUTFLOW1"] - obsvals["OUTFLOW9"] atol = 1.0e-6 @@ -214,7 +214,7 @@ def check_output(idx, test): # assert np.allclose(diff, 0., atol=atol), f"{diff}" # read binary stage file - fpth = test.workspace / f"{swfname}.stage" + fpth = test.workspace / f"{chfname}.stage" sobj = flopy.utils.HeadFile(fpth, precision="double", text="STAGE") stage_all = sobj.get_alldata() for kstp, stage in enumerate(stage_all): diff --git a/autotest/test_swf_dfw_loop.py b/autotest/test_chf_dfw_loop.py similarity index 95% rename from autotest/test_swf_dfw_loop.py rename to autotest/test_chf_dfw_loop.py index b1226427143..60b1eeea978 100644 --- a/autotest/test_swf_dfw_loop.py +++ b/autotest/test_chf_dfw_loop.py @@ -11,7 +11,7 @@ from framework import TestFramework cases = [ - "swf-dfw-loop", + "chf-dfw-loop", ] data_path = project_root_path / "autotest/data/swr04/" @@ -53,7 +53,7 @@ def build_models(idx, test): under_relaxation="simple", under_relaxation_gamma=0.7, ) - swf = flopy.mf6.ModflowSwf( + chf = flopy.mf6.ModflowChf( sim, modelname=name, save_flows=True, @@ -221,8 +221,8 @@ def build_models(idx, test): nodes = len(cell2d) nvert = len(vertices) - disv1d = flopy.mf6.ModflowSwfdisv1D( - swf, + disv1d = flopy.mf6.ModflowChfdisv1D( + chf, nodes=nodes, nvert=nvert, length=reach_length, @@ -234,10 +234,10 @@ def build_models(idx, test): ) stage0 = np.array(14 * [3] + 4 * [2]) - ic = flopy.mf6.ModflowSwfic(swf, strt=stage0) + ic = flopy.mf6.ModflowChfic(chf, strt=stage0) - dfw = flopy.mf6.ModflowSwfdfw( - swf, + dfw = flopy.mf6.ModflowChfdfw( + chf, central_in_space=True, # dev_swr_conductance=True, print_flows=True, @@ -246,8 +246,8 @@ def build_models(idx, test): idcxs=idcxs, ) - sto = flopy.mf6.ModflowSwfsto( - swf, + sto = flopy.mf6.ModflowChfsto( + chf, save_flows=True, ) @@ -266,8 +266,8 @@ def build_models(idx, test): ) cxsdata = list(zip(xfraction, height, mannfraction)) - cxs = flopy.mf6.ModflowSwfcxs( - swf, + cxs = flopy.mf6.ModflowChfcxs( + chf, nsections=3, npoints=4 * 3, packagedata=[(0, 4), (1, 4), (2, 4)], @@ -275,8 +275,8 @@ def build_models(idx, test): ) # output control - oc = flopy.mf6.ModflowSwfoc( - swf, + oc = flopy.mf6.ModflowChfoc( + chf, budget_filerecord=f"{name}.bud", stage_filerecord=f"{name}.stage", saverecord=[ @@ -293,8 +293,8 @@ def build_models(idx, test): [(0,), "reach1"], [(4,), "reach5"], ] - flw = flopy.mf6.ModflowSwfflw( - swf, + flw = flopy.mf6.ModflowChfflw( + chf, maxbound=len(flwlist), print_input=True, print_flows=True, @@ -311,8 +311,8 @@ def build_models(idx, test): interpolation_methodrecord=interpolation_methodrecord, ) - chd = flopy.mf6.ModflowSwfchd( - swf, + chd = flopy.mf6.ModflowChfchd( + chf, maxbound=1, print_input=True, print_flows=True, @@ -332,7 +332,7 @@ def build_models(idx, test): ], } obs_package = flopy.mf6.ModflowUtlobs( - swf, + chf, filename=f"{name}.obs", digits=10, print_input=True, @@ -349,7 +349,7 @@ def make_plot(test): name = test.name ws = test.workspace mfsim = flopy.mf6.MFSimulation.load(sim_ws=ws) - swf = mfsim.get_model(name) + chf = mfsim.get_model(name) fpth = test.workspace / f"{name}.obs.csv" obsvals = np.genfromtxt(fpth, names=True, delimiter=",") diff --git a/autotest/test_swf_dfw_swrt2.py b/autotest/test_chf_dfw_swrt2.py similarity index 78% rename from autotest/test_swf_dfw_swrt2.py rename to autotest/test_chf_dfw_swrt2.py index f6cb944d474..8e3c99c3bc0 100644 --- a/autotest/test_swf_dfw_swrt2.py +++ b/autotest/test_chf_dfw_swrt2.py @@ -2,11 +2,9 @@ SWR Test Problem 2 simulates two-dimensional overland flow using a grid of rows and columns. The SWR code was compared with results -from SWIFT2D, a USGS 2D overland flow simulator. Because the DFW -Package in MF6 presently works only with the DISV1D Package, it cannot -represent flow on a grid, so it is used here to simulate a one- -dimensional version of this same problem. The problem is set up -so that once steady conditions are achieved, the depth in each reach +from SWIFT2D, a USGS 2D overland flow simulator. The CHF model is used +here to simulate a one-dimensional version of this same problem. The problem +is set up so that once steady conditions are achieved, the depth in each reach should be 1.0 m. """ @@ -19,7 +17,7 @@ from framework import TestFramework cases = [ - "swf-swr-t2", + "chf-swr-t2", ] @@ -35,7 +33,7 @@ def build_models(idx, test): for i in range(nper): tdis_rc.append((perlen[i], nstp[i], tsmult[i])) - name = "swf" + name = "chf" # build MODFLOW 6 files ws = test.workspace @@ -48,12 +46,12 @@ def build_models(idx, test): ) # surface water model - swfname = f"{name}_model" - swf = flopy.mf6.ModflowSwf(sim, modelname=swfname, save_flows=True) + chfname = f"{name}_model" + chf = flopy.mf6.ModflowChf(sim, modelname=chfname, save_flows=True) nouter, ninner = 100, 50 hclose, rclose, relax = 1e-8, 1e-8, 1.0 - imsswf = flopy.mf6.ModflowIms( + imschf = flopy.mf6.ModflowIms( sim, print_option="SUMMARY", outer_dvclose=hclose, @@ -72,9 +70,9 @@ def build_models(idx, test): backtracking_tolerance=1.0, backtracking_reduction_factor=0.3, backtracking_residual_limit=100.0, - filename=f"{swfname}.ims", + filename=f"{chfname}.ims", ) - sim.register_ims_package(imsswf, [swf.name]) + sim.register_ims_package(imschf, [chf.name]) vertices = [] vertices = [[j, j * dx, 0.0] for j in range(nreach + 1)] @@ -86,8 +84,8 @@ def build_models(idx, test): reach_bottom = np.linspace(1.05, 0.05, nreach) - disv1d = flopy.mf6.ModflowSwfdisv1D( - swf, + disv1d = flopy.mf6.ModflowChfdisv1D( + chf, export_array_ascii=True, nodes=nodes, nvert=nvert, @@ -99,8 +97,8 @@ def build_models(idx, test): cell2d=cell2d, ) - dfw = flopy.mf6.ModflowSwfdfw( - swf, + dfw = flopy.mf6.ModflowChfdfw( + chf, export_array_ascii=True, print_flows=True, save_flows=True, @@ -108,22 +106,22 @@ def build_models(idx, test): idcxs=None, ) - sto = flopy.mf6.ModflowSwfsto( - swf, + sto = flopy.mf6.ModflowChfsto( + chf, save_flows=True, ) - ic = flopy.mf6.ModflowSwfic( - swf, + ic = flopy.mf6.ModflowChfic( + chf, export_array_ascii=True, strt=2.05, ) # output control - oc = flopy.mf6.ModflowSwfoc( - swf, - budget_filerecord=f"{swfname}.bud", - stage_filerecord=f"{swfname}.stage", + oc = flopy.mf6.ModflowChfoc( + chf, + budget_filerecord=f"{chfname}.bud", + stage_filerecord=f"{chfname}.stage", saverecord=[ ("STAGE", "ALL"), ("BUDGET", "ALL"), @@ -137,16 +135,16 @@ def build_models(idx, test): # flw inflow_reach = 0 qinflow = 23.570 - flw = flopy.mf6.ModflowSwfflw( - swf, + flw = flopy.mf6.ModflowChfflw( + chf, maxbound=1, print_input=True, print_flows=True, stress_period_data=[(inflow_reach, qinflow)], ) - chd = flopy.mf6.ModflowSwfchd( - swf, + chd = flopy.mf6.ModflowChfchd( + chf, maxbound=1, print_input=True, print_flows=True, @@ -154,15 +152,15 @@ def build_models(idx, test): ) obs_data = { - f"{swfname}.obs.csv": [ + f"{chfname}.obs.csv": [ ("OBS1", "STAGE", (1,)), ("OBS2", "STAGE", (5,)), ("OBS3", "STAGE", (8,)), ], } obs_package = flopy.mf6.ModflowUtlobs( - swf, - filename=f"{swfname}.obs", + chf, + filename=f"{chfname}.obs", digits=10, print_input=True, continuous=obs_data, @@ -175,7 +173,7 @@ def make_plot(test, mfsim): print("making plots...") import matplotlib.pyplot as plt - fpth = test.workspace / "swf_model.obs.csv" + fpth = test.workspace / "chf_model.obs.csv" obsvals = np.genfromtxt(fpth, names=True, delimiter=",") fig = plt.figure(figsize=(10, 10)) @@ -196,7 +194,7 @@ def make_plot(test, mfsim): plt.xlabel("time, in hours") plt.ylabel("stage, in meters") plt.legend() - fname = test.workspace / "swf_model.obs.1.png" + fname = test.workspace / "chf_model.obs.1.png" plt.savefig(fname) return @@ -205,7 +203,7 @@ def make_plot(test, mfsim): def check_output(idx, test): print(f"evaluating model for case {idx}...") - swfname = "swf_model" + chfname = "chf_model" ws = test.workspace mfsim = flopy.mf6.MFSimulation.load(sim_ws=ws) @@ -214,13 +212,13 @@ def check_output(idx, test): make_plot(test, mfsim) # read binary stage file - fpth = test.workspace / f"{swfname}.stage" + fpth = test.workspace / f"{chfname}.stage" sobj = flopy.utils.HeadFile(fpth, precision="double", text="STAGE") stage_all = sobj.get_alldata() # at end of simulation, water depth should be 1.0 for all reaches - swf = mfsim.get_model(swfname) - depth = stage_all[-1] - swf.disv1d.bottom.array + chf = mfsim.get_model(chfname) + depth = stage_all[-1] - chf.disv1d.bottom.array ( np.allclose(depth, 1.0), f"Simulated depth at end should be 1, but found {depth}", @@ -235,14 +233,14 @@ def check_output(idx, test): "dfw.manningsn", "ic.strt", ] - files = [pl.Path(ws / f"{swfname}-{f}.txt") for f in flist] - swf = test.sims[0].swf[0] + files = [pl.Path(ws / f"{chfname}-{f}.txt") for f in flist] + chf = test.sims[0].chf[0] for i, fpth in enumerate(files): assert fpth.is_file(), f"Expected file does not exist: {fpth.name}" a = np.loadtxt(fpth) array_name = flist[i][flist[i].index(".") + 1 :] package_name = flist[i][0 : flist[i].index(".")] - package = getattr(swf, package_name) + package = getattr(chf, package_name) b = getattr(package, array_name).array assert np.allclose(a, b) return diff --git a/autotest/test_swf_dfw_swrt2b.py b/autotest/test_chf_dfw_swrt2b.py similarity index 82% rename from autotest/test_swf_dfw_swrt2b.py rename to autotest/test_chf_dfw_swrt2b.py index 9977148a7bb..3907e9bb544 100644 --- a/autotest/test_swf_dfw_swrt2b.py +++ b/autotest/test_chf_dfw_swrt2b.py @@ -1,6 +1,6 @@ """ -Same as test_swf_dfw_swr2.py except this one uses +Same as test_chf_dfw_swr2.py except this one uses the adaptive time stepping (ATS). """ @@ -11,7 +11,7 @@ from framework import TestFramework cases = [ - "swf-swr-t2b", + "chf-swr-t2b", ] @@ -27,7 +27,7 @@ def build_models(idx, test): for i in range(nper): tdis_rc.append((perlen[i], nstp[i], tsmult[i])) - name = "swf" + name = "chf" # build MODFLOW 6 files ws = test.workspace @@ -56,12 +56,12 @@ def build_models(idx, test): ) # surface water model - swfname = f"{name}_model" - swf = flopy.mf6.ModflowSwf(sim, modelname=swfname, save_flows=True) + chfname = f"{name}_model" + chf = flopy.mf6.ModflowChf(sim, modelname=chfname, save_flows=True) nouter, ninner = 10, 50 hclose, rclose, relax = 1e-8, 1e-8, 1.0 - imsswf = flopy.mf6.ModflowIms( + imschf = flopy.mf6.ModflowIms( sim, print_option="SUMMARY", outer_dvclose=hclose, @@ -80,9 +80,9 @@ def build_models(idx, test): # backtracking_tolerance=1.0, # backtracking_reduction_factor=0.3, # backtracking_residual_limit=100.0, - filename=f"{swfname}.ims", + filename=f"{chfname}.ims", ) - sim.register_ims_package(imsswf, [swf.name]) + sim.register_ims_package(imschf, [chf.name]) vertices = [] vertices = [[j, j * dx, 0.0] for j in range(nreach + 1)] @@ -94,8 +94,8 @@ def build_models(idx, test): reach_bottom = np.linspace(1.05, 0.05, nreach) - disv1d = flopy.mf6.ModflowSwfdisv1D( - swf, + disv1d = flopy.mf6.ModflowChfdisv1D( + chf, nodes=nodes, nvert=nvert, length=dx, @@ -106,29 +106,29 @@ def build_models(idx, test): cell2d=cell2d, ) - dfw = flopy.mf6.ModflowSwfdfw( - swf, + dfw = flopy.mf6.ModflowChfdfw( + chf, print_flows=True, save_flows=True, manningsn=0.30, idcxs=None, ) - sto = flopy.mf6.ModflowSwfsto( - swf, + sto = flopy.mf6.ModflowChfsto( + chf, save_flows=True, ) - ic = flopy.mf6.ModflowSwfic( - swf, + ic = flopy.mf6.ModflowChfic( + chf, strt=2.05, ) # output control - oc = flopy.mf6.ModflowSwfoc( - swf, - budget_filerecord=f"{swfname}.bud", - stage_filerecord=f"{swfname}.stage", + oc = flopy.mf6.ModflowChfoc( + chf, + budget_filerecord=f"{chfname}.bud", + stage_filerecord=f"{chfname}.stage", saverecord=[ ("STAGE", "ALL"), ("BUDGET", "ALL"), @@ -142,16 +142,16 @@ def build_models(idx, test): # flw inflow_reach = 0 qinflow = 23.570 - flw = flopy.mf6.ModflowSwfflw( - swf, + flw = flopy.mf6.ModflowChfflw( + chf, maxbound=1, print_input=True, print_flows=True, stress_period_data=[(inflow_reach, qinflow)], ) - chd = flopy.mf6.ModflowSwfchd( - swf, + chd = flopy.mf6.ModflowChfchd( + chf, maxbound=1, print_input=True, print_flows=True, @@ -159,15 +159,15 @@ def build_models(idx, test): ) obs_data = { - f"{swfname}.obs.csv": [ + f"{chfname}.obs.csv": [ ("OBS1", "STAGE", (1,)), ("OBS2", "STAGE", (5,)), ("OBS3", "STAGE", (8,)), ], } obs_package = flopy.mf6.ModflowUtlobs( - swf, - filename=f"{swfname}.obs", + chf, + filename=f"{chfname}.obs", digits=10, print_input=True, continuous=obs_data, @@ -180,7 +180,7 @@ def make_plot(test, mfsim): print("making plots...") import matplotlib.pyplot as plt - fpth = test.workspace / "swf_model.obs.csv" + fpth = test.workspace / "chf_model.obs.csv" obsvals = np.genfromtxt(fpth, names=True, delimiter=",") fig = plt.figure(figsize=(10, 10)) @@ -201,7 +201,7 @@ def make_plot(test, mfsim): plt.xlabel("time, in hours") plt.ylabel("stage, in meters") plt.legend() - fname = test.workspace / "swf_model.obs.1.png" + fname = test.workspace / "chf_model.obs.1.png" plt.savefig(fname) return @@ -210,7 +210,7 @@ def make_plot(test, mfsim): def check_output(idx, test): print(f"evaluating model for case {idx}...") - swfname = "swf_model" + chfname = "chf_model" ws = test.workspace mfsim = flopy.mf6.MFSimulation.load(sim_ws=ws) @@ -219,15 +219,15 @@ def check_output(idx, test): make_plot(test, mfsim) # read binary stage file - fpth = test.workspace / f"{swfname}.stage" + fpth = test.workspace / f"{chfname}.stage" sobj = flopy.utils.HeadFile(fpth, precision="double", text="STAGE") stage_all = sobj.get_alldata() # for kstp, stage in enumerate(stage_all): # print(kstp, stage.flatten()) # at end of simulation, water depth should be 1.0 for all reaches - swf = mfsim.get_model(swfname) - depth = stage_all[-1] - swf.disv1d.bottom.array + chf = mfsim.get_model(chfname) + depth = stage_all[-1] - chf.disv1d.bottom.array ( np.allclose(depth, 1.0), f"Simulated depth at end should be 1, but found {depth}", diff --git a/autotest/test_swf_dfw_gwf.py b/autotest/test_chf_gwf.py similarity index 86% rename from autotest/test_swf_dfw_gwf.py rename to autotest/test_chf_gwf.py index f4193c45f77..08bf3d0bd47 100644 --- a/autotest/test_swf_dfw_gwf.py +++ b/autotest/test_chf_gwf.py @@ -1,10 +1,10 @@ """ -Simple 3-reach SWF model connected to a simple +Simple 3-cell CHF model connected to a simple 3-cell GWF model -SWF zero-based diagram below +CHF zero-based diagram below o------o------o------o v0 v1 v2 v3 @@ -24,7 +24,7 @@ from framework import TestFramework cases = [ - "swf-gwf01", + "chf-gwf01", ] @@ -51,31 +51,31 @@ def build_models(idx, test): under_relaxation_gamma=0.1, ) - add_swf_model(sim) + add_chf_model(sim) add_gwf_model(sim) - swfgwf_data = [ + chfgwf_data = [ ((0,), (0, 0, 0), 1.0, 1.0), ((1,), (0, 0, 1), 1.0, 1.0), ((2,), (0, 0, 2), 1.0, 1.0), ] - swfgwf = flopy.mf6.ModflowSwfgwf( + chfgwf = flopy.mf6.ModflowChfgwf( sim, print_input=True, print_flows=True, - exgtype="SWF6-GWF6", - nexg=len(swfgwf_data), - exgmnamea="swfmodel", + exgtype="CHF6-GWF6", + nexg=len(chfgwf_data), + exgmnamea="chfmodel", exgmnameb="gwfmodel", - exchangedata=swfgwf_data, + exchangedata=chfgwf_data, ) return sim, None -def add_swf_model(sim): - name = "swfmodel" - swf = flopy.mf6.ModflowSwf(sim, modelname=name, save_flows=True) +def add_chf_model(sim): + name = "chfmodel" + chf = flopy.mf6.ModflowChf(sim, modelname=name, save_flows=True) dx = 1000.0 nreach = 3 @@ -88,8 +88,8 @@ def add_swf_model(sim): nodes = len(cell2d) nvert = len(vertices) - disv1d = flopy.mf6.ModflowSwfdisv1D( - swf, + disv1d = flopy.mf6.ModflowChfdisv1D( + chf, nodes=nodes, nvert=nvert, length=dx, @@ -100,8 +100,8 @@ def add_swf_model(sim): cell2d=cell2d, ) - dfw = flopy.mf6.ModflowSwfdfw( - swf, + dfw = flopy.mf6.ModflowChfdfw( + chf, print_flows=True, save_flows=True, length_conversion=1.0, @@ -110,19 +110,19 @@ def add_swf_model(sim): idcxs=0, ) - sto = flopy.mf6.ModflowSwfsto( - swf, + sto = flopy.mf6.ModflowChfsto( + chf, save_flows=True, ) - ic = flopy.mf6.ModflowSwfic(swf, strt=1.0) + ic = flopy.mf6.ModflowChfic(chf, strt=1.0) xfraction = [0.0, 0.0, 1.0, 1.0] height = [100.0, 0.0, 0.0, 100.0] mannfraction = [1.0, 1.0, 1.0, 1.0] cxsdata = list(zip(xfraction, height, mannfraction)) - cxs = flopy.mf6.ModflowSwfcxs( - swf, + cxs = flopy.mf6.ModflowChfcxs( + chf, nsections=1, npoints=4, packagedata=[(0, 4)], @@ -130,8 +130,8 @@ def add_swf_model(sim): ) # output control - oc = flopy.mf6.ModflowSwfoc( - swf, + oc = flopy.mf6.ModflowChfoc( + chf, budget_filerecord=f"{name}.bud", stage_filerecord=f"{name}.stage", saverecord=[ @@ -148,16 +148,16 @@ def add_swf_model(sim): (0, 100), ] maxbound = len(flw_spd) - flw = flopy.mf6.ModflowSwfflw( - swf, + flw = flopy.mf6.ModflowChfflw( + chf, maxbound=maxbound, print_input=True, print_flows=True, stress_period_data=flw_spd, ) - chd = flopy.mf6.ModflowSwfchd( - swf, + chd = flopy.mf6.ModflowChfchd( + chf, maxbound=1, print_input=True, print_flows=True, @@ -224,7 +224,7 @@ def check_output(idx, test): print("evaluating model...") # assign name - name = "swfmodel" + name = "chfmodel" # read the binary grid file fpth = test.workspace / f"{name}.disv1d.grb" diff --git a/autotest/test_swf_dfw_swrt2dis.py b/autotest/test_olf_dfw_swrt2dis.py similarity index 82% rename from autotest/test_swf_dfw_swrt2dis.py rename to autotest/test_olf_dfw_swrt2dis.py index a547d6e90c8..63634c38343 100644 --- a/autotest/test_swf_dfw_swrt2dis.py +++ b/autotest/test_olf_dfw_swrt2dis.py @@ -15,7 +15,7 @@ from framework import TestFramework cases = [ - "swf-swr-t2-dis", + "olf-swr-t2-dis", ] @@ -30,7 +30,7 @@ def build_models(idx, test): for i in range(nper): tdis_rc.append((perlen[i], nstp[i], tsmult[i])) - name = "swf" + name = "olf" # build MODFLOW 6 files ws = test.workspace @@ -43,12 +43,12 @@ def build_models(idx, test): ) # surface water model - swfname = f"{name}_model" - swf = flopy.mf6.ModflowSwf(sim, modelname=swfname, save_flows=True) + olfname = f"{name}_model" + olf = flopy.mf6.ModflowOlf(sim, modelname=olfname, save_flows=True) nouter, ninner = 100, 50 hclose, rclose, relax = 1e-6, 1e-8, 1.0 - imsswf = flopy.mf6.ModflowIms( + imsolf = flopy.mf6.ModflowIms( sim, print_option="SUMMARY", outer_dvclose=hclose, @@ -67,9 +67,9 @@ def build_models(idx, test): # backtracking_tolerance=1.0, # backtracking_reduction_factor=0.3, # backtracking_residual_limit=100.0, - filename=f"{swfname}.ims", + filename=f"{olfname}.ims", ) - sim.register_ims_package(imsswf, [swf.name]) + sim.register_ims_package(imsolf, [olf.name]) nrow = 11 ncol = 11 @@ -77,8 +77,8 @@ def build_models(idx, test): for i in range(nrow): botm[i, :] = np.linspace(1.05, 0.05, nrow) - dis = flopy.mf6.ModflowSwfdis2D( - swf, + dis = flopy.mf6.ModflowOlfdis2D( + olf, nrow=nrow, ncol=ncol, delr=dx, @@ -86,29 +86,29 @@ def build_models(idx, test): botm=botm, ) - dfw = flopy.mf6.ModflowSwfdfw( - swf, + dfw = flopy.mf6.ModflowOlfdfw( + olf, print_flows=True, save_flows=True, manningsn=0.30, idcxs=None, ) - sto = flopy.mf6.ModflowSwfsto( - swf, + sto = flopy.mf6.ModflowOlfsto( + olf, save_flows=True, ) - ic = flopy.mf6.ModflowSwfic( - swf, + ic = flopy.mf6.ModflowOlfic( + olf, strt=2.05, ) # output control - oc = flopy.mf6.ModflowSwfoc( - swf, - budget_filerecord=f"{swfname}.bud", - stage_filerecord=f"{swfname}.stage", + oc = flopy.mf6.ModflowOlfoc( + olf, + budget_filerecord=f"{olfname}.bud", + stage_filerecord=f"{olfname}.stage", saverecord=[ ("STAGE", "ALL"), ("BUDGET", "ALL"), @@ -122,8 +122,8 @@ def build_models(idx, test): # flw qinflow = 23.570 spd = [(i, 0, qinflow) for i in range(nrow)] - flw = flopy.mf6.ModflowSwfflw( - swf, + flw = flopy.mf6.ModflowOlfflw( + olf, maxbound=len(spd), print_input=True, print_flows=True, @@ -131,8 +131,8 @@ def build_models(idx, test): ) spd = [(i, ncol - 1, 1.05) for i in range(nrow)] - chd = flopy.mf6.ModflowSwfchd( - swf, + chd = flopy.mf6.ModflowOlfchd( + olf, maxbound=len(spd), print_input=True, print_flows=True, @@ -140,15 +140,15 @@ def build_models(idx, test): ) # obs_data = { - # f"{swfname}.obs.csv": [ + # f"{olfname}.obs.csv": [ # ("OBS1", "STAGE", (1,)), # ("OBS2", "STAGE", (5,)), # ("OBS3", "STAGE", (8,)), # ], # } # obs_package = flopy.mf6.ModflowUtlobs( - # swf, - # filename=f"{swfname}.obs", + # olf, + # filename=f"{olfname}.obs", # digits=10, # print_input=True, # continuous=obs_data, @@ -161,7 +161,7 @@ def make_plot(test, mfsim): print("making plots...") import matplotlib.pyplot as plt - fpth = test.workspace / "swf_model.obs.csv" + fpth = test.workspace / "olf_model.obs.csv" obsvals = np.genfromtxt(fpth, names=True, delimiter=",") fig = plt.figure(figsize=(10, 10)) @@ -182,7 +182,7 @@ def make_plot(test, mfsim): plt.xlabel("time, in hours") plt.ylabel("stage, in meters") plt.legend() - fname = test.workspace / "swf_model.obs.1.png" + fname = test.workspace / "olf_model.obs.1.png" plt.savefig(fname) return @@ -191,7 +191,7 @@ def make_plot(test, mfsim): def check_output(idx, test): print(f"evaluating model for case {idx}...") - swfname = "swf_model" + olfname = "olf_model" ws = test.workspace mfsim = flopy.mf6.MFSimulation.load(sim_ws=ws) @@ -200,13 +200,13 @@ def check_output(idx, test): make_plot(test, mfsim) # read binary stage file - fpth = test.workspace / f"{swfname}.stage" + fpth = test.workspace / f"{olfname}.stage" sobj = flopy.utils.HeadFile(fpth, precision="double", text="STAGE") stage_all = sobj.get_alldata() # at end of simulation, water depth should be 1.0 for all reaches - swf = mfsim.get_model(swfname) - depth = stage_all[-1] - swf.dis.botm.array + olf = mfsim.get_model(olfname) + depth = stage_all[-1] - olf.dis.botm.array assert np.allclose( depth, 1.0 ), f"Simulated depth at end should be 1, but found {depth}" diff --git a/autotest/test_olf_gwf.py b/autotest/test_olf_gwf.py new file mode 100644 index 00000000000..b17a2fe4d7b --- /dev/null +++ b/autotest/test_olf_gwf.py @@ -0,0 +1,255 @@ +""" + +Simple 3-cell OLF model connected to a simple +3-cell GWF model + + +Zero-based diagram below + + 0 1 2 OLF +o------o------o------o +| | | | +| 0 | 1 | 2 | GWF +| | | | +o------o------o------o + + +""" + +import flopy +import numpy as np +import pytest +from framework import TestFramework + +cases = [ + "olf-gwf01", +] + + +def build_models(idx, test): + sim_ws = test.workspace + name = cases[idx] + sim = flopy.mf6.MFSimulation( + sim_name=name, + version="mf6", + exe_name="mf6", + sim_ws=sim_ws, + memory_print_option="all", + ) + + tdis = flopy.mf6.ModflowTdis(sim) + ims = flopy.mf6.ModflowIms( + sim, + print_option="all", + linear_acceleration="BICGSTAB", + outer_dvclose=1.0e-12, + inner_dvclose=1.0e-12, + outer_maximum=500, + under_relaxation="simple", + under_relaxation_gamma=0.1, + ) + + add_olf_model(sim) + add_gwf_model(sim) + + olfgwf_data = [ + ((0, 0), (0, 0, 0), 1.0, 1.0), + ((0, 1), (0, 0, 1), 1.0, 1.0), + ((0, 2), (0, 0, 2), 1.0, 1.0), + ] + olfgwf = flopy.mf6.ModflowOlfgwf( + sim, + print_input=True, + print_flows=True, + exgtype="OLF6-GWF6", + nexg=len(olfgwf_data), + exgmnamea="olfmodel", + exgmnameb="gwfmodel", + exchangedata=olfgwf_data, + ) + + return sim, None + + +def add_olf_model(sim): + name = "olfmodel" + olf = flopy.mf6.ModflowOlf(sim, modelname=name, save_flows=True) + + dx = 1000.0 + nrow = 1 + ncol = 3 + total_length = dx * ncol + + botm = np.zeros((nrow, ncol), dtype=float) + + dis = flopy.mf6.ModflowOlfdis2D( + olf, + nrow=nrow, + ncol=ncol, + delr=dx, + delc=dx, + botm=botm, + ) + + dfw = flopy.mf6.ModflowOlfdfw( + olf, + print_flows=True, + save_flows=True, + length_conversion=1.0, + time_conversion=86400.0, + manningsn=3.5, + idcxs=None, + ) + + sto = flopy.mf6.ModflowOlfsto( + olf, + save_flows=True, + ) + + ic = flopy.mf6.ModflowOlfic(olf, strt=1.0) + + # output control + oc = flopy.mf6.ModflowOlfoc( + olf, + budget_filerecord=f"{name}.bud", + stage_filerecord=f"{name}.stage", + saverecord=[ + ("STAGE", "ALL"), + ("BUDGET", "ALL"), + ], + printrecord=[ + ("STAGE", "LAST"), + ("BUDGET", "ALL"), + ], + ) + + flw_spd = [ + (0, 0, 100), + ] + maxbound = len(flw_spd) + flw = flopy.mf6.ModflowOlfflw( + olf, + maxbound=maxbound, + print_input=True, + print_flows=True, + stress_period_data=flw_spd, + ) + + chd = flopy.mf6.ModflowOlfchd( + olf, + maxbound=1, + print_input=True, + print_flows=True, + stress_period_data=[(0, 2, 1.0)], + ) + + return + + +def add_gwf_model(sim): + # create gwf model + name = "gwfmodel" + gwf = flopy.mf6.ModflowGwf( + sim, + modelname=name, + save_flows=True, + ) + + dis = flopy.mf6.ModflowGwfdis( + gwf, + nlay=1, + nrow=1, + ncol=3, + delr=1000.0, + delc=50.0, + top=0.0, + botm=-10.0, + ) + + # initial conditions + ic = flopy.mf6.ModflowGwfic(gwf, strt=-5.0) + + # node property flow + npf = flopy.mf6.ModflowGwfnpf( + gwf, + save_flows=False, + icelltype=1, + k=1.0, + ) + + sto = flopy.mf6.ModflowGwfsto(gwf, sy=0.1, ss=1.0e-5, iconvert=1) + + # chd files + # chd_spd = [(0, 0, 0, 1.0), (0, 0, 2, 1.0)] + # chd = flopy.mf6.modflow.mfgwfchd.ModflowGwfchd( + # gwf, + # maxbound=len(chd_spd), + # stress_period_data=chd_spd, + # pname="CHD-1", + # ) + + # output control + oc = flopy.mf6.ModflowGwfoc( + gwf, + budget_filerecord=f"{name}.cbc", + head_filerecord=f"{name}.hds", + headprintrecord=[("COLUMNS", 10, "WIDTH", 15, "DIGITS", 6, "GENERAL")], + saverecord=[("HEAD", "LAST"), ("BUDGET", "LAST")], + printrecord=[("HEAD", "LAST"), ("BUDGET", "LAST")], + ) + + +def check_output(idx, test): + print("evaluating model...") + + # assign name + name = "olfmodel" + + # read the binary grid file + fpth = test.workspace / f"{name}.dis2d.grb" + grb = flopy.mf6.utils.MfGrdFile(fpth) + ia = grb.ia + ja = grb.ja + assert ia.shape[0] == grb.ncells + 1, "ia in grb file is not correct size" + + # read stage file + fpth = test.workspace / f"{name}.stage" + qobj = flopy.utils.HeadFile(fpth, precision="double", text="STAGE") + stage = qobj.get_alldata() + print(f"{stage=}") + + # read the budget file + fpth = test.workspace / f"{name}.bud" + budobj = flopy.utils.binaryfile.CellBudgetFile(fpth) + flowja = budobj.get_data(text="FLOW-JA-FACE")[0].flatten() + qstorage = budobj.get_data(text="STORAGE") + qflw = budobj.get_data(text="FLW") + qchd = budobj.get_data(text="CHD") + qresidual = np.zeros(grb.nodes) + nodes = ia.shape[0] - 1 + for n in range(nodes): + qresidual[n] = flowja[ia[n]] + + print(budobj.list_records()) + print(f"flowja: {flowja}") + print(f"qstorage: {qstorage}") + print(f"qchd: {qchd}") + print(f"qflw: {qflw}") + print(f"qresidual: {qresidual}") + + assert np.allclose(qresidual, 0.0, atol=1.0e-3), "Flowja residual > 1.e-3" + + return + + +@pytest.mark.developmode +@pytest.mark.parametrize("idx, name", enumerate(cases)) +def test_mf6model(idx, name, function_tmpdir, targets): + test = TestFramework( + name=name, + workspace=function_tmpdir, + build=lambda t: build_models(idx, t), + check=lambda t: check_output(idx, t), + targets=targets, + ) + test.run() diff --git a/autotest/test_swf_vcatch.py b/autotest/test_olf_vcatch.py similarity index 84% rename from autotest/test_swf_vcatch.py rename to autotest/test_olf_vcatch.py index e69bfd48a06..e29a66e0540 100644 --- a/autotest/test_swf_vcatch.py +++ b/autotest/test_olf_vcatch.py @@ -1,6 +1,6 @@ """ -This problem tests the SWF capability to simulate overland flow +This problem tests the OLF capability to simulate overland flow on a regular grid. The problem is based on the tilted v-catchment problem described by Panday and Huyakorn (2004): Advances in Water Resources 27 (2004) 361-382. @@ -15,7 +15,7 @@ from framework import TestFramework cases = [ - "swf-swr-vcatch", + "olf-swr-vcatch", ] @@ -57,7 +57,7 @@ def build_models(idx, test): for i in range(nper): tdis_rc.append((perlen[i], nstp[i], tsmult[i])) - name = "swf" + name = "olf" # build MODFLOW 6 files ws = test.workspace @@ -91,12 +91,12 @@ def build_models(idx, test): ) # surface water model - swfname = f"{name}_model" - swf = flopy.mf6.ModflowSwf(sim, modelname=swfname, save_flows=True) + olfname = f"{name}_model" + olf = flopy.mf6.ModflowOlf(sim, modelname=olfname, save_flows=True) nouter, ninner = 15, 100 hclose, rclose, relax = 1e-8, 1e-8, 1.0 - imsswf = flopy.mf6.ModflowIms( + imsolf = flopy.mf6.ModflowIms( sim, print_option="SUMMARY", outer_dvclose=hclose, @@ -115,13 +115,13 @@ def build_models(idx, test): # backtracking_tolerance=1.0, # backtracking_reduction_factor=0.3, # backtracking_residual_limit=100.0, - filename=f"{swfname}.ims", + filename=f"{olfname}.ims", ) - sim.register_ims_package(imsswf, [swf.name]) + sim.register_ims_package(imsolf, [olf.name]) botm = land_surface.reshape((nrow, ncol)) - dis = flopy.mf6.ModflowSwfdis2D( - swf, + dis = flopy.mf6.ModflowOlfdis2D( + olf, export_array_ascii=True, nrow=nrow, ncol=ncol, @@ -134,8 +134,8 @@ def build_models(idx, test): rough = rough_overland * np.ones((nlay, nrow, ncol), dtype=float) rough[0, :, int(ncol / 2)] = rough_channel - dfw = flopy.mf6.ModflowSwfdfw( - swf, + dfw = flopy.mf6.ModflowOlfdfw( + olf, export_array_ascii=True, print_flows=False, save_flows=True, @@ -143,24 +143,24 @@ def build_models(idx, test): idcxs=None, ) - sto = flopy.mf6.ModflowSwfsto( - swf, + sto = flopy.mf6.ModflowOlfsto( + olf, save_flows=True, steady_state={0: False, 1: False}, transient={0: True, 1: True}, ) - ic = flopy.mf6.ModflowSwfic( - swf, + ic = flopy.mf6.ModflowOlfic( + olf, export_array_ascii=True, strt=botm, ) # output control - oc = flopy.mf6.ModflowSwfoc( - swf, - budget_filerecord=f"{swfname}.bud", - stage_filerecord=f"{swfname}.stage", + oc = flopy.mf6.ModflowOlfoc( + olf, + budget_filerecord=f"{olfname}.bud", + stage_filerecord=f"{olfname}.stage", saverecord=[ ("STAGE", "ALL"), ("BUDGET", "ALL"), @@ -173,8 +173,8 @@ def build_models(idx, test): # flw qinflow = rainfall * dx * dx spd = [(i, j, qinflow) for j in range(ncol) for i in range(nrow)] - flw = flopy.mf6.ModflowSwfflw( - swf, + flw = flopy.mf6.ModflowOlfflw( + olf, maxbound=len(spd), print_input=True, print_flows=True, @@ -182,7 +182,7 @@ def build_models(idx, test): ) # note: for specifying zero-based reach number, put reach number in tuple - fname = f"{swfname}.zdg.obs.csv" + fname = f"{olfname}.zdg.obs.csv" zdg_obs = { fname: [ ("OUTFLOW", "ZDG", (nrow - 1, int(ncol / 2))), @@ -193,8 +193,8 @@ def build_models(idx, test): idcxs = -1 # use cross section 0 width = dx spd = [((nrow - 1, int(ncol / 2)), idcxs, width, slope_y, rough_channel)] - zdg = flopy.mf6.ModflowSwfzdg( - swf, + zdg = flopy.mf6.ModflowOlfzdg( + olf, observations=zdg_obs, print_input=True, maxbound=len(spd), @@ -208,7 +208,7 @@ def make_plot(test, mfsim): print("making plots...") import matplotlib.pyplot as plt - fpth = test.workspace / "swf_model.zdg.obs.csv" + fpth = test.workspace / "olf_model.zdg.obs.csv" obsvals = np.genfromtxt(fpth, names=True, delimiter=",") fig = plt.figure(figsize=(6, 4)) @@ -228,7 +228,7 @@ def make_plot(test, mfsim): plt.xlabel("time, in minutes") plt.ylabel("flow, in meters per second") plt.legend() - fname = test.workspace / "swf_model.zdg.obs.png" + fname = test.workspace / "olf_model.zdg.obs.png" plt.savefig(fname) return @@ -237,7 +237,7 @@ def make_plot(test, mfsim): def check_output(idx, test): print(f"evaluating model for case {idx}...") - swfname = "swf_model" + olfname = "olf_model" ws = test.workspace mfsim = flopy.mf6.MFSimulation.load(sim_ws=ws) @@ -246,19 +246,19 @@ def check_output(idx, test): make_plot(test, mfsim) # read the binary grid file - fpth = test.workspace / f"{swfname}.dis2d.grb" + fpth = test.workspace / f"{olfname}.dis2d.grb" grb = flopy.mf6.utils.MfGrdFile(fpth) ia = grb.ia ja = grb.ja assert ia.shape[0] == grb.ncells + 1, "ia in grb file is not correct size" # read binary stage file - fpth = test.workspace / f"{swfname}.stage" + fpth = test.workspace / f"{olfname}.stage" sobj = flopy.utils.HeadFile(fpth, precision="double", text="STAGE") stage_all = sobj.get_alldata() # read outflow observation - fpth = test.workspace / "swf_model.zdg.obs.csv" + fpth = test.workspace / "olf_model.zdg.obs.csv" obsvals = np.genfromtxt(fpth, names=True, delimiter=",") outflow_answer = 4.859497719 # outflow value at end of first period @@ -278,14 +278,14 @@ def check_output(idx, test): "dfw.manningsn", "ic.strt", ] - files = [pl.Path(ws / f"{swfname}-{f}.txt") for f in flist] - swf = test.sims[0].swf[0] + files = [pl.Path(ws / f"{olfname}-{f}.txt") for f in flist] + olf = test.sims[0].olf[0] for i, fpth in enumerate(files): assert fpth.is_file(), f"Expected file does not exist: {fpth.name}" a = np.loadtxt(fpth) array_name = flist[i][flist[i].index(".") + 1 :] package_name = flist[i][0 : flist[i].index(".")] - package = getattr(swf, package_name) + package = getattr(olf, package_name) b = getattr(package, array_name).array assert np.allclose(a, b) return diff --git a/doc/mf6io/mf6ivar/dfn/chf-cdb.dfn b/doc/mf6io/mf6ivar/dfn/chf-cdb.dfn new file mode 100644 index 00000000000..dea9e181497 --- /dev/null +++ b/doc/mf6io/mf6ivar/dfn/chf-cdb.dfn @@ -0,0 +1,183 @@ +# --------------------- swf cdb options --------------------- +# flopy multi-package + +block options +name auxiliary +type string +shape (naux) +reader urword +optional true +longname keyword to specify aux variables +description REPLACE auxnames {'{#1}': 'Surface Water Flow'} + +block options +name boundnames +type keyword +shape +reader urword +optional true +longname +description REPLACE boundnames {'{#1}': 'critical depth boundary'} + +block options +name print_input +type keyword +reader urword +optional true +longname print input to listing file +description REPLACE print_input {'{#1}': 'critical depth boundary'} +mf6internal iprpak + +block options +name print_flows +type keyword +reader urword +optional true +longname print calculated flows to listing file +description REPLACE print_flows {'{#1}': 'critical depth boundary'} +mf6internal iprflow + +block options +name save_flows +type keyword +reader urword +optional true +longname save flows to budget file +description REPLACE save_flows {'{#1}': 'critical depth boundary'} +mf6internal ipakcb + +block options +name filein +type keyword +shape +in_record true +reader urword +tagged true +optional false +longname file keyword +description keyword to specify that an input filename is expected next. + +block options +name obs_filerecord +type record obs6 filein obs6_filename +shape +reader urword +tagged true +optional true +longname +description + +block options +name obs6 +type keyword +shape +in_record true +reader urword +tagged true +optional false +longname obs keyword +description keyword to specify that record corresponds to an observations file. + +block options +name obs6_filename +type string +preserve_case true +in_record true +tagged false +reader urword +optional false +longname obs6 input filename +description REPLACE obs6_filename {'{#1}': 'Zero-Depth-Gradient Boundary'} + + +# --------------------- swf cdb dimensions --------------------- + +block dimensions +name maxbound +type integer +reader urword +optional false +longname maximum number of critical depth boundaries +description REPLACE maxbound {'{#1}': 'critical depth boundary'} + + +# --------------------- swf cdb period --------------------- + +block period +name iper +type integer +block_variable True +in_record true +tagged false +shape +valid +reader urword +optional false +longname stress period number +description REPLACE iper {} + +block period +name stress_period_data +type recarray cellid idcxs width aux boundname +shape (maxbound) +reader urword +longname +description +mf6internal spd + +block period +name cellid +type integer +shape (ncelldim) +tagged false +in_record true +reader urword +longname cell identifier +description REPLACE cellid {} + +block period +name idcxs +type integer +shape +tagged false +in_record true +reader urword +time_series false +longname cross section identifier +description is the identifier for the cross section specified in the CXS Package. A value of zero indicates the zero-depth-gradient calculation will use parameters for a hydraulically wide channel. +numeric_index true + +block period +name width +type double precision +shape +tagged false +in_record true +reader urword +time_series true +longname width of the zero-depth gradient boundary +description is the channel width of the zero-depth gradient boundary. If a cross section is associated with this boundary, the width will be scaled by the cross section information. If the Options block includes a TIMESERIESFILE entry (see the ``Time-Variable Input'' section), values can be obtained from a time series by entering the time-series name in place of a numeric value. + +block period +name aux +type double precision +in_record true +tagged false +shape (naux) +reader urword +optional true +time_series true +longname auxiliary variables +description REPLACE aux {'{#1}': 'zero-depth-gradient boundary'} +mf6internal auxvar + +block period +name boundname +type string +shape +tagged false +in_record true +reader urword +optional true +longname zero-depth-gradient boundary name +description REPLACE boundname {'{#1}': 'zero-depth-gradient boundary'} diff --git a/doc/mf6io/mf6ivar/dfn/chf-chd.dfn b/doc/mf6io/mf6ivar/dfn/chf-chd.dfn new file mode 100644 index 00000000000..a20bd6c4e0e --- /dev/null +++ b/doc/mf6io/mf6ivar/dfn/chf-chd.dfn @@ -0,0 +1,208 @@ +# --------------------- swf chd options --------------------- +# flopy multi-package + +block options +name auxiliary +type string +shape (naux) +reader urword +optional true +longname keyword to specify aux variables +description REPLACE auxnames {'{#1}': 'Surface Water Flow'} + +block options +name auxmultname +type string +shape +reader urword +optional true +longname name of auxiliary variable for multiplier +description REPLACE auxmultname {'{#1}': 'CHD head value'} + +block options +name boundnames +type keyword +shape +reader urword +optional true +longname +description REPLACE boundnames {'{#1}': 'constant-head'} + +block options +name print_input +type keyword +reader urword +optional true +longname print input to listing file +description REPLACE print_input {'{#1}': 'constant-head'} + +block options +name print_flows +type keyword +reader urword +optional true +longname print CHD flows to listing file +description REPLACE print_flows {'{#1}': 'constant-head'} + +block options +name save_flows +type keyword +reader urword +optional true +longname save CHD flows to budget file +description REPLACE save_flows {'{#1}': 'constant-head'} + +block options +name ts_filerecord +type record ts6 filein ts6_filename +shape +reader urword +tagged true +optional true +longname +description + +block options +name ts6 +type keyword +shape +in_record true +reader urword +tagged true +optional false +longname head keyword +description keyword to specify that record corresponds to a time-series file. + +block options +name filein +type keyword +shape +in_record true +reader urword +tagged true +optional false +longname file keyword +description keyword to specify that an input filename is expected next. + +block options +name ts6_filename +type string +preserve_case true +in_record true +reader urword +optional false +tagged false +longname file name of time series information +description REPLACE timeseriesfile {} + +block options +name obs_filerecord +type record obs6 filein obs6_filename +shape +reader urword +tagged true +optional true +longname +description + +block options +name obs6 +type keyword +shape +in_record true +reader urword +tagged true +optional false +longname obs keyword +description keyword to specify that record corresponds to an observations file. + +block options +name obs6_filename +type string +preserve_case true +in_record true +tagged false +reader urword +optional false +longname obs6 input filename +description REPLACE obs6_filename {'{#1}': 'constant-head'} + + +# --------------------- swf chd dimensions --------------------- + +block dimensions +name maxbound +type integer +reader urword +optional false +longname maximum number of constant heads +description REPLACE maxbound {'{#1}': 'constant-head'} + + +# --------------------- swf chd period --------------------- + +block period +name iper +type integer +block_variable True +in_record true +tagged false +shape +valid +reader urword +optional false +longname stress period number +description REPLACE iper {} + +block period +name stress_period_data +type recarray cellid head aux boundname +shape (maxbound) +reader urword +longname +description +mf6internal spd + +block period +name cellid +type integer +shape (ncelldim) +tagged false +in_record true +reader urword +longname cell identifier +description REPLACE cellid {} + +block period +name head +type double precision +shape +tagged false +in_record true +reader urword +time_series true +longname head value assigned to constant head +description is the head at the boundary. If the Options block includes a TIMESERIESFILE entry (see the ``Time-Variable Input'' section), values can be obtained from a time series by entering the time-series name in place of a numeric value. + +block period +name aux +type double precision +in_record true +tagged false +shape (naux) +reader urword +optional true +time_series true +longname auxiliary variables +description REPLACE aux {'{#1}': 'constant head'} + +block period +name boundname +type string +shape +tagged false +in_record true +reader urword +optional true +longname constant head boundary name +description REPLACE boundname {'{#1}': 'constant head boundary'} diff --git a/doc/mf6io/mf6ivar/dfn/chf-cxs.dfn b/doc/mf6io/mf6ivar/dfn/chf-cxs.dfn new file mode 100644 index 00000000000..a1d28f962fe --- /dev/null +++ b/doc/mf6io/mf6ivar/dfn/chf-cxs.dfn @@ -0,0 +1,100 @@ +# --------------------- swf cxs options --------------------- + +block options +name print_input +type keyword +reader urword +optional true +longname print input to listing file +description REPLACE print_input {'{#1}': 'stream reach'} +mf6internal iprpak + +# --------------------- swf cxs dimensions --------------------- + +block dimensions +name nsections +type integer +reader urword +optional false +longname number of reaches +description integer value specifying the number of cross sections that will be defined. There must be NSECTIONS entries in the PACKAGEDATA block. + +block dimensions +name npoints +type integer +reader urword +optional false +longname total number of points defined for all reaches +description integer value specifying the total number of cross-section points defined for all reaches. There must be NPOINTS entries in the CROSSSECTIONDATA block. + +# --------------------- swf cxs packagedata --------------------- + +block packagedata +name packagedata +type recarray idcxs nxspoints +shape (nsections) +reader urword +longname +description + +block packagedata +name idcxs +type integer +shape +tagged false +in_record true +reader urword +longname reach number for this entry +description integer value that defines the cross section number associated with the specified PACKAGEDATA data on the line. IDCXS must be greater than zero and less than or equal to NSECTIONS. Information must be specified for every section or the program will terminate with an error. The program will also terminate with an error if information for a section is specified more than once. +numeric_index true + +block packagedata +name nxspoints +type integer +shape +tagged false +in_record true +reader urword +longname number of points used to define cross section +description integer value that defines the number of points used to define the define the shape of a section. NXSPOINTS must be greater than zero or the program will terminate with an error. NXSPOINTS defines the number of points that must be entered for the reach in the CROSSSECTIONDATA block. The sum of NXSPOINTS for all sections must equal the NPOINTS dimension. + +# --------------------- swf cxs crosssectiondata --------------------- + +block crosssectiondata +name crosssectiondata +type recarray xfraction height manfraction +shape (npoints) +reader urword +longname +description + +block crosssectiondata +name xfraction +type double precision +shape +tagged false +in_record true +reader urword +longname fractional width +description real value that defines the station (x) data for the cross-section as a fraction of the width (WIDTH) of the reach. XFRACTION must be greater than or equal to zero but can be greater than one. XFRACTION values can be used to decrease or increase the width of a reach from the specified reach width (WIDTH). + +block crosssectiondata +name height +type double precision +shape +tagged false +in_record true +reader urword +longname depth +description real value that is the height relative to the top of the lowest elevation of the streambed (ELEVATION) and corresponding to the station data on the same line. HEIGHT must be greater than or equal to zero and at least one cross-section height must be equal to zero. + +block crosssectiondata +name manfraction +type double precision +shape +tagged false +in_record true +reader urword +optional false +longname Manning's roughness coefficient +description real value that defines the Manning's roughness coefficient data for the cross-section as a fraction of the Manning's roughness coefficient for the reach (MANNINGSN) and corresponding to the station data on the same line. MANFRACTION must be greater than zero. MANFRACTION is applied from the XFRACTION value on the same line to the XFRACTION value on the next line. diff --git a/doc/mf6io/mf6ivar/dfn/chf-dfw.dfn b/doc/mf6io/mf6ivar/dfn/chf-dfw.dfn new file mode 100644 index 00000000000..0eef8d71b2e --- /dev/null +++ b/doc/mf6io/mf6ivar/dfn/chf-dfw.dfn @@ -0,0 +1,143 @@ +# --------------------- swf dfw options --------------------- + +block options +name central_in_space +type keyword +reader urword +optional true +longname use central in space weighting +description keyword to indicate conductance should be calculated using central-in-space weighting instead of the default upstream weighting approach. This option should be used with caution as it does not work well unless all of the stream reaches are saturated. With this option, there is no way for water to flow into a dry reach from connected reaches. +mf6internal icentral + +block options +name length_conversion +type double precision +reader urword +optional true +longname length conversion factor +description real value that is used to convert user-specified Manning's roughness coefficients from meters to model length units. LENGTH\_CONVERSION should be set to 3.28081, 1.0, and 100.0 when using length units (LENGTH\_UNITS) of feet, meters, or centimeters in the simulation, respectively. LENGTH\_CONVERSION does not need to be specified if LENGTH\_UNITS are meters. +mf6internal lengthconv + +block options +name time_conversion +type double precision +reader urword +optional true +longname time conversion factor +description real value that is used to convert user-specified Manning's roughness coefficients from seconds to model time units. TIME\_CONVERSION should be set to 1.0, 60.0, 3,600.0, 86,400.0, and 31,557,600.0 when using time units (TIME\_UNITS) of seconds, minutes, hours, days, or years in the simulation, respectively. TIME\_CONVERSION does not need to be specified if TIME\_UNITS are seconds. +mf6internal timeconv + +block options +name save_flows +type keyword +reader urword +optional true +longname keyword to save DFW flows +description keyword to indicate that budget flow terms will be written to the file specified with ``BUDGET SAVE FILE'' in Output Control. +mf6internal ipakcb + +block options +name print_flows +type keyword +reader urword +optional true +longname keyword to print DFW flows to listing file +description keyword to indicate that calculated flows between cells will be printed to the listing file for every stress period time step in which ``BUDGET PRINT'' is specified in Output Control. If there is no Output Control option and ``PRINT\_FLOWS'' is specified, then flow rates are printed for the last time step of each stress period. This option can produce extremely large list files because all cell-by-cell flows are printed. It should only be used with the DFW Package for models that have a small number of cells. +mf6internal iprflow + +block options +name save_velocity +type keyword +reader urword +optional true +longname keyword to save velocity +description keyword to indicate that x, y, and z components of velocity will be calculated at cell centers and written to the budget file, which is specified with ``BUDGET SAVE FILE'' in Output Control. If this option is activated, then additional information may be required in the discretization packages and the GWF Exchange package (if GWF models are coupled). Specifically, ANGLDEGX must be specified in the CONNECTIONDATA block of the DISU Package; ANGLDEGX must also be specified for the GWF Exchange as an auxiliary variable. +mf6internal isavvelocity + +block options +name obs_filerecord +type record obs6 filein obs6_filename +shape +reader urword +tagged true +optional true +longname +description + +block options +name obs6 +type keyword +shape +in_record true +reader urword +tagged true +optional false +longname obs keyword +description keyword to specify that record corresponds to an observations file. + +block options +name filein +type keyword +shape +in_record true +reader urword +tagged true +optional false +longname file keyword +description keyword to specify that an input filename is expected next. + +block options +name obs6_filename +type string +preserve_case true +in_record true +tagged false +reader urword +optional false +longname obs6 input filename +description REPLACE obs6_filename {'{#1}': 'DFW'} + +block options +name export_array_ascii +type keyword +reader urword +optional true +mf6internal export_ascii +longname export array variables to layered ascii files. +description keyword that specifies input griddata arrays should be written to layered ascii output files. + +# dev options + +block options +name dev_swr_conductance +type keyword +reader urword +optional true +longname use SWR conductance formulation +description use the conductance formulation in the Surface Water Routing (SWR) Process for MODFLOW-2005. +mf6internal iswrcond + +# --------------------- swf dfw griddata --------------------- + +block griddata +name manningsn +type double precision +shape (nodes) +valid +reader readarray +layered false +optional +longname mannings roughness coefficient +description mannings roughness coefficient + +block griddata +name idcxs +type integer +shape (nodes) +valid +reader readarray +layered false +optional true +longname cross section number +description integer value indication the cross section identifier in the Cross Section Package that applies to the reach. If not provided then reach will be treated as hydraulically wide. +numeric_index true diff --git a/doc/mf6io/mf6ivar/dfn/chf-dis2d.dfn b/doc/mf6io/mf6ivar/dfn/chf-dis2d.dfn new file mode 100644 index 00000000000..96b1837b572 --- /dev/null +++ b/doc/mf6io/mf6ivar/dfn/chf-dis2d.dfn @@ -0,0 +1,112 @@ +# --------------------- swf dis2d options --------------------- + +block options +name length_units +type string +reader urword +optional true +longname model length units +description is the length units used for this model. Values can be ``FEET'', ``METERS'', or ``CENTIMETERS''. If not specified, the default is ``UNKNOWN''. + +block options +name nogrb +type keyword +reader urword +optional true +longname do not write binary grid file +description keyword to deactivate writing of the binary grid file. + +block options +name xorigin +type double precision +reader urword +optional true +longname x-position of the model grid origin +description x-position of the lower-left corner of the model grid. A default value of zero is assigned if not specified. The value for XORIGIN does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space. + +block options +name yorigin +type double precision +reader urword +optional true +longname y-position of the model grid origin +description y-position of the lower-left corner of the model grid. If not specified, then a default value equal to zero is used. The value for YORIGIN does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space. + +block options +name angrot +type double precision +reader urword +optional true +longname rotation angle +description counter-clockwise rotation angle (in degrees) of the lower-left corner of the model grid. If not specified, then a default value of 0.0 is assigned. The value for ANGROT does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space. + +block options +name export_array_ascii +type keyword +reader urword +optional true +mf6internal export_ascii +longname export array variables to layered ascii files. +description keyword that specifies input griddata arrays should be written to layered ascii output files. + +# --------------------- swf dis2d dimensions --------------------- + +block dimensions +name nrow +type integer +reader urword +optional false +longname number of rows +description is the number of rows in the model grid. +default_value 2 + +block dimensions +name ncol +type integer +reader urword +optional false +longname number of columns +description is the number of columns in the model grid. +default_value 2 + +# --------------------- swf dis2d griddata --------------------- + +block griddata +name delr +type double precision +shape (ncol) +reader readarray +longname spacing along a row +description is the column spacing in the row direction. +default_value 1.0 + +block griddata +name delc +type double precision +shape (nrow) +reader readarray +longname spacing along a column +description is the row spacing in the column direction. +default_value 1.0 + +block griddata +name botm +type double precision +shape (ncol, nrow) +reader readarray +layered false +longname cell bottom elevation +description is the bottom elevation for each cell. +default_value 0. + +block griddata +name idomain +type integer +shape (ncol, nrow) +reader readarray +layered false +optional true +longname idomain existence array +description is an optional array that characterizes the existence status of a cell. If the IDOMAIN array is not specified, then all model cells exist within the solution. If the IDOMAIN value for a cell is 0, the cell does not exist in the simulation. Input and output values will be read and written for the cell, but internal to the program, the cell is excluded from the solution. If the IDOMAIN value for a cell is 1, the cell exists in the simulation. If the IDOMAIN value for a cell is -1, the cell does not exist in the simulation. Furthermore, the first existing cell above will be connected to the first existing cell below. This type of cell is referred to as a ``vertical pass through'' cell. + + diff --git a/doc/mf6io/mf6ivar/dfn/chf-disv1d.dfn b/doc/mf6io/mf6ivar/dfn/chf-disv1d.dfn new file mode 100644 index 00000000000..8e6b3c10f69 --- /dev/null +++ b/doc/mf6io/mf6ivar/dfn/chf-disv1d.dfn @@ -0,0 +1,210 @@ +# --------------------- swf disv1d options --------------------- + +block options +name length_units +type string +reader urword +optional true +longname model length units +description is the length units used for this model. Values can be ``FEET'', ``METERS'', or ``CENTIMETERS''. If not specified, the default is ``UNKNOWN''. + +block options +name nogrb +type keyword +reader urword +optional true +longname do not write binary grid file +description keyword to deactivate writing of the binary grid file. + +block options +name xorigin +type double precision +reader urword +optional true +longname x-position origin of the model grid coordinate system +description x-position of the origin used for model grid vertices. This value should be provided in a real-world coordinate system. A default value of zero is assigned if not specified. The value for XORIGIN does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space. + +block options +name yorigin +type double precision +reader urword +optional true +longname y-position origin of the model grid coordinate system +description y-position of the origin used for model grid vertices. This value should be provided in a real-world coordinate system. If not specified, then a default value equal to zero is used. The value for YORIGIN does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space. + +block options +name angrot +type double precision +reader urword +optional true +longname rotation angle +description counter-clockwise rotation angle (in degrees) of the model grid coordinate system relative to a real-world coordinate system. If not specified, then a default value of 0.0 is assigned. The value for ANGROT does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space. + +block options +name export_array_ascii +type keyword +reader urword +optional true +mf6internal export_ascii +longname export array variables to layered ascii files. +description keyword that specifies input griddata arrays should be written to layered ascii output files. + +# --------------------- swf disv1d dimensions --------------------- + +block dimensions +name nodes +type integer +reader urword +optional false +longname number of linear features +description is the number of linear cells. + +block dimensions +name nvert +type integer +reader urword +optional true +longname number of columns +description is the total number of (x, y, z) vertex pairs used to characterize the model grid. + +# --------------------- swf disv1d griddata --------------------- + +block griddata +name length +type double precision +shape (nodes) +valid +reader readarray +layered false +optional +longname length +description length for each one-dimensional cell + +block griddata +name width +type double precision +shape (nodes) +valid +reader readarray +layered false +optional +longname width +description real value that defines the width for each one-dimensional cell. WIDTH must be greater than zero. If the Cross Section (CXS) Package is used, then the WIDTH value will be multiplied by the specified cross section x-fraction values. + +block griddata +name bottom +type double precision +shape (nodes) +valid +reader readarray +layered false +optional +longname bottom elevation for the one-dimensional cell +description bottom elevation for the one-dimensional cell. + +block griddata +name idomain +type integer +shape (nodes) +reader readarray +layered false +optional true +longname idomain existence array +description is an optional array that characterizes the existence status of a cell. If the IDOMAIN array is not specified, then all model cells exist within the solution. If the IDOMAIN value for a cell is 0, the cell does not exist in the simulation. Input and output values will be read and written for the cell, but internal to the program, the cell is excluded from the solution. If the IDOMAIN value for a cell is 1, the cell exists in the simulation. + + +# --------------------- swf disv1d vertices --------------------- + +block vertices +name vertices +type recarray iv xv yv +shape (nvert) +reader urword +optional false +longname vertices data +description + +block vertices +name iv +type integer +in_record true +tagged false +reader urword +optional false +longname vertex number +description is the vertex number. Records in the VERTICES block must be listed in consecutive order from 1 to NVERT. +numeric_index true + +block vertices +name xv +type double precision +in_record true +tagged false +reader urword +optional false +longname x-coordinate for vertex +description is the x-coordinate for the vertex. + +block vertices +name yv +type double precision +in_record true +tagged false +reader urword +optional false +longname y-coordinate for vertex +description is the y-coordinate for the vertex. + +# --------------------- swf disv1d cell2d --------------------- + +block cell2d +name cell2d +type recarray icell2d fdc ncvert icvert +shape (nodes) +reader urword +optional false +longname cell2d data +description + +block cell2d +name icell2d +type integer +in_record true +tagged false +reader urword +optional false +longname cell2d number +description is the cell2d number. Records in the cell2d block must be listed in consecutive order from the first to the last. +numeric_index true + +block cell2d +name fdc +type double precision +in_record true +tagged false +reader urword +optional false +longname fractional distance to the cell center +description is the fractional distance to the cell center. FDC is relative to the first vertex in the ICVERT array. In most cases FDC should be 0.5, which would place the center of the line segment that defines the cell. If the value of FDC is 1, the cell center would located at the last vertex. FDC values of 0 and 1 can be used to place the node at either end of the cell which can be useful for cells with boundary conditions. + +block cell2d +name ncvert +type integer +in_record true +tagged false +reader urword +optional false +longname number of cell vertices +description is the number of vertices required to define the cell. There may be a different number of vertices for each cell. + +block cell2d +name icvert +type integer +shape (ncvert) +in_record true +tagged false +reader urword +optional false +longname number of cell vertices +description is an array of integer values containing vertex numbers (in the VERTICES block) used to define the cell. Vertices must be listed in the order that defines the line representing the cell. Cells that are connected must share vertices. The bottom elevation of the cell is calculated using the ZV of the first and last vertex point and FDC. +numeric_index true diff --git a/doc/mf6io/mf6ivar/dfn/chf-disv2d.dfn b/doc/mf6io/mf6ivar/dfn/chf-disv2d.dfn new file mode 100644 index 00000000000..37f17f7f4b2 --- /dev/null +++ b/doc/mf6io/mf6ivar/dfn/chf-disv2d.dfn @@ -0,0 +1,196 @@ +# --------------------- swf disv2d options --------------------- + +block options +name length_units +type string +reader urword +optional true +longname model length units +description is the length units used for this model. Values can be ``FEET'', ``METERS'', or ``CENTIMETERS''. If not specified, the default is ``UNKNOWN''. + +block options +name nogrb +type keyword +reader urword +optional true +longname do not write binary grid file +description keyword to deactivate writing of the binary grid file. + +block options +name xorigin +type double precision +reader urword +optional true +longname x-position of the model grid origin +description x-position of the lower-left corner of the model grid. A default value of zero is assigned if not specified. The value for XORIGIN does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space. + +block options +name yorigin +type double precision +reader urword +optional true +longname y-position of the model grid origin +description y-position of the lower-left corner of the model grid. If not specified, then a default value equal to zero is used. The value for YORIGIN does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space. + +block options +name angrot +type double precision +reader urword +optional true +longname rotation angle +description counter-clockwise rotation angle (in degrees) of the lower-left corner of the model grid. If not specified, then a default value of 0.0 is assigned. The value for ANGROT does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space. + +block options +name export_array_ascii +type keyword +reader urword +optional true +mf6internal export_ascii +longname export array variables to layered ascii files. +description keyword that specifies input griddata arrays should be written to layered ascii output files. + +# --------------------- swf disv2d dimensions --------------------- + +block dimensions +name nodes +type integer +reader urword +optional false +longname number of cells per layer +description is the number of cells per layer. This is a constant value for the grid and it applies to all layers. + +block dimensions +name nvert +type integer +reader urword +optional false +longname number of columns +description is the total number of (x, y) vertex pairs used to characterize the horizontal configuration of the model grid. + +# --------------------- swf disv2d griddata --------------------- + +block griddata +name bottom +type double precision +shape (nodes) +reader readarray +layered false +longname model bottom elevation +description is the bottom elevation for each cell. + +block griddata +name idomain +type integer +shape (nodes) +reader readarray +layered false +optional true +longname idomain existence array +description is an optional array that characterizes the existence status of a cell. If the IDOMAIN array is not specified, then all model cells exist within the solution. If the IDOMAIN value for a cell is 0, the cell does not exist in the simulation. Input and output values will be read and written for the cell, but internal to the program, the cell is excluded from the solution. If the IDOMAIN value for a cell is 1 or greater, the cell exists in the simulation. If the IDOMAIN value for a cell is -1, the cell does not exist in the simulation. Furthermore, the first existing cell above will be connected to the first existing cell below. This type of cell is referred to as a ``vertical pass through'' cell. + +# --------------------- swf disv2d vertices --------------------- + +block vertices +name vertices +type recarray iv xv yv +shape (nvert) +reader urword +optional false +longname vertices data +description + +block vertices +name iv +type integer +in_record true +tagged false +reader urword +optional false +longname vertex number +description is the vertex number. Records in the VERTICES block must be listed in consecutive order from 1 to NVERT. +numeric_index true + +block vertices +name xv +type double precision +in_record true +tagged false +reader urword +optional false +longname x-coordinate for vertex +description is the x-coordinate for the vertex. + +block vertices +name yv +type double precision +in_record true +tagged false +reader urword +optional false +longname y-coordinate for vertex +description is the y-coordinate for the vertex. + + +# --------------------- swf disv cell2d --------------------- + +block cell2d +name cell2d +type recarray icell2d xc yc ncvert icvert +shape (nodes) +reader urword +optional false +longname cell2d data +description + +block cell2d +name icell2d +type integer +in_record true +tagged false +reader urword +optional false +longname cell2d number +description is the CELL2D number. Records in the CELL2D block must be listed in consecutive order from the first to the last. +numeric_index true + +block cell2d +name xc +type double precision +in_record true +tagged false +reader urword +optional false +longname x-coordinate for cell center +description is the x-coordinate for the cell center. + +block cell2d +name yc +type double precision +in_record true +tagged false +reader urword +optional false +longname y-coordinate for cell center +description is the y-coordinate for the cell center. + +block cell2d +name ncvert +type integer +in_record true +tagged false +reader urword +optional false +longname number of cell vertices +description is the number of vertices required to define the cell. There may be a different number of vertices for each cell. + +block cell2d +name icvert +type integer +shape (ncvert) +in_record true +tagged false +reader urword +optional false +longname array of vertex numbers +description is an array of integer values containing vertex numbers (in the VERTICES block) used to define the cell. Vertices must be listed in clockwise order. Cells that are connected must share vertices. +numeric_index true diff --git a/doc/mf6io/mf6ivar/dfn/chf-flw.dfn b/doc/mf6io/mf6ivar/dfn/chf-flw.dfn new file mode 100644 index 00000000000..dbacb0588c7 --- /dev/null +++ b/doc/mf6io/mf6ivar/dfn/chf-flw.dfn @@ -0,0 +1,207 @@ +# --------------------- swf flw options --------------------- +# flopy multi-package + +block options +name auxiliary +type string +shape (naux) +reader urword +optional true +longname keyword to specify aux variables +description REPLACE auxnames {'{#1}': 'Stream Network Flow'} + +block options +name auxmultname +type string +shape +reader urword +optional true +longname name of auxiliary variable for multiplier +description REPLACE auxmultname {'{#1}': 'flow rate'} + +block options +name boundnames +type keyword +shape +reader urword +optional true +longname +description REPLACE boundnames {'{#1}': 'inflow'} + +block options +name print_input +type keyword +reader urword +optional true +longname print input to listing file +description REPLACE print_input {'{#1}': 'inflow'} + +block options +name print_flows +type keyword +reader urword +optional true +longname print calculated flows to listing file +description REPLACE print_flows {'{#1}': 'inflow'} + +block options +name save_flows +type keyword +reader urword +optional true +longname save well flows to budget file +description REPLACE save_flows {'{#1}': 'inflow'} + +block options +name ts_filerecord +type record ts6 filein ts6_filename +shape +reader urword +tagged true +optional true +longname +description + +block options +name ts6 +type keyword +shape +in_record true +reader urword +tagged true +optional false +longname head keyword +description keyword to specify that record corresponds to a time-series file. + +block options +name filein +type keyword +shape +in_record true +reader urword +tagged true +optional false +longname file keyword +description keyword to specify that an input filename is expected next. + +block options +name ts6_filename +type string +preserve_case true +in_record true +reader urword +optional false +tagged false +longname file name of time series information +description REPLACE timeseriesfile {} + +block options +name obs_filerecord +type record obs6 filein obs6_filename +shape +reader urword +tagged true +optional true +longname +description + +block options +name obs6 +type keyword +shape +in_record true +reader urword +tagged true +optional false +longname obs keyword +description keyword to specify that record corresponds to an observations file. + +block options +name obs6_filename +type string +preserve_case true +in_record true +tagged false +reader urword +optional false +longname obs6 input filename +description REPLACE obs6_filename {'{#1}': 'inflow'} + +# --------------------- swf flw dimensions --------------------- + +block dimensions +name maxbound +type integer +reader urword +optional false +longname maximum number of inflow +description REPLACE maxbound {'{#1}': 'inflow'} + + +# --------------------- swf flw period --------------------- + +block period +name iper +type integer +block_variable True +in_record true +tagged false +shape +valid +reader urword +optional false +longname stress period number +description REPLACE iper {} + +block period +name stress_period_data +type recarray cellid q aux boundname +shape (maxbound) +reader urword +longname +description +mf6internal spd + +block period +name cellid +type integer +shape (ncelldim) +tagged false +in_record true +reader urword +longname cell identifier +description REPLACE cellid {} + +block period +name q +type double precision +shape +tagged false +in_record true +reader urword +time_series true +longname well rate +description is the volumetric inflow rate. A positive value indicates inflow to the stream. Negative values are not allows. If the Options block includes a TIMESERIESFILE entry (see the ``Time-Variable Input'' section), values can be obtained from a time series by entering the time-series name in place of a numeric value. + +block period +name aux +type double precision +in_record true +tagged false +shape (naux) +reader urword +optional true +time_series true +longname auxiliary variables +description REPLACE aux {'{#1}': 'inflow'} + +block period +name boundname +type string +shape +tagged false +in_record true +reader urword +optional true +longname inflow name +description REPLACE boundname {'{#1}': 'inflow'} diff --git a/doc/mf6io/mf6ivar/dfn/chf-ic.dfn b/doc/mf6io/mf6ivar/dfn/chf-ic.dfn new file mode 100644 index 00000000000..5462ac7a29c --- /dev/null +++ b/doc/mf6io/mf6ivar/dfn/chf-ic.dfn @@ -0,0 +1,22 @@ +# --------------------- swf ic options --------------------- + +block options +name export_array_ascii +type keyword +reader urword +optional true +mf6internal export_ascii +longname export array variables to layered ascii files. +description keyword that specifies input griddata arrays should be written to layered ascii output files. + +# --------------------- swf ic griddata --------------------- + +block griddata +name strt +type double precision +shape (nodes) +reader readarray +layered true +longname starting concentration +description is the initial (starting) stage---that is, stage at the beginning of the SWF Model simulation. STRT must be specified for all SWF Model simulations. One value is read for every model reach. +default_value 0.0 diff --git a/doc/mf6io/mf6ivar/dfn/chf-nam.dfn b/doc/mf6io/mf6ivar/dfn/chf-nam.dfn new file mode 100644 index 00000000000..77fcbcd8ab2 --- /dev/null +++ b/doc/mf6io/mf6ivar/dfn/chf-nam.dfn @@ -0,0 +1,99 @@ +# --------------------- swf nam options --------------------- + +block options +name list +type string +reader urword +optional true +preserve_case true +longname name of listing file +description is name of the listing file to create for this SWF model. If not specified, then the name of the list file will be the basename of the SWF model name file and the '.lst' extension. For example, if the SWF name file is called ``my.model.nam'' then the list file will be called ``my.model.lst''. + +block options +name print_input +type keyword +reader urword +optional true +longname print input to listing file +description REPLACE print_input {'{#1}': 'all model stress package'} + +block options +name print_flows +type keyword +reader urword +optional true +longname print calculated flows to listing file +description REPLACE print_flows {'{#1}': 'all model package'} + +block options +name save_flows +type keyword +reader urword +optional true +longname save flows for all packages to budget file +description REPLACE save_flows {'{#1}': 'all model package'} + +block options +name newtonoptions +type record newton under_relaxation +reader urword +optional true +longname newton keyword and options +description none + +block options +name newton +in_record true +type keyword +reader urword +longname keyword to activate Newton-Raphson formulation +description keyword that activates the Newton-Raphson formulation for surface water flow between connected reaches and stress packages that support calculation of Newton-Raphson terms. + +block options +name under_relaxation +in_record true +type keyword +reader urword +optional true +longname keyword to activate Newton-Raphson UNDER_RELAXATION option +description keyword that indicates whether the surface water stage in a reach will be under-relaxed when water levels fall below the bottom of the model below any given cell. By default, Newton-Raphson UNDER\_RELAXATION is not applied. + +# --------------------- swf nam packages --------------------- + +block packages +name packages +type recarray ftype fname pname +reader urword +optional false +longname package list +description + +block packages +name ftype +in_record true +type string +tagged false +reader urword +longname package type +description is the file type, which must be one of the following character values shown in table~\ref{table:ftype-swf}. Ftype may be entered in any combination of uppercase and lowercase. + +block packages +name fname +in_record true +type string +preserve_case true +tagged false +reader urword +longname file name +description is the name of the file containing the package input. The path to the file should be included if the file is not located in the folder where the program was run. + +block packages +name pname +in_record true +type string +tagged false +reader urword +optional true +longname user name for package +description is the user-defined name for the package. PNAME is restricted to 16 characters. No spaces are allowed in PNAME. PNAME character values are read and stored by the program for stress packages only. These names may be useful for labeling purposes when multiple stress packages of the same type are located within a single SWF Model. If PNAME is specified for a stress package, then PNAME will be used in the flow budget table in the listing file; it will also be used for the text entry in the cell-by-cell budget file. PNAME is case insensitive and is stored in all upper case letters. + diff --git a/doc/mf6io/mf6ivar/dfn/chf-oc.dfn b/doc/mf6io/mf6ivar/dfn/chf-oc.dfn new file mode 100644 index 00000000000..645942857a6 --- /dev/null +++ b/doc/mf6io/mf6ivar/dfn/chf-oc.dfn @@ -0,0 +1,345 @@ +# --------------------- swf oc options --------------------- + +block options +name budget_filerecord +type record budget fileout budgetfile +shape +reader urword +tagged true +optional true +longname +description + +block options +name budget +type keyword +shape +in_record true +reader urword +tagged true +optional false +longname budget keyword +description keyword to specify that record corresponds to the budget. + +block options +name fileout +type keyword +shape +in_record true +reader urword +tagged true +optional false +longname file keyword +description keyword to specify that an output filename is expected next. + +block options +name budgetfile +type string +preserve_case true +shape +in_record true +reader urword +tagged false +optional false +longname file keyword +description name of the output file to write budget information. + +block options +name budgetcsv_filerecord +type record budgetcsv fileout budgetcsvfile +shape +reader urword +tagged true +optional true +longname +description + +block options +name budgetcsv +type keyword +shape +in_record true +reader urword +tagged true +optional false +longname budget keyword +description keyword to specify that record corresponds to the budget CSV. + +block options +name budgetcsvfile +type string +preserve_case true +shape +in_record true +reader urword +tagged false +optional false +longname file keyword +description name of the comma-separated value (CSV) output file to write budget summary information. A budget summary record will be written to this file for each time step of the simulation. + +block options +name qoutflow_filerecord +type record qoutflow fileout qoutflowfile +shape +reader urword +tagged true +optional true +longname +description + +block options +name qoutflow +type keyword +shape +in_record true +reader urword +tagged true +optional false +longname qoutflow keyword +description keyword to specify that record corresponds to qoutflow. + +block options +name qoutflowfile +type string +preserve_case true +shape +in_record true +reader urword +tagged false +optional false +longname file keyword +description name of the output file to write conc information. + +block options +name stage_filerecord +type record stage fileout stagefile +shape +reader urword +tagged true +optional true +longname +description + +block options +name stage +type keyword +shape +in_record true +reader urword +tagged true +optional false +longname stage keyword +description keyword to specify that record corresponds to stage. + +block options +name stagefile +type string +preserve_case true +shape +in_record true +reader urword +tagged false +optional false +longname file keyword +description name of the output file to write stage information. + +block options +name qoutflowprintrecord +type record qoutflow print_format formatrecord +shape +reader urword +optional true +longname +description + +block options +name print_format +type keyword +shape +in_record true +reader urword +tagged true +optional false +longname keyword to indicate that a print format follows +description keyword to specify format for printing to the listing file. + +block options +name formatrecord +type record columns width digits format +shape +in_record true +reader urword +tagged +optional false +longname +description + +block options +name columns +type integer +shape +in_record true +reader urword +tagged true +optional +longname number of columns +description number of columns for writing data. + +block options +name width +type integer +shape +in_record true +reader urword +tagged true +optional +longname width for each number +description width for writing each number. + +block options +name digits +type integer +shape +in_record true +reader urword +tagged true +optional +longname number of digits +description number of digits to use for writing a number. + +block options +name format +type string +shape +in_record true +reader urword +tagged false +optional false +longname write format +description write format can be EXPONENTIAL, FIXED, GENERAL, or SCIENTIFIC. + +# --------------------- swf oc period --------------------- + +block period +name iper +type integer +block_variable True +in_record true +tagged false +shape +valid +reader urword +optional false +longname stress period number +description REPLACE iper {} + +block period +name saverecord +type record save rtype ocsetting +shape +reader urword +tagged false +optional true +longname +description + +block period +name save +type keyword +shape +in_record true +reader urword +tagged true +optional false +longname keyword to save +description keyword to indicate that information will be saved this stress period. + +block period +name printrecord +type record print rtype ocsetting +shape +reader urword +tagged false +optional true +longname +description + +block period +name print +type keyword +shape +in_record true +reader urword +tagged true +optional false +longname keyword to save +description keyword to indicate that information will be printed this stress period. + +block period +name rtype +type string +shape +in_record true +reader urword +tagged false +optional false +longname record type +description type of information to save or print. Can be BUDGET. + +block period +name ocsetting +type keystring all first last frequency steps +shape +tagged false +in_record true +reader urword +longname +description specifies the steps for which the data will be saved. + +block period +name all +type keyword +shape +in_record true +reader urword +longname +description keyword to indicate save for all time steps in period. + +block period +name first +type keyword +shape +in_record true +reader urword +longname +description keyword to indicate save for first step in period. This keyword may be used in conjunction with other keywords to print or save results for multiple time steps. + +block period +name last +type keyword +shape +in_record true +reader urword +longname +description keyword to indicate save for last step in period. This keyword may be used in conjunction with other keywords to print or save results for multiple time steps. + +block period +name frequency +type integer +shape +tagged true +in_record true +reader urword +longname +description save at the specified time step frequency. This keyword may be used in conjunction with other keywords to print or save results for multiple time steps. + +block period +name steps +type integer +shape ( - + + - - - - - - - - + + + + + + + + + - - - - - - - - + + + + + + + + + - - - - - - - - + + + + + + + + + - - - - - - - - + + + + + + + + + + @@ -83,13 +89,13 @@ - + - + - + - + @@ -107,33 +113,51 @@ + + + + + + + + + + + + + + + + + + @@ -165,6 +189,18 @@ + + + + + + + + + + + + @@ -223,6 +259,9 @@ + + + @@ -248,10 +287,7 @@ - - - - + @@ -292,10 +328,14 @@ - + + + + + @@ -381,13 +421,13 @@ - + - + - + - + @@ -396,13 +436,13 @@ - + - + - + - + @@ -436,12 +476,12 @@ + - @@ -449,14 +489,14 @@ - - + + - + - + - + @@ -473,31 +513,14 @@ - - + + - + - + - - - - - - - - - - - - - - - - - - + @@ -520,6 +543,23 @@ + + + + + + + + + + + + + + + + + @@ -560,23 +600,23 @@ - + - + - + - + - + - + - + - + @@ -618,12 +658,14 @@ - + - + - + - - - + + + + + diff --git a/src/Exchange/exg-chfgwf.f90 b/src/Exchange/exg-chfgwf.f90 new file mode 100644 index 00000000000..ad8bc8b9b95 --- /dev/null +++ b/src/Exchange/exg-chfgwf.f90 @@ -0,0 +1,287 @@ +!> @brief This module contains the ChfGwfExchangeModule Module +!! +!! This module contains a lightweight CHF-GWF exchange class which is +!! primarily based on the underlying and generic SWF-GWF code for connecting +!< a SWF model (either CHF or OLF) with a GWF model. +module ChfGwfExchangeModule + + use KindModule, only: DP, I4B, LGP + use SimVariablesModule, only: errmsg, iout, model_loc_idx + use SimModule, only: count_errors, store_error, store_error_filename + use ListsModule, only: basemodellist, baseexchangelist + use MemoryHelperModule, only: create_mem_path + use BaseExchangeModule, only: BaseExchangeType, AddBaseExchangeToList + use BaseModelModule, only: BaseModelType, GetBaseModelFromList + use SwfGwfExchangeModule, only: SwfGwfExchangeType + use GwfModule, only: GwfModelType + use SwfModule, only: SwfModelType + use ObsModule, only: obs_cr + + implicit none + private + public :: chfgwf_cr + + type, extends(SwfGwfExchangeType) :: ChfGwfExchangeType + contains + procedure :: exg_df => chf_gwf_df + procedure :: source_options + procedure :: source_dimensions + procedure :: source_data + end type ChfGwfExchangeType + +contains + + !> @ brief Create CHF GWF exchange + !! + !! High level wrapper over the SWF-GWF exchange, which is generic in that + !! it can be used to couple either a CHF or OLF surface water model to a + !! GWF model. + !< + subroutine chfgwf_cr(filename, name, id, m1_id, m2_id, input_mempath) + ! modules + ! dummy + character(len=*), intent(in) :: filename !< filename for reading + character(len=*) :: name !< exchange name + integer(I4B), intent(in) :: id !< id for the exchange + integer(I4B), intent(in) :: m1_id !< id for model 1 + integer(I4B), intent(in) :: m2_id !< id for model 2 + character(len=*), intent(in) :: input_mempath + ! local + type(ChfGwfExchangeType), pointer :: exchange + class(BaseExchangeType), pointer :: baseexchange + + ! Create a new exchange and add it to the baseexchangelist container + allocate (exchange) + baseexchange => exchange + call AddBaseExchangeToList(baseexchangelist, baseexchange) + + call exchange%initialize(filename, name, 'CHF', id, m1_id, m2_id, & + input_mempath) + + end subroutine chfgwf_cr + + !> @ brief Define CHF GWF exchange + !< + subroutine chf_gwf_df(this) + ! modules + ! dummy + class(ChfGwfExchangeType) :: this !< SwfGwfExchangeType + ! local + + ! log the exchange + write (iout, '(/a,a)') ' Creating exchange: ', this%name + ! + ! Ensure models are in same solution + if (associated(this%swfmodel) .and. associated(this%gwfmodel)) then + if (this%swfmodel%idsoln /= this%gwfmodel%idsoln) then + call store_error('Two models are connected in a SWF-GWF '// & + 'exchange but they are in different solutions. '// & + 'Models must be in same solution: '// & + trim(this%swfmodel%name)//' '// & + trim(this%gwfmodel%name)) + call store_error_filename(this%filename) + end if + end if + + ! source options + call this%source_options(iout) + + ! source dimensions + call this%source_dimensions(iout) + + ! allocate arrays + call this%allocate_arrays() + + ! source exchange data + call this%source_data(iout) + + ! Store obs + ! call this%swf_gwf_df_obs() + ! if (associated(this%swfmodel1)) then + ! call this%obs%obs_df(iout, this%name, 'SWF-GWF', this%swfmodel1%dis) + ! end if + + ! ! validate + ! call this%validate_exchange() + + end subroutine chf_gwf_df + + !> @ brief Source options + !< + subroutine source_options(this, iout) + ! modules + use ConstantsModule, only: LENVARNAME, DEM6 + use InputOutputModule, only: getunit, openfile + use MemoryManagerExtModule, only: mem_set_value + use CharacterStringModule, only: CharacterStringType + use ExgChfgwfInputModule, only: ExgChfgwfParamFoundType + use SourceCommonModule, only: filein_fname + ! dummy + class(ChfGwfExchangeType) :: this !< GwfExchangeType + integer(I4B), intent(in) :: iout + ! local + type(ExgChfgwfParamFoundType) :: found + + ! update defaults with idm sourced values + call mem_set_value(this%ipr_input, 'IPR_INPUT', & + this%input_mempath, found%ipr_input) + call mem_set_value(this%ipr_flow, 'IPR_FLOW', & + this%input_mempath, found%ipr_flow) + call mem_set_value(this%ifixedcond, 'IFIXEDCOND', & + this%input_mempath, found%ifixedcond) + + write (iout, '(1x,a)') 'Processing CHF-GWF exchange options' + + if (found%ipr_input) then + write (iout, '(4x,a)') & + 'The list of exchanges will be printed.' + end if + + if (found%ipr_flow) then + write (iout, '(4x,a)') & + 'Exchange flows will be printed to list files.' + end if + + if (found%ifixedcond) then + write (iout, '(4x,a)') & + 'Conductance is fixed as product of BEDLEAK and CFACT.' + end if + + ! enforce 0 or 1 OBS6_FILENAME entries in option block + ! if (.not. this%is_datacopy) then + ! if (filein_fname(this%obs%inputFilename, 'OBS6_FILENAME', & + ! this%input_mempath, this%filename)) then + ! this%obs%active = .true. + ! this%obs%inUnitObs = GetUnit() + ! call openfile(this%obs%inUnitObs, iout, this%obs%inputFilename, 'OBS') + ! end if + ! end if + + write (iout, '(1x,a)') 'End of CHF-GWF exchange options' + + end subroutine source_options + + !> @brief Source dimension from input context + !< + subroutine source_dimensions(this, iout) + ! modules + use MemoryManagerExtModule, only: mem_set_value + use ExgChfgwfInputModule, only: ExgChfgwfParamFoundType + ! dummy + class(ChfGwfExchangeType) :: this !< instance of exchange object + integer(I4B), intent(in) :: iout !< for logging + ! local + type(ExgChfgwfParamFoundType) :: found + + ! update defaults with idm sourced values + call mem_set_value(this%nexg, 'NEXG', this%input_mempath, found%nexg) + + write (iout, '(1x,a)') 'PROCESSING EXCHANGE DIMENSIONS' + + if (found%nexg) then + write (iout, '(4x,a,i0)') 'NEXG = ', this%nexg + end if + + write (iout, '(1x,a)') 'END OF EXCHANGE DIMENSIONS' + + end subroutine source_dimensions + + !> @brief Source exchange data from input context + !< + subroutine source_data(this, iout) + ! modules + use MemoryManagerModule, only: mem_setptr + ! dummy + class(ChfGwfExchangeType) :: this !< instance of exchange object + integer(I4B), intent(in) :: iout !< the output file unit + ! local + integer(I4B), dimension(:, :), contiguous, pointer :: cellidm1 + integer(I4B), dimension(:, :), contiguous, pointer :: cellidm2 + real(DP), dimension(:), contiguous, pointer :: bedleak + real(DP), dimension(:), contiguous, pointer :: cfact + character(len=20) :: cellstr1, cellstr2 + integer(I4B) :: nerr + integer(I4B) :: iexg, nodeswf, nodegwf + ! format + character(len=*), parameter :: fmtexglabel = "(1x, 3a10, 50(a16))" + character(len=*), parameter :: fmtexgdata = & + "(5x, a, 1x, a ,50(1pg16.6))" + + call mem_setptr(cellidm1, 'CELLIDM1', this%input_mempath) + call mem_setptr(cellidm2, 'CELLIDM2', this%input_mempath) + call mem_setptr(bedleak, 'BEDLEAK', this%input_mempath) + call mem_setptr(cfact, 'CFACT', this%input_mempath) + + write (iout, '(1x,a)') 'PROCESSING EXCHANGEDATA' + + if (this%ipr_input /= 0) then + write (iout, fmtexglabel) 'NODEM1', 'NODEM2', 'BEDLEAK', 'CFACT' + end if + + do iexg = 1, this%nexg + + if (associated(this%model1)) then + ! Determine user node number + nodeswf = this%noder(this%model1, cellidm1(:, iexg), iout) + this%nodeswf(iexg) = nodeswf + else + this%nodeswf(iexg) = -1 + end if + + if (associated(this%model2)) then + ! Determine user node number + nodegwf = this%noder(this%model2, cellidm2(:, iexg), iout) + this%nodegwf(iexg) = nodegwf + else + this%nodegwf(iexg) = -1 + end if + + ! Read rest of input line + this%bedleak(iexg) = bedleak(iexg) + this%cfact(iexg) = cfact(iexg) + + ! Write the data to listing file if requested + if (this%ipr_input /= 0) then + cellstr1 = this%cellstr(this%model1, cellidm1(:, iexg), iout) + cellstr2 = this%cellstr(this%model2, cellidm2(:, iexg), iout) + write (iout, fmtexgdata) trim(cellstr1), trim(cellstr2), & + this%bedleak(iexg), this%cfact(iexg) + end if + + ! Check to see if nodeswf is outside of active domain + if (associated(this%model1)) then + if (nodeswf <= 0) then + cellstr1 = this%cellstr(this%model1, cellidm1(:, iexg), iout) + write (errmsg, *) & + trim(adjustl(this%model1%name))// & + ' Cell is outside active grid domain ('// & + trim(adjustl(cellstr1))//').' + call store_error(errmsg) + end if + end if + + ! Check to see if nodegwf is outside of active domain + if (associated(this%model2)) then + if (nodegwf <= 0) then + cellstr2 = this%cellstr(this%model2, cellidm2(:, iexg), iout) + write (errmsg, *) & + trim(adjustl(this%model2%name))// & + ' Cell is outside active grid domain ('// & + trim(adjustl(cellstr2))//').' + call store_error(errmsg) + end if + end if + end do + + write (iout, '(1x,a)') 'END OF EXCHANGEDATA' + + ! Stop if errors + nerr = count_errors() + if (nerr > 0) then + call store_error('Errors encountered in exchange input file.') + call store_error_filename(this%filename) + end if + + end subroutine source_data + +end module ChfGwfExchangeModule diff --git a/src/Exchange/exg-olfgwf.f90 b/src/Exchange/exg-olfgwf.f90 new file mode 100644 index 00000000000..130d336efc6 --- /dev/null +++ b/src/Exchange/exg-olfgwf.f90 @@ -0,0 +1,287 @@ +!> @brief This module contains the OlfGwfExchangeModule Module +!! +!! This module contains a lightweight OLF-GWF exchange class which is +!! primarily based on the underlying and generic SWF-GWF code for connecting +!< a SWF model (either CHF or OLF) with a GWF model. +module OlfGwfExchangeModule + + use KindModule, only: DP, I4B, LGP + use SimVariablesModule, only: errmsg, iout, model_loc_idx + use SimModule, only: count_errors, store_error, store_error_filename + use ListsModule, only: basemodellist, baseexchangelist + use MemoryHelperModule, only: create_mem_path + use BaseExchangeModule, only: BaseExchangeType, AddBaseExchangeToList + use BaseModelModule, only: BaseModelType, GetBaseModelFromList + use SwfGwfExchangeModule, only: SwfGwfExchangeType + use GwfModule, only: GwfModelType + use SwfModule, only: SwfModelType + use ObsModule, only: obs_cr + + implicit none + private + public :: olfgwf_cr + + type, extends(SwfGwfExchangeType) :: OlfGwfExchangeType + contains + procedure :: exg_df => olf_gwf_df + procedure :: source_options + procedure :: source_dimensions + procedure :: source_data + end type OlfGwfExchangeType + +contains + + !> @ brief Create OLF GWF exchange + !! + !! High level wrapper over the SWF-GWF exchange, which is generic in that + !! it can be used to couple either a CHF or OLF surface water model to a + !! GWF model. + !< + subroutine olfgwf_cr(filename, name, id, m1_id, m2_id, input_mempath) + ! modules + ! dummy + character(len=*), intent(in) :: filename !< filename for reading + character(len=*) :: name !< exchange name + integer(I4B), intent(in) :: id !< id for the exchange + integer(I4B), intent(in) :: m1_id !< id for model 1 + integer(I4B), intent(in) :: m2_id !< id for model 2 + character(len=*), intent(in) :: input_mempath + ! local + type(OlfGwfExchangeType), pointer :: exchange + class(BaseExchangeType), pointer :: baseexchange + + ! Create a new exchange and add it to the baseexchangelist container + allocate (exchange) + baseexchange => exchange + call AddBaseExchangeToList(baseexchangelist, baseexchange) + + call exchange%initialize(filename, name, 'OLF', id, m1_id, m2_id, & + input_mempath) + + end subroutine olfgwf_cr + + !> @ brief Define OLF GWF exchange + !< + subroutine olf_gwf_df(this) + ! modules + ! dummy + class(OlfGwfExchangeType) :: this !< SwfGwfExchangeType + ! local + + ! log the exchange + write (iout, '(/a,a)') ' Creating exchange: ', this%name + ! + ! Ensure models are in same solution + if (associated(this%swfmodel) .and. associated(this%gwfmodel)) then + if (this%swfmodel%idsoln /= this%gwfmodel%idsoln) then + call store_error('Two models are connected in a SWF-GWF '// & + 'exchange but they are in different solutions. '// & + 'Models must be in same solution: '// & + trim(this%swfmodel%name)//' '// & + trim(this%gwfmodel%name)) + call store_error_filename(this%filename) + end if + end if + + ! source options + call this%source_options(iout) + + ! source dimensions + call this%source_dimensions(iout) + + ! allocate arrays + call this%allocate_arrays() + + ! source exchange data + call this%source_data(iout) + + ! Store obs + ! call this%swf_gwf_df_obs() + ! if (associated(this%swfmodel1)) then + ! call this%obs%obs_df(iout, this%name, 'SWF-GWF', this%swfmodel1%dis) + ! end if + + ! ! validate + ! call this%validate_exchange() + + end subroutine olf_gwf_df + + !> @ brief Source options + !< + subroutine source_options(this, iout) + ! modules + use ConstantsModule, only: LENVARNAME, DEM6 + use InputOutputModule, only: getunit, openfile + use MemoryManagerExtModule, only: mem_set_value + use CharacterStringModule, only: CharacterStringType + use ExgOlfgwfInputModule, only: ExgOlfgwfParamFoundType + use SourceCommonModule, only: filein_fname + ! dummy + class(OlfGwfExchangeType) :: this !< GwfExchangeType + integer(I4B), intent(in) :: iout + ! local + type(ExgOlfgwfParamFoundType) :: found + + ! update defaults with idm sourced values + call mem_set_value(this%ipr_input, 'IPR_INPUT', & + this%input_mempath, found%ipr_input) + call mem_set_value(this%ipr_flow, 'IPR_FLOW', & + this%input_mempath, found%ipr_flow) + call mem_set_value(this%ifixedcond, 'IFIXEDCOND', & + this%input_mempath, found%ifixedcond) + + write (iout, '(1x,a)') 'Processing OLF-GWF exchange options' + + if (found%ipr_input) then + write (iout, '(4x,a)') & + 'The list of exchanges will be printed.' + end if + + if (found%ipr_flow) then + write (iout, '(4x,a)') & + 'Exchange flows will be printed to list files.' + end if + + if (found%ifixedcond) then + write (iout, '(4x,a)') & + 'Conductance is fixed as product of BEDLEAK and CFACT.' + end if + + ! enforce 0 or 1 OBS6_FILENAME entries in option block + ! if (.not. this%is_datacopy) then + ! if (filein_fname(this%obs%inputFilename, 'OBS6_FILENAME', & + ! this%input_mempath, this%filename)) then + ! this%obs%active = .true. + ! this%obs%inUnitObs = GetUnit() + ! call openfile(this%obs%inUnitObs, iout, this%obs%inputFilename, 'OBS') + ! end if + ! end if + + write (iout, '(1x,a)') 'End of OLF-GWF exchange options' + + end subroutine source_options + + !> @brief Source dimension from input context + !< + subroutine source_dimensions(this, iout) + ! modules + use MemoryManagerExtModule, only: mem_set_value + use ExgOlfgwfInputModule, only: ExgOlfgwfParamFoundType + ! dummy + class(OlfGwfExchangeType) :: this !< instance of exchange object + integer(I4B), intent(in) :: iout !< for logging + ! local + type(ExgOlfgwfParamFoundType) :: found + + ! update defaults with idm sourced values + call mem_set_value(this%nexg, 'NEXG', this%input_mempath, found%nexg) + + write (iout, '(1x,a)') 'PROCESSING EXCHANGE DIMENSIONS' + + if (found%nexg) then + write (iout, '(4x,a,i0)') 'NEXG = ', this%nexg + end if + + write (iout, '(1x,a)') 'END OF EXCHANGE DIMENSIONS' + + end subroutine source_dimensions + + !> @brief Source exchange data from input context + !< + subroutine source_data(this, iout) + ! modules + use MemoryManagerModule, only: mem_setptr + ! dummy + class(OlfGwfExchangeType) :: this !< instance of exchange object + integer(I4B), intent(in) :: iout !< the output file unit + ! local + integer(I4B), dimension(:, :), contiguous, pointer :: cellidm1 + integer(I4B), dimension(:, :), contiguous, pointer :: cellidm2 + real(DP), dimension(:), contiguous, pointer :: bedleak + real(DP), dimension(:), contiguous, pointer :: cfact + character(len=20) :: cellstr1, cellstr2 + integer(I4B) :: nerr + integer(I4B) :: iexg, nodeswf, nodegwf + ! format + character(len=*), parameter :: fmtexglabel = "(1x, 3a10, 50(a16))" + character(len=*), parameter :: fmtexgdata = & + "(5x, a, 1x, a ,50(1pg16.6))" + + call mem_setptr(cellidm1, 'CELLIDM1', this%input_mempath) + call mem_setptr(cellidm2, 'CELLIDM2', this%input_mempath) + call mem_setptr(bedleak, 'BEDLEAK', this%input_mempath) + call mem_setptr(cfact, 'CFACT', this%input_mempath) + + write (iout, '(1x,a)') 'PROCESSING EXCHANGEDATA' + + if (this%ipr_input /= 0) then + write (iout, fmtexglabel) 'NODEM1', 'NODEM2', 'BEDLEAK', 'CFACT' + end if + + do iexg = 1, this%nexg + + if (associated(this%model1)) then + ! Determine user node number + nodeswf = this%noder(this%model1, cellidm1(:, iexg), iout) + this%nodeswf(iexg) = nodeswf + else + this%nodeswf(iexg) = -1 + end if + + if (associated(this%model2)) then + ! Determine user node number + nodegwf = this%noder(this%model2, cellidm2(:, iexg), iout) + this%nodegwf(iexg) = nodegwf + else + this%nodegwf(iexg) = -1 + end if + + ! Read rest of input line + this%bedleak(iexg) = bedleak(iexg) + this%cfact(iexg) = cfact(iexg) + + ! Write the data to listing file if requested + if (this%ipr_input /= 0) then + cellstr1 = this%cellstr(this%model1, cellidm1(:, iexg), iout) + cellstr2 = this%cellstr(this%model2, cellidm2(:, iexg), iout) + write (iout, fmtexgdata) trim(cellstr1), trim(cellstr2), & + this%bedleak(iexg), this%cfact(iexg) + end if + + ! Check to see if nodeswf is outside of active domain + if (associated(this%model1)) then + if (nodeswf <= 0) then + cellstr1 = this%cellstr(this%model1, cellidm1(:, iexg), iout) + write (errmsg, *) & + trim(adjustl(this%model1%name))// & + ' Cell is outside active grid domain ('// & + trim(adjustl(cellstr1))//').' + call store_error(errmsg) + end if + end if + + ! Check to see if nodegwf is outside of active domain + if (associated(this%model2)) then + if (nodegwf <= 0) then + cellstr2 = this%cellstr(this%model2, cellidm2(:, iexg), iout) + write (errmsg, *) & + trim(adjustl(this%model2%name))// & + ' Cell is outside active grid domain ('// & + trim(adjustl(cellstr2))//').' + call store_error(errmsg) + end if + end if + end do + + write (iout, '(1x,a)') 'END OF EXCHANGEDATA' + + ! Stop if errors + nerr = count_errors() + if (nerr > 0) then + call store_error('Errors encountered in exchange input file.') + call store_error_filename(this%filename) + end if + + end subroutine source_data + +end module OlfGwfExchangeModule diff --git a/src/Exchange/exg-swfgwf.f90 b/src/Exchange/exg-swfgwf.f90 index ce4f5e20da9..f836bd1ab3a 100644 --- a/src/Exchange/exg-swfgwf.f90 +++ b/src/Exchange/exg-swfgwf.f90 @@ -1,13 +1,14 @@ !> @brief This module contains the SwfGwfExchangeModule Module !! !! This module contains the code for connecting a SWF model with -!! a GWF model. +!! a GWF model. The SwfGwfExchangeType class is a parent to the CHF and +!! OLF models and should not be used directly. !! !< module SwfGwfExchangeModule use KindModule, only: DP, I4B, LGP - use ConstantsModule, only: LINELENGTH, DZERO + use ConstantsModule, only: LINELENGTH, DZERO, LENFTYPE use SimVariablesModule, only: errmsg, iout, model_loc_idx use SimModule, only: count_errors, store_error, store_error_unit, & store_error_filename @@ -27,7 +28,7 @@ module SwfGwfExchangeModule implicit none private - public :: swfgwf_cr + public :: SwfGwfExchangeType type, extends(NumericalExchangeType) :: SwfGwfExchangeType @@ -36,6 +37,7 @@ module SwfGwfExchangeModule class(SwfModelType), pointer :: swfmodel => null() !< pointer to SWF Model class(GwfModelType), pointer :: gwfmodel => null() !< pointer to GWF Model + character(len=LENFTYPE), pointer :: swf_ftype => null() !< type of swf model (CHF or OLF) character(len=LINELENGTH), pointer :: filename => null() !< name of the input file integer(I4B), pointer :: ipr_input => null() !< flag to print input integer(I4B), pointer :: ipr_flow => null() !< print flag for cell by cell flows @@ -60,7 +62,7 @@ module SwfGwfExchangeModule contains - procedure :: exg_df => swf_gwf_df + ! procedure :: exg_df (delegated to CHF and OLF df routines) procedure :: exg_ac => swf_gwf_ac procedure :: exg_mc => swf_gwf_mc procedure :: exg_fc => swf_gwf_fc @@ -68,11 +70,9 @@ module SwfGwfExchangeModule procedure :: exg_bd => swf_gwf_bd procedure :: exg_ot => swf_gwf_ot procedure :: exg_da => swf_gwf_da + procedure :: initialize procedure :: allocate_scalars procedure :: allocate_arrays - procedure :: source_options - procedure :: source_dimensions - procedure :: source_data procedure :: swf_gwf_calc_simvals procedure :: swf_gwf_save_simvals procedure :: qcalc @@ -91,138 +91,85 @@ module SwfGwfExchangeModule contains - !> @ brief Create SWF GWF exchange - !! - !! Create a new SWF to GWF exchange object. + !> @ brief Initialize SWF GWF exchange !< - subroutine swfgwf_cr(filename, name, id, m1_id, m2_id, input_mempath) - ! -- modules - ! -- dummy + subroutine initialize(this, filename, name, swf_ftype, id, m1_id, m2_id, & + input_mempath) + ! dummy + class(SwfGwfExchangeType) :: this !< SwfGwfExchangeType character(len=*), intent(in) :: filename !< filename for reading character(len=*) :: name !< exchange name + character(len=*) :: swf_ftype !< type of swf model, CHF or OLF integer(I4B), intent(in) :: id !< id for the exchange integer(I4B), intent(in) :: m1_id !< id for model 1 integer(I4B), intent(in) :: m2_id !< id for model 2 character(len=*), intent(in) :: input_mempath ! -- local - type(SwfGwfExchangeType), pointer :: exchange class(BaseModelType), pointer :: mb - class(BaseExchangeType), pointer :: baseexchange integer(I4B) :: m1_index, m2_index - ! - ! -- Create a new exchange and add it to the baseexchangelist container - allocate (exchange) - baseexchange => exchange - call AddBaseExchangeToList(baseexchangelist, baseexchange) - ! - ! -- Assign id and name - exchange%id = id - exchange%name = name - exchange%memoryPath = create_mem_path(exchange%name) - exchange%input_mempath = input_mempath - ! - ! -- allocate scalars and set defaults - call exchange%allocate_scalars() - exchange%filename = filename - exchange%typename = 'SWF-GWF' - ! - ! -- set swfmodel1 + + ! Assign id and name + this%id = id + this%name = name + this%memoryPath = create_mem_path(this%name) + this%input_mempath = input_mempath + + ! allocate scalars and set defaults + call this%allocate_scalars() + this%filename = filename + this%swf_ftype = swf_ftype + this%typename = trim(swf_ftype)//'-GWF' + + ! set swfmodel m1_index = model_loc_idx(m1_id) if (m1_index > 0) then mb => GetBaseModelFromList(basemodellist, m1_index) select type (mb) - type is (SwfModelType) - exchange%model1 => mb - exchange%swfmodel => mb + class is (SwfModelType) + this%model1 => mb + this%swfmodel => mb end select end if - ! exchange%v_model1 => get_virtual_model(m1_id) - ! exchange%is_datacopy = .not. exchange%v_model1%is_local - ! - ! -- set gwfmodel2 + ! this%v_model1 => get_virtual_model(m1_id) + ! this%is_datacopy = .not. this%v_model1%is_local + + ! set gwfmodel m2_index = model_loc_idx(m2_id) if (m2_index > 0) then mb => GetBaseModelFromList(basemodellist, m2_index) select type (mb) type is (GwfModelType) - exchange%model2 => mb - exchange%gwfmodel => mb + this%model2 => mb + this%gwfmodel => mb end select end if - ! exchange%v_model2 => get_virtual_model(m2_id) - ! - ! -- Verify that gwf model1 is of the correct type - if (.not. associated(exchange%swfmodel) .and. m1_index > 0) then - write (errmsg, '(3a)') 'Problem with SWF-GWF exchange ', & - trim(exchange%name), & - '. Specified SWF Model does not appear to be of the correct type.' + ! this%v_model2 => get_virtual_model(m2_id) + + ! Verify that the surface water model is of the correct type + if (.not. associated(this%swfmodel) .and. m1_index > 0) then + write (errmsg, '(7a)') & + 'Problem with ', & + trim(this%typename), & + ' exchange ', & + trim(this%name), & + '. Specified ', & + trim(this%swf_ftype), & + ' model does not appear to be of the correct type.' call store_error(errmsg, terminate=.true.) end if - ! - ! -- Verify that gwf model2 is of the correct type - if (.not. associated(exchange%gwfmodel) .and. m2_index > 0) then + + ! Verify that gwf model is of the correct type + if (.not. associated(this%gwfmodel) .and. m2_index > 0) then write (errmsg, '(3a)') 'Problem with SWF-GWF exchange ', & - trim(exchange%name), & - '. Specified GWF Model does not appear to be of the correct type.' + trim(this%name), & + '. Specified GWF model does not appear to be of the correct type.' call store_error(errmsg, terminate=.true.) end if - ! - ! -- Create the obs package - call obs_cr(exchange%obs, exchange%inobs) - ! - ! -- Return - return - end subroutine swfgwf_cr - !> @ brief Define SWF GWF exchange - !! - !! Define SWF to GWF exchange object. - !< - subroutine swf_gwf_df(this) - ! -- modules - ! -- dummy - class(SwfGwfExchangeType) :: this !< SwfGwfExchangeType - ! -- local - ! - ! -- log the exchange - write (iout, '(/a,a)') ' Creating exchange: ', this%name - ! - ! -- Ensure models are in same solution - if (associated(this%swfmodel) .and. associated(this%gwfmodel)) then - if (this%swfmodel%idsoln /= this%gwfmodel%idsoln) then - call store_error('Two models are connected in a SWF-GWF '// & - 'exchange but they are in different solutions. '// & - 'Models must be in same solution: '// & - trim(this%swfmodel%name)//' '// & - trim(this%gwfmodel%name)) - call store_error_filename(this%filename) - end if - end if - ! - ! -- source options - call this%source_options(iout) - ! - ! -- source dimensions - call this%source_dimensions(iout) - ! - ! -- allocate arrays - call this%allocate_arrays() - ! - ! -- source exchange data - call this%source_data(iout) - ! - ! -- Store obs - ! call this%swf_gwf_df_obs() - ! if (associated(this%swfmodel1)) then - ! call this%obs%obs_df(iout, this%name, 'SWF-GWF', this%swfmodel1%dis) - ! end if - ! ! - ! ! -- validate - ! call this%validate_exchange() - ! - ! -- Return - return - end subroutine swf_gwf_df + ! Create the obs package + call obs_cr(this%obs, this%inobs) + + end subroutine initialize !> @ brief Add connections !! @@ -410,6 +357,7 @@ subroutine swf_gwf_da(this) call mem_deallocate(this%simvals) ! ! -- scalars + deallocate (this%swf_ftype) deallocate (this%filename) call mem_deallocate(this%ipr_input) call mem_deallocate(this%ipr_flow) @@ -430,6 +378,8 @@ subroutine allocate_scalars(this) ! -- dummy class(SwfGwfExchangeType) :: this !< SwfGwfExchangeType ! + allocate (this%swf_ftype) + this%swf_ftype = '' allocate (this%filename) this%filename = '' ! @@ -468,92 +418,6 @@ subroutine allocate_arrays(this) return end subroutine allocate_arrays - !> @ brief Source options - !! - !! Source the options block - !< - subroutine source_options(this, iout) - ! -- modules - use ConstantsModule, only: LENVARNAME, DEM6 - use InputOutputModule, only: getunit, openfile - use MemoryManagerExtModule, only: mem_set_value - use CharacterStringModule, only: CharacterStringType - use ExgSwfgwfInputModule, only: ExgSwfgwfParamFoundType - use SourceCommonModule, only: filein_fname - ! -- dummy - class(SwfGwfExchangeType) :: this !< GwfExchangeType - integer(I4B), intent(in) :: iout - ! -- local - type(ExgSwfgwfParamFoundType) :: found - ! - ! -- update defaults with idm sourced values - call mem_set_value(this%ipr_input, 'IPR_INPUT', & - this%input_mempath, found%ipr_input) - call mem_set_value(this%ipr_flow, 'IPR_FLOW', & - this%input_mempath, found%ipr_flow) - call mem_set_value(this%ifixedcond, 'IFIXEDCOND', & - this%input_mempath, found%ifixedcond) - ! - write (iout, '(1x,a)') 'PROCESSING SWF-GWF EXCHANGE OPTIONS' - - if (found%ipr_input) then - write (iout, '(4x,a)') & - 'THE LIST OF EXCHANGES WILL BE PRINTED.' - end if - - if (found%ipr_flow) then - write (iout, '(4x,a)') & - 'EXCHANGE FLOWS WILL BE PRINTED TO LIST FILES.' - end if - - if (found%ifixedcond) then - write (iout, '(4x,a)') & - 'CONDUCTANCE IS FIXED AS PRODUCT OF BEDLEAK AND CFACT.' - end if - ! - ! -- enforce 0 or 1 OBS6_FILENAME entries in option block - ! if (.not. this%is_datacopy) then - ! if (filein_fname(this%obs%inputFilename, 'OBS6_FILENAME', & - ! this%input_mempath, this%filename)) then - ! this%obs%active = .true. - ! this%obs%inUnitObs = GetUnit() - ! call openfile(this%obs%inUnitObs, iout, this%obs%inputFilename, 'OBS') - ! end if - ! end if - ! - write (iout, '(1x,a)') 'END OF SWF-GWF EXCHANGE OPTIONS' - ! - ! -- Return - return - end subroutine source_options - - !> @brief Source dimension from input context - !< - subroutine source_dimensions(this, iout) - ! -- modules - use MemoryManagerExtModule, only: mem_set_value - use ExgSwfgwfInputModule, only: ExgSwfgwfParamFoundType - ! -- dummy - class(SwfGwfExchangeType) :: this !< instance of exchange object - integer(I4B), intent(in) :: iout !< for logging - ! -- local - type(ExgSwfgwfParamFoundType) :: found - ! - ! -- update defaults with idm sourced values - call mem_set_value(this%nexg, 'NEXG', this%input_mempath, found%nexg) - ! - write (iout, '(1x,a)') 'PROCESSING EXCHANGE DIMENSIONS' - ! - if (found%nexg) then - write (iout, '(4x,a,i0)') 'NEXG = ', this%nexg - end if - ! - write (iout, '(1x,a)') 'END OF EXCHANGE DIMENSIONS' - ! - ! -- return - return - end subroutine source_dimensions - !> @brief !< function noder(this, model, cellid, iout) @@ -617,110 +481,6 @@ function cellstr(this, model, cellid, iout) return end function cellstr - !> @brief Source exchange data from input context - !< - subroutine source_data(this, iout) - ! -- modules - use MemoryManagerModule, only: mem_setptr - ! -- dummy - class(SwfGwfExchangeType) :: this !< instance of exchange object - integer(I4B), intent(in) :: iout !< the output file unit - ! -- local - integer(I4B), dimension(:, :), contiguous, pointer :: cellidm1 - integer(I4B), dimension(:, :), contiguous, pointer :: cellidm2 - real(DP), dimension(:), contiguous, pointer :: bedleak - real(DP), dimension(:), contiguous, pointer :: cfact - character(len=20) :: cellstr1, cellstr2 - integer(I4B) :: nerr - integer(I4B) :: iexg, nodeswf, nodegwf - ! -- format - character(len=*), parameter :: fmtexglabel = "(1x, 3a10, 50(a16))" - character(len=*), parameter :: fmtexgdata = & - "(5x, a, 1x, a ,50(1pg16.6))" - ! - call mem_setptr(cellidm1, 'CELLIDM1', this%input_mempath) - call mem_setptr(cellidm2, 'CELLIDM2', this%input_mempath) - call mem_setptr(bedleak, 'BEDLEAK', this%input_mempath) - call mem_setptr(cfact, 'CFACT', this%input_mempath) - ! - write (iout, '(1x,a)') 'PROCESSING EXCHANGEDATA' - ! - if (this%ipr_input /= 0) then - write (iout, fmtexglabel) 'NODEM1', 'NODEM2', 'BEDLEAK', 'CFACT' - end if - ! - do iexg = 1, this%nexg - ! - if (associated(this%model1)) then - ! - ! -- Determine user node number - nodeswf = this%noder(this%model1, cellidm1(:, iexg), iout) - this%nodeswf(iexg) = nodeswf - ! - else - this%nodeswf(iexg) = -1 - end if - ! - if (associated(this%model2)) then - ! - ! -- Determine user node number - nodegwf = this%noder(this%model2, cellidm2(:, iexg), iout) - this%nodegwf(iexg) = nodegwf - ! - else - this%nodegwf(iexg) = -1 - end if - ! - ! -- Read rest of input line - this%bedleak(iexg) = bedleak(iexg) - this%cfact(iexg) = cfact(iexg) - ! - ! -- Write the data to listing file if requested - if (this%ipr_input /= 0) then - cellstr1 = this%cellstr(this%model1, cellidm1(:, iexg), iout) - cellstr2 = this%cellstr(this%model2, cellidm2(:, iexg), iout) - write (iout, fmtexgdata) trim(cellstr1), trim(cellstr2), & - this%bedleak(iexg), this%cfact(iexg) - end if - ! - ! -- Check to see if nodeswf is outside of active domain - if (associated(this%model1)) then - if (nodeswf <= 0) then - cellstr1 = this%cellstr(this%model1, cellidm1(:, iexg), iout) - write (errmsg, *) & - trim(adjustl(this%model1%name))// & - ' Cell is outside active grid domain ('// & - trim(adjustl(cellstr1))//').' - call store_error(errmsg) - end if - end if - ! - ! -- Check to see if nodegwf is outside of active domain - if (associated(this%model2)) then - if (nodegwf <= 0) then - cellstr2 = this%cellstr(this%model2, cellidm2(:, iexg), iout) - write (errmsg, *) & - trim(adjustl(this%model2%name))// & - ' Cell is outside active grid domain ('// & - trim(adjustl(cellstr2))//').' - call store_error(errmsg) - end if - end if - end do - ! - write (iout, '(1x,a)') 'END OF EXCHANGEDATA' - ! - ! -- Stop if errors - nerr = count_errors() - if (nerr > 0) then - call store_error('Errors encountered in exchange input file.') - call store_error_filename(this%filename) - end if - ! - ! -- Return - return - end subroutine source_data - !> @brief Calculate flow rates for the exchanges and store them in a member !! array !< diff --git a/src/Idm/chf-cdbidm.f90 b/src/Idm/chf-cdbidm.f90 new file mode 100644 index 00000000000..7bb80389e4e --- /dev/null +++ b/src/Idm/chf-cdbidm.f90 @@ -0,0 +1,377 @@ +! ** Do Not Modify! MODFLOW 6 system generated file. ** +module ChfCdbInputModule + use ConstantsModule, only: LENVARNAME + use InputDefinitionModule, only: InputParamDefinitionType, & + InputBlockDefinitionType + private + public chf_cdb_param_definitions + public chf_cdb_aggregate_definitions + public chf_cdb_block_definitions + public ChfCdbParamFoundType + public chf_cdb_multi_package + public chf_cdb_subpackages + + type ChfCdbParamFoundType + logical :: auxiliary = .false. + logical :: boundnames = .false. + logical :: iprpak = .false. + logical :: iprflow = .false. + logical :: ipakcb = .false. + logical :: filein = .false. + logical :: obs_filerecord = .false. + logical :: obs6 = .false. + logical :: obs6_filename = .false. + logical :: maxbound = .false. + logical :: cellid = .false. + logical :: idcxs = .false. + logical :: width = .false. + logical :: auxvar = .false. + logical :: boundname = .false. + end type ChfCdbParamFoundType + + logical :: chf_cdb_multi_package = .true. + + character(len=16), parameter :: & + chf_cdb_subpackages(*) = & + [ & + ' ' & + ] + + type(InputParamDefinitionType), parameter :: & + chfcdb_auxiliary = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'CDB', & ! subcomponent + 'OPTIONS', & ! block + 'AUXILIARY', & ! tag name + 'AUXILIARY', & ! fortran variable + 'STRING', & ! type + 'NAUX', & ! shape + 'keyword to specify aux variables', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfcdb_boundnames = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'CDB', & ! subcomponent + 'OPTIONS', & ! block + 'BOUNDNAMES', & ! tag name + 'BOUNDNAMES', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + '', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfcdb_iprpak = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'CDB', & ! subcomponent + 'OPTIONS', & ! block + 'PRINT_INPUT', & ! tag name + 'IPRPAK', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'print input to listing file', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfcdb_iprflow = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'CDB', & ! subcomponent + 'OPTIONS', & ! block + 'PRINT_FLOWS', & ! tag name + 'IPRFLOW', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'print calculated flows to listing file', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfcdb_ipakcb = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'CDB', & ! subcomponent + 'OPTIONS', & ! block + 'SAVE_FLOWS', & ! tag name + 'IPAKCB', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'save flows to budget file', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfcdb_filein = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'CDB', & ! subcomponent + 'OPTIONS', & ! block + 'FILEIN', & ! tag name + 'FILEIN', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'file keyword', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfcdb_obs_filerecord = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'CDB', & ! subcomponent + 'OPTIONS', & ! block + 'OBS_FILERECORD', & ! tag name + 'OBS_FILERECORD', & ! fortran variable + 'RECORD OBS6 FILEIN OBS6_FILENAME', & ! type + '', & ! shape + '', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfcdb_obs6 = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'CDB', & ! subcomponent + 'OPTIONS', & ! block + 'OBS6', & ! tag name + 'OBS6', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'obs keyword', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfcdb_obs6_filename = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'CDB', & ! subcomponent + 'OPTIONS', & ! block + 'OBS6_FILENAME', & ! tag name + 'OBS6_FILENAME', & ! fortran variable + 'STRING', & ! type + '', & ! shape + 'obs6 input filename', & ! longname + .true., & ! required + .true., & ! multi-record + .true., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfcdb_maxbound = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'CDB', & ! subcomponent + 'DIMENSIONS', & ! block + 'MAXBOUND', & ! tag name + 'MAXBOUND', & ! fortran variable + 'INTEGER', & ! type + '', & ! shape + 'maximum number of critical depth boundaries', & ! longname + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfcdb_cellid = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'CDB', & ! subcomponent + 'PERIOD', & ! block + 'CELLID', & ! tag name + 'CELLID', & ! fortran variable + 'INTEGER1D', & ! type + 'NCELLDIM', & ! shape + 'cell identifier', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfcdb_idcxs = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'CDB', & ! subcomponent + 'PERIOD', & ! block + 'IDCXS', & ! tag name + 'IDCXS', & ! fortran variable + 'INTEGER', & ! type + '', & ! shape + 'cross section identifier', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfcdb_width = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'CDB', & ! subcomponent + 'PERIOD', & ! block + 'WIDTH', & ! tag name + 'WIDTH', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + 'width of the zero-depth gradient boundary', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .true. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfcdb_auxvar = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'CDB', & ! subcomponent + 'PERIOD', & ! block + 'AUX', & ! tag name + 'AUXVAR', & ! fortran variable + 'DOUBLE1D', & ! type + 'NAUX', & ! shape + 'auxiliary variables', & ! longname + .false., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .true. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfcdb_boundname = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'CDB', & ! subcomponent + 'PERIOD', & ! block + 'BOUNDNAME', & ! tag name + 'BOUNDNAME', & ! fortran variable + 'STRING', & ! type + '', & ! shape + 'zero-depth-gradient boundary name', & ! longname + .false., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chf_cdb_param_definitions(*) = & + [ & + chfcdb_auxiliary, & + chfcdb_boundnames, & + chfcdb_iprpak, & + chfcdb_iprflow, & + chfcdb_ipakcb, & + chfcdb_filein, & + chfcdb_obs_filerecord, & + chfcdb_obs6, & + chfcdb_obs6_filename, & + chfcdb_maxbound, & + chfcdb_cellid, & + chfcdb_idcxs, & + chfcdb_width, & + chfcdb_auxvar, & + chfcdb_boundname & + ] + + type(InputParamDefinitionType), parameter :: & + chfcdb_spd = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'CDB', & ! subcomponent + 'PERIOD', & ! block + 'STRESS_PERIOD_DATA', & ! tag name + 'SPD', & ! fortran variable + 'RECARRAY CELLID IDCXS WIDTH AUX BOUNDNAME', & ! type + 'MAXBOUND', & ! shape + '', & ! longname + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chf_cdb_aggregate_definitions(*) = & + [ & + chfcdb_spd & + ] + + type(InputBlockDefinitionType), parameter :: & + chf_cdb_block_definitions(*) = & + [ & + InputBlockDefinitionType( & + 'OPTIONS', & ! blockname + .false., & ! required + .false., & ! aggregate + .false. & ! block_variable + ), & + InputBlockDefinitionType( & + 'DIMENSIONS', & ! blockname + .true., & ! required + .false., & ! aggregate + .false. & ! block_variable + ), & + InputBlockDefinitionType( & + 'PERIOD', & ! blockname + .true., & ! required + .true., & ! aggregate + .true. & ! block_variable + ) & + ] + +end module ChfCdbInputModule diff --git a/src/Idm/chf-chdidm.f90 b/src/Idm/chf-chdidm.f90 new file mode 100644 index 00000000000..c312c87e1cc --- /dev/null +++ b/src/Idm/chf-chdidm.f90 @@ -0,0 +1,437 @@ +! ** Do Not Modify! MODFLOW 6 system generated file. ** +module ChfChdInputModule + use ConstantsModule, only: LENVARNAME + use InputDefinitionModule, only: InputParamDefinitionType, & + InputBlockDefinitionType + private + public chf_chd_param_definitions + public chf_chd_aggregate_definitions + public chf_chd_block_definitions + public ChfChdParamFoundType + public chf_chd_multi_package + public chf_chd_subpackages + + type ChfChdParamFoundType + logical :: auxiliary = .false. + logical :: auxmultname = .false. + logical :: boundnames = .false. + logical :: print_input = .false. + logical :: print_flows = .false. + logical :: save_flows = .false. + logical :: ts_filerecord = .false. + logical :: ts6 = .false. + logical :: filein = .false. + logical :: ts6_filename = .false. + logical :: obs_filerecord = .false. + logical :: obs6 = .false. + logical :: obs6_filename = .false. + logical :: maxbound = .false. + logical :: cellid = .false. + logical :: head = .false. + logical :: aux = .false. + logical :: boundname = .false. + end type ChfChdParamFoundType + + logical :: chf_chd_multi_package = .true. + + character(len=16), parameter :: & + chf_chd_subpackages(*) = & + [ & + ' ' & + ] + + type(InputParamDefinitionType), parameter :: & + chfchd_auxiliary = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'CHD', & ! subcomponent + 'OPTIONS', & ! block + 'AUXILIARY', & ! tag name + 'AUXILIARY', & ! fortran variable + 'STRING', & ! type + 'NAUX', & ! shape + 'keyword to specify aux variables', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfchd_auxmultname = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'CHD', & ! subcomponent + 'OPTIONS', & ! block + 'AUXMULTNAME', & ! tag name + 'AUXMULTNAME', & ! fortran variable + 'STRING', & ! type + '', & ! shape + 'name of auxiliary variable for multiplier', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfchd_boundnames = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'CHD', & ! subcomponent + 'OPTIONS', & ! block + 'BOUNDNAMES', & ! tag name + 'BOUNDNAMES', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + '', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfchd_print_input = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'CHD', & ! subcomponent + 'OPTIONS', & ! block + 'PRINT_INPUT', & ! tag name + 'PRINT_INPUT', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'print input to listing file', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfchd_print_flows = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'CHD', & ! subcomponent + 'OPTIONS', & ! block + 'PRINT_FLOWS', & ! tag name + 'PRINT_FLOWS', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'print CHD flows to listing file', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfchd_save_flows = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'CHD', & ! subcomponent + 'OPTIONS', & ! block + 'SAVE_FLOWS', & ! tag name + 'SAVE_FLOWS', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'save CHD flows to budget file', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfchd_ts_filerecord = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'CHD', & ! subcomponent + 'OPTIONS', & ! block + 'TS_FILERECORD', & ! tag name + 'TS_FILERECORD', & ! fortran variable + 'RECORD TS6 FILEIN TS6_FILENAME', & ! type + '', & ! shape + '', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfchd_ts6 = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'CHD', & ! subcomponent + 'OPTIONS', & ! block + 'TS6', & ! tag name + 'TS6', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'head keyword', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfchd_filein = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'CHD', & ! subcomponent + 'OPTIONS', & ! block + 'FILEIN', & ! tag name + 'FILEIN', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'file keyword', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfchd_ts6_filename = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'CHD', & ! subcomponent + 'OPTIONS', & ! block + 'TS6_FILENAME', & ! tag name + 'TS6_FILENAME', & ! fortran variable + 'STRING', & ! type + '', & ! shape + 'file name of time series information', & ! longname + .true., & ! required + .true., & ! multi-record + .true., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfchd_obs_filerecord = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'CHD', & ! subcomponent + 'OPTIONS', & ! block + 'OBS_FILERECORD', & ! tag name + 'OBS_FILERECORD', & ! fortran variable + 'RECORD OBS6 FILEIN OBS6_FILENAME', & ! type + '', & ! shape + '', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfchd_obs6 = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'CHD', & ! subcomponent + 'OPTIONS', & ! block + 'OBS6', & ! tag name + 'OBS6', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'obs keyword', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfchd_obs6_filename = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'CHD', & ! subcomponent + 'OPTIONS', & ! block + 'OBS6_FILENAME', & ! tag name + 'OBS6_FILENAME', & ! fortran variable + 'STRING', & ! type + '', & ! shape + 'obs6 input filename', & ! longname + .true., & ! required + .true., & ! multi-record + .true., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfchd_maxbound = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'CHD', & ! subcomponent + 'DIMENSIONS', & ! block + 'MAXBOUND', & ! tag name + 'MAXBOUND', & ! fortran variable + 'INTEGER', & ! type + '', & ! shape + 'maximum number of constant heads', & ! longname + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfchd_cellid = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'CHD', & ! subcomponent + 'PERIOD', & ! block + 'CELLID', & ! tag name + 'CELLID', & ! fortran variable + 'INTEGER1D', & ! type + 'NCELLDIM', & ! shape + 'cell identifier', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfchd_head = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'CHD', & ! subcomponent + 'PERIOD', & ! block + 'HEAD', & ! tag name + 'HEAD', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + 'head value assigned to constant head', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .true. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfchd_aux = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'CHD', & ! subcomponent + 'PERIOD', & ! block + 'AUX', & ! tag name + 'AUX', & ! fortran variable + 'DOUBLE1D', & ! type + 'NAUX', & ! shape + 'auxiliary variables', & ! longname + .false., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .true. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfchd_boundname = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'CHD', & ! subcomponent + 'PERIOD', & ! block + 'BOUNDNAME', & ! tag name + 'BOUNDNAME', & ! fortran variable + 'STRING', & ! type + '', & ! shape + 'constant head boundary name', & ! longname + .false., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chf_chd_param_definitions(*) = & + [ & + chfchd_auxiliary, & + chfchd_auxmultname, & + chfchd_boundnames, & + chfchd_print_input, & + chfchd_print_flows, & + chfchd_save_flows, & + chfchd_ts_filerecord, & + chfchd_ts6, & + chfchd_filein, & + chfchd_ts6_filename, & + chfchd_obs_filerecord, & + chfchd_obs6, & + chfchd_obs6_filename, & + chfchd_maxbound, & + chfchd_cellid, & + chfchd_head, & + chfchd_aux, & + chfchd_boundname & + ] + + type(InputParamDefinitionType), parameter :: & + chfchd_spd = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'CHD', & ! subcomponent + 'PERIOD', & ! block + 'STRESS_PERIOD_DATA', & ! tag name + 'SPD', & ! fortran variable + 'RECARRAY CELLID HEAD AUX BOUNDNAME', & ! type + 'MAXBOUND', & ! shape + '', & ! longname + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chf_chd_aggregate_definitions(*) = & + [ & + chfchd_spd & + ] + + type(InputBlockDefinitionType), parameter :: & + chf_chd_block_definitions(*) = & + [ & + InputBlockDefinitionType( & + 'OPTIONS', & ! blockname + .false., & ! required + .false., & ! aggregate + .false. & ! block_variable + ), & + InputBlockDefinitionType( & + 'DIMENSIONS', & ! blockname + .true., & ! required + .false., & ! aggregate + .false. & ! block_variable + ), & + InputBlockDefinitionType( & + 'PERIOD', & ! blockname + .true., & ! required + .true., & ! aggregate + .true. & ! block_variable + ) & + ] + +end module ChfChdInputModule diff --git a/src/Idm/chf-cxsidm.f90 b/src/Idm/chf-cxsidm.f90 new file mode 100644 index 00000000000..f511e30723b --- /dev/null +++ b/src/Idm/chf-cxsidm.f90 @@ -0,0 +1,262 @@ +! ** Do Not Modify! MODFLOW 6 system generated file. ** +module ChfCxsInputModule + use ConstantsModule, only: LENVARNAME + use InputDefinitionModule, only: InputParamDefinitionType, & + InputBlockDefinitionType + private + public chf_cxs_param_definitions + public chf_cxs_aggregate_definitions + public chf_cxs_block_definitions + public ChfCxsParamFoundType + public chf_cxs_multi_package + public chf_cxs_subpackages + + type ChfCxsParamFoundType + logical :: iprpak = .false. + logical :: nsections = .false. + logical :: npoints = .false. + logical :: idcxs = .false. + logical :: nxspoints = .false. + logical :: xfraction = .false. + logical :: height = .false. + logical :: manfraction = .false. + end type ChfCxsParamFoundType + + logical :: chf_cxs_multi_package = .false. + + character(len=16), parameter :: & + chf_cxs_subpackages(*) = & + [ & + ' ' & + ] + + type(InputParamDefinitionType), parameter :: & + chfcxs_iprpak = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'CXS', & ! subcomponent + 'OPTIONS', & ! block + 'PRINT_INPUT', & ! tag name + 'IPRPAK', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'print input to listing file', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfcxs_nsections = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'CXS', & ! subcomponent + 'DIMENSIONS', & ! block + 'NSECTIONS', & ! tag name + 'NSECTIONS', & ! fortran variable + 'INTEGER', & ! type + '', & ! shape + 'number of reaches', & ! longname + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfcxs_npoints = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'CXS', & ! subcomponent + 'DIMENSIONS', & ! block + 'NPOINTS', & ! tag name + 'NPOINTS', & ! fortran variable + 'INTEGER', & ! type + '', & ! shape + 'total number of points defined for all reaches', & ! longname + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfcxs_idcxs = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'CXS', & ! subcomponent + 'PACKAGEDATA', & ! block + 'IDCXS', & ! tag name + 'IDCXS', & ! fortran variable + 'INTEGER', & ! type + '', & ! shape + 'reach number for this entry', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfcxs_nxspoints = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'CXS', & ! subcomponent + 'PACKAGEDATA', & ! block + 'NXSPOINTS', & ! tag name + 'NXSPOINTS', & ! fortran variable + 'INTEGER', & ! type + '', & ! shape + 'number of points used to define cross section', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfcxs_xfraction = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'CXS', & ! subcomponent + 'CROSSSECTIONDATA', & ! block + 'XFRACTION', & ! tag name + 'XFRACTION', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + 'fractional width', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfcxs_height = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'CXS', & ! subcomponent + 'CROSSSECTIONDATA', & ! block + 'HEIGHT', & ! tag name + 'HEIGHT', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + 'depth', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfcxs_manfraction = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'CXS', & ! subcomponent + 'CROSSSECTIONDATA', & ! block + 'MANFRACTION', & ! tag name + 'MANFRACTION', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + 'Mannings roughness coefficient', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chf_cxs_param_definitions(*) = & + [ & + chfcxs_iprpak, & + chfcxs_nsections, & + chfcxs_npoints, & + chfcxs_idcxs, & + chfcxs_nxspoints, & + chfcxs_xfraction, & + chfcxs_height, & + chfcxs_manfraction & + ] + + type(InputParamDefinitionType), parameter :: & + chfcxs_packagedata = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'CXS', & ! subcomponent + 'PACKAGEDATA', & ! block + 'PACKAGEDATA', & ! tag name + 'PACKAGEDATA', & ! fortran variable + 'RECARRAY IDCXS NXSPOINTS', & ! type + 'NSECTIONS', & ! shape + '', & ! longname + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfcxs_crosssectiondata = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'CXS', & ! subcomponent + 'CROSSSECTIONDATA', & ! block + 'CROSSSECTIONDATA', & ! tag name + 'CROSSSECTIONDATA', & ! fortran variable + 'RECARRAY XFRACTION HEIGHT MANFRACTION', & ! type + 'NPOINTS', & ! shape + '', & ! longname + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chf_cxs_aggregate_definitions(*) = & + [ & + chfcxs_packagedata, & + chfcxs_crosssectiondata & + ] + + type(InputBlockDefinitionType), parameter :: & + chf_cxs_block_definitions(*) = & + [ & + InputBlockDefinitionType( & + 'OPTIONS', & ! blockname + .false., & ! required + .false., & ! aggregate + .false. & ! block_variable + ), & + InputBlockDefinitionType( & + 'DIMENSIONS', & ! blockname + .true., & ! required + .false., & ! aggregate + .false. & ! block_variable + ), & + InputBlockDefinitionType( & + 'PACKAGEDATA', & ! blockname + .true., & ! required + .true., & ! aggregate + .false. & ! block_variable + ), & + InputBlockDefinitionType( & + 'CROSSSECTIONDATA', & ! blockname + .true., & ! required + .true., & ! aggregate + .false. & ! block_variable + ) & + ] + +end module ChfCxsInputModule diff --git a/src/Idm/chf-dfwidm.f90 b/src/Idm/chf-dfwidm.f90 new file mode 100644 index 00000000000..8adf4c142b7 --- /dev/null +++ b/src/Idm/chf-dfwidm.f90 @@ -0,0 +1,348 @@ +! ** Do Not Modify! MODFLOW 6 system generated file. ** +module ChfDfwInputModule + use ConstantsModule, only: LENVARNAME + use InputDefinitionModule, only: InputParamDefinitionType, & + InputBlockDefinitionType + private + public chf_dfw_param_definitions + public chf_dfw_aggregate_definitions + public chf_dfw_block_definitions + public ChfDfwParamFoundType + public chf_dfw_multi_package + public chf_dfw_subpackages + + type ChfDfwParamFoundType + logical :: icentral = .false. + logical :: lengthconv = .false. + logical :: timeconv = .false. + logical :: ipakcb = .false. + logical :: iprflow = .false. + logical :: isavvelocity = .false. + logical :: obs_filerecord = .false. + logical :: obs6 = .false. + logical :: filein = .false. + logical :: obs6_filename = .false. + logical :: export_ascii = .false. + logical :: iswrcond = .false. + logical :: manningsn = .false. + logical :: idcxs = .false. + end type ChfDfwParamFoundType + + logical :: chf_dfw_multi_package = .false. + + character(len=16), parameter :: & + chf_dfw_subpackages(*) = & + [ & + ' ' & + ] + + type(InputParamDefinitionType), parameter :: & + chfdfw_icentral = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DFW', & ! subcomponent + 'OPTIONS', & ! block + 'CENTRAL_IN_SPACE', & ! tag name + 'ICENTRAL', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'use central in space weighting', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfdfw_lengthconv = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DFW', & ! subcomponent + 'OPTIONS', & ! block + 'LENGTH_CONVERSION', & ! tag name + 'LENGTHCONV', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + 'length conversion factor', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfdfw_timeconv = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DFW', & ! subcomponent + 'OPTIONS', & ! block + 'TIME_CONVERSION', & ! tag name + 'TIMECONV', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + 'time conversion factor', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfdfw_ipakcb = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DFW', & ! subcomponent + 'OPTIONS', & ! block + 'SAVE_FLOWS', & ! tag name + 'IPAKCB', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'keyword to save DFW flows', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfdfw_iprflow = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DFW', & ! subcomponent + 'OPTIONS', & ! block + 'PRINT_FLOWS', & ! tag name + 'IPRFLOW', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'keyword to print DFW flows to listing file', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfdfw_isavvelocity = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DFW', & ! subcomponent + 'OPTIONS', & ! block + 'SAVE_VELOCITY', & ! tag name + 'ISAVVELOCITY', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'keyword to save velocity', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfdfw_obs_filerecord = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DFW', & ! subcomponent + 'OPTIONS', & ! block + 'OBS_FILERECORD', & ! tag name + 'OBS_FILERECORD', & ! fortran variable + 'RECORD OBS6 FILEIN OBS6_FILENAME', & ! type + '', & ! shape + '', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfdfw_obs6 = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DFW', & ! subcomponent + 'OPTIONS', & ! block + 'OBS6', & ! tag name + 'OBS6', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'obs keyword', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfdfw_filein = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DFW', & ! subcomponent + 'OPTIONS', & ! block + 'FILEIN', & ! tag name + 'FILEIN', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'file keyword', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfdfw_obs6_filename = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DFW', & ! subcomponent + 'OPTIONS', & ! block + 'OBS6_FILENAME', & ! tag name + 'OBS6_FILENAME', & ! fortran variable + 'STRING', & ! type + '', & ! shape + 'obs6 input filename', & ! longname + .true., & ! required + .true., & ! multi-record + .true., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfdfw_export_ascii = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DFW', & ! subcomponent + 'OPTIONS', & ! block + 'EXPORT_ARRAY_ASCII', & ! tag name + 'EXPORT_ASCII', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'export array variables to layered ascii files.', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfdfw_iswrcond = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DFW', & ! subcomponent + 'OPTIONS', & ! block + 'DEV_SWR_CONDUCTANCE', & ! tag name + 'ISWRCOND', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'use SWR conductance formulation', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfdfw_manningsn = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DFW', & ! subcomponent + 'GRIDDATA', & ! block + 'MANNINGSN', & ! tag name + 'MANNINGSN', & ! fortran variable + 'DOUBLE1D', & ! type + 'NODES', & ! shape + 'mannings roughness coefficient', & ! longname + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfdfw_idcxs = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DFW', & ! subcomponent + 'GRIDDATA', & ! block + 'IDCXS', & ! tag name + 'IDCXS', & ! fortran variable + 'INTEGER1D', & ! type + 'NODES', & ! shape + 'cross section number', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chf_dfw_param_definitions(*) = & + [ & + chfdfw_icentral, & + chfdfw_lengthconv, & + chfdfw_timeconv, & + chfdfw_ipakcb, & + chfdfw_iprflow, & + chfdfw_isavvelocity, & + chfdfw_obs_filerecord, & + chfdfw_obs6, & + chfdfw_filein, & + chfdfw_obs6_filename, & + chfdfw_export_ascii, & + chfdfw_iswrcond, & + chfdfw_manningsn, & + chfdfw_idcxs & + ] + + type(InputParamDefinitionType), parameter :: & + chf_dfw_aggregate_definitions(*) = & + [ & + InputParamDefinitionType & + ( & + '', & ! component + '', & ! subcomponent + '', & ! block + '', & ! tag name + '', & ! fortran variable + '', & ! type + '', & ! shape + '', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) & + ] + + type(InputBlockDefinitionType), parameter :: & + chf_dfw_block_definitions(*) = & + [ & + InputBlockDefinitionType( & + 'OPTIONS', & ! blockname + .false., & ! required + .false., & ! aggregate + .false. & ! block_variable + ), & + InputBlockDefinitionType( & + 'GRIDDATA', & ! blockname + .true., & ! required + .false., & ! aggregate + .false. & ! block_variable + ) & + ] + +end module ChfDfwInputModule diff --git a/src/Idm/chf-dis2didm.f90 b/src/Idm/chf-dis2didm.f90 new file mode 100644 index 00000000000..8f4eabec9c8 --- /dev/null +++ b/src/Idm/chf-dis2didm.f90 @@ -0,0 +1,314 @@ +! ** Do Not Modify! MODFLOW 6 system generated file. ** +module ChfDis2DInputModule + use ConstantsModule, only: LENVARNAME + use InputDefinitionModule, only: InputParamDefinitionType, & + InputBlockDefinitionType + private + public chf_dis2d_param_definitions + public chf_dis2d_aggregate_definitions + public chf_dis2d_block_definitions + public ChfDis2dParamFoundType + public chf_dis2d_multi_package + public chf_dis2d_subpackages + + type ChfDis2dParamFoundType + logical :: length_units = .false. + logical :: nogrb = .false. + logical :: xorigin = .false. + logical :: yorigin = .false. + logical :: angrot = .false. + logical :: export_ascii = .false. + logical :: nrow = .false. + logical :: ncol = .false. + logical :: delr = .false. + logical :: delc = .false. + logical :: botm = .false. + logical :: idomain = .false. + end type ChfDis2dParamFoundType + + logical :: chf_dis2d_multi_package = .false. + + character(len=16), parameter :: & + chf_dis2d_subpackages(*) = & + [ & + ' ' & + ] + + type(InputParamDefinitionType), parameter :: & + chfdis2d_length_units = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DIS2D', & ! subcomponent + 'OPTIONS', & ! block + 'LENGTH_UNITS', & ! tag name + 'LENGTH_UNITS', & ! fortran variable + 'STRING', & ! type + '', & ! shape + 'model length units', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfdis2d_nogrb = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DIS2D', & ! subcomponent + 'OPTIONS', & ! block + 'NOGRB', & ! tag name + 'NOGRB', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'do not write binary grid file', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfdis2d_xorigin = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DIS2D', & ! subcomponent + 'OPTIONS', & ! block + 'XORIGIN', & ! tag name + 'XORIGIN', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + 'x-position of the model grid origin', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfdis2d_yorigin = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DIS2D', & ! subcomponent + 'OPTIONS', & ! block + 'YORIGIN', & ! tag name + 'YORIGIN', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + 'y-position of the model grid origin', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfdis2d_angrot = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DIS2D', & ! subcomponent + 'OPTIONS', & ! block + 'ANGROT', & ! tag name + 'ANGROT', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + 'rotation angle', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfdis2d_export_ascii = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DIS2D', & ! subcomponent + 'OPTIONS', & ! block + 'EXPORT_ARRAY_ASCII', & ! tag name + 'EXPORT_ASCII', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'export array variables to layered ascii files.', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfdis2d_nrow = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DIS2D', & ! subcomponent + 'DIMENSIONS', & ! block + 'NROW', & ! tag name + 'NROW', & ! fortran variable + 'INTEGER', & ! type + '', & ! shape + 'number of rows', & ! longname + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfdis2d_ncol = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DIS2D', & ! subcomponent + 'DIMENSIONS', & ! block + 'NCOL', & ! tag name + 'NCOL', & ! fortran variable + 'INTEGER', & ! type + '', & ! shape + 'number of columns', & ! longname + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfdis2d_delr = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DIS2D', & ! subcomponent + 'GRIDDATA', & ! block + 'DELR', & ! tag name + 'DELR', & ! fortran variable + 'DOUBLE1D', & ! type + 'NCOL', & ! shape + 'spacing along a row', & ! longname + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfdis2d_delc = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DIS2D', & ! subcomponent + 'GRIDDATA', & ! block + 'DELC', & ! tag name + 'DELC', & ! fortran variable + 'DOUBLE1D', & ! type + 'NROW', & ! shape + 'spacing along a column', & ! longname + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfdis2d_botm = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DIS2D', & ! subcomponent + 'GRIDDATA', & ! block + 'BOTM', & ! tag name + 'BOTM', & ! fortran variable + 'DOUBLE2D', & ! type + 'NCOL NROW', & ! shape + 'cell bottom elevation', & ! longname + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfdis2d_idomain = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DIS2D', & ! subcomponent + 'GRIDDATA', & ! block + 'IDOMAIN', & ! tag name + 'IDOMAIN', & ! fortran variable + 'INTEGER2D', & ! type + 'NCOL NROW', & ! shape + 'idomain existence array', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chf_dis2d_param_definitions(*) = & + [ & + chfdis2d_length_units, & + chfdis2d_nogrb, & + chfdis2d_xorigin, & + chfdis2d_yorigin, & + chfdis2d_angrot, & + chfdis2d_export_ascii, & + chfdis2d_nrow, & + chfdis2d_ncol, & + chfdis2d_delr, & + chfdis2d_delc, & + chfdis2d_botm, & + chfdis2d_idomain & + ] + + type(InputParamDefinitionType), parameter :: & + chf_dis2d_aggregate_definitions(*) = & + [ & + InputParamDefinitionType & + ( & + '', & ! component + '', & ! subcomponent + '', & ! block + '', & ! tag name + '', & ! fortran variable + '', & ! type + '', & ! shape + '', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) & + ] + + type(InputBlockDefinitionType), parameter :: & + chf_dis2d_block_definitions(*) = & + [ & + InputBlockDefinitionType( & + 'OPTIONS', & ! blockname + .false., & ! required + .false., & ! aggregate + .false. & ! block_variable + ), & + InputBlockDefinitionType( & + 'DIMENSIONS', & ! blockname + .true., & ! required + .false., & ! aggregate + .false. & ! block_variable + ), & + InputBlockDefinitionType( & + 'GRIDDATA', & ! blockname + .true., & ! required + .false., & ! aggregate + .false. & ! block_variable + ) & + ] + +end module ChfDis2DInputModule diff --git a/src/Idm/chf-disv1didm.f90 b/src/Idm/chf-disv1didm.f90 new file mode 100644 index 00000000000..e678128bf8d --- /dev/null +++ b/src/Idm/chf-disv1didm.f90 @@ -0,0 +1,488 @@ +! ** Do Not Modify! MODFLOW 6 system generated file. ** +module ChfDisv1DInputModule + use ConstantsModule, only: LENVARNAME + use InputDefinitionModule, only: InputParamDefinitionType, & + InputBlockDefinitionType + private + public chf_disv1d_param_definitions + public chf_disv1d_aggregate_definitions + public chf_disv1d_block_definitions + public ChfDisv1dParamFoundType + public chf_disv1d_multi_package + public chf_disv1d_subpackages + + type ChfDisv1dParamFoundType + logical :: length_units = .false. + logical :: nogrb = .false. + logical :: xorigin = .false. + logical :: yorigin = .false. + logical :: angrot = .false. + logical :: export_ascii = .false. + logical :: nodes = .false. + logical :: nvert = .false. + logical :: length = .false. + logical :: width = .false. + logical :: bottom = .false. + logical :: idomain = .false. + logical :: iv = .false. + logical :: xv = .false. + logical :: yv = .false. + logical :: icell2d = .false. + logical :: fdc = .false. + logical :: ncvert = .false. + logical :: icvert = .false. + end type ChfDisv1dParamFoundType + + logical :: chf_disv1d_multi_package = .false. + + character(len=16), parameter :: & + chf_disv1d_subpackages(*) = & + [ & + ' ' & + ] + + type(InputParamDefinitionType), parameter :: & + chfdisv1d_length_units = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DISV1D', & ! subcomponent + 'OPTIONS', & ! block + 'LENGTH_UNITS', & ! tag name + 'LENGTH_UNITS', & ! fortran variable + 'STRING', & ! type + '', & ! shape + 'model length units', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfdisv1d_nogrb = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DISV1D', & ! subcomponent + 'OPTIONS', & ! block + 'NOGRB', & ! tag name + 'NOGRB', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'do not write binary grid file', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfdisv1d_xorigin = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DISV1D', & ! subcomponent + 'OPTIONS', & ! block + 'XORIGIN', & ! tag name + 'XORIGIN', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + 'x-position origin of the model grid coordinate system', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfdisv1d_yorigin = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DISV1D', & ! subcomponent + 'OPTIONS', & ! block + 'YORIGIN', & ! tag name + 'YORIGIN', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + 'y-position origin of the model grid coordinate system', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfdisv1d_angrot = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DISV1D', & ! subcomponent + 'OPTIONS', & ! block + 'ANGROT', & ! tag name + 'ANGROT', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + 'rotation angle', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfdisv1d_export_ascii = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DISV1D', & ! subcomponent + 'OPTIONS', & ! block + 'EXPORT_ARRAY_ASCII', & ! tag name + 'EXPORT_ASCII', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'export array variables to layered ascii files.', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfdisv1d_nodes = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DISV1D', & ! subcomponent + 'DIMENSIONS', & ! block + 'NODES', & ! tag name + 'NODES', & ! fortran variable + 'INTEGER', & ! type + '', & ! shape + 'number of linear features', & ! longname + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfdisv1d_nvert = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DISV1D', & ! subcomponent + 'DIMENSIONS', & ! block + 'NVERT', & ! tag name + 'NVERT', & ! fortran variable + 'INTEGER', & ! type + '', & ! shape + 'number of columns', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfdisv1d_length = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DISV1D', & ! subcomponent + 'GRIDDATA', & ! block + 'LENGTH', & ! tag name + 'LENGTH', & ! fortran variable + 'DOUBLE1D', & ! type + 'NODES', & ! shape + 'length', & ! longname + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfdisv1d_width = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DISV1D', & ! subcomponent + 'GRIDDATA', & ! block + 'WIDTH', & ! tag name + 'WIDTH', & ! fortran variable + 'DOUBLE1D', & ! type + 'NODES', & ! shape + 'width', & ! longname + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfdisv1d_bottom = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DISV1D', & ! subcomponent + 'GRIDDATA', & ! block + 'BOTTOM', & ! tag name + 'BOTTOM', & ! fortran variable + 'DOUBLE1D', & ! type + 'NODES', & ! shape + 'bottom elevation for the one-dimensional cell', & ! longname + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfdisv1d_idomain = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DISV1D', & ! subcomponent + 'GRIDDATA', & ! block + 'IDOMAIN', & ! tag name + 'IDOMAIN', & ! fortran variable + 'INTEGER1D', & ! type + 'NODES', & ! shape + 'idomain existence array', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfdisv1d_iv = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DISV1D', & ! subcomponent + 'VERTICES', & ! block + 'IV', & ! tag name + 'IV', & ! fortran variable + 'INTEGER', & ! type + '', & ! shape + 'vertex number', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfdisv1d_xv = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DISV1D', & ! subcomponent + 'VERTICES', & ! block + 'XV', & ! tag name + 'XV', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + 'x-coordinate for vertex', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfdisv1d_yv = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DISV1D', & ! subcomponent + 'VERTICES', & ! block + 'YV', & ! tag name + 'YV', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + 'y-coordinate for vertex', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfdisv1d_icell2d = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DISV1D', & ! subcomponent + 'CELL2D', & ! block + 'ICELL2D', & ! tag name + 'ICELL2D', & ! fortran variable + 'INTEGER', & ! type + '', & ! shape + 'cell2d number', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfdisv1d_fdc = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DISV1D', & ! subcomponent + 'CELL2D', & ! block + 'FDC', & ! tag name + 'FDC', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + 'fractional distance to the cell center', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfdisv1d_ncvert = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DISV1D', & ! subcomponent + 'CELL2D', & ! block + 'NCVERT', & ! tag name + 'NCVERT', & ! fortran variable + 'INTEGER', & ! type + '', & ! shape + 'number of cell vertices', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfdisv1d_icvert = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DISV1D', & ! subcomponent + 'CELL2D', & ! block + 'ICVERT', & ! tag name + 'ICVERT', & ! fortran variable + 'INTEGER1D', & ! type + 'NCVERT', & ! shape + 'number of cell vertices', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chf_disv1d_param_definitions(*) = & + [ & + chfdisv1d_length_units, & + chfdisv1d_nogrb, & + chfdisv1d_xorigin, & + chfdisv1d_yorigin, & + chfdisv1d_angrot, & + chfdisv1d_export_ascii, & + chfdisv1d_nodes, & + chfdisv1d_nvert, & + chfdisv1d_length, & + chfdisv1d_width, & + chfdisv1d_bottom, & + chfdisv1d_idomain, & + chfdisv1d_iv, & + chfdisv1d_xv, & + chfdisv1d_yv, & + chfdisv1d_icell2d, & + chfdisv1d_fdc, & + chfdisv1d_ncvert, & + chfdisv1d_icvert & + ] + + type(InputParamDefinitionType), parameter :: & + chfdisv1d_vertices = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DISV1D', & ! subcomponent + 'VERTICES', & ! block + 'VERTICES', & ! tag name + 'VERTICES', & ! fortran variable + 'RECARRAY IV XV YV', & ! type + 'NVERT', & ! shape + 'vertices data', & ! longname + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfdisv1d_cell2d = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DISV1D', & ! subcomponent + 'CELL2D', & ! block + 'CELL2D', & ! tag name + 'CELL2D', & ! fortran variable + 'RECARRAY ICELL2D FDC NCVERT ICVERT', & ! type + 'NODES', & ! shape + 'cell2d data', & ! longname + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chf_disv1d_aggregate_definitions(*) = & + [ & + chfdisv1d_vertices, & + chfdisv1d_cell2d & + ] + + type(InputBlockDefinitionType), parameter :: & + chf_disv1d_block_definitions(*) = & + [ & + InputBlockDefinitionType( & + 'OPTIONS', & ! blockname + .false., & ! required + .false., & ! aggregate + .false. & ! block_variable + ), & + InputBlockDefinitionType( & + 'DIMENSIONS', & ! blockname + .true., & ! required + .false., & ! aggregate + .false. & ! block_variable + ), & + InputBlockDefinitionType( & + 'GRIDDATA', & ! blockname + .true., & ! required + .false., & ! aggregate + .false. & ! block_variable + ), & + InputBlockDefinitionType( & + 'VERTICES', & ! blockname + .true., & ! required + .true., & ! aggregate + .false. & ! block_variable + ), & + InputBlockDefinitionType( & + 'CELL2D', & ! blockname + .true., & ! required + .true., & ! aggregate + .false. & ! block_variable + ) & + ] + +end module ChfDisv1DInputModule diff --git a/src/Idm/chf-disv2didm.f90 b/src/Idm/chf-disv2didm.f90 new file mode 100644 index 00000000000..567060c712c --- /dev/null +++ b/src/Idm/chf-disv2didm.f90 @@ -0,0 +1,468 @@ +! ** Do Not Modify! MODFLOW 6 system generated file. ** +module ChfDisv2DInputModule + use ConstantsModule, only: LENVARNAME + use InputDefinitionModule, only: InputParamDefinitionType, & + InputBlockDefinitionType + private + public chf_disv2d_param_definitions + public chf_disv2d_aggregate_definitions + public chf_disv2d_block_definitions + public ChfDisv2dParamFoundType + public chf_disv2d_multi_package + public chf_disv2d_subpackages + + type ChfDisv2dParamFoundType + logical :: length_units = .false. + logical :: nogrb = .false. + logical :: xorigin = .false. + logical :: yorigin = .false. + logical :: angrot = .false. + logical :: export_ascii = .false. + logical :: nodes = .false. + logical :: nvert = .false. + logical :: bottom = .false. + logical :: idomain = .false. + logical :: iv = .false. + logical :: xv = .false. + logical :: yv = .false. + logical :: icell2d = .false. + logical :: xc = .false. + logical :: yc = .false. + logical :: ncvert = .false. + logical :: icvert = .false. + end type ChfDisv2dParamFoundType + + logical :: chf_disv2d_multi_package = .false. + + character(len=16), parameter :: & + chf_disv2d_subpackages(*) = & + [ & + ' ' & + ] + + type(InputParamDefinitionType), parameter :: & + chfdisv2d_length_units = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DISV2D', & ! subcomponent + 'OPTIONS', & ! block + 'LENGTH_UNITS', & ! tag name + 'LENGTH_UNITS', & ! fortran variable + 'STRING', & ! type + '', & ! shape + 'model length units', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfdisv2d_nogrb = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DISV2D', & ! subcomponent + 'OPTIONS', & ! block + 'NOGRB', & ! tag name + 'NOGRB', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'do not write binary grid file', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfdisv2d_xorigin = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DISV2D', & ! subcomponent + 'OPTIONS', & ! block + 'XORIGIN', & ! tag name + 'XORIGIN', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + 'x-position of the model grid origin', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfdisv2d_yorigin = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DISV2D', & ! subcomponent + 'OPTIONS', & ! block + 'YORIGIN', & ! tag name + 'YORIGIN', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + 'y-position of the model grid origin', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfdisv2d_angrot = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DISV2D', & ! subcomponent + 'OPTIONS', & ! block + 'ANGROT', & ! tag name + 'ANGROT', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + 'rotation angle', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfdisv2d_export_ascii = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DISV2D', & ! subcomponent + 'OPTIONS', & ! block + 'EXPORT_ARRAY_ASCII', & ! tag name + 'EXPORT_ASCII', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'export array variables to layered ascii files.', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfdisv2d_nodes = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DISV2D', & ! subcomponent + 'DIMENSIONS', & ! block + 'NODES', & ! tag name + 'NODES', & ! fortran variable + 'INTEGER', & ! type + '', & ! shape + 'number of cells per layer', & ! longname + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfdisv2d_nvert = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DISV2D', & ! subcomponent + 'DIMENSIONS', & ! block + 'NVERT', & ! tag name + 'NVERT', & ! fortran variable + 'INTEGER', & ! type + '', & ! shape + 'number of columns', & ! longname + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfdisv2d_bottom = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DISV2D', & ! subcomponent + 'GRIDDATA', & ! block + 'BOTTOM', & ! tag name + 'BOTTOM', & ! fortran variable + 'DOUBLE1D', & ! type + 'NODES', & ! shape + 'model bottom elevation', & ! longname + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfdisv2d_idomain = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DISV2D', & ! subcomponent + 'GRIDDATA', & ! block + 'IDOMAIN', & ! tag name + 'IDOMAIN', & ! fortran variable + 'INTEGER1D', & ! type + 'NODES', & ! shape + 'idomain existence array', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfdisv2d_iv = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DISV2D', & ! subcomponent + 'VERTICES', & ! block + 'IV', & ! tag name + 'IV', & ! fortran variable + 'INTEGER', & ! type + '', & ! shape + 'vertex number', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfdisv2d_xv = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DISV2D', & ! subcomponent + 'VERTICES', & ! block + 'XV', & ! tag name + 'XV', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + 'x-coordinate for vertex', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfdisv2d_yv = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DISV2D', & ! subcomponent + 'VERTICES', & ! block + 'YV', & ! tag name + 'YV', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + 'y-coordinate for vertex', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfdisv2d_icell2d = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DISV2D', & ! subcomponent + 'CELL2D', & ! block + 'ICELL2D', & ! tag name + 'ICELL2D', & ! fortran variable + 'INTEGER', & ! type + '', & ! shape + 'cell2d number', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfdisv2d_xc = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DISV2D', & ! subcomponent + 'CELL2D', & ! block + 'XC', & ! tag name + 'XC', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + 'x-coordinate for cell center', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfdisv2d_yc = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DISV2D', & ! subcomponent + 'CELL2D', & ! block + 'YC', & ! tag name + 'YC', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + 'y-coordinate for cell center', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfdisv2d_ncvert = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DISV2D', & ! subcomponent + 'CELL2D', & ! block + 'NCVERT', & ! tag name + 'NCVERT', & ! fortran variable + 'INTEGER', & ! type + '', & ! shape + 'number of cell vertices', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfdisv2d_icvert = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DISV2D', & ! subcomponent + 'CELL2D', & ! block + 'ICVERT', & ! tag name + 'ICVERT', & ! fortran variable + 'INTEGER1D', & ! type + 'NCVERT', & ! shape + 'array of vertex numbers', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chf_disv2d_param_definitions(*) = & + [ & + chfdisv2d_length_units, & + chfdisv2d_nogrb, & + chfdisv2d_xorigin, & + chfdisv2d_yorigin, & + chfdisv2d_angrot, & + chfdisv2d_export_ascii, & + chfdisv2d_nodes, & + chfdisv2d_nvert, & + chfdisv2d_bottom, & + chfdisv2d_idomain, & + chfdisv2d_iv, & + chfdisv2d_xv, & + chfdisv2d_yv, & + chfdisv2d_icell2d, & + chfdisv2d_xc, & + chfdisv2d_yc, & + chfdisv2d_ncvert, & + chfdisv2d_icvert & + ] + + type(InputParamDefinitionType), parameter :: & + chfdisv2d_vertices = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DISV2D', & ! subcomponent + 'VERTICES', & ! block + 'VERTICES', & ! tag name + 'VERTICES', & ! fortran variable + 'RECARRAY IV XV YV', & ! type + 'NVERT', & ! shape + 'vertices data', & ! longname + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfdisv2d_cell2d = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'DISV2D', & ! subcomponent + 'CELL2D', & ! block + 'CELL2D', & ! tag name + 'CELL2D', & ! fortran variable + 'RECARRAY ICELL2D XC YC NCVERT ICVERT', & ! type + 'NODES', & ! shape + 'cell2d data', & ! longname + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chf_disv2d_aggregate_definitions(*) = & + [ & + chfdisv2d_vertices, & + chfdisv2d_cell2d & + ] + + type(InputBlockDefinitionType), parameter :: & + chf_disv2d_block_definitions(*) = & + [ & + InputBlockDefinitionType( & + 'OPTIONS', & ! blockname + .false., & ! required + .false., & ! aggregate + .false. & ! block_variable + ), & + InputBlockDefinitionType( & + 'DIMENSIONS', & ! blockname + .true., & ! required + .false., & ! aggregate + .false. & ! block_variable + ), & + InputBlockDefinitionType( & + 'GRIDDATA', & ! blockname + .true., & ! required + .false., & ! aggregate + .false. & ! block_variable + ), & + InputBlockDefinitionType( & + 'VERTICES', & ! blockname + .true., & ! required + .true., & ! aggregate + .false. & ! block_variable + ), & + InputBlockDefinitionType( & + 'CELL2D', & ! blockname + .true., & ! required + .true., & ! aggregate + .false. & ! block_variable + ) & + ] + +end module ChfDisv2DInputModule diff --git a/src/Idm/chf-flwidm.f90 b/src/Idm/chf-flwidm.f90 new file mode 100644 index 00000000000..8897ed7b184 --- /dev/null +++ b/src/Idm/chf-flwidm.f90 @@ -0,0 +1,437 @@ +! ** Do Not Modify! MODFLOW 6 system generated file. ** +module ChfFlwInputModule + use ConstantsModule, only: LENVARNAME + use InputDefinitionModule, only: InputParamDefinitionType, & + InputBlockDefinitionType + private + public chf_flw_param_definitions + public chf_flw_aggregate_definitions + public chf_flw_block_definitions + public ChfFlwParamFoundType + public chf_flw_multi_package + public chf_flw_subpackages + + type ChfFlwParamFoundType + logical :: auxiliary = .false. + logical :: auxmultname = .false. + logical :: boundnames = .false. + logical :: print_input = .false. + logical :: print_flows = .false. + logical :: save_flows = .false. + logical :: ts_filerecord = .false. + logical :: ts6 = .false. + logical :: filein = .false. + logical :: ts6_filename = .false. + logical :: obs_filerecord = .false. + logical :: obs6 = .false. + logical :: obs6_filename = .false. + logical :: maxbound = .false. + logical :: cellid = .false. + logical :: q = .false. + logical :: aux = .false. + logical :: boundname = .false. + end type ChfFlwParamFoundType + + logical :: chf_flw_multi_package = .true. + + character(len=16), parameter :: & + chf_flw_subpackages(*) = & + [ & + ' ' & + ] + + type(InputParamDefinitionType), parameter :: & + chfflw_auxiliary = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'FLW', & ! subcomponent + 'OPTIONS', & ! block + 'AUXILIARY', & ! tag name + 'AUXILIARY', & ! fortran variable + 'STRING', & ! type + 'NAUX', & ! shape + 'keyword to specify aux variables', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfflw_auxmultname = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'FLW', & ! subcomponent + 'OPTIONS', & ! block + 'AUXMULTNAME', & ! tag name + 'AUXMULTNAME', & ! fortran variable + 'STRING', & ! type + '', & ! shape + 'name of auxiliary variable for multiplier', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfflw_boundnames = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'FLW', & ! subcomponent + 'OPTIONS', & ! block + 'BOUNDNAMES', & ! tag name + 'BOUNDNAMES', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + '', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfflw_print_input = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'FLW', & ! subcomponent + 'OPTIONS', & ! block + 'PRINT_INPUT', & ! tag name + 'PRINT_INPUT', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'print input to listing file', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfflw_print_flows = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'FLW', & ! subcomponent + 'OPTIONS', & ! block + 'PRINT_FLOWS', & ! tag name + 'PRINT_FLOWS', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'print calculated flows to listing file', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfflw_save_flows = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'FLW', & ! subcomponent + 'OPTIONS', & ! block + 'SAVE_FLOWS', & ! tag name + 'SAVE_FLOWS', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'save well flows to budget file', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfflw_ts_filerecord = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'FLW', & ! subcomponent + 'OPTIONS', & ! block + 'TS_FILERECORD', & ! tag name + 'TS_FILERECORD', & ! fortran variable + 'RECORD TS6 FILEIN TS6_FILENAME', & ! type + '', & ! shape + '', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfflw_ts6 = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'FLW', & ! subcomponent + 'OPTIONS', & ! block + 'TS6', & ! tag name + 'TS6', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'head keyword', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfflw_filein = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'FLW', & ! subcomponent + 'OPTIONS', & ! block + 'FILEIN', & ! tag name + 'FILEIN', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'file keyword', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfflw_ts6_filename = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'FLW', & ! subcomponent + 'OPTIONS', & ! block + 'TS6_FILENAME', & ! tag name + 'TS6_FILENAME', & ! fortran variable + 'STRING', & ! type + '', & ! shape + 'file name of time series information', & ! longname + .true., & ! required + .true., & ! multi-record + .true., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfflw_obs_filerecord = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'FLW', & ! subcomponent + 'OPTIONS', & ! block + 'OBS_FILERECORD', & ! tag name + 'OBS_FILERECORD', & ! fortran variable + 'RECORD OBS6 FILEIN OBS6_FILENAME', & ! type + '', & ! shape + '', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfflw_obs6 = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'FLW', & ! subcomponent + 'OPTIONS', & ! block + 'OBS6', & ! tag name + 'OBS6', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'obs keyword', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfflw_obs6_filename = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'FLW', & ! subcomponent + 'OPTIONS', & ! block + 'OBS6_FILENAME', & ! tag name + 'OBS6_FILENAME', & ! fortran variable + 'STRING', & ! type + '', & ! shape + 'obs6 input filename', & ! longname + .true., & ! required + .true., & ! multi-record + .true., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfflw_maxbound = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'FLW', & ! subcomponent + 'DIMENSIONS', & ! block + 'MAXBOUND', & ! tag name + 'MAXBOUND', & ! fortran variable + 'INTEGER', & ! type + '', & ! shape + 'maximum number of inflow', & ! longname + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfflw_cellid = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'FLW', & ! subcomponent + 'PERIOD', & ! block + 'CELLID', & ! tag name + 'CELLID', & ! fortran variable + 'INTEGER1D', & ! type + 'NCELLDIM', & ! shape + 'cell identifier', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfflw_q = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'FLW', & ! subcomponent + 'PERIOD', & ! block + 'Q', & ! tag name + 'Q', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + 'well rate', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .true. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfflw_aux = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'FLW', & ! subcomponent + 'PERIOD', & ! block + 'AUX', & ! tag name + 'AUX', & ! fortran variable + 'DOUBLE1D', & ! type + 'NAUX', & ! shape + 'auxiliary variables', & ! longname + .false., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .true. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfflw_boundname = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'FLW', & ! subcomponent + 'PERIOD', & ! block + 'BOUNDNAME', & ! tag name + 'BOUNDNAME', & ! fortran variable + 'STRING', & ! type + '', & ! shape + 'inflow name', & ! longname + .false., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chf_flw_param_definitions(*) = & + [ & + chfflw_auxiliary, & + chfflw_auxmultname, & + chfflw_boundnames, & + chfflw_print_input, & + chfflw_print_flows, & + chfflw_save_flows, & + chfflw_ts_filerecord, & + chfflw_ts6, & + chfflw_filein, & + chfflw_ts6_filename, & + chfflw_obs_filerecord, & + chfflw_obs6, & + chfflw_obs6_filename, & + chfflw_maxbound, & + chfflw_cellid, & + chfflw_q, & + chfflw_aux, & + chfflw_boundname & + ] + + type(InputParamDefinitionType), parameter :: & + chfflw_spd = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'FLW', & ! subcomponent + 'PERIOD', & ! block + 'STRESS_PERIOD_DATA', & ! tag name + 'SPD', & ! fortran variable + 'RECARRAY CELLID Q AUX BOUNDNAME', & ! type + 'MAXBOUND', & ! shape + '', & ! longname + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chf_flw_aggregate_definitions(*) = & + [ & + chfflw_spd & + ] + + type(InputBlockDefinitionType), parameter :: & + chf_flw_block_definitions(*) = & + [ & + InputBlockDefinitionType( & + 'OPTIONS', & ! blockname + .false., & ! required + .false., & ! aggregate + .false. & ! block_variable + ), & + InputBlockDefinitionType( & + 'DIMENSIONS', & ! blockname + .true., & ! required + .false., & ! aggregate + .false. & ! block_variable + ), & + InputBlockDefinitionType( & + 'PERIOD', & ! blockname + .true., & ! required + .true., & ! aggregate + .true. & ! block_variable + ) & + ] + +end module ChfFlwInputModule diff --git a/src/Idm/chf-icidm.f90 b/src/Idm/chf-icidm.f90 new file mode 100644 index 00000000000..d776145aeb6 --- /dev/null +++ b/src/Idm/chf-icidm.f90 @@ -0,0 +1,108 @@ +! ** Do Not Modify! MODFLOW 6 system generated file. ** +module ChfIcInputModule + use ConstantsModule, only: LENVARNAME + use InputDefinitionModule, only: InputParamDefinitionType, & + InputBlockDefinitionType + private + public chf_ic_param_definitions + public chf_ic_aggregate_definitions + public chf_ic_block_definitions + public ChfIcParamFoundType + public chf_ic_multi_package + public chf_ic_subpackages + + type ChfIcParamFoundType + logical :: export_ascii = .false. + logical :: strt = .false. + end type ChfIcParamFoundType + + logical :: chf_ic_multi_package = .false. + + character(len=16), parameter :: & + chf_ic_subpackages(*) = & + [ & + ' ' & + ] + + type(InputParamDefinitionType), parameter :: & + chfic_export_ascii = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'IC', & ! subcomponent + 'OPTIONS', & ! block + 'EXPORT_ARRAY_ASCII', & ! tag name + 'EXPORT_ASCII', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'export array variables to layered ascii files.', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfic_strt = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'IC', & ! subcomponent + 'GRIDDATA', & ! block + 'STRT', & ! tag name + 'STRT', & ! fortran variable + 'DOUBLE1D', & ! type + 'NODES', & ! shape + 'starting concentration', & ! longname + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .true., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chf_ic_param_definitions(*) = & + [ & + chfic_export_ascii, & + chfic_strt & + ] + + type(InputParamDefinitionType), parameter :: & + chf_ic_aggregate_definitions(*) = & + [ & + InputParamDefinitionType & + ( & + '', & ! component + '', & ! subcomponent + '', & ! block + '', & ! tag name + '', & ! fortran variable + '', & ! type + '', & ! shape + '', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) & + ] + + type(InputBlockDefinitionType), parameter :: & + chf_ic_block_definitions(*) = & + [ & + InputBlockDefinitionType( & + 'OPTIONS', & ! blockname + .false., & ! required + .false., & ! aggregate + .false. & ! block_variable + ), & + InputBlockDefinitionType( & + 'GRIDDATA', & ! blockname + .true., & ! required + .false., & ! aggregate + .false. & ! block_variable + ) & + ] + +end module ChfIcInputModule diff --git a/src/Idm/chf-namidm.f90 b/src/Idm/chf-namidm.f90 new file mode 100644 index 00000000000..c08b86dde9c --- /dev/null +++ b/src/Idm/chf-namidm.f90 @@ -0,0 +1,271 @@ +! ** Do Not Modify! MODFLOW 6 system generated file. ** +module ChfNamInputModule + use ConstantsModule, only: LENVARNAME + use InputDefinitionModule, only: InputParamDefinitionType, & + InputBlockDefinitionType + private + public chf_nam_param_definitions + public chf_nam_aggregate_definitions + public chf_nam_block_definitions + public ChfNamParamFoundType + public chf_nam_multi_package + public chf_nam_subpackages + + type ChfNamParamFoundType + logical :: list = .false. + logical :: print_input = .false. + logical :: print_flows = .false. + logical :: save_flows = .false. + logical :: newtonoptions = .false. + logical :: newton = .false. + logical :: under_relaxation = .false. + logical :: ftype = .false. + logical :: fname = .false. + logical :: pname = .false. + end type ChfNamParamFoundType + + logical :: chf_nam_multi_package = .false. + + character(len=16), parameter :: & + chf_nam_subpackages(*) = & + [ & + ' ' & + ] + + type(InputParamDefinitionType), parameter :: & + chfnam_list = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'NAM', & ! subcomponent + 'OPTIONS', & ! block + 'LIST', & ! tag name + 'LIST', & ! fortran variable + 'STRING', & ! type + '', & ! shape + 'name of listing file', & ! longname + .false., & ! required + .false., & ! multi-record + .true., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfnam_print_input = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'NAM', & ! subcomponent + 'OPTIONS', & ! block + 'PRINT_INPUT', & ! tag name + 'PRINT_INPUT', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'print input to listing file', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfnam_print_flows = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'NAM', & ! subcomponent + 'OPTIONS', & ! block + 'PRINT_FLOWS', & ! tag name + 'PRINT_FLOWS', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'print calculated flows to listing file', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfnam_save_flows = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'NAM', & ! subcomponent + 'OPTIONS', & ! block + 'SAVE_FLOWS', & ! tag name + 'SAVE_FLOWS', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'save flows for all packages to budget file', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfnam_newtonoptions = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'NAM', & ! subcomponent + 'OPTIONS', & ! block + 'NEWTONOPTIONS', & ! tag name + 'NEWTONOPTIONS', & ! fortran variable + 'RECORD NEWTON UNDER_RELAXATION', & ! type + '', & ! shape + 'newton keyword and options', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfnam_newton = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'NAM', & ! subcomponent + 'OPTIONS', & ! block + 'NEWTON', & ! tag name + 'NEWTON', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'keyword to activate Newton-Raphson formulation', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfnam_under_relaxation = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'NAM', & ! subcomponent + 'OPTIONS', & ! block + 'UNDER_RELAXATION', & ! tag name + 'UNDER_RELAXATION', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'keyword to activate Newton-Raphson UNDER_RELAXATION option', & ! longname + .false., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfnam_ftype = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'NAM', & ! subcomponent + 'PACKAGES', & ! block + 'FTYPE', & ! tag name + 'FTYPE', & ! fortran variable + 'STRING', & ! type + '', & ! shape + 'package type', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfnam_fname = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'NAM', & ! subcomponent + 'PACKAGES', & ! block + 'FNAME', & ! tag name + 'FNAME', & ! fortran variable + 'STRING', & ! type + '', & ! shape + 'file name', & ! longname + .true., & ! required + .true., & ! multi-record + .true., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfnam_pname = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'NAM', & ! subcomponent + 'PACKAGES', & ! block + 'PNAME', & ! tag name + 'PNAME', & ! fortran variable + 'STRING', & ! type + '', & ! shape + 'user name for package', & ! longname + .false., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chf_nam_param_definitions(*) = & + [ & + chfnam_list, & + chfnam_print_input, & + chfnam_print_flows, & + chfnam_save_flows, & + chfnam_newtonoptions, & + chfnam_newton, & + chfnam_under_relaxation, & + chfnam_ftype, & + chfnam_fname, & + chfnam_pname & + ] + + type(InputParamDefinitionType), parameter :: & + chfnam_packages = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'NAM', & ! subcomponent + 'PACKAGES', & ! block + 'PACKAGES', & ! tag name + 'PACKAGES', & ! fortran variable + 'RECARRAY FTYPE FNAME PNAME', & ! type + '', & ! shape + 'package list', & ! longname + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chf_nam_aggregate_definitions(*) = & + [ & + chfnam_packages & + ] + + type(InputBlockDefinitionType), parameter :: & + chf_nam_block_definitions(*) = & + [ & + InputBlockDefinitionType( & + 'OPTIONS', & ! blockname + .false., & ! required + .false., & ! aggregate + .false. & ! block_variable + ), & + InputBlockDefinitionType( & + 'PACKAGES', & ! blockname + .true., & ! required + .true., & ! aggregate + .false. & ! block_variable + ) & + ] + +end module ChfNamInputModule diff --git a/src/Idm/chf-stoidm.f90 b/src/Idm/chf-stoidm.f90 new file mode 100644 index 00000000000..e7e3b7045d5 --- /dev/null +++ b/src/Idm/chf-stoidm.f90 @@ -0,0 +1,148 @@ +! ** Do Not Modify! MODFLOW 6 system generated file. ** +module ChfStoInputModule + use ConstantsModule, only: LENVARNAME + use InputDefinitionModule, only: InputParamDefinitionType, & + InputBlockDefinitionType + private + public chf_sto_param_definitions + public chf_sto_aggregate_definitions + public chf_sto_block_definitions + public ChfStoParamFoundType + public chf_sto_multi_package + public chf_sto_subpackages + + type ChfStoParamFoundType + logical :: ipakcb = .false. + logical :: export_ascii = .false. + logical :: steady_state = .false. + logical :: transient = .false. + end type ChfStoParamFoundType + + logical :: chf_sto_multi_package = .false. + + character(len=16), parameter :: & + chf_sto_subpackages(*) = & + [ & + ' ' & + ] + + type(InputParamDefinitionType), parameter :: & + chfsto_ipakcb = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'STO', & ! subcomponent + 'OPTIONS', & ! block + 'SAVE_FLOWS', & ! tag name + 'IPAKCB', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'keyword to save NPF flows', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfsto_export_ascii = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'STO', & ! subcomponent + 'OPTIONS', & ! block + 'EXPORT_ARRAY_ASCII', & ! tag name + 'EXPORT_ASCII', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'export array variables to layered ascii files.', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfsto_steady_state = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'STO', & ! subcomponent + 'PERIOD', & ! block + 'STEADY-STATE', & ! tag name + 'STEADY_STATE', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'steady state indicator', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfsto_transient = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'STO', & ! subcomponent + 'PERIOD', & ! block + 'TRANSIENT', & ! tag name + 'TRANSIENT', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'transient indicator', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chf_sto_param_definitions(*) = & + [ & + chfsto_ipakcb, & + chfsto_export_ascii, & + chfsto_steady_state, & + chfsto_transient & + ] + + type(InputParamDefinitionType), parameter :: & + chf_sto_aggregate_definitions(*) = & + [ & + InputParamDefinitionType & + ( & + '', & ! component + '', & ! subcomponent + '', & ! block + '', & ! tag name + '', & ! fortran variable + '', & ! type + '', & ! shape + '', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) & + ] + + type(InputBlockDefinitionType), parameter :: & + chf_sto_block_definitions(*) = & + [ & + InputBlockDefinitionType( & + 'OPTIONS', & ! blockname + .false., & ! required + .false., & ! aggregate + .false. & ! block_variable + ), & + InputBlockDefinitionType( & + 'PERIOD', & ! blockname + .false., & ! required + .false., & ! aggregate + .true. & ! block_variable + ) & + ] + +end module ChfStoInputModule diff --git a/src/Idm/chf-zdgidm.f90 b/src/Idm/chf-zdgidm.f90 new file mode 100644 index 00000000000..d058620c67b --- /dev/null +++ b/src/Idm/chf-zdgidm.f90 @@ -0,0 +1,477 @@ +! ** Do Not Modify! MODFLOW 6 system generated file. ** +module ChfZdgInputModule + use ConstantsModule, only: LENVARNAME + use InputDefinitionModule, only: InputParamDefinitionType, & + InputBlockDefinitionType + private + public chf_zdg_param_definitions + public chf_zdg_aggregate_definitions + public chf_zdg_block_definitions + public ChfZdgParamFoundType + public chf_zdg_multi_package + public chf_zdg_subpackages + + type ChfZdgParamFoundType + logical :: auxiliary = .false. + logical :: boundnames = .false. + logical :: iprpak = .false. + logical :: iprflow = .false. + logical :: ipakcb = .false. + logical :: ts_filerecord = .false. + logical :: ts6 = .false. + logical :: filein = .false. + logical :: ts6_filename = .false. + logical :: obs_filerecord = .false. + logical :: obs6 = .false. + logical :: obs6_filename = .false. + logical :: maxbound = .false. + logical :: cellid = .false. + logical :: idcxs = .false. + logical :: width = .false. + logical :: slope = .false. + logical :: rough = .false. + logical :: auxvar = .false. + logical :: boundname = .false. + end type ChfZdgParamFoundType + + logical :: chf_zdg_multi_package = .true. + + character(len=16), parameter :: & + chf_zdg_subpackages(*) = & + [ & + ' ' & + ] + + type(InputParamDefinitionType), parameter :: & + chfzdg_auxiliary = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'ZDG', & ! subcomponent + 'OPTIONS', & ! block + 'AUXILIARY', & ! tag name + 'AUXILIARY', & ! fortran variable + 'STRING', & ! type + 'NAUX', & ! shape + 'keyword to specify aux variables', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfzdg_boundnames = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'ZDG', & ! subcomponent + 'OPTIONS', & ! block + 'BOUNDNAMES', & ! tag name + 'BOUNDNAMES', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + '', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfzdg_iprpak = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'ZDG', & ! subcomponent + 'OPTIONS', & ! block + 'PRINT_INPUT', & ! tag name + 'IPRPAK', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'print input to listing file', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfzdg_iprflow = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'ZDG', & ! subcomponent + 'OPTIONS', & ! block + 'PRINT_FLOWS', & ! tag name + 'IPRFLOW', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'print calculated flows to listing file', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfzdg_ipakcb = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'ZDG', & ! subcomponent + 'OPTIONS', & ! block + 'SAVE_FLOWS', & ! tag name + 'IPAKCB', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'save flows to budget file', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfzdg_ts_filerecord = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'ZDG', & ! subcomponent + 'OPTIONS', & ! block + 'TS_FILERECORD', & ! tag name + 'TS_FILERECORD', & ! fortran variable + 'RECORD TS6 FILEIN TS6_FILENAME', & ! type + '', & ! shape + '', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfzdg_ts6 = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'ZDG', & ! subcomponent + 'OPTIONS', & ! block + 'TS6', & ! tag name + 'TS6', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'head keyword', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfzdg_filein = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'ZDG', & ! subcomponent + 'OPTIONS', & ! block + 'FILEIN', & ! tag name + 'FILEIN', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'file keyword', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfzdg_ts6_filename = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'ZDG', & ! subcomponent + 'OPTIONS', & ! block + 'TS6_FILENAME', & ! tag name + 'TS6_FILENAME', & ! fortran variable + 'STRING', & ! type + '', & ! shape + 'file name of time series information', & ! longname + .true., & ! required + .true., & ! multi-record + .true., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfzdg_obs_filerecord = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'ZDG', & ! subcomponent + 'OPTIONS', & ! block + 'OBS_FILERECORD', & ! tag name + 'OBS_FILERECORD', & ! fortran variable + 'RECORD OBS6 FILEIN OBS6_FILENAME', & ! type + '', & ! shape + '', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfzdg_obs6 = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'ZDG', & ! subcomponent + 'OPTIONS', & ! block + 'OBS6', & ! tag name + 'OBS6', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'obs keyword', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfzdg_obs6_filename = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'ZDG', & ! subcomponent + 'OPTIONS', & ! block + 'OBS6_FILENAME', & ! tag name + 'OBS6_FILENAME', & ! fortran variable + 'STRING', & ! type + '', & ! shape + 'obs6 input filename', & ! longname + .true., & ! required + .true., & ! multi-record + .true., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfzdg_maxbound = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'ZDG', & ! subcomponent + 'DIMENSIONS', & ! block + 'MAXBOUND', & ! tag name + 'MAXBOUND', & ! fortran variable + 'INTEGER', & ! type + '', & ! shape + 'maximum number of zero-depth-gradient boundaries', & ! longname + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfzdg_cellid = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'ZDG', & ! subcomponent + 'PERIOD', & ! block + 'CELLID', & ! tag name + 'CELLID', & ! fortran variable + 'INTEGER1D', & ! type + 'NCELLDIM', & ! shape + 'cell identifier', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfzdg_idcxs = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'ZDG', & ! subcomponent + 'PERIOD', & ! block + 'IDCXS', & ! tag name + 'IDCXS', & ! fortran variable + 'INTEGER', & ! type + '', & ! shape + 'cross section identifier', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfzdg_width = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'ZDG', & ! subcomponent + 'PERIOD', & ! block + 'WIDTH', & ! tag name + 'WIDTH', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + 'width of the zero-depth gradient boundary', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .true. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfzdg_slope = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'ZDG', & ! subcomponent + 'PERIOD', & ! block + 'SLOPE', & ! tag name + 'SLOPE', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + 'channel slope', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .true. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfzdg_rough = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'ZDG', & ! subcomponent + 'PERIOD', & ! block + 'ROUGH', & ! tag name + 'ROUGH', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + 'channel roughness', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .true. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfzdg_auxvar = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'ZDG', & ! subcomponent + 'PERIOD', & ! block + 'AUX', & ! tag name + 'AUXVAR', & ! fortran variable + 'DOUBLE1D', & ! type + 'NAUX', & ! shape + 'auxiliary variables', & ! longname + .false., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .true. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chfzdg_boundname = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'ZDG', & ! subcomponent + 'PERIOD', & ! block + 'BOUNDNAME', & ! tag name + 'BOUNDNAME', & ! fortran variable + 'STRING', & ! type + '', & ! shape + 'zero-depth-gradient boundary name', & ! longname + .false., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chf_zdg_param_definitions(*) = & + [ & + chfzdg_auxiliary, & + chfzdg_boundnames, & + chfzdg_iprpak, & + chfzdg_iprflow, & + chfzdg_ipakcb, & + chfzdg_ts_filerecord, & + chfzdg_ts6, & + chfzdg_filein, & + chfzdg_ts6_filename, & + chfzdg_obs_filerecord, & + chfzdg_obs6, & + chfzdg_obs6_filename, & + chfzdg_maxbound, & + chfzdg_cellid, & + chfzdg_idcxs, & + chfzdg_width, & + chfzdg_slope, & + chfzdg_rough, & + chfzdg_auxvar, & + chfzdg_boundname & + ] + + type(InputParamDefinitionType), parameter :: & + chfzdg_spd = InputParamDefinitionType & + ( & + 'CHF', & ! component + 'ZDG', & ! subcomponent + 'PERIOD', & ! block + 'STRESS_PERIOD_DATA', & ! tag name + 'SPD', & ! fortran variable + 'RECARRAY CELLID IDCXS WIDTH SLOPE ROUGH AUX BOUNDNAME', & ! type + 'MAXBOUND', & ! shape + '', & ! longname + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + chf_zdg_aggregate_definitions(*) = & + [ & + chfzdg_spd & + ] + + type(InputBlockDefinitionType), parameter :: & + chf_zdg_block_definitions(*) = & + [ & + InputBlockDefinitionType( & + 'OPTIONS', & ! blockname + .false., & ! required + .false., & ! aggregate + .false. & ! block_variable + ), & + InputBlockDefinitionType( & + 'DIMENSIONS', & ! blockname + .true., & ! required + .false., & ! aggregate + .false. & ! block_variable + ), & + InputBlockDefinitionType( & + 'PERIOD', & ! blockname + .true., & ! required + .true., & ! aggregate + .true. & ! block_variable + ) & + ] + +end module ChfZdgInputModule diff --git a/src/Idm/exg-chfgwfidm.f90 b/src/Idm/exg-chfgwfidm.f90 new file mode 100644 index 00000000000..bc874ad1ada --- /dev/null +++ b/src/Idm/exg-chfgwfidm.f90 @@ -0,0 +1,317 @@ +! ** Do Not Modify! MODFLOW 6 system generated file. ** +module ExgChfgwfInputModule + use ConstantsModule, only: LENVARNAME + use InputDefinitionModule, only: InputParamDefinitionType, & + InputBlockDefinitionType + private + public exg_chfgwf_param_definitions + public exg_chfgwf_aggregate_definitions + public exg_chfgwf_block_definitions + public ExgChfgwfParamFoundType + public exg_chfgwf_multi_package + public exg_chfgwf_subpackages + + type ExgChfgwfParamFoundType + logical :: ipr_input = .false. + logical :: ipr_flow = .false. + logical :: ifixedcond = .false. + logical :: obs_filerecord = .false. + logical :: obs6 = .false. + logical :: filein = .false. + logical :: obs6_filename = .false. + logical :: nexg = .false. + logical :: cellidm1 = .false. + logical :: cellidm2 = .false. + logical :: bedleak = .false. + logical :: cfact = .false. + end type ExgChfgwfParamFoundType + + logical :: exg_chfgwf_multi_package = .true. + + character(len=16), parameter :: & + exg_chfgwf_subpackages(*) = & + [ & + ' ' & + ] + + type(InputParamDefinitionType), parameter :: & + exgchfgwf_ipr_input = InputParamDefinitionType & + ( & + 'EXG', & ! component + 'CHFGWF', & ! subcomponent + 'OPTIONS', & ! block + 'PRINT_INPUT', & ! tag name + 'IPR_INPUT', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'keyword to print input to list file', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + exgchfgwf_ipr_flow = InputParamDefinitionType & + ( & + 'EXG', & ! component + 'CHFGWF', & ! subcomponent + 'OPTIONS', & ! block + 'PRINT_FLOWS', & ! tag name + 'IPR_FLOW', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'keyword to print chfgwf flows to list file', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + exgchfgwf_ifixedcond = InputParamDefinitionType & + ( & + 'EXG', & ! component + 'CHFGWF', & ! subcomponent + 'OPTIONS', & ! block + 'FIXED_CONDUCTANCE', & ! tag name + 'IFIXEDCOND', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'keyword to indicate conductance is fixed', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + exgchfgwf_obs_filerecord = InputParamDefinitionType & + ( & + 'EXG', & ! component + 'CHFGWF', & ! subcomponent + 'OPTIONS', & ! block + 'OBS_FILERECORD', & ! tag name + 'OBS_FILERECORD', & ! fortran variable + 'RECORD OBS6 FILEIN OBS6_FILENAME', & ! type + '', & ! shape + '', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + exgchfgwf_obs6 = InputParamDefinitionType & + ( & + 'EXG', & ! component + 'CHFGWF', & ! subcomponent + 'OPTIONS', & ! block + 'OBS6', & ! tag name + 'OBS6', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'obs keyword', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + exgchfgwf_filein = InputParamDefinitionType & + ( & + 'EXG', & ! component + 'CHFGWF', & ! subcomponent + 'OPTIONS', & ! block + 'FILEIN', & ! tag name + 'FILEIN', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'file keyword', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + exgchfgwf_obs6_filename = InputParamDefinitionType & + ( & + 'EXG', & ! component + 'CHFGWF', & ! subcomponent + 'OPTIONS', & ! block + 'OBS6_FILENAME', & ! tag name + 'OBS6_FILENAME', & ! fortran variable + 'STRING', & ! type + '', & ! shape + 'obs6 input filename', & ! longname + .true., & ! required + .true., & ! multi-record + .true., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + exgchfgwf_nexg = InputParamDefinitionType & + ( & + 'EXG', & ! component + 'CHFGWF', & ! subcomponent + 'DIMENSIONS', & ! block + 'NEXG', & ! tag name + 'NEXG', & ! fortran variable + 'INTEGER', & ! type + '', & ! shape + 'number of exchanges', & ! longname + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + exgchfgwf_cellidm1 = InputParamDefinitionType & + ( & + 'EXG', & ! component + 'CHFGWF', & ! subcomponent + 'EXCHANGEDATA', & ! block + 'CELLIDM1', & ! tag name + 'CELLIDM1', & ! fortran variable + 'INTEGER1D', & ! type + 'NCELLDIM', & ! shape + 'cellid of cell in surface water model', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + exgchfgwf_cellidm2 = InputParamDefinitionType & + ( & + 'EXG', & ! component + 'CHFGWF', & ! subcomponent + 'EXCHANGEDATA', & ! block + 'CELLIDM2', & ! tag name + 'CELLIDM2', & ! fortran variable + 'INTEGER1D', & ! type + 'NCELLDIM', & ! shape + 'cellid of cell in groundwater model', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + exgchfgwf_bedleak = InputParamDefinitionType & + ( & + 'EXG', & ! component + 'CHFGWF', & ! subcomponent + 'EXCHANGEDATA', & ! block + 'BEDLEAK', & ! tag name + 'BEDLEAK', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + 'bed leakance', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + exgchfgwf_cfact = InputParamDefinitionType & + ( & + 'EXG', & ! component + 'CHFGWF', & ! subcomponent + 'EXCHANGEDATA', & ! block + 'CFACT', & ! tag name + 'CFACT', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + 'factor used for conductance calculation', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + exg_chfgwf_param_definitions(*) = & + [ & + exgchfgwf_ipr_input, & + exgchfgwf_ipr_flow, & + exgchfgwf_ifixedcond, & + exgchfgwf_obs_filerecord, & + exgchfgwf_obs6, & + exgchfgwf_filein, & + exgchfgwf_obs6_filename, & + exgchfgwf_nexg, & + exgchfgwf_cellidm1, & + exgchfgwf_cellidm2, & + exgchfgwf_bedleak, & + exgchfgwf_cfact & + ] + + type(InputParamDefinitionType), parameter :: & + exgchfgwf_exchangedata = InputParamDefinitionType & + ( & + 'EXG', & ! component + 'CHFGWF', & ! subcomponent + 'EXCHANGEDATA', & ! block + 'EXCHANGEDATA', & ! tag name + 'EXCHANGEDATA', & ! fortran variable + 'RECARRAY CELLIDM1 CELLIDM2 BEDLEAK CFACT', & ! type + 'NEXG', & ! shape + 'exchange data', & ! longname + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + exg_chfgwf_aggregate_definitions(*) = & + [ & + exgchfgwf_exchangedata & + ] + + type(InputBlockDefinitionType), parameter :: & + exg_chfgwf_block_definitions(*) = & + [ & + InputBlockDefinitionType( & + 'OPTIONS', & ! blockname + .false., & ! required + .false., & ! aggregate + .false. & ! block_variable + ), & + InputBlockDefinitionType( & + 'DIMENSIONS', & ! blockname + .true., & ! required + .false., & ! aggregate + .false. & ! block_variable + ), & + InputBlockDefinitionType( & + 'EXCHANGEDATA', & ! blockname + .true., & ! required + .true., & ! aggregate + .false. & ! block_variable + ) & + ] + +end module ExgChfgwfInputModule diff --git a/src/Idm/exg-olfgwfidm.f90 b/src/Idm/exg-olfgwfidm.f90 new file mode 100644 index 00000000000..fae7f8e733b --- /dev/null +++ b/src/Idm/exg-olfgwfidm.f90 @@ -0,0 +1,317 @@ +! ** Do Not Modify! MODFLOW 6 system generated file. ** +module ExgOlfgwfInputModule + use ConstantsModule, only: LENVARNAME + use InputDefinitionModule, only: InputParamDefinitionType, & + InputBlockDefinitionType + private + public exg_olfgwf_param_definitions + public exg_olfgwf_aggregate_definitions + public exg_olfgwf_block_definitions + public ExgOlfgwfParamFoundType + public exg_olfgwf_multi_package + public exg_olfgwf_subpackages + + type ExgOlfgwfParamFoundType + logical :: ipr_input = .false. + logical :: ipr_flow = .false. + logical :: ifixedcond = .false. + logical :: obs_filerecord = .false. + logical :: obs6 = .false. + logical :: filein = .false. + logical :: obs6_filename = .false. + logical :: nexg = .false. + logical :: cellidm1 = .false. + logical :: cellidm2 = .false. + logical :: bedleak = .false. + logical :: cfact = .false. + end type ExgOlfgwfParamFoundType + + logical :: exg_olfgwf_multi_package = .true. + + character(len=16), parameter :: & + exg_olfgwf_subpackages(*) = & + [ & + ' ' & + ] + + type(InputParamDefinitionType), parameter :: & + exgolfgwf_ipr_input = InputParamDefinitionType & + ( & + 'EXG', & ! component + 'OLFGWF', & ! subcomponent + 'OPTIONS', & ! block + 'PRINT_INPUT', & ! tag name + 'IPR_INPUT', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'keyword to print input to list file', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + exgolfgwf_ipr_flow = InputParamDefinitionType & + ( & + 'EXG', & ! component + 'OLFGWF', & ! subcomponent + 'OPTIONS', & ! block + 'PRINT_FLOWS', & ! tag name + 'IPR_FLOW', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'keyword to print olfgwf flows to list file', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + exgolfgwf_ifixedcond = InputParamDefinitionType & + ( & + 'EXG', & ! component + 'OLFGWF', & ! subcomponent + 'OPTIONS', & ! block + 'FIXED_CONDUCTANCE', & ! tag name + 'IFIXEDCOND', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'keyword to indicate conductance is fixed', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + exgolfgwf_obs_filerecord = InputParamDefinitionType & + ( & + 'EXG', & ! component + 'OLFGWF', & ! subcomponent + 'OPTIONS', & ! block + 'OBS_FILERECORD', & ! tag name + 'OBS_FILERECORD', & ! fortran variable + 'RECORD OBS6 FILEIN OBS6_FILENAME', & ! type + '', & ! shape + '', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + exgolfgwf_obs6 = InputParamDefinitionType & + ( & + 'EXG', & ! component + 'OLFGWF', & ! subcomponent + 'OPTIONS', & ! block + 'OBS6', & ! tag name + 'OBS6', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'obs keyword', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + exgolfgwf_filein = InputParamDefinitionType & + ( & + 'EXG', & ! component + 'OLFGWF', & ! subcomponent + 'OPTIONS', & ! block + 'FILEIN', & ! tag name + 'FILEIN', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'file keyword', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + exgolfgwf_obs6_filename = InputParamDefinitionType & + ( & + 'EXG', & ! component + 'OLFGWF', & ! subcomponent + 'OPTIONS', & ! block + 'OBS6_FILENAME', & ! tag name + 'OBS6_FILENAME', & ! fortran variable + 'STRING', & ! type + '', & ! shape + 'obs6 input filename', & ! longname + .true., & ! required + .true., & ! multi-record + .true., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + exgolfgwf_nexg = InputParamDefinitionType & + ( & + 'EXG', & ! component + 'OLFGWF', & ! subcomponent + 'DIMENSIONS', & ! block + 'NEXG', & ! tag name + 'NEXG', & ! fortran variable + 'INTEGER', & ! type + '', & ! shape + 'number of exchanges', & ! longname + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + exgolfgwf_cellidm1 = InputParamDefinitionType & + ( & + 'EXG', & ! component + 'OLFGWF', & ! subcomponent + 'EXCHANGEDATA', & ! block + 'CELLIDM1', & ! tag name + 'CELLIDM1', & ! fortran variable + 'INTEGER1D', & ! type + 'NCELLDIM', & ! shape + 'cellid of cell in surface water model', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + exgolfgwf_cellidm2 = InputParamDefinitionType & + ( & + 'EXG', & ! component + 'OLFGWF', & ! subcomponent + 'EXCHANGEDATA', & ! block + 'CELLIDM2', & ! tag name + 'CELLIDM2', & ! fortran variable + 'INTEGER1D', & ! type + 'NCELLDIM', & ! shape + 'cellid of cell in groundwater model', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + exgolfgwf_bedleak = InputParamDefinitionType & + ( & + 'EXG', & ! component + 'OLFGWF', & ! subcomponent + 'EXCHANGEDATA', & ! block + 'BEDLEAK', & ! tag name + 'BEDLEAK', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + 'bed leakance', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + exgolfgwf_cfact = InputParamDefinitionType & + ( & + 'EXG', & ! component + 'OLFGWF', & ! subcomponent + 'EXCHANGEDATA', & ! block + 'CFACT', & ! tag name + 'CFACT', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + 'factor used for conductance calculation', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + exg_olfgwf_param_definitions(*) = & + [ & + exgolfgwf_ipr_input, & + exgolfgwf_ipr_flow, & + exgolfgwf_ifixedcond, & + exgolfgwf_obs_filerecord, & + exgolfgwf_obs6, & + exgolfgwf_filein, & + exgolfgwf_obs6_filename, & + exgolfgwf_nexg, & + exgolfgwf_cellidm1, & + exgolfgwf_cellidm2, & + exgolfgwf_bedleak, & + exgolfgwf_cfact & + ] + + type(InputParamDefinitionType), parameter :: & + exgolfgwf_exchangedata = InputParamDefinitionType & + ( & + 'EXG', & ! component + 'OLFGWF', & ! subcomponent + 'EXCHANGEDATA', & ! block + 'EXCHANGEDATA', & ! tag name + 'EXCHANGEDATA', & ! fortran variable + 'RECARRAY CELLIDM1 CELLIDM2 BEDLEAK CFACT', & ! type + 'NEXG', & ! shape + 'exchange data', & ! longname + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + exg_olfgwf_aggregate_definitions(*) = & + [ & + exgolfgwf_exchangedata & + ] + + type(InputBlockDefinitionType), parameter :: & + exg_olfgwf_block_definitions(*) = & + [ & + InputBlockDefinitionType( & + 'OPTIONS', & ! blockname + .false., & ! required + .false., & ! aggregate + .false. & ! block_variable + ), & + InputBlockDefinitionType( & + 'DIMENSIONS', & ! blockname + .true., & ! required + .false., & ! aggregate + .false. & ! block_variable + ), & + InputBlockDefinitionType( & + 'EXCHANGEDATA', & ! blockname + .true., & ! required + .true., & ! aggregate + .false. & ! block_variable + ) & + ] + +end module ExgOlfgwfInputModule diff --git a/src/Idm/olf-cdbidm.f90 b/src/Idm/olf-cdbidm.f90 new file mode 100644 index 00000000000..174ff934f74 --- /dev/null +++ b/src/Idm/olf-cdbidm.f90 @@ -0,0 +1,377 @@ +! ** Do Not Modify! MODFLOW 6 system generated file. ** +module OlfCdbInputModule + use ConstantsModule, only: LENVARNAME + use InputDefinitionModule, only: InputParamDefinitionType, & + InputBlockDefinitionType + private + public olf_cdb_param_definitions + public olf_cdb_aggregate_definitions + public olf_cdb_block_definitions + public OlfCdbParamFoundType + public olf_cdb_multi_package + public olf_cdb_subpackages + + type OlfCdbParamFoundType + logical :: auxiliary = .false. + logical :: boundnames = .false. + logical :: iprpak = .false. + logical :: iprflow = .false. + logical :: ipakcb = .false. + logical :: filein = .false. + logical :: obs_filerecord = .false. + logical :: obs6 = .false. + logical :: obs6_filename = .false. + logical :: maxbound = .false. + logical :: cellid = .false. + logical :: idcxs = .false. + logical :: width = .false. + logical :: auxvar = .false. + logical :: boundname = .false. + end type OlfCdbParamFoundType + + logical :: olf_cdb_multi_package = .true. + + character(len=16), parameter :: & + olf_cdb_subpackages(*) = & + [ & + ' ' & + ] + + type(InputParamDefinitionType), parameter :: & + olfcdb_auxiliary = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'CDB', & ! subcomponent + 'OPTIONS', & ! block + 'AUXILIARY', & ! tag name + 'AUXILIARY', & ! fortran variable + 'STRING', & ! type + 'NAUX', & ! shape + 'keyword to specify aux variables', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfcdb_boundnames = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'CDB', & ! subcomponent + 'OPTIONS', & ! block + 'BOUNDNAMES', & ! tag name + 'BOUNDNAMES', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + '', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfcdb_iprpak = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'CDB', & ! subcomponent + 'OPTIONS', & ! block + 'PRINT_INPUT', & ! tag name + 'IPRPAK', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'print input to listing file', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfcdb_iprflow = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'CDB', & ! subcomponent + 'OPTIONS', & ! block + 'PRINT_FLOWS', & ! tag name + 'IPRFLOW', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'print calculated flows to listing file', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfcdb_ipakcb = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'CDB', & ! subcomponent + 'OPTIONS', & ! block + 'SAVE_FLOWS', & ! tag name + 'IPAKCB', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'save flows to budget file', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfcdb_filein = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'CDB', & ! subcomponent + 'OPTIONS', & ! block + 'FILEIN', & ! tag name + 'FILEIN', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'file keyword', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfcdb_obs_filerecord = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'CDB', & ! subcomponent + 'OPTIONS', & ! block + 'OBS_FILERECORD', & ! tag name + 'OBS_FILERECORD', & ! fortran variable + 'RECORD OBS6 FILEIN OBS6_FILENAME', & ! type + '', & ! shape + '', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfcdb_obs6 = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'CDB', & ! subcomponent + 'OPTIONS', & ! block + 'OBS6', & ! tag name + 'OBS6', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'obs keyword', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfcdb_obs6_filename = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'CDB', & ! subcomponent + 'OPTIONS', & ! block + 'OBS6_FILENAME', & ! tag name + 'OBS6_FILENAME', & ! fortran variable + 'STRING', & ! type + '', & ! shape + 'obs6 input filename', & ! longname + .true., & ! required + .true., & ! multi-record + .true., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfcdb_maxbound = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'CDB', & ! subcomponent + 'DIMENSIONS', & ! block + 'MAXBOUND', & ! tag name + 'MAXBOUND', & ! fortran variable + 'INTEGER', & ! type + '', & ! shape + 'maximum number of critical depth boundaries', & ! longname + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfcdb_cellid = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'CDB', & ! subcomponent + 'PERIOD', & ! block + 'CELLID', & ! tag name + 'CELLID', & ! fortran variable + 'INTEGER1D', & ! type + 'NCELLDIM', & ! shape + 'cell identifier', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfcdb_idcxs = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'CDB', & ! subcomponent + 'PERIOD', & ! block + 'IDCXS', & ! tag name + 'IDCXS', & ! fortran variable + 'INTEGER', & ! type + '', & ! shape + 'cross section identifier', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfcdb_width = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'CDB', & ! subcomponent + 'PERIOD', & ! block + 'WIDTH', & ! tag name + 'WIDTH', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + 'width of the zero-depth gradient boundary', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .true. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfcdb_auxvar = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'CDB', & ! subcomponent + 'PERIOD', & ! block + 'AUX', & ! tag name + 'AUXVAR', & ! fortran variable + 'DOUBLE1D', & ! type + 'NAUX', & ! shape + 'auxiliary variables', & ! longname + .false., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .true. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfcdb_boundname = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'CDB', & ! subcomponent + 'PERIOD', & ! block + 'BOUNDNAME', & ! tag name + 'BOUNDNAME', & ! fortran variable + 'STRING', & ! type + '', & ! shape + 'zero-depth-gradient boundary name', & ! longname + .false., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olf_cdb_param_definitions(*) = & + [ & + olfcdb_auxiliary, & + olfcdb_boundnames, & + olfcdb_iprpak, & + olfcdb_iprflow, & + olfcdb_ipakcb, & + olfcdb_filein, & + olfcdb_obs_filerecord, & + olfcdb_obs6, & + olfcdb_obs6_filename, & + olfcdb_maxbound, & + olfcdb_cellid, & + olfcdb_idcxs, & + olfcdb_width, & + olfcdb_auxvar, & + olfcdb_boundname & + ] + + type(InputParamDefinitionType), parameter :: & + olfcdb_spd = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'CDB', & ! subcomponent + 'PERIOD', & ! block + 'STRESS_PERIOD_DATA', & ! tag name + 'SPD', & ! fortran variable + 'RECARRAY CELLID IDCXS WIDTH AUX BOUNDNAME', & ! type + 'MAXBOUND', & ! shape + '', & ! longname + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olf_cdb_aggregate_definitions(*) = & + [ & + olfcdb_spd & + ] + + type(InputBlockDefinitionType), parameter :: & + olf_cdb_block_definitions(*) = & + [ & + InputBlockDefinitionType( & + 'OPTIONS', & ! blockname + .false., & ! required + .false., & ! aggregate + .false. & ! block_variable + ), & + InputBlockDefinitionType( & + 'DIMENSIONS', & ! blockname + .true., & ! required + .false., & ! aggregate + .false. & ! block_variable + ), & + InputBlockDefinitionType( & + 'PERIOD', & ! blockname + .true., & ! required + .true., & ! aggregate + .true. & ! block_variable + ) & + ] + +end module OlfCdbInputModule diff --git a/src/Idm/olf-chdidm.f90 b/src/Idm/olf-chdidm.f90 new file mode 100644 index 00000000000..3e17ab8ef6b --- /dev/null +++ b/src/Idm/olf-chdidm.f90 @@ -0,0 +1,437 @@ +! ** Do Not Modify! MODFLOW 6 system generated file. ** +module OlfChdInputModule + use ConstantsModule, only: LENVARNAME + use InputDefinitionModule, only: InputParamDefinitionType, & + InputBlockDefinitionType + private + public olf_chd_param_definitions + public olf_chd_aggregate_definitions + public olf_chd_block_definitions + public OlfChdParamFoundType + public olf_chd_multi_package + public olf_chd_subpackages + + type OlfChdParamFoundType + logical :: auxiliary = .false. + logical :: auxmultname = .false. + logical :: boundnames = .false. + logical :: print_input = .false. + logical :: print_flows = .false. + logical :: save_flows = .false. + logical :: ts_filerecord = .false. + logical :: ts6 = .false. + logical :: filein = .false. + logical :: ts6_filename = .false. + logical :: obs_filerecord = .false. + logical :: obs6 = .false. + logical :: obs6_filename = .false. + logical :: maxbound = .false. + logical :: cellid = .false. + logical :: head = .false. + logical :: aux = .false. + logical :: boundname = .false. + end type OlfChdParamFoundType + + logical :: olf_chd_multi_package = .true. + + character(len=16), parameter :: & + olf_chd_subpackages(*) = & + [ & + ' ' & + ] + + type(InputParamDefinitionType), parameter :: & + olfchd_auxiliary = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'CHD', & ! subcomponent + 'OPTIONS', & ! block + 'AUXILIARY', & ! tag name + 'AUXILIARY', & ! fortran variable + 'STRING', & ! type + 'NAUX', & ! shape + 'keyword to specify aux variables', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfchd_auxmultname = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'CHD', & ! subcomponent + 'OPTIONS', & ! block + 'AUXMULTNAME', & ! tag name + 'AUXMULTNAME', & ! fortran variable + 'STRING', & ! type + '', & ! shape + 'name of auxiliary variable for multiplier', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfchd_boundnames = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'CHD', & ! subcomponent + 'OPTIONS', & ! block + 'BOUNDNAMES', & ! tag name + 'BOUNDNAMES', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + '', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfchd_print_input = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'CHD', & ! subcomponent + 'OPTIONS', & ! block + 'PRINT_INPUT', & ! tag name + 'PRINT_INPUT', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'print input to listing file', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfchd_print_flows = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'CHD', & ! subcomponent + 'OPTIONS', & ! block + 'PRINT_FLOWS', & ! tag name + 'PRINT_FLOWS', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'print CHD flows to listing file', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfchd_save_flows = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'CHD', & ! subcomponent + 'OPTIONS', & ! block + 'SAVE_FLOWS', & ! tag name + 'SAVE_FLOWS', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'save CHD flows to budget file', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfchd_ts_filerecord = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'CHD', & ! subcomponent + 'OPTIONS', & ! block + 'TS_FILERECORD', & ! tag name + 'TS_FILERECORD', & ! fortran variable + 'RECORD TS6 FILEIN TS6_FILENAME', & ! type + '', & ! shape + '', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfchd_ts6 = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'CHD', & ! subcomponent + 'OPTIONS', & ! block + 'TS6', & ! tag name + 'TS6', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'head keyword', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfchd_filein = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'CHD', & ! subcomponent + 'OPTIONS', & ! block + 'FILEIN', & ! tag name + 'FILEIN', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'file keyword', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfchd_ts6_filename = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'CHD', & ! subcomponent + 'OPTIONS', & ! block + 'TS6_FILENAME', & ! tag name + 'TS6_FILENAME', & ! fortran variable + 'STRING', & ! type + '', & ! shape + 'file name of time series information', & ! longname + .true., & ! required + .true., & ! multi-record + .true., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfchd_obs_filerecord = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'CHD', & ! subcomponent + 'OPTIONS', & ! block + 'OBS_FILERECORD', & ! tag name + 'OBS_FILERECORD', & ! fortran variable + 'RECORD OBS6 FILEIN OBS6_FILENAME', & ! type + '', & ! shape + '', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfchd_obs6 = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'CHD', & ! subcomponent + 'OPTIONS', & ! block + 'OBS6', & ! tag name + 'OBS6', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'obs keyword', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfchd_obs6_filename = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'CHD', & ! subcomponent + 'OPTIONS', & ! block + 'OBS6_FILENAME', & ! tag name + 'OBS6_FILENAME', & ! fortran variable + 'STRING', & ! type + '', & ! shape + 'obs6 input filename', & ! longname + .true., & ! required + .true., & ! multi-record + .true., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfchd_maxbound = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'CHD', & ! subcomponent + 'DIMENSIONS', & ! block + 'MAXBOUND', & ! tag name + 'MAXBOUND', & ! fortran variable + 'INTEGER', & ! type + '', & ! shape + 'maximum number of constant heads', & ! longname + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfchd_cellid = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'CHD', & ! subcomponent + 'PERIOD', & ! block + 'CELLID', & ! tag name + 'CELLID', & ! fortran variable + 'INTEGER1D', & ! type + 'NCELLDIM', & ! shape + 'cell identifier', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfchd_head = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'CHD', & ! subcomponent + 'PERIOD', & ! block + 'HEAD', & ! tag name + 'HEAD', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + 'head value assigned to constant head', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .true. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfchd_aux = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'CHD', & ! subcomponent + 'PERIOD', & ! block + 'AUX', & ! tag name + 'AUX', & ! fortran variable + 'DOUBLE1D', & ! type + 'NAUX', & ! shape + 'auxiliary variables', & ! longname + .false., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .true. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfchd_boundname = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'CHD', & ! subcomponent + 'PERIOD', & ! block + 'BOUNDNAME', & ! tag name + 'BOUNDNAME', & ! fortran variable + 'STRING', & ! type + '', & ! shape + 'constant head boundary name', & ! longname + .false., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olf_chd_param_definitions(*) = & + [ & + olfchd_auxiliary, & + olfchd_auxmultname, & + olfchd_boundnames, & + olfchd_print_input, & + olfchd_print_flows, & + olfchd_save_flows, & + olfchd_ts_filerecord, & + olfchd_ts6, & + olfchd_filein, & + olfchd_ts6_filename, & + olfchd_obs_filerecord, & + olfchd_obs6, & + olfchd_obs6_filename, & + olfchd_maxbound, & + olfchd_cellid, & + olfchd_head, & + olfchd_aux, & + olfchd_boundname & + ] + + type(InputParamDefinitionType), parameter :: & + olfchd_spd = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'CHD', & ! subcomponent + 'PERIOD', & ! block + 'STRESS_PERIOD_DATA', & ! tag name + 'SPD', & ! fortran variable + 'RECARRAY CELLID HEAD AUX BOUNDNAME', & ! type + 'MAXBOUND', & ! shape + '', & ! longname + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olf_chd_aggregate_definitions(*) = & + [ & + olfchd_spd & + ] + + type(InputBlockDefinitionType), parameter :: & + olf_chd_block_definitions(*) = & + [ & + InputBlockDefinitionType( & + 'OPTIONS', & ! blockname + .false., & ! required + .false., & ! aggregate + .false. & ! block_variable + ), & + InputBlockDefinitionType( & + 'DIMENSIONS', & ! blockname + .true., & ! required + .false., & ! aggregate + .false. & ! block_variable + ), & + InputBlockDefinitionType( & + 'PERIOD', & ! blockname + .true., & ! required + .true., & ! aggregate + .true. & ! block_variable + ) & + ] + +end module OlfChdInputModule diff --git a/src/Idm/olf-cxsidm.f90 b/src/Idm/olf-cxsidm.f90 new file mode 100644 index 00000000000..b51e9ae4b2a --- /dev/null +++ b/src/Idm/olf-cxsidm.f90 @@ -0,0 +1,262 @@ +! ** Do Not Modify! MODFLOW 6 system generated file. ** +module OlfCxsInputModule + use ConstantsModule, only: LENVARNAME + use InputDefinitionModule, only: InputParamDefinitionType, & + InputBlockDefinitionType + private + public olf_cxs_param_definitions + public olf_cxs_aggregate_definitions + public olf_cxs_block_definitions + public OlfCxsParamFoundType + public olf_cxs_multi_package + public olf_cxs_subpackages + + type OlfCxsParamFoundType + logical :: iprpak = .false. + logical :: nsections = .false. + logical :: npoints = .false. + logical :: idcxs = .false. + logical :: nxspoints = .false. + logical :: xfraction = .false. + logical :: height = .false. + logical :: manfraction = .false. + end type OlfCxsParamFoundType + + logical :: olf_cxs_multi_package = .false. + + character(len=16), parameter :: & + olf_cxs_subpackages(*) = & + [ & + ' ' & + ] + + type(InputParamDefinitionType), parameter :: & + olfcxs_iprpak = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'CXS', & ! subcomponent + 'OPTIONS', & ! block + 'PRINT_INPUT', & ! tag name + 'IPRPAK', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'print input to listing file', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfcxs_nsections = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'CXS', & ! subcomponent + 'DIMENSIONS', & ! block + 'NSECTIONS', & ! tag name + 'NSECTIONS', & ! fortran variable + 'INTEGER', & ! type + '', & ! shape + 'number of reaches', & ! longname + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfcxs_npoints = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'CXS', & ! subcomponent + 'DIMENSIONS', & ! block + 'NPOINTS', & ! tag name + 'NPOINTS', & ! fortran variable + 'INTEGER', & ! type + '', & ! shape + 'total number of points defined for all reaches', & ! longname + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfcxs_idcxs = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'CXS', & ! subcomponent + 'PACKAGEDATA', & ! block + 'IDCXS', & ! tag name + 'IDCXS', & ! fortran variable + 'INTEGER', & ! type + '', & ! shape + 'reach number for this entry', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfcxs_nxspoints = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'CXS', & ! subcomponent + 'PACKAGEDATA', & ! block + 'NXSPOINTS', & ! tag name + 'NXSPOINTS', & ! fortran variable + 'INTEGER', & ! type + '', & ! shape + 'number of points used to define cross section', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfcxs_xfraction = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'CXS', & ! subcomponent + 'CROSSSECTIONDATA', & ! block + 'XFRACTION', & ! tag name + 'XFRACTION', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + 'fractional width', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfcxs_height = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'CXS', & ! subcomponent + 'CROSSSECTIONDATA', & ! block + 'HEIGHT', & ! tag name + 'HEIGHT', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + 'depth', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfcxs_manfraction = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'CXS', & ! subcomponent + 'CROSSSECTIONDATA', & ! block + 'MANFRACTION', & ! tag name + 'MANFRACTION', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + 'Mannings roughness coefficient', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olf_cxs_param_definitions(*) = & + [ & + olfcxs_iprpak, & + olfcxs_nsections, & + olfcxs_npoints, & + olfcxs_idcxs, & + olfcxs_nxspoints, & + olfcxs_xfraction, & + olfcxs_height, & + olfcxs_manfraction & + ] + + type(InputParamDefinitionType), parameter :: & + olfcxs_packagedata = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'CXS', & ! subcomponent + 'PACKAGEDATA', & ! block + 'PACKAGEDATA', & ! tag name + 'PACKAGEDATA', & ! fortran variable + 'RECARRAY IDCXS NXSPOINTS', & ! type + 'NSECTIONS', & ! shape + '', & ! longname + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfcxs_crosssectiondata = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'CXS', & ! subcomponent + 'CROSSSECTIONDATA', & ! block + 'CROSSSECTIONDATA', & ! tag name + 'CROSSSECTIONDATA', & ! fortran variable + 'RECARRAY XFRACTION HEIGHT MANFRACTION', & ! type + 'NPOINTS', & ! shape + '', & ! longname + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olf_cxs_aggregate_definitions(*) = & + [ & + olfcxs_packagedata, & + olfcxs_crosssectiondata & + ] + + type(InputBlockDefinitionType), parameter :: & + olf_cxs_block_definitions(*) = & + [ & + InputBlockDefinitionType( & + 'OPTIONS', & ! blockname + .false., & ! required + .false., & ! aggregate + .false. & ! block_variable + ), & + InputBlockDefinitionType( & + 'DIMENSIONS', & ! blockname + .true., & ! required + .false., & ! aggregate + .false. & ! block_variable + ), & + InputBlockDefinitionType( & + 'PACKAGEDATA', & ! blockname + .true., & ! required + .true., & ! aggregate + .false. & ! block_variable + ), & + InputBlockDefinitionType( & + 'CROSSSECTIONDATA', & ! blockname + .true., & ! required + .true., & ! aggregate + .false. & ! block_variable + ) & + ] + +end module OlfCxsInputModule diff --git a/src/Idm/olf-dfwidm.f90 b/src/Idm/olf-dfwidm.f90 new file mode 100644 index 00000000000..cf20d880747 --- /dev/null +++ b/src/Idm/olf-dfwidm.f90 @@ -0,0 +1,348 @@ +! ** Do Not Modify! MODFLOW 6 system generated file. ** +module OlfDfwInputModule + use ConstantsModule, only: LENVARNAME + use InputDefinitionModule, only: InputParamDefinitionType, & + InputBlockDefinitionType + private + public olf_dfw_param_definitions + public olf_dfw_aggregate_definitions + public olf_dfw_block_definitions + public OlfDfwParamFoundType + public olf_dfw_multi_package + public olf_dfw_subpackages + + type OlfDfwParamFoundType + logical :: icentral = .false. + logical :: lengthconv = .false. + logical :: timeconv = .false. + logical :: ipakcb = .false. + logical :: iprflow = .false. + logical :: isavvelocity = .false. + logical :: obs_filerecord = .false. + logical :: obs6 = .false. + logical :: filein = .false. + logical :: obs6_filename = .false. + logical :: export_ascii = .false. + logical :: iswrcond = .false. + logical :: manningsn = .false. + logical :: idcxs = .false. + end type OlfDfwParamFoundType + + logical :: olf_dfw_multi_package = .false. + + character(len=16), parameter :: & + olf_dfw_subpackages(*) = & + [ & + ' ' & + ] + + type(InputParamDefinitionType), parameter :: & + olfdfw_icentral = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DFW', & ! subcomponent + 'OPTIONS', & ! block + 'CENTRAL_IN_SPACE', & ! tag name + 'ICENTRAL', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'use central in space weighting', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfdfw_lengthconv = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DFW', & ! subcomponent + 'OPTIONS', & ! block + 'LENGTH_CONVERSION', & ! tag name + 'LENGTHCONV', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + 'length conversion factor', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfdfw_timeconv = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DFW', & ! subcomponent + 'OPTIONS', & ! block + 'TIME_CONVERSION', & ! tag name + 'TIMECONV', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + 'time conversion factor', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfdfw_ipakcb = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DFW', & ! subcomponent + 'OPTIONS', & ! block + 'SAVE_FLOWS', & ! tag name + 'IPAKCB', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'keyword to save DFW flows', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfdfw_iprflow = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DFW', & ! subcomponent + 'OPTIONS', & ! block + 'PRINT_FLOWS', & ! tag name + 'IPRFLOW', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'keyword to print DFW flows to listing file', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfdfw_isavvelocity = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DFW', & ! subcomponent + 'OPTIONS', & ! block + 'SAVE_VELOCITY', & ! tag name + 'ISAVVELOCITY', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'keyword to save velocity', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfdfw_obs_filerecord = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DFW', & ! subcomponent + 'OPTIONS', & ! block + 'OBS_FILERECORD', & ! tag name + 'OBS_FILERECORD', & ! fortran variable + 'RECORD OBS6 FILEIN OBS6_FILENAME', & ! type + '', & ! shape + '', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfdfw_obs6 = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DFW', & ! subcomponent + 'OPTIONS', & ! block + 'OBS6', & ! tag name + 'OBS6', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'obs keyword', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfdfw_filein = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DFW', & ! subcomponent + 'OPTIONS', & ! block + 'FILEIN', & ! tag name + 'FILEIN', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'file keyword', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfdfw_obs6_filename = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DFW', & ! subcomponent + 'OPTIONS', & ! block + 'OBS6_FILENAME', & ! tag name + 'OBS6_FILENAME', & ! fortran variable + 'STRING', & ! type + '', & ! shape + 'obs6 input filename', & ! longname + .true., & ! required + .true., & ! multi-record + .true., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfdfw_export_ascii = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DFW', & ! subcomponent + 'OPTIONS', & ! block + 'EXPORT_ARRAY_ASCII', & ! tag name + 'EXPORT_ASCII', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'export array variables to layered ascii files.', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfdfw_iswrcond = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DFW', & ! subcomponent + 'OPTIONS', & ! block + 'DEV_SWR_CONDUCTANCE', & ! tag name + 'ISWRCOND', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'use SWR conductance formulation', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfdfw_manningsn = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DFW', & ! subcomponent + 'GRIDDATA', & ! block + 'MANNINGSN', & ! tag name + 'MANNINGSN', & ! fortran variable + 'DOUBLE1D', & ! type + 'NODES', & ! shape + 'mannings roughness coefficient', & ! longname + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfdfw_idcxs = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DFW', & ! subcomponent + 'GRIDDATA', & ! block + 'IDCXS', & ! tag name + 'IDCXS', & ! fortran variable + 'INTEGER1D', & ! type + 'NODES', & ! shape + 'cross section number', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olf_dfw_param_definitions(*) = & + [ & + olfdfw_icentral, & + olfdfw_lengthconv, & + olfdfw_timeconv, & + olfdfw_ipakcb, & + olfdfw_iprflow, & + olfdfw_isavvelocity, & + olfdfw_obs_filerecord, & + olfdfw_obs6, & + olfdfw_filein, & + olfdfw_obs6_filename, & + olfdfw_export_ascii, & + olfdfw_iswrcond, & + olfdfw_manningsn, & + olfdfw_idcxs & + ] + + type(InputParamDefinitionType), parameter :: & + olf_dfw_aggregate_definitions(*) = & + [ & + InputParamDefinitionType & + ( & + '', & ! component + '', & ! subcomponent + '', & ! block + '', & ! tag name + '', & ! fortran variable + '', & ! type + '', & ! shape + '', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) & + ] + + type(InputBlockDefinitionType), parameter :: & + olf_dfw_block_definitions(*) = & + [ & + InputBlockDefinitionType( & + 'OPTIONS', & ! blockname + .false., & ! required + .false., & ! aggregate + .false. & ! block_variable + ), & + InputBlockDefinitionType( & + 'GRIDDATA', & ! blockname + .true., & ! required + .false., & ! aggregate + .false. & ! block_variable + ) & + ] + +end module OlfDfwInputModule diff --git a/src/Idm/olf-dis2didm.f90 b/src/Idm/olf-dis2didm.f90 new file mode 100644 index 00000000000..4f3b669f83a --- /dev/null +++ b/src/Idm/olf-dis2didm.f90 @@ -0,0 +1,314 @@ +! ** Do Not Modify! MODFLOW 6 system generated file. ** +module OlfDis2DInputModule + use ConstantsModule, only: LENVARNAME + use InputDefinitionModule, only: InputParamDefinitionType, & + InputBlockDefinitionType + private + public olf_dis2d_param_definitions + public olf_dis2d_aggregate_definitions + public olf_dis2d_block_definitions + public OlfDis2dParamFoundType + public olf_dis2d_multi_package + public olf_dis2d_subpackages + + type OlfDis2dParamFoundType + logical :: length_units = .false. + logical :: nogrb = .false. + logical :: xorigin = .false. + logical :: yorigin = .false. + logical :: angrot = .false. + logical :: export_ascii = .false. + logical :: nrow = .false. + logical :: ncol = .false. + logical :: delr = .false. + logical :: delc = .false. + logical :: botm = .false. + logical :: idomain = .false. + end type OlfDis2dParamFoundType + + logical :: olf_dis2d_multi_package = .false. + + character(len=16), parameter :: & + olf_dis2d_subpackages(*) = & + [ & + ' ' & + ] + + type(InputParamDefinitionType), parameter :: & + olfdis2d_length_units = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DIS2D', & ! subcomponent + 'OPTIONS', & ! block + 'LENGTH_UNITS', & ! tag name + 'LENGTH_UNITS', & ! fortran variable + 'STRING', & ! type + '', & ! shape + 'model length units', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfdis2d_nogrb = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DIS2D', & ! subcomponent + 'OPTIONS', & ! block + 'NOGRB', & ! tag name + 'NOGRB', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'do not write binary grid file', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfdis2d_xorigin = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DIS2D', & ! subcomponent + 'OPTIONS', & ! block + 'XORIGIN', & ! tag name + 'XORIGIN', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + 'x-position of the model grid origin', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfdis2d_yorigin = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DIS2D', & ! subcomponent + 'OPTIONS', & ! block + 'YORIGIN', & ! tag name + 'YORIGIN', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + 'y-position of the model grid origin', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfdis2d_angrot = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DIS2D', & ! subcomponent + 'OPTIONS', & ! block + 'ANGROT', & ! tag name + 'ANGROT', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + 'rotation angle', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfdis2d_export_ascii = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DIS2D', & ! subcomponent + 'OPTIONS', & ! block + 'EXPORT_ARRAY_ASCII', & ! tag name + 'EXPORT_ASCII', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'export array variables to layered ascii files.', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfdis2d_nrow = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DIS2D', & ! subcomponent + 'DIMENSIONS', & ! block + 'NROW', & ! tag name + 'NROW', & ! fortran variable + 'INTEGER', & ! type + '', & ! shape + 'number of rows', & ! longname + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfdis2d_ncol = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DIS2D', & ! subcomponent + 'DIMENSIONS', & ! block + 'NCOL', & ! tag name + 'NCOL', & ! fortran variable + 'INTEGER', & ! type + '', & ! shape + 'number of columns', & ! longname + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfdis2d_delr = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DIS2D', & ! subcomponent + 'GRIDDATA', & ! block + 'DELR', & ! tag name + 'DELR', & ! fortran variable + 'DOUBLE1D', & ! type + 'NCOL', & ! shape + 'spacing along a row', & ! longname + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfdis2d_delc = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DIS2D', & ! subcomponent + 'GRIDDATA', & ! block + 'DELC', & ! tag name + 'DELC', & ! fortran variable + 'DOUBLE1D', & ! type + 'NROW', & ! shape + 'spacing along a column', & ! longname + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfdis2d_botm = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DIS2D', & ! subcomponent + 'GRIDDATA', & ! block + 'BOTM', & ! tag name + 'BOTM', & ! fortran variable + 'DOUBLE2D', & ! type + 'NCOL NROW', & ! shape + 'cell bottom elevation', & ! longname + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfdis2d_idomain = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DIS2D', & ! subcomponent + 'GRIDDATA', & ! block + 'IDOMAIN', & ! tag name + 'IDOMAIN', & ! fortran variable + 'INTEGER2D', & ! type + 'NCOL NROW', & ! shape + 'idomain existence array', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olf_dis2d_param_definitions(*) = & + [ & + olfdis2d_length_units, & + olfdis2d_nogrb, & + olfdis2d_xorigin, & + olfdis2d_yorigin, & + olfdis2d_angrot, & + olfdis2d_export_ascii, & + olfdis2d_nrow, & + olfdis2d_ncol, & + olfdis2d_delr, & + olfdis2d_delc, & + olfdis2d_botm, & + olfdis2d_idomain & + ] + + type(InputParamDefinitionType), parameter :: & + olf_dis2d_aggregate_definitions(*) = & + [ & + InputParamDefinitionType & + ( & + '', & ! component + '', & ! subcomponent + '', & ! block + '', & ! tag name + '', & ! fortran variable + '', & ! type + '', & ! shape + '', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) & + ] + + type(InputBlockDefinitionType), parameter :: & + olf_dis2d_block_definitions(*) = & + [ & + InputBlockDefinitionType( & + 'OPTIONS', & ! blockname + .false., & ! required + .false., & ! aggregate + .false. & ! block_variable + ), & + InputBlockDefinitionType( & + 'DIMENSIONS', & ! blockname + .true., & ! required + .false., & ! aggregate + .false. & ! block_variable + ), & + InputBlockDefinitionType( & + 'GRIDDATA', & ! blockname + .true., & ! required + .false., & ! aggregate + .false. & ! block_variable + ) & + ] + +end module OlfDis2DInputModule diff --git a/src/Idm/olf-disv1didm.f90 b/src/Idm/olf-disv1didm.f90 new file mode 100644 index 00000000000..df0298a9618 --- /dev/null +++ b/src/Idm/olf-disv1didm.f90 @@ -0,0 +1,488 @@ +! ** Do Not Modify! MODFLOW 6 system generated file. ** +module OlfDisv1DInputModule + use ConstantsModule, only: LENVARNAME + use InputDefinitionModule, only: InputParamDefinitionType, & + InputBlockDefinitionType + private + public olf_disv1d_param_definitions + public olf_disv1d_aggregate_definitions + public olf_disv1d_block_definitions + public OlfDisv1dParamFoundType + public olf_disv1d_multi_package + public olf_disv1d_subpackages + + type OlfDisv1dParamFoundType + logical :: length_units = .false. + logical :: nogrb = .false. + logical :: xorigin = .false. + logical :: yorigin = .false. + logical :: angrot = .false. + logical :: export_ascii = .false. + logical :: nodes = .false. + logical :: nvert = .false. + logical :: length = .false. + logical :: width = .false. + logical :: bottom = .false. + logical :: idomain = .false. + logical :: iv = .false. + logical :: xv = .false. + logical :: yv = .false. + logical :: icell2d = .false. + logical :: fdc = .false. + logical :: ncvert = .false. + logical :: icvert = .false. + end type OlfDisv1dParamFoundType + + logical :: olf_disv1d_multi_package = .false. + + character(len=16), parameter :: & + olf_disv1d_subpackages(*) = & + [ & + ' ' & + ] + + type(InputParamDefinitionType), parameter :: & + olfdisv1d_length_units = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DISV1D', & ! subcomponent + 'OPTIONS', & ! block + 'LENGTH_UNITS', & ! tag name + 'LENGTH_UNITS', & ! fortran variable + 'STRING', & ! type + '', & ! shape + 'model length units', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfdisv1d_nogrb = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DISV1D', & ! subcomponent + 'OPTIONS', & ! block + 'NOGRB', & ! tag name + 'NOGRB', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'do not write binary grid file', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfdisv1d_xorigin = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DISV1D', & ! subcomponent + 'OPTIONS', & ! block + 'XORIGIN', & ! tag name + 'XORIGIN', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + 'x-position origin of the model grid coordinate system', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfdisv1d_yorigin = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DISV1D', & ! subcomponent + 'OPTIONS', & ! block + 'YORIGIN', & ! tag name + 'YORIGIN', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + 'y-position origin of the model grid coordinate system', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfdisv1d_angrot = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DISV1D', & ! subcomponent + 'OPTIONS', & ! block + 'ANGROT', & ! tag name + 'ANGROT', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + 'rotation angle', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfdisv1d_export_ascii = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DISV1D', & ! subcomponent + 'OPTIONS', & ! block + 'EXPORT_ARRAY_ASCII', & ! tag name + 'EXPORT_ASCII', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'export array variables to layered ascii files.', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfdisv1d_nodes = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DISV1D', & ! subcomponent + 'DIMENSIONS', & ! block + 'NODES', & ! tag name + 'NODES', & ! fortran variable + 'INTEGER', & ! type + '', & ! shape + 'number of linear features', & ! longname + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfdisv1d_nvert = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DISV1D', & ! subcomponent + 'DIMENSIONS', & ! block + 'NVERT', & ! tag name + 'NVERT', & ! fortran variable + 'INTEGER', & ! type + '', & ! shape + 'number of columns', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfdisv1d_length = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DISV1D', & ! subcomponent + 'GRIDDATA', & ! block + 'LENGTH', & ! tag name + 'LENGTH', & ! fortran variable + 'DOUBLE1D', & ! type + 'NODES', & ! shape + 'length', & ! longname + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfdisv1d_width = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DISV1D', & ! subcomponent + 'GRIDDATA', & ! block + 'WIDTH', & ! tag name + 'WIDTH', & ! fortran variable + 'DOUBLE1D', & ! type + 'NODES', & ! shape + 'width', & ! longname + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfdisv1d_bottom = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DISV1D', & ! subcomponent + 'GRIDDATA', & ! block + 'BOTTOM', & ! tag name + 'BOTTOM', & ! fortran variable + 'DOUBLE1D', & ! type + 'NODES', & ! shape + 'bottom elevation for the one-dimensional cell', & ! longname + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfdisv1d_idomain = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DISV1D', & ! subcomponent + 'GRIDDATA', & ! block + 'IDOMAIN', & ! tag name + 'IDOMAIN', & ! fortran variable + 'INTEGER1D', & ! type + 'NODES', & ! shape + 'idomain existence array', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfdisv1d_iv = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DISV1D', & ! subcomponent + 'VERTICES', & ! block + 'IV', & ! tag name + 'IV', & ! fortran variable + 'INTEGER', & ! type + '', & ! shape + 'vertex number', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfdisv1d_xv = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DISV1D', & ! subcomponent + 'VERTICES', & ! block + 'XV', & ! tag name + 'XV', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + 'x-coordinate for vertex', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfdisv1d_yv = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DISV1D', & ! subcomponent + 'VERTICES', & ! block + 'YV', & ! tag name + 'YV', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + 'y-coordinate for vertex', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfdisv1d_icell2d = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DISV1D', & ! subcomponent + 'CELL2D', & ! block + 'ICELL2D', & ! tag name + 'ICELL2D', & ! fortran variable + 'INTEGER', & ! type + '', & ! shape + 'cell2d number', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfdisv1d_fdc = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DISV1D', & ! subcomponent + 'CELL2D', & ! block + 'FDC', & ! tag name + 'FDC', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + 'fractional distance to the cell center', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfdisv1d_ncvert = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DISV1D', & ! subcomponent + 'CELL2D', & ! block + 'NCVERT', & ! tag name + 'NCVERT', & ! fortran variable + 'INTEGER', & ! type + '', & ! shape + 'number of cell vertices', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfdisv1d_icvert = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DISV1D', & ! subcomponent + 'CELL2D', & ! block + 'ICVERT', & ! tag name + 'ICVERT', & ! fortran variable + 'INTEGER1D', & ! type + 'NCVERT', & ! shape + 'number of cell vertices', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olf_disv1d_param_definitions(*) = & + [ & + olfdisv1d_length_units, & + olfdisv1d_nogrb, & + olfdisv1d_xorigin, & + olfdisv1d_yorigin, & + olfdisv1d_angrot, & + olfdisv1d_export_ascii, & + olfdisv1d_nodes, & + olfdisv1d_nvert, & + olfdisv1d_length, & + olfdisv1d_width, & + olfdisv1d_bottom, & + olfdisv1d_idomain, & + olfdisv1d_iv, & + olfdisv1d_xv, & + olfdisv1d_yv, & + olfdisv1d_icell2d, & + olfdisv1d_fdc, & + olfdisv1d_ncvert, & + olfdisv1d_icvert & + ] + + type(InputParamDefinitionType), parameter :: & + olfdisv1d_vertices = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DISV1D', & ! subcomponent + 'VERTICES', & ! block + 'VERTICES', & ! tag name + 'VERTICES', & ! fortran variable + 'RECARRAY IV XV YV', & ! type + 'NVERT', & ! shape + 'vertices data', & ! longname + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfdisv1d_cell2d = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DISV1D', & ! subcomponent + 'CELL2D', & ! block + 'CELL2D', & ! tag name + 'CELL2D', & ! fortran variable + 'RECARRAY ICELL2D FDC NCVERT ICVERT', & ! type + 'NODES', & ! shape + 'cell2d data', & ! longname + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olf_disv1d_aggregate_definitions(*) = & + [ & + olfdisv1d_vertices, & + olfdisv1d_cell2d & + ] + + type(InputBlockDefinitionType), parameter :: & + olf_disv1d_block_definitions(*) = & + [ & + InputBlockDefinitionType( & + 'OPTIONS', & ! blockname + .false., & ! required + .false., & ! aggregate + .false. & ! block_variable + ), & + InputBlockDefinitionType( & + 'DIMENSIONS', & ! blockname + .true., & ! required + .false., & ! aggregate + .false. & ! block_variable + ), & + InputBlockDefinitionType( & + 'GRIDDATA', & ! blockname + .true., & ! required + .false., & ! aggregate + .false. & ! block_variable + ), & + InputBlockDefinitionType( & + 'VERTICES', & ! blockname + .true., & ! required + .true., & ! aggregate + .false. & ! block_variable + ), & + InputBlockDefinitionType( & + 'CELL2D', & ! blockname + .true., & ! required + .true., & ! aggregate + .false. & ! block_variable + ) & + ] + +end module OlfDisv1DInputModule diff --git a/src/Idm/olf-disv2didm.f90 b/src/Idm/olf-disv2didm.f90 new file mode 100644 index 00000000000..2305101aafb --- /dev/null +++ b/src/Idm/olf-disv2didm.f90 @@ -0,0 +1,468 @@ +! ** Do Not Modify! MODFLOW 6 system generated file. ** +module OlfDisv2DInputModule + use ConstantsModule, only: LENVARNAME + use InputDefinitionModule, only: InputParamDefinitionType, & + InputBlockDefinitionType + private + public olf_disv2d_param_definitions + public olf_disv2d_aggregate_definitions + public olf_disv2d_block_definitions + public OlfDisv2dParamFoundType + public olf_disv2d_multi_package + public olf_disv2d_subpackages + + type OlfDisv2dParamFoundType + logical :: length_units = .false. + logical :: nogrb = .false. + logical :: xorigin = .false. + logical :: yorigin = .false. + logical :: angrot = .false. + logical :: export_ascii = .false. + logical :: nodes = .false. + logical :: nvert = .false. + logical :: bottom = .false. + logical :: idomain = .false. + logical :: iv = .false. + logical :: xv = .false. + logical :: yv = .false. + logical :: icell2d = .false. + logical :: xc = .false. + logical :: yc = .false. + logical :: ncvert = .false. + logical :: icvert = .false. + end type OlfDisv2dParamFoundType + + logical :: olf_disv2d_multi_package = .false. + + character(len=16), parameter :: & + olf_disv2d_subpackages(*) = & + [ & + ' ' & + ] + + type(InputParamDefinitionType), parameter :: & + olfdisv2d_length_units = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DISV2D', & ! subcomponent + 'OPTIONS', & ! block + 'LENGTH_UNITS', & ! tag name + 'LENGTH_UNITS', & ! fortran variable + 'STRING', & ! type + '', & ! shape + 'model length units', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfdisv2d_nogrb = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DISV2D', & ! subcomponent + 'OPTIONS', & ! block + 'NOGRB', & ! tag name + 'NOGRB', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'do not write binary grid file', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfdisv2d_xorigin = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DISV2D', & ! subcomponent + 'OPTIONS', & ! block + 'XORIGIN', & ! tag name + 'XORIGIN', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + 'x-position of the model grid origin', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfdisv2d_yorigin = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DISV2D', & ! subcomponent + 'OPTIONS', & ! block + 'YORIGIN', & ! tag name + 'YORIGIN', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + 'y-position of the model grid origin', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfdisv2d_angrot = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DISV2D', & ! subcomponent + 'OPTIONS', & ! block + 'ANGROT', & ! tag name + 'ANGROT', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + 'rotation angle', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfdisv2d_export_ascii = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DISV2D', & ! subcomponent + 'OPTIONS', & ! block + 'EXPORT_ARRAY_ASCII', & ! tag name + 'EXPORT_ASCII', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'export array variables to layered ascii files.', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfdisv2d_nodes = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DISV2D', & ! subcomponent + 'DIMENSIONS', & ! block + 'NODES', & ! tag name + 'NODES', & ! fortran variable + 'INTEGER', & ! type + '', & ! shape + 'number of cells per layer', & ! longname + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfdisv2d_nvert = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DISV2D', & ! subcomponent + 'DIMENSIONS', & ! block + 'NVERT', & ! tag name + 'NVERT', & ! fortran variable + 'INTEGER', & ! type + '', & ! shape + 'number of columns', & ! longname + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfdisv2d_bottom = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DISV2D', & ! subcomponent + 'GRIDDATA', & ! block + 'BOTTOM', & ! tag name + 'BOTTOM', & ! fortran variable + 'DOUBLE1D', & ! type + 'NODES', & ! shape + 'model bottom elevation', & ! longname + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfdisv2d_idomain = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DISV2D', & ! subcomponent + 'GRIDDATA', & ! block + 'IDOMAIN', & ! tag name + 'IDOMAIN', & ! fortran variable + 'INTEGER1D', & ! type + 'NODES', & ! shape + 'idomain existence array', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfdisv2d_iv = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DISV2D', & ! subcomponent + 'VERTICES', & ! block + 'IV', & ! tag name + 'IV', & ! fortran variable + 'INTEGER', & ! type + '', & ! shape + 'vertex number', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfdisv2d_xv = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DISV2D', & ! subcomponent + 'VERTICES', & ! block + 'XV', & ! tag name + 'XV', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + 'x-coordinate for vertex', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfdisv2d_yv = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DISV2D', & ! subcomponent + 'VERTICES', & ! block + 'YV', & ! tag name + 'YV', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + 'y-coordinate for vertex', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfdisv2d_icell2d = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DISV2D', & ! subcomponent + 'CELL2D', & ! block + 'ICELL2D', & ! tag name + 'ICELL2D', & ! fortran variable + 'INTEGER', & ! type + '', & ! shape + 'cell2d number', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfdisv2d_xc = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DISV2D', & ! subcomponent + 'CELL2D', & ! block + 'XC', & ! tag name + 'XC', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + 'x-coordinate for cell center', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfdisv2d_yc = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DISV2D', & ! subcomponent + 'CELL2D', & ! block + 'YC', & ! tag name + 'YC', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + 'y-coordinate for cell center', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfdisv2d_ncvert = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DISV2D', & ! subcomponent + 'CELL2D', & ! block + 'NCVERT', & ! tag name + 'NCVERT', & ! fortran variable + 'INTEGER', & ! type + '', & ! shape + 'number of cell vertices', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfdisv2d_icvert = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DISV2D', & ! subcomponent + 'CELL2D', & ! block + 'ICVERT', & ! tag name + 'ICVERT', & ! fortran variable + 'INTEGER1D', & ! type + 'NCVERT', & ! shape + 'array of vertex numbers', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olf_disv2d_param_definitions(*) = & + [ & + olfdisv2d_length_units, & + olfdisv2d_nogrb, & + olfdisv2d_xorigin, & + olfdisv2d_yorigin, & + olfdisv2d_angrot, & + olfdisv2d_export_ascii, & + olfdisv2d_nodes, & + olfdisv2d_nvert, & + olfdisv2d_bottom, & + olfdisv2d_idomain, & + olfdisv2d_iv, & + olfdisv2d_xv, & + olfdisv2d_yv, & + olfdisv2d_icell2d, & + olfdisv2d_xc, & + olfdisv2d_yc, & + olfdisv2d_ncvert, & + olfdisv2d_icvert & + ] + + type(InputParamDefinitionType), parameter :: & + olfdisv2d_vertices = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DISV2D', & ! subcomponent + 'VERTICES', & ! block + 'VERTICES', & ! tag name + 'VERTICES', & ! fortran variable + 'RECARRAY IV XV YV', & ! type + 'NVERT', & ! shape + 'vertices data', & ! longname + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfdisv2d_cell2d = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'DISV2D', & ! subcomponent + 'CELL2D', & ! block + 'CELL2D', & ! tag name + 'CELL2D', & ! fortran variable + 'RECARRAY ICELL2D XC YC NCVERT ICVERT', & ! type + 'NODES', & ! shape + 'cell2d data', & ! longname + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olf_disv2d_aggregate_definitions(*) = & + [ & + olfdisv2d_vertices, & + olfdisv2d_cell2d & + ] + + type(InputBlockDefinitionType), parameter :: & + olf_disv2d_block_definitions(*) = & + [ & + InputBlockDefinitionType( & + 'OPTIONS', & ! blockname + .false., & ! required + .false., & ! aggregate + .false. & ! block_variable + ), & + InputBlockDefinitionType( & + 'DIMENSIONS', & ! blockname + .true., & ! required + .false., & ! aggregate + .false. & ! block_variable + ), & + InputBlockDefinitionType( & + 'GRIDDATA', & ! blockname + .true., & ! required + .false., & ! aggregate + .false. & ! block_variable + ), & + InputBlockDefinitionType( & + 'VERTICES', & ! blockname + .true., & ! required + .true., & ! aggregate + .false. & ! block_variable + ), & + InputBlockDefinitionType( & + 'CELL2D', & ! blockname + .true., & ! required + .true., & ! aggregate + .false. & ! block_variable + ) & + ] + +end module OlfDisv2DInputModule diff --git a/src/Idm/olf-flwidm.f90 b/src/Idm/olf-flwidm.f90 new file mode 100644 index 00000000000..7a232e08f58 --- /dev/null +++ b/src/Idm/olf-flwidm.f90 @@ -0,0 +1,437 @@ +! ** Do Not Modify! MODFLOW 6 system generated file. ** +module OlfFlwInputModule + use ConstantsModule, only: LENVARNAME + use InputDefinitionModule, only: InputParamDefinitionType, & + InputBlockDefinitionType + private + public olf_flw_param_definitions + public olf_flw_aggregate_definitions + public olf_flw_block_definitions + public OlfFlwParamFoundType + public olf_flw_multi_package + public olf_flw_subpackages + + type OlfFlwParamFoundType + logical :: auxiliary = .false. + logical :: auxmultname = .false. + logical :: boundnames = .false. + logical :: print_input = .false. + logical :: print_flows = .false. + logical :: save_flows = .false. + logical :: ts_filerecord = .false. + logical :: ts6 = .false. + logical :: filein = .false. + logical :: ts6_filename = .false. + logical :: obs_filerecord = .false. + logical :: obs6 = .false. + logical :: obs6_filename = .false. + logical :: maxbound = .false. + logical :: cellid = .false. + logical :: q = .false. + logical :: aux = .false. + logical :: boundname = .false. + end type OlfFlwParamFoundType + + logical :: olf_flw_multi_package = .true. + + character(len=16), parameter :: & + olf_flw_subpackages(*) = & + [ & + ' ' & + ] + + type(InputParamDefinitionType), parameter :: & + olfflw_auxiliary = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'FLW', & ! subcomponent + 'OPTIONS', & ! block + 'AUXILIARY', & ! tag name + 'AUXILIARY', & ! fortran variable + 'STRING', & ! type + 'NAUX', & ! shape + 'keyword to specify aux variables', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfflw_auxmultname = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'FLW', & ! subcomponent + 'OPTIONS', & ! block + 'AUXMULTNAME', & ! tag name + 'AUXMULTNAME', & ! fortran variable + 'STRING', & ! type + '', & ! shape + 'name of auxiliary variable for multiplier', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfflw_boundnames = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'FLW', & ! subcomponent + 'OPTIONS', & ! block + 'BOUNDNAMES', & ! tag name + 'BOUNDNAMES', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + '', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfflw_print_input = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'FLW', & ! subcomponent + 'OPTIONS', & ! block + 'PRINT_INPUT', & ! tag name + 'PRINT_INPUT', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'print input to listing file', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfflw_print_flows = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'FLW', & ! subcomponent + 'OPTIONS', & ! block + 'PRINT_FLOWS', & ! tag name + 'PRINT_FLOWS', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'print calculated flows to listing file', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfflw_save_flows = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'FLW', & ! subcomponent + 'OPTIONS', & ! block + 'SAVE_FLOWS', & ! tag name + 'SAVE_FLOWS', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'save well flows to budget file', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfflw_ts_filerecord = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'FLW', & ! subcomponent + 'OPTIONS', & ! block + 'TS_FILERECORD', & ! tag name + 'TS_FILERECORD', & ! fortran variable + 'RECORD TS6 FILEIN TS6_FILENAME', & ! type + '', & ! shape + '', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfflw_ts6 = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'FLW', & ! subcomponent + 'OPTIONS', & ! block + 'TS6', & ! tag name + 'TS6', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'head keyword', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfflw_filein = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'FLW', & ! subcomponent + 'OPTIONS', & ! block + 'FILEIN', & ! tag name + 'FILEIN', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'file keyword', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfflw_ts6_filename = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'FLW', & ! subcomponent + 'OPTIONS', & ! block + 'TS6_FILENAME', & ! tag name + 'TS6_FILENAME', & ! fortran variable + 'STRING', & ! type + '', & ! shape + 'file name of time series information', & ! longname + .true., & ! required + .true., & ! multi-record + .true., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfflw_obs_filerecord = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'FLW', & ! subcomponent + 'OPTIONS', & ! block + 'OBS_FILERECORD', & ! tag name + 'OBS_FILERECORD', & ! fortran variable + 'RECORD OBS6 FILEIN OBS6_FILENAME', & ! type + '', & ! shape + '', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfflw_obs6 = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'FLW', & ! subcomponent + 'OPTIONS', & ! block + 'OBS6', & ! tag name + 'OBS6', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'obs keyword', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfflw_obs6_filename = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'FLW', & ! subcomponent + 'OPTIONS', & ! block + 'OBS6_FILENAME', & ! tag name + 'OBS6_FILENAME', & ! fortran variable + 'STRING', & ! type + '', & ! shape + 'obs6 input filename', & ! longname + .true., & ! required + .true., & ! multi-record + .true., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfflw_maxbound = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'FLW', & ! subcomponent + 'DIMENSIONS', & ! block + 'MAXBOUND', & ! tag name + 'MAXBOUND', & ! fortran variable + 'INTEGER', & ! type + '', & ! shape + 'maximum number of inflow', & ! longname + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfflw_cellid = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'FLW', & ! subcomponent + 'PERIOD', & ! block + 'CELLID', & ! tag name + 'CELLID', & ! fortran variable + 'INTEGER1D', & ! type + 'NCELLDIM', & ! shape + 'cell identifier', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfflw_q = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'FLW', & ! subcomponent + 'PERIOD', & ! block + 'Q', & ! tag name + 'Q', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + 'well rate', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .true. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfflw_aux = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'FLW', & ! subcomponent + 'PERIOD', & ! block + 'AUX', & ! tag name + 'AUX', & ! fortran variable + 'DOUBLE1D', & ! type + 'NAUX', & ! shape + 'auxiliary variables', & ! longname + .false., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .true. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfflw_boundname = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'FLW', & ! subcomponent + 'PERIOD', & ! block + 'BOUNDNAME', & ! tag name + 'BOUNDNAME', & ! fortran variable + 'STRING', & ! type + '', & ! shape + 'inflow name', & ! longname + .false., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olf_flw_param_definitions(*) = & + [ & + olfflw_auxiliary, & + olfflw_auxmultname, & + olfflw_boundnames, & + olfflw_print_input, & + olfflw_print_flows, & + olfflw_save_flows, & + olfflw_ts_filerecord, & + olfflw_ts6, & + olfflw_filein, & + olfflw_ts6_filename, & + olfflw_obs_filerecord, & + olfflw_obs6, & + olfflw_obs6_filename, & + olfflw_maxbound, & + olfflw_cellid, & + olfflw_q, & + olfflw_aux, & + olfflw_boundname & + ] + + type(InputParamDefinitionType), parameter :: & + olfflw_spd = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'FLW', & ! subcomponent + 'PERIOD', & ! block + 'STRESS_PERIOD_DATA', & ! tag name + 'SPD', & ! fortran variable + 'RECARRAY CELLID Q AUX BOUNDNAME', & ! type + 'MAXBOUND', & ! shape + '', & ! longname + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olf_flw_aggregate_definitions(*) = & + [ & + olfflw_spd & + ] + + type(InputBlockDefinitionType), parameter :: & + olf_flw_block_definitions(*) = & + [ & + InputBlockDefinitionType( & + 'OPTIONS', & ! blockname + .false., & ! required + .false., & ! aggregate + .false. & ! block_variable + ), & + InputBlockDefinitionType( & + 'DIMENSIONS', & ! blockname + .true., & ! required + .false., & ! aggregate + .false. & ! block_variable + ), & + InputBlockDefinitionType( & + 'PERIOD', & ! blockname + .true., & ! required + .true., & ! aggregate + .true. & ! block_variable + ) & + ] + +end module OlfFlwInputModule diff --git a/src/Idm/olf-icidm.f90 b/src/Idm/olf-icidm.f90 new file mode 100644 index 00000000000..e84865f6c19 --- /dev/null +++ b/src/Idm/olf-icidm.f90 @@ -0,0 +1,108 @@ +! ** Do Not Modify! MODFLOW 6 system generated file. ** +module OlfIcInputModule + use ConstantsModule, only: LENVARNAME + use InputDefinitionModule, only: InputParamDefinitionType, & + InputBlockDefinitionType + private + public olf_ic_param_definitions + public olf_ic_aggregate_definitions + public olf_ic_block_definitions + public OlfIcParamFoundType + public olf_ic_multi_package + public olf_ic_subpackages + + type OlfIcParamFoundType + logical :: export_ascii = .false. + logical :: strt = .false. + end type OlfIcParamFoundType + + logical :: olf_ic_multi_package = .false. + + character(len=16), parameter :: & + olf_ic_subpackages(*) = & + [ & + ' ' & + ] + + type(InputParamDefinitionType), parameter :: & + olfic_export_ascii = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'IC', & ! subcomponent + 'OPTIONS', & ! block + 'EXPORT_ARRAY_ASCII', & ! tag name + 'EXPORT_ASCII', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'export array variables to layered ascii files.', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfic_strt = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'IC', & ! subcomponent + 'GRIDDATA', & ! block + 'STRT', & ! tag name + 'STRT', & ! fortran variable + 'DOUBLE1D', & ! type + 'NODES', & ! shape + 'starting concentration', & ! longname + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .true., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olf_ic_param_definitions(*) = & + [ & + olfic_export_ascii, & + olfic_strt & + ] + + type(InputParamDefinitionType), parameter :: & + olf_ic_aggregate_definitions(*) = & + [ & + InputParamDefinitionType & + ( & + '', & ! component + '', & ! subcomponent + '', & ! block + '', & ! tag name + '', & ! fortran variable + '', & ! type + '', & ! shape + '', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) & + ] + + type(InputBlockDefinitionType), parameter :: & + olf_ic_block_definitions(*) = & + [ & + InputBlockDefinitionType( & + 'OPTIONS', & ! blockname + .false., & ! required + .false., & ! aggregate + .false. & ! block_variable + ), & + InputBlockDefinitionType( & + 'GRIDDATA', & ! blockname + .true., & ! required + .false., & ! aggregate + .false. & ! block_variable + ) & + ] + +end module OlfIcInputModule diff --git a/src/Idm/olf-namidm.f90 b/src/Idm/olf-namidm.f90 new file mode 100644 index 00000000000..92a4c6b3156 --- /dev/null +++ b/src/Idm/olf-namidm.f90 @@ -0,0 +1,271 @@ +! ** Do Not Modify! MODFLOW 6 system generated file. ** +module OlfNamInputModule + use ConstantsModule, only: LENVARNAME + use InputDefinitionModule, only: InputParamDefinitionType, & + InputBlockDefinitionType + private + public olf_nam_param_definitions + public olf_nam_aggregate_definitions + public olf_nam_block_definitions + public OlfNamParamFoundType + public olf_nam_multi_package + public olf_nam_subpackages + + type OlfNamParamFoundType + logical :: list = .false. + logical :: print_input = .false. + logical :: print_flows = .false. + logical :: save_flows = .false. + logical :: newtonoptions = .false. + logical :: newton = .false. + logical :: under_relaxation = .false. + logical :: ftype = .false. + logical :: fname = .false. + logical :: pname = .false. + end type OlfNamParamFoundType + + logical :: olf_nam_multi_package = .false. + + character(len=16), parameter :: & + olf_nam_subpackages(*) = & + [ & + ' ' & + ] + + type(InputParamDefinitionType), parameter :: & + olfnam_list = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'NAM', & ! subcomponent + 'OPTIONS', & ! block + 'LIST', & ! tag name + 'LIST', & ! fortran variable + 'STRING', & ! type + '', & ! shape + 'name of listing file', & ! longname + .false., & ! required + .false., & ! multi-record + .true., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfnam_print_input = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'NAM', & ! subcomponent + 'OPTIONS', & ! block + 'PRINT_INPUT', & ! tag name + 'PRINT_INPUT', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'print input to listing file', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfnam_print_flows = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'NAM', & ! subcomponent + 'OPTIONS', & ! block + 'PRINT_FLOWS', & ! tag name + 'PRINT_FLOWS', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'print calculated flows to listing file', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfnam_save_flows = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'NAM', & ! subcomponent + 'OPTIONS', & ! block + 'SAVE_FLOWS', & ! tag name + 'SAVE_FLOWS', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'save flows for all packages to budget file', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfnam_newtonoptions = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'NAM', & ! subcomponent + 'OPTIONS', & ! block + 'NEWTONOPTIONS', & ! tag name + 'NEWTONOPTIONS', & ! fortran variable + 'RECORD NEWTON UNDER_RELAXATION', & ! type + '', & ! shape + 'newton keyword and options', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfnam_newton = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'NAM', & ! subcomponent + 'OPTIONS', & ! block + 'NEWTON', & ! tag name + 'NEWTON', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'keyword to activate Newton-Raphson formulation', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfnam_under_relaxation = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'NAM', & ! subcomponent + 'OPTIONS', & ! block + 'UNDER_RELAXATION', & ! tag name + 'UNDER_RELAXATION', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'keyword to activate Newton-Raphson UNDER_RELAXATION option', & ! longname + .false., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfnam_ftype = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'NAM', & ! subcomponent + 'PACKAGES', & ! block + 'FTYPE', & ! tag name + 'FTYPE', & ! fortran variable + 'STRING', & ! type + '', & ! shape + 'package type', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfnam_fname = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'NAM', & ! subcomponent + 'PACKAGES', & ! block + 'FNAME', & ! tag name + 'FNAME', & ! fortran variable + 'STRING', & ! type + '', & ! shape + 'file name', & ! longname + .true., & ! required + .true., & ! multi-record + .true., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfnam_pname = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'NAM', & ! subcomponent + 'PACKAGES', & ! block + 'PNAME', & ! tag name + 'PNAME', & ! fortran variable + 'STRING', & ! type + '', & ! shape + 'user name for package', & ! longname + .false., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olf_nam_param_definitions(*) = & + [ & + olfnam_list, & + olfnam_print_input, & + olfnam_print_flows, & + olfnam_save_flows, & + olfnam_newtonoptions, & + olfnam_newton, & + olfnam_under_relaxation, & + olfnam_ftype, & + olfnam_fname, & + olfnam_pname & + ] + + type(InputParamDefinitionType), parameter :: & + olfnam_packages = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'NAM', & ! subcomponent + 'PACKAGES', & ! block + 'PACKAGES', & ! tag name + 'PACKAGES', & ! fortran variable + 'RECARRAY FTYPE FNAME PNAME', & ! type + '', & ! shape + 'package list', & ! longname + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olf_nam_aggregate_definitions(*) = & + [ & + olfnam_packages & + ] + + type(InputBlockDefinitionType), parameter :: & + olf_nam_block_definitions(*) = & + [ & + InputBlockDefinitionType( & + 'OPTIONS', & ! blockname + .false., & ! required + .false., & ! aggregate + .false. & ! block_variable + ), & + InputBlockDefinitionType( & + 'PACKAGES', & ! blockname + .true., & ! required + .true., & ! aggregate + .false. & ! block_variable + ) & + ] + +end module OlfNamInputModule diff --git a/src/Idm/olf-stoidm.f90 b/src/Idm/olf-stoidm.f90 new file mode 100644 index 00000000000..4423145bf4f --- /dev/null +++ b/src/Idm/olf-stoidm.f90 @@ -0,0 +1,148 @@ +! ** Do Not Modify! MODFLOW 6 system generated file. ** +module OlfStoInputModule + use ConstantsModule, only: LENVARNAME + use InputDefinitionModule, only: InputParamDefinitionType, & + InputBlockDefinitionType + private + public olf_sto_param_definitions + public olf_sto_aggregate_definitions + public olf_sto_block_definitions + public OlfStoParamFoundType + public olf_sto_multi_package + public olf_sto_subpackages + + type OlfStoParamFoundType + logical :: ipakcb = .false. + logical :: export_ascii = .false. + logical :: steady_state = .false. + logical :: transient = .false. + end type OlfStoParamFoundType + + logical :: olf_sto_multi_package = .false. + + character(len=16), parameter :: & + olf_sto_subpackages(*) = & + [ & + ' ' & + ] + + type(InputParamDefinitionType), parameter :: & + olfsto_ipakcb = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'STO', & ! subcomponent + 'OPTIONS', & ! block + 'SAVE_FLOWS', & ! tag name + 'IPAKCB', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'keyword to save NPF flows', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfsto_export_ascii = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'STO', & ! subcomponent + 'OPTIONS', & ! block + 'EXPORT_ARRAY_ASCII', & ! tag name + 'EXPORT_ASCII', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'export array variables to layered ascii files.', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfsto_steady_state = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'STO', & ! subcomponent + 'PERIOD', & ! block + 'STEADY-STATE', & ! tag name + 'STEADY_STATE', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'steady state indicator', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfsto_transient = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'STO', & ! subcomponent + 'PERIOD', & ! block + 'TRANSIENT', & ! tag name + 'TRANSIENT', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'transient indicator', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olf_sto_param_definitions(*) = & + [ & + olfsto_ipakcb, & + olfsto_export_ascii, & + olfsto_steady_state, & + olfsto_transient & + ] + + type(InputParamDefinitionType), parameter :: & + olf_sto_aggregate_definitions(*) = & + [ & + InputParamDefinitionType & + ( & + '', & ! component + '', & ! subcomponent + '', & ! block + '', & ! tag name + '', & ! fortran variable + '', & ! type + '', & ! shape + '', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) & + ] + + type(InputBlockDefinitionType), parameter :: & + olf_sto_block_definitions(*) = & + [ & + InputBlockDefinitionType( & + 'OPTIONS', & ! blockname + .false., & ! required + .false., & ! aggregate + .false. & ! block_variable + ), & + InputBlockDefinitionType( & + 'PERIOD', & ! blockname + .false., & ! required + .false., & ! aggregate + .true. & ! block_variable + ) & + ] + +end module OlfStoInputModule diff --git a/src/Idm/olf-zdgidm.f90 b/src/Idm/olf-zdgidm.f90 new file mode 100644 index 00000000000..bac7bd72c67 --- /dev/null +++ b/src/Idm/olf-zdgidm.f90 @@ -0,0 +1,477 @@ +! ** Do Not Modify! MODFLOW 6 system generated file. ** +module OlfZdgInputModule + use ConstantsModule, only: LENVARNAME + use InputDefinitionModule, only: InputParamDefinitionType, & + InputBlockDefinitionType + private + public olf_zdg_param_definitions + public olf_zdg_aggregate_definitions + public olf_zdg_block_definitions + public OlfZdgParamFoundType + public olf_zdg_multi_package + public olf_zdg_subpackages + + type OlfZdgParamFoundType + logical :: auxiliary = .false. + logical :: boundnames = .false. + logical :: iprpak = .false. + logical :: iprflow = .false. + logical :: ipakcb = .false. + logical :: ts_filerecord = .false. + logical :: ts6 = .false. + logical :: filein = .false. + logical :: ts6_filename = .false. + logical :: obs_filerecord = .false. + logical :: obs6 = .false. + logical :: obs6_filename = .false. + logical :: maxbound = .false. + logical :: cellid = .false. + logical :: idcxs = .false. + logical :: width = .false. + logical :: slope = .false. + logical :: rough = .false. + logical :: auxvar = .false. + logical :: boundname = .false. + end type OlfZdgParamFoundType + + logical :: olf_zdg_multi_package = .true. + + character(len=16), parameter :: & + olf_zdg_subpackages(*) = & + [ & + ' ' & + ] + + type(InputParamDefinitionType), parameter :: & + olfzdg_auxiliary = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'ZDG', & ! subcomponent + 'OPTIONS', & ! block + 'AUXILIARY', & ! tag name + 'AUXILIARY', & ! fortran variable + 'STRING', & ! type + 'NAUX', & ! shape + 'keyword to specify aux variables', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfzdg_boundnames = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'ZDG', & ! subcomponent + 'OPTIONS', & ! block + 'BOUNDNAMES', & ! tag name + 'BOUNDNAMES', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + '', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfzdg_iprpak = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'ZDG', & ! subcomponent + 'OPTIONS', & ! block + 'PRINT_INPUT', & ! tag name + 'IPRPAK', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'print input to listing file', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfzdg_iprflow = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'ZDG', & ! subcomponent + 'OPTIONS', & ! block + 'PRINT_FLOWS', & ! tag name + 'IPRFLOW', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'print calculated flows to listing file', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfzdg_ipakcb = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'ZDG', & ! subcomponent + 'OPTIONS', & ! block + 'SAVE_FLOWS', & ! tag name + 'IPAKCB', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'save flows to budget file', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfzdg_ts_filerecord = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'ZDG', & ! subcomponent + 'OPTIONS', & ! block + 'TS_FILERECORD', & ! tag name + 'TS_FILERECORD', & ! fortran variable + 'RECORD TS6 FILEIN TS6_FILENAME', & ! type + '', & ! shape + '', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfzdg_ts6 = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'ZDG', & ! subcomponent + 'OPTIONS', & ! block + 'TS6', & ! tag name + 'TS6', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'head keyword', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfzdg_filein = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'ZDG', & ! subcomponent + 'OPTIONS', & ! block + 'FILEIN', & ! tag name + 'FILEIN', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'file keyword', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfzdg_ts6_filename = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'ZDG', & ! subcomponent + 'OPTIONS', & ! block + 'TS6_FILENAME', & ! tag name + 'TS6_FILENAME', & ! fortran variable + 'STRING', & ! type + '', & ! shape + 'file name of time series information', & ! longname + .true., & ! required + .true., & ! multi-record + .true., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfzdg_obs_filerecord = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'ZDG', & ! subcomponent + 'OPTIONS', & ! block + 'OBS_FILERECORD', & ! tag name + 'OBS_FILERECORD', & ! fortran variable + 'RECORD OBS6 FILEIN OBS6_FILENAME', & ! type + '', & ! shape + '', & ! longname + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfzdg_obs6 = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'ZDG', & ! subcomponent + 'OPTIONS', & ! block + 'OBS6', & ! tag name + 'OBS6', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + 'obs keyword', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfzdg_obs6_filename = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'ZDG', & ! subcomponent + 'OPTIONS', & ! block + 'OBS6_FILENAME', & ! tag name + 'OBS6_FILENAME', & ! fortran variable + 'STRING', & ! type + '', & ! shape + 'obs6 input filename', & ! longname + .true., & ! required + .true., & ! multi-record + .true., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfzdg_maxbound = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'ZDG', & ! subcomponent + 'DIMENSIONS', & ! block + 'MAXBOUND', & ! tag name + 'MAXBOUND', & ! fortran variable + 'INTEGER', & ! type + '', & ! shape + 'maximum number of zero-depth-gradient boundaries', & ! longname + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfzdg_cellid = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'ZDG', & ! subcomponent + 'PERIOD', & ! block + 'CELLID', & ! tag name + 'CELLID', & ! fortran variable + 'INTEGER1D', & ! type + 'NCELLDIM', & ! shape + 'cell identifier', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfzdg_idcxs = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'ZDG', & ! subcomponent + 'PERIOD', & ! block + 'IDCXS', & ! tag name + 'IDCXS', & ! fortran variable + 'INTEGER', & ! type + '', & ! shape + 'cross section identifier', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfzdg_width = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'ZDG', & ! subcomponent + 'PERIOD', & ! block + 'WIDTH', & ! tag name + 'WIDTH', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + 'width of the zero-depth gradient boundary', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .true. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfzdg_slope = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'ZDG', & ! subcomponent + 'PERIOD', & ! block + 'SLOPE', & ! tag name + 'SLOPE', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + 'channel slope', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .true. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfzdg_rough = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'ZDG', & ! subcomponent + 'PERIOD', & ! block + 'ROUGH', & ! tag name + 'ROUGH', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + 'channel roughness', & ! longname + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .true. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfzdg_auxvar = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'ZDG', & ! subcomponent + 'PERIOD', & ! block + 'AUX', & ! tag name + 'AUXVAR', & ! fortran variable + 'DOUBLE1D', & ! type + 'NAUX', & ! shape + 'auxiliary variables', & ! longname + .false., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .true. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olfzdg_boundname = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'ZDG', & ! subcomponent + 'PERIOD', & ! block + 'BOUNDNAME', & ! tag name + 'BOUNDNAME', & ! fortran variable + 'STRING', & ! type + '', & ! shape + 'zero-depth-gradient boundary name', & ! longname + .false., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olf_zdg_param_definitions(*) = & + [ & + olfzdg_auxiliary, & + olfzdg_boundnames, & + olfzdg_iprpak, & + olfzdg_iprflow, & + olfzdg_ipakcb, & + olfzdg_ts_filerecord, & + olfzdg_ts6, & + olfzdg_filein, & + olfzdg_ts6_filename, & + olfzdg_obs_filerecord, & + olfzdg_obs6, & + olfzdg_obs6_filename, & + olfzdg_maxbound, & + olfzdg_cellid, & + olfzdg_idcxs, & + olfzdg_width, & + olfzdg_slope, & + olfzdg_rough, & + olfzdg_auxvar, & + olfzdg_boundname & + ] + + type(InputParamDefinitionType), parameter :: & + olfzdg_spd = InputParamDefinitionType & + ( & + 'OLF', & ! component + 'ZDG', & ! subcomponent + 'PERIOD', & ! block + 'STRESS_PERIOD_DATA', & ! tag name + 'SPD', & ! fortran variable + 'RECARRAY CELLID IDCXS WIDTH SLOPE ROUGH AUX BOUNDNAME', & ! type + 'MAXBOUND', & ! shape + '', & ! longname + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + olf_zdg_aggregate_definitions(*) = & + [ & + olfzdg_spd & + ] + + type(InputBlockDefinitionType), parameter :: & + olf_zdg_block_definitions(*) = & + [ & + InputBlockDefinitionType( & + 'OPTIONS', & ! blockname + .false., & ! required + .false., & ! aggregate + .false. & ! block_variable + ), & + InputBlockDefinitionType( & + 'DIMENSIONS', & ! blockname + .true., & ! required + .false., & ! aggregate + .false. & ! block_variable + ), & + InputBlockDefinitionType( & + 'PERIOD', & ! blockname + .true., & ! required + .true., & ! aggregate + .true. & ! block_variable + ) & + ] + +end module OlfZdgInputModule diff --git a/src/Idm/selector/IdmChfDfnSelector.f90 b/src/Idm/selector/IdmChfDfnSelector.f90 new file mode 100644 index 00000000000..83ff42bf9c0 --- /dev/null +++ b/src/Idm/selector/IdmChfDfnSelector.f90 @@ -0,0 +1,255 @@ +! ** Do Not Modify! MODFLOW 6 system generated file. ** +module IdmChfDfnSelectorModule + + use ConstantsModule, only: LENVARNAME + use SimModule, only: store_error + use InputDefinitionModule, only: InputParamDefinitionType, & + InputBlockDefinitionType + use ChfNamInputModule + use ChfDisv1DInputModule + use ChfDis2DInputModule + use ChfDisv2DInputModule + use ChfCxsInputModule + use ChfDfwInputModule + use ChfIcInputModule + use ChfCdbInputModule + use ChfChdInputModule + use ChfFlwInputModule + use ChfStoInputModule + use ChfZdgInputModule + + implicit none + private + public :: chf_param_definitions + public :: chf_aggregate_definitions + public :: chf_block_definitions + public :: chf_idm_multi_package + public :: chf_idm_subpackages + public :: chf_idm_integrated + +contains + + subroutine set_param_pointer(input_dfn, input_dfn_target) + type(InputParamDefinitionType), dimension(:), pointer :: input_dfn + type(InputParamDefinitionType), dimension(:), target :: input_dfn_target + input_dfn => input_dfn_target + end subroutine set_param_pointer + + subroutine set_block_pointer(input_dfn, input_dfn_target) + type(InputBlockDefinitionType), dimension(:), pointer :: input_dfn + type(InputBlockDefinitionType), dimension(:), target :: input_dfn_target + input_dfn => input_dfn_target + end subroutine set_block_pointer + + subroutine set_subpkg_pointer(subpkg_list, subpkg_list_target) + character(len=16), dimension(:), pointer :: subpkg_list + character(len=16), dimension(:), target :: subpkg_list_target + subpkg_list => subpkg_list_target + end subroutine set_subpkg_pointer + + function chf_param_definitions(subcomponent) result(input_definition) + character(len=*), intent(in) :: subcomponent + type(InputParamDefinitionType), dimension(:), pointer :: input_definition + nullify (input_definition) + select case (subcomponent) + case ('NAM') + call set_param_pointer(input_definition, chf_nam_param_definitions) + case ('DISV1D') + call set_param_pointer(input_definition, chf_disv1d_param_definitions) + case ('DIS2D') + call set_param_pointer(input_definition, chf_dis2d_param_definitions) + case ('DISV2D') + call set_param_pointer(input_definition, chf_disv2d_param_definitions) + case ('CXS') + call set_param_pointer(input_definition, chf_cxs_param_definitions) + case ('DFW') + call set_param_pointer(input_definition, chf_dfw_param_definitions) + case ('IC') + call set_param_pointer(input_definition, chf_ic_param_definitions) + case ('CDB') + call set_param_pointer(input_definition, chf_cdb_param_definitions) + case ('CHD') + call set_param_pointer(input_definition, chf_chd_param_definitions) + case ('FLW') + call set_param_pointer(input_definition, chf_flw_param_definitions) + case ('STO') + call set_param_pointer(input_definition, chf_sto_param_definitions) + case ('ZDG') + call set_param_pointer(input_definition, chf_zdg_param_definitions) + case default + end select + return + end function chf_param_definitions + + function chf_aggregate_definitions(subcomponent) result(input_definition) + character(len=*), intent(in) :: subcomponent + type(InputParamDefinitionType), dimension(:), pointer :: input_definition + nullify (input_definition) + select case (subcomponent) + case ('NAM') + call set_param_pointer(input_definition, chf_nam_aggregate_definitions) + case ('DISV1D') + call set_param_pointer(input_definition, chf_disv1d_aggregate_definitions) + case ('DIS2D') + call set_param_pointer(input_definition, chf_dis2d_aggregate_definitions) + case ('DISV2D') + call set_param_pointer(input_definition, chf_disv2d_aggregate_definitions) + case ('CXS') + call set_param_pointer(input_definition, chf_cxs_aggregate_definitions) + case ('DFW') + call set_param_pointer(input_definition, chf_dfw_aggregate_definitions) + case ('IC') + call set_param_pointer(input_definition, chf_ic_aggregate_definitions) + case ('CDB') + call set_param_pointer(input_definition, chf_cdb_aggregate_definitions) + case ('CHD') + call set_param_pointer(input_definition, chf_chd_aggregate_definitions) + case ('FLW') + call set_param_pointer(input_definition, chf_flw_aggregate_definitions) + case ('STO') + call set_param_pointer(input_definition, chf_sto_aggregate_definitions) + case ('ZDG') + call set_param_pointer(input_definition, chf_zdg_aggregate_definitions) + case default + end select + return + end function chf_aggregate_definitions + + function chf_block_definitions(subcomponent) result(input_definition) + character(len=*), intent(in) :: subcomponent + type(InputBlockDefinitionType), dimension(:), pointer :: input_definition + nullify (input_definition) + select case (subcomponent) + case ('NAM') + call set_block_pointer(input_definition, chf_nam_block_definitions) + case ('DISV1D') + call set_block_pointer(input_definition, chf_disv1d_block_definitions) + case ('DIS2D') + call set_block_pointer(input_definition, chf_dis2d_block_definitions) + case ('DISV2D') + call set_block_pointer(input_definition, chf_disv2d_block_definitions) + case ('CXS') + call set_block_pointer(input_definition, chf_cxs_block_definitions) + case ('DFW') + call set_block_pointer(input_definition, chf_dfw_block_definitions) + case ('IC') + call set_block_pointer(input_definition, chf_ic_block_definitions) + case ('CDB') + call set_block_pointer(input_definition, chf_cdb_block_definitions) + case ('CHD') + call set_block_pointer(input_definition, chf_chd_block_definitions) + case ('FLW') + call set_block_pointer(input_definition, chf_flw_block_definitions) + case ('STO') + call set_block_pointer(input_definition, chf_sto_block_definitions) + case ('ZDG') + call set_block_pointer(input_definition, chf_zdg_block_definitions) + case default + end select + return + end function chf_block_definitions + + function chf_idm_multi_package(subcomponent) result(multi_package) + character(len=*), intent(in) :: subcomponent + logical :: multi_package + select case (subcomponent) + case ('NAM') + multi_package = chf_nam_multi_package + case ('DISV1D') + multi_package = chf_disv1d_multi_package + case ('DIS2D') + multi_package = chf_dis2d_multi_package + case ('DISV2D') + multi_package = chf_disv2d_multi_package + case ('CXS') + multi_package = chf_cxs_multi_package + case ('DFW') + multi_package = chf_dfw_multi_package + case ('IC') + multi_package = chf_ic_multi_package + case ('CDB') + multi_package = chf_cdb_multi_package + case ('CHD') + multi_package = chf_chd_multi_package + case ('FLW') + multi_package = chf_flw_multi_package + case ('STO') + multi_package = chf_sto_multi_package + case ('ZDG') + multi_package = chf_zdg_multi_package + case default + call store_error('Idm selector subcomponent not found; '//& + &'component="CHF"'//& + &', subcomponent="'//trim(subcomponent)//'".', .true.) + end select + return + end function chf_idm_multi_package + + function chf_idm_subpackages(subcomponent) result(subpackages) + character(len=*), intent(in) :: subcomponent + character(len=16), dimension(:), pointer :: subpackages + select case (subcomponent) + case ('NAM') + call set_subpkg_pointer(subpackages, chf_nam_subpackages) + case ('DISV1D') + call set_subpkg_pointer(subpackages, chf_disv1d_subpackages) + case ('DIS2D') + call set_subpkg_pointer(subpackages, chf_dis2d_subpackages) + case ('DISV2D') + call set_subpkg_pointer(subpackages, chf_disv2d_subpackages) + case ('CXS') + call set_subpkg_pointer(subpackages, chf_cxs_subpackages) + case ('DFW') + call set_subpkg_pointer(subpackages, chf_dfw_subpackages) + case ('IC') + call set_subpkg_pointer(subpackages, chf_ic_subpackages) + case ('CDB') + call set_subpkg_pointer(subpackages, chf_cdb_subpackages) + case ('CHD') + call set_subpkg_pointer(subpackages, chf_chd_subpackages) + case ('FLW') + call set_subpkg_pointer(subpackages, chf_flw_subpackages) + case ('STO') + call set_subpkg_pointer(subpackages, chf_sto_subpackages) + case ('ZDG') + call set_subpkg_pointer(subpackages, chf_zdg_subpackages) + case default + end select + return + end function chf_idm_subpackages + + function chf_idm_integrated(subcomponent) result(integrated) + character(len=*), intent(in) :: subcomponent + logical :: integrated + integrated = .false. + select case (subcomponent) + case ('NAM') + integrated = .true. + case ('DISV1D') + integrated = .true. + case ('DIS2D') + integrated = .true. + case ('DISV2D') + integrated = .true. + case ('CXS') + integrated = .true. + case ('DFW') + integrated = .true. + case ('IC') + integrated = .true. + case ('CDB') + integrated = .true. + case ('CHD') + integrated = .true. + case ('FLW') + integrated = .true. + case ('STO') + integrated = .true. + case ('ZDG') + integrated = .true. + case default + end select + return + end function chf_idm_integrated + +end module IdmChfDfnSelectorModule diff --git a/src/Idm/selector/IdmDfnSelector.f90 b/src/Idm/selector/IdmDfnSelector.f90 index f473f2b0858..f840ad281b7 100644 --- a/src/Idm/selector/IdmDfnSelector.f90 +++ b/src/Idm/selector/IdmDfnSelector.f90 @@ -9,6 +9,8 @@ module IdmDfnSelectorModule use IdmGwfDfnSelectorModule use IdmGwtDfnSelectorModule use IdmGweDfnSelectorModule + use IdmChfDfnSelectorModule + use IdmOlfDfnSelectorModule use IdmSwfDfnSelectorModule use IdmPrtDfnSelectorModule use IdmExgDfnSelectorModule @@ -40,6 +42,10 @@ function param_definitions(component, subcomponent) result(input_definition) input_definition => gwt_param_definitions(subcomponent) case ('GWE') input_definition => gwe_param_definitions(subcomponent) + case ('CHF') + input_definition => chf_param_definitions(subcomponent) + case ('OLF') + input_definition => olf_param_definitions(subcomponent) case ('SWF') input_definition => swf_param_definitions(subcomponent) case ('PRT') @@ -67,6 +73,10 @@ function aggregate_definitions(component, subcomponent) result(input_definition) input_definition => gwt_aggregate_definitions(subcomponent) case ('GWE') input_definition => gwe_aggregate_definitions(subcomponent) + case ('CHF') + input_definition => chf_aggregate_definitions(subcomponent) + case ('OLF') + input_definition => olf_aggregate_definitions(subcomponent) case ('SWF') input_definition => swf_aggregate_definitions(subcomponent) case ('PRT') @@ -94,6 +104,10 @@ function block_definitions(component, subcomponent) result(input_definition) input_definition => gwt_block_definitions(subcomponent) case ('GWE') input_definition => gwe_block_definitions(subcomponent) + case ('CHF') + input_definition => chf_block_definitions(subcomponent) + case ('OLF') + input_definition => olf_block_definitions(subcomponent) case ('SWF') input_definition => swf_block_definitions(subcomponent) case ('PRT') @@ -120,6 +134,10 @@ function idm_multi_package(component, subcomponent) result(multi_package) multi_package = gwt_idm_multi_package(subcomponent) case ('GWE') multi_package = gwe_idm_multi_package(subcomponent) + case ('CHF') + multi_package = chf_idm_multi_package(subcomponent) + case ('OLF') + multi_package = olf_idm_multi_package(subcomponent) case ('SWF') multi_package = swf_idm_multi_package(subcomponent) case ('PRT') @@ -149,6 +167,10 @@ function idm_subpackages(component, subcomponent) result(subpackages) subpackages => gwt_idm_subpackages(subcomponent) case ('GWE') subpackages => gwe_idm_subpackages(subcomponent) + case ('CHF') + subpackages => chf_idm_subpackages(subcomponent) + case ('OLF') + subpackages => olf_idm_subpackages(subcomponent) case ('SWF') subpackages => swf_idm_subpackages(subcomponent) case ('PRT') @@ -179,6 +201,10 @@ function idm_integrated(component, subcomponent) result(integrated) integrated = gwt_idm_integrated(subcomponent) case ('GWE') integrated = gwe_idm_integrated(subcomponent) + case ('CHF') + integrated = chf_idm_integrated(subcomponent) + case ('OLF') + integrated = olf_idm_integrated(subcomponent) case ('SWF') integrated = swf_idm_integrated(subcomponent) case ('PRT') @@ -205,6 +231,10 @@ function idm_component(component) result(integrated) integrated = .true. case ('GWE') integrated = .true. + case ('CHF') + integrated = .true. + case ('OLF') + integrated = .true. case ('SWF') integrated = .true. case ('PRT') diff --git a/src/Idm/selector/IdmExgDfnSelector.f90 b/src/Idm/selector/IdmExgDfnSelector.f90 index 2ee06b14d09..564a62ac879 100644 --- a/src/Idm/selector/IdmExgDfnSelector.f90 +++ b/src/Idm/selector/IdmExgDfnSelector.f90 @@ -5,13 +5,14 @@ module IdmExgDfnSelectorModule use SimModule, only: store_error use InputDefinitionModule, only: InputParamDefinitionType, & InputBlockDefinitionType + use ExgChfgwfInputModule use ExgGwfgwfInputModule use ExgGwfgwtInputModule use ExgGwtgwtInputModule use ExgGwfgweInputModule use ExgGwegweInputModule - use ExgSwfgwfInputModule use ExgGwfprtInputModule + use ExgOlfgwfInputModule implicit none private @@ -47,6 +48,8 @@ function exg_param_definitions(subcomponent) result(input_definition) type(InputParamDefinitionType), dimension(:), pointer :: input_definition nullify (input_definition) select case (subcomponent) + case ('CHFGWF') + call set_param_pointer(input_definition, exg_chfgwf_param_definitions) case ('GWFGWF') call set_param_pointer(input_definition, exg_gwfgwf_param_definitions) case ('GWFGWT') @@ -57,10 +60,10 @@ function exg_param_definitions(subcomponent) result(input_definition) call set_param_pointer(input_definition, exg_gwfgwe_param_definitions) case ('GWEGWE') call set_param_pointer(input_definition, exg_gwegwe_param_definitions) - case ('SWFGWF') - call set_param_pointer(input_definition, exg_swfgwf_param_definitions) case ('GWFPRT') call set_param_pointer(input_definition, exg_gwfprt_param_definitions) + case ('OLFGWF') + call set_param_pointer(input_definition, exg_olfgwf_param_definitions) case default end select return @@ -71,6 +74,8 @@ function exg_aggregate_definitions(subcomponent) result(input_definition) type(InputParamDefinitionType), dimension(:), pointer :: input_definition nullify (input_definition) select case (subcomponent) + case ('CHFGWF') + call set_param_pointer(input_definition, exg_chfgwf_aggregate_definitions) case ('GWFGWF') call set_param_pointer(input_definition, exg_gwfgwf_aggregate_definitions) case ('GWFGWT') @@ -81,10 +86,10 @@ function exg_aggregate_definitions(subcomponent) result(input_definition) call set_param_pointer(input_definition, exg_gwfgwe_aggregate_definitions) case ('GWEGWE') call set_param_pointer(input_definition, exg_gwegwe_aggregate_definitions) - case ('SWFGWF') - call set_param_pointer(input_definition, exg_swfgwf_aggregate_definitions) case ('GWFPRT') call set_param_pointer(input_definition, exg_gwfprt_aggregate_definitions) + case ('OLFGWF') + call set_param_pointer(input_definition, exg_olfgwf_aggregate_definitions) case default end select return @@ -95,6 +100,8 @@ function exg_block_definitions(subcomponent) result(input_definition) type(InputBlockDefinitionType), dimension(:), pointer :: input_definition nullify (input_definition) select case (subcomponent) + case ('CHFGWF') + call set_block_pointer(input_definition, exg_chfgwf_block_definitions) case ('GWFGWF') call set_block_pointer(input_definition, exg_gwfgwf_block_definitions) case ('GWFGWT') @@ -105,10 +112,10 @@ function exg_block_definitions(subcomponent) result(input_definition) call set_block_pointer(input_definition, exg_gwfgwe_block_definitions) case ('GWEGWE') call set_block_pointer(input_definition, exg_gwegwe_block_definitions) - case ('SWFGWF') - call set_block_pointer(input_definition, exg_swfgwf_block_definitions) case ('GWFPRT') call set_block_pointer(input_definition, exg_gwfprt_block_definitions) + case ('OLFGWF') + call set_block_pointer(input_definition, exg_olfgwf_block_definitions) case default end select return @@ -118,6 +125,8 @@ function exg_idm_multi_package(subcomponent) result(multi_package) character(len=*), intent(in) :: subcomponent logical :: multi_package select case (subcomponent) + case ('CHFGWF') + multi_package = exg_chfgwf_multi_package case ('GWFGWF') multi_package = exg_gwfgwf_multi_package case ('GWFGWT') @@ -128,10 +137,10 @@ function exg_idm_multi_package(subcomponent) result(multi_package) multi_package = exg_gwfgwe_multi_package case ('GWEGWE') multi_package = exg_gwegwe_multi_package - case ('SWFGWF') - multi_package = exg_swfgwf_multi_package case ('GWFPRT') multi_package = exg_gwfprt_multi_package + case ('OLFGWF') + multi_package = exg_olfgwf_multi_package case default call store_error('Idm selector subcomponent not found; '//& &'component="EXG"'//& @@ -144,6 +153,8 @@ function exg_idm_subpackages(subcomponent) result(subpackages) character(len=*), intent(in) :: subcomponent character(len=16), dimension(:), pointer :: subpackages select case (subcomponent) + case ('CHFGWF') + call set_subpkg_pointer(subpackages, exg_chfgwf_subpackages) case ('GWFGWF') call set_subpkg_pointer(subpackages, exg_gwfgwf_subpackages) case ('GWFGWT') @@ -154,10 +165,10 @@ function exg_idm_subpackages(subcomponent) result(subpackages) call set_subpkg_pointer(subpackages, exg_gwfgwe_subpackages) case ('GWEGWE') call set_subpkg_pointer(subpackages, exg_gwegwe_subpackages) - case ('SWFGWF') - call set_subpkg_pointer(subpackages, exg_swfgwf_subpackages) case ('GWFPRT') call set_subpkg_pointer(subpackages, exg_gwfprt_subpackages) + case ('OLFGWF') + call set_subpkg_pointer(subpackages, exg_olfgwf_subpackages) case default end select return @@ -168,6 +179,8 @@ function exg_idm_integrated(subcomponent) result(integrated) logical :: integrated integrated = .false. select case (subcomponent) + case ('CHFGWF') + integrated = .true. case ('GWFGWF') integrated = .true. case ('GWFGWT') @@ -178,10 +191,10 @@ function exg_idm_integrated(subcomponent) result(integrated) integrated = .true. case ('GWEGWE') integrated = .true. - case ('SWFGWF') - integrated = .true. case ('GWFPRT') integrated = .true. + case ('OLFGWF') + integrated = .true. case default end select return diff --git a/src/Idm/selector/IdmOlfDfnSelector.f90 b/src/Idm/selector/IdmOlfDfnSelector.f90 new file mode 100644 index 00000000000..aac16fc3a51 --- /dev/null +++ b/src/Idm/selector/IdmOlfDfnSelector.f90 @@ -0,0 +1,255 @@ +! ** Do Not Modify! MODFLOW 6 system generated file. ** +module IdmOlfDfnSelectorModule + + use ConstantsModule, only: LENVARNAME + use SimModule, only: store_error + use InputDefinitionModule, only: InputParamDefinitionType, & + InputBlockDefinitionType + use OlfNamInputModule + use OlfDisv1DInputModule + use OlfDis2DInputModule + use OlfDisv2DInputModule + use OlfCxsInputModule + use OlfDfwInputModule + use OlfIcInputModule + use OlfCdbInputModule + use OlfChdInputModule + use OlfFlwInputModule + use OlfStoInputModule + use OlfZdgInputModule + + implicit none + private + public :: olf_param_definitions + public :: olf_aggregate_definitions + public :: olf_block_definitions + public :: olf_idm_multi_package + public :: olf_idm_subpackages + public :: olf_idm_integrated + +contains + + subroutine set_param_pointer(input_dfn, input_dfn_target) + type(InputParamDefinitionType), dimension(:), pointer :: input_dfn + type(InputParamDefinitionType), dimension(:), target :: input_dfn_target + input_dfn => input_dfn_target + end subroutine set_param_pointer + + subroutine set_block_pointer(input_dfn, input_dfn_target) + type(InputBlockDefinitionType), dimension(:), pointer :: input_dfn + type(InputBlockDefinitionType), dimension(:), target :: input_dfn_target + input_dfn => input_dfn_target + end subroutine set_block_pointer + + subroutine set_subpkg_pointer(subpkg_list, subpkg_list_target) + character(len=16), dimension(:), pointer :: subpkg_list + character(len=16), dimension(:), target :: subpkg_list_target + subpkg_list => subpkg_list_target + end subroutine set_subpkg_pointer + + function olf_param_definitions(subcomponent) result(input_definition) + character(len=*), intent(in) :: subcomponent + type(InputParamDefinitionType), dimension(:), pointer :: input_definition + nullify (input_definition) + select case (subcomponent) + case ('NAM') + call set_param_pointer(input_definition, olf_nam_param_definitions) + case ('DISV1D') + call set_param_pointer(input_definition, olf_disv1d_param_definitions) + case ('DIS2D') + call set_param_pointer(input_definition, olf_dis2d_param_definitions) + case ('DISV2D') + call set_param_pointer(input_definition, olf_disv2d_param_definitions) + case ('CXS') + call set_param_pointer(input_definition, olf_cxs_param_definitions) + case ('DFW') + call set_param_pointer(input_definition, olf_dfw_param_definitions) + case ('IC') + call set_param_pointer(input_definition, olf_ic_param_definitions) + case ('CDB') + call set_param_pointer(input_definition, olf_cdb_param_definitions) + case ('CHD') + call set_param_pointer(input_definition, olf_chd_param_definitions) + case ('FLW') + call set_param_pointer(input_definition, olf_flw_param_definitions) + case ('STO') + call set_param_pointer(input_definition, olf_sto_param_definitions) + case ('ZDG') + call set_param_pointer(input_definition, olf_zdg_param_definitions) + case default + end select + return + end function olf_param_definitions + + function olf_aggregate_definitions(subcomponent) result(input_definition) + character(len=*), intent(in) :: subcomponent + type(InputParamDefinitionType), dimension(:), pointer :: input_definition + nullify (input_definition) + select case (subcomponent) + case ('NAM') + call set_param_pointer(input_definition, olf_nam_aggregate_definitions) + case ('DISV1D') + call set_param_pointer(input_definition, olf_disv1d_aggregate_definitions) + case ('DIS2D') + call set_param_pointer(input_definition, olf_dis2d_aggregate_definitions) + case ('DISV2D') + call set_param_pointer(input_definition, olf_disv2d_aggregate_definitions) + case ('CXS') + call set_param_pointer(input_definition, olf_cxs_aggregate_definitions) + case ('DFW') + call set_param_pointer(input_definition, olf_dfw_aggregate_definitions) + case ('IC') + call set_param_pointer(input_definition, olf_ic_aggregate_definitions) + case ('CDB') + call set_param_pointer(input_definition, olf_cdb_aggregate_definitions) + case ('CHD') + call set_param_pointer(input_definition, olf_chd_aggregate_definitions) + case ('FLW') + call set_param_pointer(input_definition, olf_flw_aggregate_definitions) + case ('STO') + call set_param_pointer(input_definition, olf_sto_aggregate_definitions) + case ('ZDG') + call set_param_pointer(input_definition, olf_zdg_aggregate_definitions) + case default + end select + return + end function olf_aggregate_definitions + + function olf_block_definitions(subcomponent) result(input_definition) + character(len=*), intent(in) :: subcomponent + type(InputBlockDefinitionType), dimension(:), pointer :: input_definition + nullify (input_definition) + select case (subcomponent) + case ('NAM') + call set_block_pointer(input_definition, olf_nam_block_definitions) + case ('DISV1D') + call set_block_pointer(input_definition, olf_disv1d_block_definitions) + case ('DIS2D') + call set_block_pointer(input_definition, olf_dis2d_block_definitions) + case ('DISV2D') + call set_block_pointer(input_definition, olf_disv2d_block_definitions) + case ('CXS') + call set_block_pointer(input_definition, olf_cxs_block_definitions) + case ('DFW') + call set_block_pointer(input_definition, olf_dfw_block_definitions) + case ('IC') + call set_block_pointer(input_definition, olf_ic_block_definitions) + case ('CDB') + call set_block_pointer(input_definition, olf_cdb_block_definitions) + case ('CHD') + call set_block_pointer(input_definition, olf_chd_block_definitions) + case ('FLW') + call set_block_pointer(input_definition, olf_flw_block_definitions) + case ('STO') + call set_block_pointer(input_definition, olf_sto_block_definitions) + case ('ZDG') + call set_block_pointer(input_definition, olf_zdg_block_definitions) + case default + end select + return + end function olf_block_definitions + + function olf_idm_multi_package(subcomponent) result(multi_package) + character(len=*), intent(in) :: subcomponent + logical :: multi_package + select case (subcomponent) + case ('NAM') + multi_package = olf_nam_multi_package + case ('DISV1D') + multi_package = olf_disv1d_multi_package + case ('DIS2D') + multi_package = olf_dis2d_multi_package + case ('DISV2D') + multi_package = olf_disv2d_multi_package + case ('CXS') + multi_package = olf_cxs_multi_package + case ('DFW') + multi_package = olf_dfw_multi_package + case ('IC') + multi_package = olf_ic_multi_package + case ('CDB') + multi_package = olf_cdb_multi_package + case ('CHD') + multi_package = olf_chd_multi_package + case ('FLW') + multi_package = olf_flw_multi_package + case ('STO') + multi_package = olf_sto_multi_package + case ('ZDG') + multi_package = olf_zdg_multi_package + case default + call store_error('Idm selector subcomponent not found; '//& + &'component="OLF"'//& + &', subcomponent="'//trim(subcomponent)//'".', .true.) + end select + return + end function olf_idm_multi_package + + function olf_idm_subpackages(subcomponent) result(subpackages) + character(len=*), intent(in) :: subcomponent + character(len=16), dimension(:), pointer :: subpackages + select case (subcomponent) + case ('NAM') + call set_subpkg_pointer(subpackages, olf_nam_subpackages) + case ('DISV1D') + call set_subpkg_pointer(subpackages, olf_disv1d_subpackages) + case ('DIS2D') + call set_subpkg_pointer(subpackages, olf_dis2d_subpackages) + case ('DISV2D') + call set_subpkg_pointer(subpackages, olf_disv2d_subpackages) + case ('CXS') + call set_subpkg_pointer(subpackages, olf_cxs_subpackages) + case ('DFW') + call set_subpkg_pointer(subpackages, olf_dfw_subpackages) + case ('IC') + call set_subpkg_pointer(subpackages, olf_ic_subpackages) + case ('CDB') + call set_subpkg_pointer(subpackages, olf_cdb_subpackages) + case ('CHD') + call set_subpkg_pointer(subpackages, olf_chd_subpackages) + case ('FLW') + call set_subpkg_pointer(subpackages, olf_flw_subpackages) + case ('STO') + call set_subpkg_pointer(subpackages, olf_sto_subpackages) + case ('ZDG') + call set_subpkg_pointer(subpackages, olf_zdg_subpackages) + case default + end select + return + end function olf_idm_subpackages + + function olf_idm_integrated(subcomponent) result(integrated) + character(len=*), intent(in) :: subcomponent + logical :: integrated + integrated = .false. + select case (subcomponent) + case ('NAM') + integrated = .true. + case ('DISV1D') + integrated = .true. + case ('DIS2D') + integrated = .true. + case ('DISV2D') + integrated = .true. + case ('CXS') + integrated = .true. + case ('DFW') + integrated = .true. + case ('IC') + integrated = .true. + case ('CDB') + integrated = .true. + case ('CHD') + integrated = .true. + case ('FLW') + integrated = .true. + case ('STO') + integrated = .true. + case ('ZDG') + integrated = .true. + case default + end select + return + end function olf_idm_integrated + +end module IdmOlfDfnSelectorModule diff --git a/src/Model/ChannelFlow/chf.f90 b/src/Model/ChannelFlow/chf.f90 new file mode 100644 index 00000000000..9402a2a8676 --- /dev/null +++ b/src/Model/ChannelFlow/chf.f90 @@ -0,0 +1,156 @@ +!> @brief Channel Flow (CHF) Module +!< +module ChfModule + + use KindModule, only: I4B + use ConstantsModule, only: LENPACKAGETYPE, LENMEMPATH, LINELENGTH + use SimModule, only: store_error + use BaseModelModule, only: BaseModelType + use ListsModule, only: basemodellist + use BaseModelModule, only: AddBaseModelToList + use SwfModule, only: SwfModelType + use BudgetModule, only: budget_cr + + implicit none + + private + public :: chf_cr + public :: ChfModelType + public :: CHF_NBASEPKG, CHF_NMULTIPKG + public :: CHF_BASEPKG, CHF_MULTIPKG + + type, extends(SwfModelType) :: ChfModelType + contains + procedure :: set_namfile_options + procedure :: log_namfile_options + end type ChfModelType + + !> @brief CHF base package array descriptors + !! + !! CHF model base package types. Only listed packages are candidates + !< for input and these will be loaded in the order specified. + integer(I4B), parameter :: CHF_NBASEPKG = 7 + character(len=LENPACKAGETYPE), dimension(CHF_NBASEPKG) :: & + CHF_BASEPKG = ['DISV1D6', 'DFW6 ', 'CXS6 ', & + 'OC6 ', 'IC6 ', 'OBS6 ', & + 'STO6 '] + + !> @brief CHF multi package array descriptors + !! + !! CHF model multi-instance package types. Only listed packages are + !< candidates for input and these will be loaded in the order specified. + integer(I4B), parameter :: CHF_NMULTIPKG = 50 + character(len=LENPACKAGETYPE), dimension(CHF_NMULTIPKG) :: CHF_MULTIPKG + data CHF_MULTIPKG/'FLW6 ', 'CHD6 ', 'CDB6 ', 'ZDG6 ', ' ', & ! 5 + &45*' '/ ! 50 + + ! size of supported model package arrays + integer(I4B), parameter :: NIUNIT_CHF = CHF_NBASEPKG + CHF_NMULTIPKG + +contains + + !> @brief Create a new surface water flow model object + !< + subroutine chf_cr(filename, id, modelname) + ! modules + ! dummy + character(len=*), intent(in) :: filename !< input file + integer(I4B), intent(in) :: id !< consecutive model number listed in mfsim.nam + character(len=*), intent(in) :: modelname !< name of the model + ! local + class(ChfModelType), pointer :: this + class(BaseModelType), pointer :: model + + ! Allocate a new model + allocate (this) + model => this + call AddBaseModelToList(basemodellist, model) + + ! call parent initialize routine + call this%initialize('CHF', filename, id, modelname) + + ! set and log namefile options + call this%set_namfile_options() + + ! Create utility objects + call budget_cr(this%budget, this%name) + + ! create model packages + call this%create_packages() + + end subroutine chf_cr + + !> @brief Handle namefile options + !! + !! Set pointers to IDM namefile options, then + !! create the list file and log options. + !< + subroutine set_namfile_options(this) + use SimVariablesModule, only: idm_context + use MemoryHelperModule, only: create_mem_path + use MemoryManagerExtModule, only: mem_set_value + use ChfNamInputModule, only: ChfNamParamFoundType + class(ChfModelType) :: this + type(ChfNamParamFoundType) :: found + character(len=LENMEMPATH) :: input_mempath + character(len=LINELENGTH) :: lst_fname + + ! set input model namfile memory path + input_mempath = create_mem_path(this%name, 'NAM', idm_context) + + ! copy option params from input context + call mem_set_value(lst_fname, 'LIST', input_mempath, found%list) + call mem_set_value(this%inewton, 'NEWTON', input_mempath, found%newton) + call mem_set_value(this%inewtonur, 'UNDER_RELAXATION', input_mempath, & + found%under_relaxation) + call mem_set_value(this%iprpak, 'PRINT_INPUT', input_mempath, & + found%print_input) + call mem_set_value(this%iprflow, 'PRINT_FLOWS', input_mempath, & + found%print_flows) + call mem_set_value(this%ipakcb, 'SAVE_FLOWS', input_mempath, found%save_flows) + + ! create the list file + call this%create_lstfile(lst_fname, this%filename, found%list, & + 'CHANNEL FLOW MODEL (CHF)') + + ! activate save_flows if found + if (found%save_flows) then + this%ipakcb = -1 + end if + + ! log set options + if (this%iout > 0) then + call this%log_namfile_options(found) + end if + + end subroutine set_namfile_options + + !> @brief Write model namfile options to list file + !< + subroutine log_namfile_options(this, found) + use ChfNamInputModule, only: ChfNamParamFoundType + class(ChfModelType) :: this + type(ChfNamParamFoundType), intent(in) :: found + + write (this%iout, '(1x,a)') 'BEGIN NAMEFILE OPTIONS' + + if (found%print_input) then + write (this%iout, '(4x,a)') 'STRESS PACKAGE INPUT WILL BE PRINTED '// & + 'FOR ALL MODEL STRESS PACKAGES' + end if + + if (found%print_flows) then + write (this%iout, '(4x,a)') 'PACKAGE FLOWS WILL BE PRINTED '// & + 'FOR ALL MODEL PACKAGES' + end if + + if (found%save_flows) then + write (this%iout, '(4x,a)') & + 'FLOWS WILL BE SAVED TO BUDGET FILE SPECIFIED IN OUTPUT CONTROL' + end if + + write (this%iout, '(1x,a)') 'END NAMEFILE OPTIONS' + + end subroutine log_namfile_options + +end module ChfModule diff --git a/src/Model/ModelUtilities/ModelPackageInput.f90 b/src/Model/ModelUtilities/ModelPackageInput.f90 index 9ff1ba3f855..be3d5bd50a9 100644 --- a/src/Model/ModelUtilities/ModelPackageInput.f90 +++ b/src/Model/ModelUtilities/ModelPackageInput.f90 @@ -10,14 +10,16 @@ module ModelPackageInputModule use SimVariablesModule, only: errmsg use ConstantsModule, only: LENFTYPE, LENPACKAGETYPE use SimModule, only: store_error, store_error_filename + use ChfModule, only: CHF_NBASEPKG, CHF_NMULTIPKG, & + CHF_BASEPKG, CHF_MULTIPKG + use GweModule, only: GWE_NBASEPKG, GWE_NMULTIPKG, & + GWE_BASEPKG, GWE_MULTIPKG use GwfModule, only: GWF_NBASEPKG, GWF_NMULTIPKG, & GWF_BASEPKG, GWF_MULTIPKG use GwtModule, only: GWT_NBASEPKG, GWT_NMULTIPKG, & GWT_BASEPKG, GWT_MULTIPKG - use GweModule, only: GWE_NBASEPKG, GWE_NMULTIPKG, & - GWE_BASEPKG, GWE_MULTIPKG - use SwfModule, only: SWF_NBASEPKG, SWF_NMULTIPKG, & - SWF_BASEPKG, SWF_MULTIPKG + use OlfModule, only: OLF_NBASEPKG, OLF_NMULTIPKG, & + OLF_BASEPKG, OLF_MULTIPKG use PrtModule, only: PRT_NBASEPKG, PRT_NMULTIPKG, & PRT_BASEPKG, PRT_MULTIPKG @@ -46,6 +48,14 @@ subroutine supported_model_packages(mtype, pkgtypes, numpkgs) ! -- local ! select case (mtype) + case ('CHF6') + numpkgs = CHF_NBASEPKG + CHF_NMULTIPKG + allocate (pkgtypes(numpkgs)) + pkgtypes = [CHF_BASEPKG, CHF_MULTIPKG] + case ('GWE6') + numpkgs = GWE_NBASEPKG + GWE_NMULTIPKG + allocate (pkgtypes(numpkgs)) + pkgtypes = [GWE_BASEPKG, GWE_MULTIPKG] case ('GWF6') numpkgs = GWF_NBASEPKG + GWF_NMULTIPKG allocate (pkgtypes(numpkgs)) @@ -54,18 +64,14 @@ subroutine supported_model_packages(mtype, pkgtypes, numpkgs) numpkgs = GWT_NBASEPKG + GWT_NMULTIPKG allocate (pkgtypes(numpkgs)) pkgtypes = [GWT_BASEPKG, GWT_MULTIPKG] - case ('GWE6') - numpkgs = GWE_NBASEPKG + GWE_NMULTIPKG + case ('OLF6') + numpkgs = OLF_NBASEPKG + OLF_NMULTIPKG allocate (pkgtypes(numpkgs)) - pkgtypes = [GWE_BASEPKG, GWE_MULTIPKG] + pkgtypes = [OLF_BASEPKG, OLF_MULTIPKG] case ('PRT6') numpkgs = PRT_NBASEPKG + PRT_NMULTIPKG allocate (pkgtypes(numpkgs)) pkgtypes = [PRT_BASEPKG, PRT_MULTIPKG] - case ('SWF6') - numpkgs = SWF_NBASEPKG + SWF_NMULTIPKG - allocate (pkgtypes(numpkgs)) - pkgtypes = [SWF_BASEPKG, SWF_MULTIPKG] case default end select ! @@ -90,6 +96,22 @@ function multi_package_type(mtype_component, ptype_component, pkgtype) & multi_package = .false. ! select case (mtype_component) + case ('CHF') + do n = 1, CHF_NMULTIPKG + if (CHF_MULTIPKG(n) == pkgtype) then + multi_package = .true. + exit + end if + end do + ! + case ('GWE') + do n = 1, GWE_NMULTIPKG + if (GWE_MULTIPKG(n) == pkgtype) then + multi_package = .true. + exit + end if + end do + ! case ('GWF') do n = 1, GWF_NMULTIPKG if (GWF_MULTIPKG(n) == pkgtype) then @@ -106,9 +128,9 @@ function multi_package_type(mtype_component, ptype_component, pkgtype) & end if end do ! - case ('GWE') - do n = 1, GWE_NMULTIPKG - if (GWE_MULTIPKG(n) == pkgtype) then + case ('OLF') + do n = 1, OLF_NMULTIPKG + if (OLF_MULTIPKG(n) == pkgtype) then multi_package = .true. exit end if diff --git a/src/Model/OverlandFlow/olf.f90 b/src/Model/OverlandFlow/olf.f90 new file mode 100644 index 00000000000..23a5b19d99b --- /dev/null +++ b/src/Model/OverlandFlow/olf.f90 @@ -0,0 +1,156 @@ +!> @brief Channel Flow (OLF) Module +!< +module OlfModule + + use KindModule, only: I4B + use ConstantsModule, only: LENPACKAGETYPE, LENMEMPATH, LINELENGTH + use SimModule, only: store_error + use BaseModelModule, only: BaseModelType + use ListsModule, only: basemodellist + use BaseModelModule, only: AddBaseModelToList + use SwfModule, only: SwfModelType + use BudgetModule, only: budget_cr + + implicit none + + private + public :: olf_cr + public :: OlfModelType + public :: OLF_NBASEPKG, OLF_NMULTIPKG + public :: OLF_BASEPKG, OLF_MULTIPKG + + type, extends(SwfModelType) :: OlfModelType + contains + procedure :: set_namfile_options + procedure :: log_namfile_options + end type OlfModelType + + !> @brief OLF base package array descriptors + !! + !! OLF model base package types. Only listed packages are candidates + !< for input and these will be loaded in the order specified. + integer(I4B), parameter :: OLF_NBASEPKG = 7 + character(len=LENPACKAGETYPE), dimension(OLF_NBASEPKG) :: & + OLF_BASEPKG = ['DIS2D6 ', 'DISV2D6', 'DFW6 ', & + 'OC6 ', 'IC6 ', 'OBS6 ', & + 'STO6 '] + + !> @brief OLF multi package array descriptors + !! + !! OLF model multi-instance package types. Only listed packages are + !< candidates for input and these will be loaded in the order specified. + integer(I4B), parameter :: OLF_NMULTIPKG = 50 + character(len=LENPACKAGETYPE), dimension(OLF_NMULTIPKG) :: OLF_MULTIPKG + data OLF_MULTIPKG/'FLW6 ', 'CHD6 ', 'CDB6 ', 'ZDG6 ', ' ', & ! 5 + &45*' '/ ! 50 + + ! size of supported model package arrays + integer(I4B), parameter :: NIUNIT_OLF = OLF_NBASEPKG + OLF_NMULTIPKG + +contains + + !> @brief Create a new overland flow model object + !< + subroutine olf_cr(filename, id, modelname) + ! modules + ! dummy + character(len=*), intent(in) :: filename !< input file + integer(I4B), intent(in) :: id !< consecutive model number listed in mfsim.nam + character(len=*), intent(in) :: modelname !< name of the model + ! local + class(OlfModelType), pointer :: this + class(BaseModelType), pointer :: model + + ! Allocate a new model + allocate (this) + model => this + call AddBaseModelToList(basemodellist, model) + + ! call parent initialize routine + call this%initialize('OLF', filename, id, modelname) + + ! set and log namefile options + call this%set_namfile_options() + + ! Create utility objects + call budget_cr(this%budget, this%name) + + ! create model packages + call this%create_packages() + + end subroutine olf_cr + + !> @brief Handle namefile options + !! + !! Set pointers to IDM namefile options, then + !! create the list file and log options. + !< + subroutine set_namfile_options(this) + use SimVariablesModule, only: idm_context + use MemoryHelperModule, only: create_mem_path + use MemoryManagerExtModule, only: mem_set_value + use OlfNamInputModule, only: OlfNamParamFoundType + class(OlfModelType) :: this + type(OlfNamParamFoundType) :: found + character(len=LENMEMPATH) :: input_mempath + character(len=LINELENGTH) :: lst_fname + + ! set input model namfile memory path + input_mempath = create_mem_path(this%name, 'NAM', idm_context) + + ! copy option params from input context + call mem_set_value(lst_fname, 'LIST', input_mempath, found%list) + call mem_set_value(this%inewton, 'NEWTON', input_mempath, found%newton) + call mem_set_value(this%inewtonur, 'UNDER_RELAXATION', input_mempath, & + found%under_relaxation) + call mem_set_value(this%iprpak, 'PRINT_INPUT', input_mempath, & + found%print_input) + call mem_set_value(this%iprflow, 'PRINT_FLOWS', input_mempath, & + found%print_flows) + call mem_set_value(this%ipakcb, 'SAVE_FLOWS', input_mempath, found%save_flows) + + ! create the list file + call this%create_lstfile(lst_fname, this%filename, found%list, & + 'CHANNEL FLOW MODEL (OLF)') + + ! activate save_flows if found + if (found%save_flows) then + this%ipakcb = -1 + end if + + ! log set options + if (this%iout > 0) then + call this%log_namfile_options(found) + end if + + end subroutine set_namfile_options + + !> @brief Write model namfile options to list file + !< + subroutine log_namfile_options(this, found) + use OlfNamInputModule, only: OlfNamParamFoundType + class(OlfModelType) :: this + type(OlfNamParamFoundType), intent(in) :: found + + write (this%iout, '(1x,a)') 'BEGIN NAMEFILE OPTIONS' + + if (found%print_input) then + write (this%iout, '(4x,a)') 'STRESS PACKAGE INPUT WILL BE PRINTED '// & + 'FOR ALL MODEL STRESS PACKAGES' + end if + + if (found%print_flows) then + write (this%iout, '(4x,a)') 'PACKAGE FLOWS WILL BE PRINTED '// & + 'FOR ALL MODEL PACKAGES' + end if + + if (found%save_flows) then + write (this%iout, '(4x,a)') & + 'FLOWS WILL BE SAVED TO BUDGET FILE SPECIFIED IN OUTPUT CONTROL' + end if + + write (this%iout, '(1x,a)') 'END NAMEFILE OPTIONS' + + end subroutine log_namfile_options + +end module OlfModule diff --git a/src/Model/SurfaceWaterFlow/swf-dfw.f90 b/src/Model/SurfaceWaterFlow/swf-dfw.f90 index 3cefc1cff7b..e14c7fe4fa6 100644 --- a/src/Model/SurfaceWaterFlow/swf-dfw.f90 +++ b/src/Model/SurfaceWaterFlow/swf-dfw.f90 @@ -1,9 +1,7 @@ !> @brief Stream Network Flow (SWF) Diffusive Wave (DFW) Module !! !! This module solves one-dimensional flow routing using a diffusive -!! wave approach. -!! -!< +!< wave approach. module SwfDfwModule use KindModule, only: DP, I4B, LGP @@ -31,7 +29,7 @@ module SwfDfwModule type, extends(NumericalPackageType) :: SwfDfwType - ! -- user-provided input + ! user-provided input integer(I4B), pointer :: is2d => null() !< flag to indicate this model is 2D overland flow and not 1d channel flow integer(I4B), pointer :: icentral => null() !< flag to use central in space weighting (default is upstream weighting) integer(I4B), pointer :: iswrcond => null() !< flag to activate the dev SWR conductance formulation @@ -57,11 +55,11 @@ module SwfDfwModule real(DP), dimension(:), pointer, contiguous :: grad_dhds_mag => null() !< magnitude of the gradient (of size nodes) real(DP), dimension(:), pointer, contiguous :: dhdsja => null() !< gradient for each connection (of size njas) - ! -- observation data + ! observation data integer(I4B), pointer :: inobspkg => null() !< unit number for obs package type(ObsType), pointer :: obs => null() !< observation package - ! -- pointer to cross section data + ! pointer to cross section data type(SwfCxsType), pointer :: cxs contains @@ -110,68 +108,66 @@ module SwfDfwModule !< subroutine dfw_cr(dfwobj, name_model, input_mempath, inunit, iout, & cxs) - ! -- modules + ! modules use MemoryManagerExtModule, only: mem_set_value - ! -- dummy - type(SwfDfwType), pointer :: dfwobj - character(len=*), intent(in) :: name_model - character(len=*), intent(in) :: input_mempath - integer(I4B), intent(in) :: inunit - integer(I4B), intent(in) :: iout + ! dummy + type(SwfDfwType), pointer :: dfwobj !< object to create + character(len=*), intent(in) :: name_model !< name of the SWF model + character(len=*), intent(in) :: input_mempath !< memory path + integer(I4B), intent(in) :: inunit !< flag to indicate if package is active + integer(I4B), intent(in) :: iout !< unit number for output type(SwfCxsType), pointer, intent(in) :: cxs !< the pointer to the cxs package - ! -- locals + ! locals logical(LGP) :: found_fname - ! -- formats + ! formats character(len=*), parameter :: fmtheader = & "(1x, /1x, 'DFW -- DIFFUSIVE WAVE (DFW) PACKAGE, VERSION 1, 9/25/2023', & &' INPUT READ FROM MEMPATH: ', A, /)" ! - ! -- Create the object + ! Create the object allocate (dfwobj) - ! -- create name and memory path + ! create name and memory path call dfwobj%set_names(1, name_model, 'DFW', 'DFW') - ! -- Allocate scalars + ! Allocate scalars call dfwobj%allocate_scalars() - ! -- Set variables + ! Set variables dfwobj%input_mempath = input_mempath dfwobj%inunit = inunit dfwobj%iout = iout - ! -- set name of input file + ! set name of input file call mem_set_value(dfwobj%input_fname, 'INPUT_FNAME', dfwobj%input_mempath, & found_fname) - ! -- Set a pointers to passed in objects + ! Set a pointers to passed in objects dfwobj%cxs => cxs - ! -- create obs package + ! create obs package call obs_cr(dfwobj%obs, dfwobj%inobspkg) - ! -- check if dfw is enabled + ! check if dfw is enabled if (inunit > 0) then - ! -- Print a message identifying the package. + ! Print a message identifying the package. write (iout, fmtheader) input_mempath end if - ! -- Return - return end subroutine dfw_cr !> @brief load data from IDM to package !< subroutine dfw_df(this, dis) - ! -- dummy - class(SwfDfwType) :: this + ! dummy + class(SwfDfwType) :: this !< this instance class(DisBaseType), pointer, intent(inout) :: dis !< the pointer to the discretization - ! -- locals + ! locals character(len=10) :: distype = '' - ! -- Set a pointers to passed in objects + ! Set a pointers to passed in objects this%dis => dis ! Set the distype (either DISV1D or DIS2D) @@ -183,14 +179,14 @@ subroutine dfw_df(this, dis) this%is2d = 1 end if - ! -- check if dfw is enabled + ! check if dfw is enabled ! this will need to become if (.not. present(dfw_options)) then !if (inunit > 0) then - ! -- allocate arrays + ! allocate arrays call this%allocate_arrays() - ! -- load dfw + ! load dfw call this%dfw_load() !end if @@ -204,14 +200,14 @@ end subroutine dfw_df !! !< subroutine allocate_scalars(this) - ! -- modules - ! -- dummy - class(SwfDfwtype) :: this + ! modules + ! dummy + class(SwfDfwtype) :: this !< this instance ! - ! -- allocate scalars in NumericalPackageType + ! allocate scalars in NumericalPackageType call this%NumericalPackageType%allocate_scalars() ! - ! -- Allocate scalars + ! Allocate scalars call mem_allocate(this%is2d, 'IS2D', this%memoryPath) call mem_allocate(this%icentral, 'ICENTRAL', this%memoryPath) call mem_allocate(this%iswrcond, 'ISWRCOND', this%memoryPath) @@ -236,14 +232,13 @@ subroutine allocate_scalars(this) this%nedges = 0 this%lastedge = 0 - return end subroutine allocate_scalars !> @brief allocate memory for arrays !< subroutine allocate_arrays(this) ! dummy - class(SwfDfwType) :: this + class(SwfDfwType) :: this !< this instance ! locals integer(I4B) :: n ! @@ -284,43 +279,38 @@ subroutine allocate_arrays(this) end do end if - ! -- Return - return end subroutine allocate_arrays !> @brief load data from IDM to package !< subroutine dfw_load(this) - ! -- dummy - class(SwfDfwType) :: this - ! -- locals - ! - ! -- source input data + ! dummy + class(SwfDfwType) :: this !< this instance + + ! source input data call this%source_options() call this%source_griddata() - ! - ! -- Return - return + end subroutine dfw_load !> @brief Copy options from IDM into package !< subroutine source_options(this) - ! -- modules + ! modules use KindModule, only: LGP use InputOutputModule, only: getunit, openfile use MemoryManagerExtModule, only: mem_set_value use CharacterStringModule, only: CharacterStringType use SwfDfwInputModule, only: SwfDfwParamFoundType - ! -- dummy - class(SwfDfwType) :: this - ! -- locals + ! dummy + class(SwfDfwType) :: this !< this instance + ! locals integer(I4B) :: isize type(SwfDfwParamFoundType) :: found type(CharacterStringType), dimension(:), pointer, & contiguous :: obs6_fnames - ! - ! -- update defaults with idm sourced values + + ! update defaults with idm sourced values call mem_set_value(this%icentral, 'ICENTRAL', & this%input_mempath, found%icentral) call mem_set_value(this%iswrcond, 'ISWRCOND', & @@ -357,9 +347,9 @@ subroutine source_options(this) call store_error(errmsg) call store_error_filename(this%input_fname) end if - ! + call mem_setptr(obs6_fnames, 'OBS6_FILENAME', this%input_mempath) - ! + found%obs6_filename = .true. this%obs%inputFilename = obs6_fnames(1) this%obs%active = .true. @@ -369,21 +359,19 @@ subroutine source_options(this) call this%obs%obs_df(this%iout, this%packName, this%filtyp, this%dis) call this%dfw_df_obs() end if - ! - ! -- log values to list file + + ! log values to list file if (this%iout > 0) then call this%log_options(found) end if - ! - ! -- Return - return + end subroutine source_options !> @brief Write user options to list file !< subroutine log_options(this, found) use SwfDfwInputModule, only: SwfDfwParamFoundType - class(SwfDfwType) :: this + class(SwfDfwType) :: this !< this instance type(SwfDfwParamFoundType), intent(in) :: found write (this%iout, '(1x,a)') 'Setting DFW Options' @@ -435,33 +423,32 @@ end subroutine log_options !> @brief copy griddata from IDM to package !< subroutine source_griddata(this) - ! -- modules + ! modules use SimModule, only: count_errors, store_error use MemoryHelperModule, only: create_mem_path use MemoryManagerExtModule, only: mem_set_value use SimVariablesModule, only: idm_context use SwfDfwInputModule, only: SwfDfwParamFoundType - ! -- dummy - class(SwfDfwType) :: this - ! -- locals + ! dummy + class(SwfDfwType) :: this !< this instance + ! locals character(len=LENMEMPATH) :: idmMemoryPath type(SwfDfwParamFoundType) :: found integer(I4B), dimension(:), pointer, contiguous :: map - ! -- formats - ! - ! -- set memory path + + ! set memory path idmMemoryPath = create_mem_path(this%name_model, 'DFW', idm_context) - ! - ! -- set map to convert user input data into reduced data + + ! set map to convert user input data into reduced data map => null() if (this%dis%nodes < this%dis%nodesuser) map => this%dis%nodeuser - ! - ! -- update defaults with idm sourced values + + ! update defaults with idm sourced values call mem_set_value(this%manningsn, 'MANNINGSN', & idmMemoryPath, map, found%manningsn) call mem_set_value(this%idcxs, 'IDCXS', idmMemoryPath, map, found%idcxs) - ! - ! -- ensure MANNINGSN was found + + ! ensure MANNINGSN was found if (.not. found%manningsn) then write (errmsg, '(a)') 'Error in GRIDDATA block: MANNINGSN not found.' call store_error(errmsg) @@ -471,20 +458,18 @@ subroutine source_griddata(this) call store_error_filename(this%input_fname) end if - ! -- log griddata + ! log griddata if (this%iout > 0) then call this%log_griddata(found) end if - ! - ! -- Return - return + end subroutine source_griddata !> @brief log griddata to list file !< subroutine log_griddata(this, found) use SwfDfwInputModule, only: SwfDfwParamFoundType - class(SwfDfwType) :: this + class(SwfDfwType) :: this !< this instance type(SwfDfwParamFoundType), intent(in) :: found write (this%iout, '(1x,a)') 'Setting DFW Griddata' @@ -504,10 +489,10 @@ subroutine log_griddata(this, found) end subroutine log_griddata subroutine write_cxs_tables(this) - ! -- modules - ! -- dummy + ! modules + ! dummy class(SwfDfwType) :: this !< this instance - ! -- local + ! local ! integer(I4B) :: idcxs ! integer(I4B) :: n @@ -524,8 +509,8 @@ end subroutine write_cxs_tables !> @brief allocate memory !< subroutine dfw_ar(this, ibound, hnew) - ! -- modules - ! -- dummy + ! modules + ! dummy class(SwfDfwType) :: this !< this instance integer(I4B), dimension(:), pointer, contiguous :: ibound !< model ibound array real(DP), dimension(:), pointer, contiguous, intent(inout) :: hnew !< pointer to model head array @@ -552,34 +537,29 @@ subroutine dfw_ar(this, ibound, hnew) ! observation data call this%obs%obs_ar() - return end subroutine dfw_ar !> @brief allocate memory !< subroutine dfw_rp(this) - ! -- modules - ! -- dummy + ! modules + ! dummy class(SwfDfwType) :: this !< this instance - ! - ! -- read observations + + ! read observations call this%dfw_rp_obs() - return + end subroutine dfw_rp !> @brief advance !< subroutine dfw_ad(this, irestore) - ! - class(SwfDfwType) :: this - integer(I4B), intent(in) :: irestore + class(SwfDfwType) :: this !< this instance + integer(I4B), intent(in) :: irestore !< ATS flag for retrying time step (1) or advancing (0) - ! -- Push simulated values to preceding time/subtime step + ! Push simulated values to preceding time/subtime step call this%obs%obs_ad() - ! - ! -- Return - return end subroutine dfw_ad !> @brief fill coefficients @@ -589,80 +569,75 @@ end subroutine dfw_ad !! !< subroutine dfw_fc(this, kiter, matrix_sln, idxglo, rhs, stage, stage_old) - ! -- modules - use ConstantsModule, only: DONE - ! -- dummy - class(SwfDfwType) :: this + ! modules + ! dummy + class(SwfDfwType) :: this !< this instance integer(I4B) :: kiter class(MatrixBaseType), pointer :: matrix_sln integer(I4B), intent(in), dimension(:) :: idxglo real(DP), intent(inout), dimension(:) :: rhs real(DP), intent(inout), dimension(:) :: stage real(DP), intent(inout), dimension(:) :: stage_old - ! -- local - ! + ! local + ! calculate dhds at cell center for 2d case if (this%is2d == 1) then call this%calc_dhds() end if - ! -- add qnm contributions to matrix equations + ! add qnm contributions to matrix equations call this%dfw_qnm_fc_nr(kiter, matrix_sln, idxglo, rhs, stage, stage_old) - ! - ! -- Return - return + end subroutine dfw_fc !> @brief fill coefficients !! - !! Add qnm contributions to matrix equations - !! - !< + !< Add qnm contributions to matrix equations subroutine dfw_qnm_fc_nr(this, kiter, matrix_sln, idxglo, rhs, stage, stage_old) - ! -- modules + ! modules use MathUtilModule, only: get_perturbation - ! -- dummy - class(SwfDfwType) :: this + ! dummy + class(SwfDfwType) :: this !< this instance integer(I4B) :: kiter class(MatrixBaseType), pointer :: matrix_sln integer(I4B), intent(in), dimension(:) :: idxglo real(DP), intent(inout), dimension(:) :: rhs real(DP), intent(inout), dimension(:) :: stage real(DP), intent(inout), dimension(:) :: stage_old - ! -- local + ! local integer(I4B) :: n, m, ii, idiag real(DP) :: qnm real(DP) :: qeps real(DP) :: eps real(DP) :: derv - ! - ! -- Calculate conductance and put into amat + + ! Calculate conductance and put into amat do n = 1, this%dis%nodes - ! - ! -- Find diagonal position for row n + + ! Find diagonal position for row n idiag = this%dis%con%ia(n) - ! - ! -- Loop through connections adding matrix terms + + ! Loop through connections adding matrix terms do ii = this%dis%con%ia(n) + 1, this%dis%con%ia(n + 1) - 1 - ! - ! -- skip for masked cells + + ! skip for masked cells if (this%dis%con%mask(ii) == 0) cycle - ! - ! -- connection variables + + ! connection variables m = this%dis%con%ja(ii) - ! - ! -- Fill the qnm term on the right-hand side + + ! Fill the qnm term on the right-hand side qnm = this%qcalc(n, m, stage(n), stage(m), ii) rhs(n) = rhs(n) - qnm - ! - ! -- Derivative calculation and fill of n terms + + ! Derivative calculation and fill of n terms eps = get_perturbation(stage(n)) qeps = this%qcalc(n, m, stage(n) + eps, stage(m), ii) derv = (qeps - qnm) / eps call matrix_sln%add_value_pos(idxglo(idiag), derv) rhs(n) = rhs(n) + derv * stage(n) - ! - ! -- Derivative calculation and fill of m terms + + ! Derivative calculation and fill of m terms eps = get_perturbation(stage(m)) qeps = this%qcalc(n, m, stage(n), stage(m) + eps, ii) derv = (qeps - qnm) / eps @@ -671,38 +646,38 @@ subroutine dfw_qnm_fc_nr(this, kiter, matrix_sln, idxglo, rhs, stage, stage_old) end do end do - ! - ! -- Return - return + end subroutine dfw_qnm_fc_nr + !> @brief fill newton + !< subroutine dfw_fn(this, kiter, matrix_sln, idxglo, rhs, stage) - ! -- dummy - class(SwfDfwType) :: this + ! dummy + class(SwfDfwType) :: this !< this instance integer(I4B) :: kiter class(MatrixBaseType), pointer :: matrix_sln integer(I4B), intent(in), dimension(:) :: idxglo real(DP), intent(inout), dimension(:) :: rhs real(DP), intent(inout), dimension(:) :: stage - ! -- local - ! - ! -- add newton terms to solution matrix - ! -- todo: add newton terms here instead? - ! - ! - ! -- Return - return + ! local + + ! add newton terms to solution matrix + ! todo: add newton terms here instead? + ! this routine is probably not necessary as method is fully newton + end subroutine dfw_fn + !> @brief calculate flow between cells n and m + !< function qcalc(this, n, m, stage_n, stage_m, ipos) result(qnm) - ! -- dummy - class(SwfDfwType) :: this + ! dummy + class(SwfDfwType) :: this !< this instance integer(I4B), intent(in) :: n !< number for cell n integer(I4B), intent(in) :: m !< number for cell m real(DP), intent(in) :: stage_n !< stage in reach n real(DP), intent(in) :: stage_m !< stage in reach m integer(I4B), intent(in) :: ipos !< connection number - ! -- local + ! local integer(I4B) :: isympos real(DP) :: qnm real(DP) :: cond @@ -729,14 +704,18 @@ function qcalc(this, n, m, stage_n, stage_m, ipos) result(qnm) ! calculate flow between n and m qnm = cond * (stage_m - stage_n) - return end function qcalc + !> @brief calculate effective conductance between cells n and m + !! + !! Calculate half-cell conductances for cell n and cell m and then use + !! harmonic averaging to calculate the effective conductance between the + !< two cells. function get_cond(this, n, m, ipos, stage_n, stage_m, cln, clm) result(cond) - ! -- modules + ! modules use SmoothingModule, only: sQuadratic - ! -- dummy - class(SwfDfwType) :: this + ! dummy + class(SwfDfwType) :: this !< this instance integer(I4B), intent(in) :: n !< number for cell n integer(I4B), intent(in) :: m !< number for cell m integer(I4B), intent(in) :: ipos !< connection number @@ -744,7 +723,7 @@ function get_cond(this, n, m, ipos, stage_n, stage_m, cln, clm) result(cond) real(DP), intent(in) :: stage_m !< stage in reach m real(DP), intent(in) :: cln !< distance from cell n to shared face with m real(DP), intent(in) :: clm !< distance from cell m to shared face with n - ! -- local + ! local real(DP) :: depth_n real(DP) :: depth_m real(DP) :: dhds_n @@ -766,7 +745,7 @@ function get_cond(this, n, m, ipos, stage_n, stage_m, cln, clm) result(cond) cond = DZERO if (length_nm > DPREC) then - ! -- Calculate depth in each reach + ! Calculate depth in each reach depth_n = stage_n - this%dis%bot(n) depth_m = stage_m - this%dis%bot(m) @@ -779,9 +758,9 @@ function get_cond(this, n, m, ipos, stage_n, stage_m, cln, clm) result(cond) dhds_m = this%grad_dhds_mag(m) end if - ! -- Assign upstream depth, if not central + ! Assign upstream depth, if not central if (this%icentral == 0) then - ! -- use upstream weighting + ! use upstream weighting if (stage_n > stage_m) then depth_m = depth_n else @@ -789,8 +768,8 @@ function get_cond(this, n, m, ipos, stage_n, stage_m, cln, clm) result(cond) end if end if - ! -- Calculate a smoothed depth that goes to zero over - ! the specified range + ! Calculate a smoothed depth that goes to zero over + ! the specified range call sQuadratic(depth_n, range, dydx, smooth_factor) depth_n = depth_n * smooth_factor call sQuadratic(depth_m, range, dydx, smooth_factor) @@ -799,14 +778,14 @@ function get_cond(this, n, m, ipos, stage_n, stage_m, cln, clm) result(cond) ! Get the flow widths for n and m from dis package call this%dis%get_flow_width(n, m, ipos, width_n, width_m) - ! -- Calculate half-cell conductance for reach - ! n and m + ! Calculate half-cell conductance for reach + ! n and m cn = this%get_cond_n(n, depth_n, cln, width_n, dhds_n) cm = this%get_cond_n(m, depth_m, clm, width_m, dhds_m) - ! -- Use harmonic mean to calculated weighted - ! conductance between the centers of reaches - ! n and m + ! Use harmonic mean to calculate weighted + ! conductance between the centers of reaches + ! n and m if ((cn + cm) > DPREC) then cond = cn * cm / (cn + cm) else @@ -817,22 +796,22 @@ function get_cond(this, n, m, ipos, stage_n, stage_m, cln, clm) result(cond) end function get_cond - !> @brief Calculate half reach conductance + !> @brief Calculate half cell conductance !! - !! Calculate half reach conductance for reach n + !! Calculate half-cell conductance for cell n !< using conveyance and Manning's equation function get_cond_n(this, n, depth, dx, width, dhds) result(c) - ! -- modules - ! -- dummy - class(SwfDfwType) :: this + ! modules + ! dummy + class(SwfDfwType) :: this !< this instance integer(I4B), intent(in) :: n !< reach number real(DP), intent(in) :: depth !< simulated depth (stage - elevation) in reach n for this iteration real(DP), intent(in) :: dx !< half-cell distance real(DP), intent(in) :: width !< width of the reach perpendicular to flow real(DP), intent(in) :: dhds !< gradient - ! -- return + ! return real(DP) :: c - ! -- local + ! local real(DP) :: rough real(DP) :: dhds_sqr real(DP) :: conveyance @@ -850,11 +829,17 @@ function get_cond_n(this, n, depth, dx, width, dhds) result(c) end function get_cond_n + !> @brief Calculate effective conductance for cells n and m using SWR method + !! + !! The SWR Process for MODFLOW uses average cell parameters from cell n and + !! m to calculate an effective conductance. This is different from the + !! default approach used in SWF, which uses harmonic averaging on two half- + !< cell conductances. function get_cond_swr(this, n, m, ipos, stage_n, stage_m, cln, clm) result(cond) - ! -- modules + ! modules use SmoothingModule, only: sQuadratic - ! -- dummy - class(SwfDfwType) :: this + ! dummy + class(SwfDfwType) :: this !< this instance integer(I4B), intent(in) :: n !< number for cell n integer(I4B), intent(in) :: m !< number for cell m integer(I4B), intent(in) :: ipos !< connection number @@ -862,7 +847,7 @@ function get_cond_swr(this, n, m, ipos, stage_n, stage_m, cln, clm) result(cond) real(DP), intent(in) :: stage_m !< stage in reach m real(DP), intent(in) :: cln !< distance from cell n to shared face with m real(DP), intent(in) :: clm !< distance from cell m to shared face with n - ! -- local + ! local real(DP) :: depth_n real(DP) :: depth_m real(DP) :: dhds_n @@ -891,13 +876,13 @@ function get_cond_swr(this, n, m, ipos, stage_n, stage_m, cln, clm) result(cond) cond = DZERO if (length_nm > DPREC) then - ! -- Calculate depth in each reach + ! Calculate depth in each reach depth_n = stage_n - this%dis%bot(n) depth_m = stage_m - this%dis%bot(m) - ! -- Assign upstream depth, if not central + ! Assign upstream depth, if not central if (this%icentral == 0) then - ! -- use upstream weighting + ! use upstream weighting if (stage_n > stage_m) then depth_m = depth_n else @@ -905,7 +890,7 @@ function get_cond_swr(this, n, m, ipos, stage_n, stage_m, cln, clm) result(cond) end if end if - ! -- Calculate a smoothed depth that goes to zero over + ! Calculate a smoothed depth that goes to zero over ! the specified range call sQuadratic(depth_n, range, dydx, smooth_factor) depth_n = depth_n * smooth_factor @@ -972,14 +957,13 @@ end function get_cond_swr !! Calculate an average flow area between cell n and m. !! First calculate a flow area for cell n and then for !! cell m and linearly weight the areas using the connection - !! distances. - !< + !< distances. function get_flow_area_nm(this, n, m, stage_n, stage_m, cln, clm, & ipos) result(area_avg) ! module use SmoothingModule, only: sQuadratic ! dummy - class(SwfDfwType) :: this + class(SwfDfwType) :: this !< this instance integer(I4B), intent(in) :: n integer(I4B), intent(in) :: m real(DP), intent(in) :: stage_n @@ -1007,9 +991,9 @@ function get_flow_area_nm(this, n, m, stage_n, stage_m, cln, clm, & depth_n = stage_n - this%dis%bot(n) depth_m = stage_m - this%dis%bot(m) - ! -- Assign upstream depth, if not central + ! Assign upstream depth, if not central if (this%icentral == 0) then - ! -- use upstream weighting + ! use upstream weighting if (stage_n > stage_m) then depth_m = depth_n else @@ -1017,8 +1001,8 @@ function get_flow_area_nm(this, n, m, stage_n, stage_m, cln, clm, & end if end if - ! -- Calculate a smoothed depth that goes to zero over - ! the specified range + ! Calculate a smoothed depth that goes to zero over + ! the specified range call sQuadratic(depth_n, range, dydx, smooth_factor) depth_n = depth_n * smooth_factor call sQuadratic(depth_m, range, dydx, smooth_factor) @@ -1039,11 +1023,17 @@ function get_flow_area_nm(this, n, m, stage_n, stage_m, cln, clm, & end function get_flow_area_nm + !> @brief Calculate average hydraulic gradient magnitude for each cell + !! + !! Go through each cell and calculate the average hydraulic gradient using + !! an xt3d-style gradient interpolation. This is used for 2D grids in the + !! calculation of an effective conductance. For 1D grids, gradients are + !< calculated between cell centers. subroutine calc_dhds(this) ! modules use VectorInterpolationModule, only: vector_interpolation_2d ! dummy - class(SwfDfwType) :: this + class(SwfDfwType) :: this !< this instance ! local integer(I4B) :: n integer(I4B) :: m @@ -1086,32 +1076,30 @@ end subroutine calc_dhds !> @ brief Newton under relaxation !! - !! If stage is below the bottom, then pull it up a bit - !! - !< + !< If stage is below the bottom, then pull it up a bit subroutine dfw_nur(this, neqmod, x, xtemp, dx, inewtonur, dxmax, locmax) - ! -- dummy - class(SwfDfwType) :: this - integer(I4B), intent(in) :: neqmod - real(DP), dimension(neqmod), intent(inout) :: x - real(DP), dimension(neqmod), intent(in) :: xtemp - real(DP), dimension(neqmod), intent(inout) :: dx - integer(I4B), intent(inout) :: inewtonur - real(DP), intent(inout) :: dxmax - integer(I4B), intent(inout) :: locmax - ! -- local + ! dummy + class(SwfDfwType) :: this !< this instance + integer(I4B), intent(in) :: neqmod !< number of equations + real(DP), dimension(neqmod), intent(inout) :: x !< dependent variable + real(DP), dimension(neqmod), intent(in) :: xtemp !< temporary dependent variable + real(DP), dimension(neqmod), intent(inout) :: dx !< change in dependent variable + integer(I4B), intent(inout) :: inewtonur !< flag to indication relaxation was applied + real(DP), intent(inout) :: dxmax !< max change in x + integer(I4B), intent(inout) :: locmax !< location of max change + ! local integer(I4B) :: n real(DP) :: botm real(DP) :: xx real(DP) :: dxx - ! - ! -- Newton-Raphson under-relaxation + + ! Newton-Raphson under-relaxation do n = 1, this%dis%nodes if (this%ibound(n) < 1) cycle if (this%icelltype(n) > 0) then botm = this%dis%bot(n) - ! -- only apply Newton-Raphson under-relaxation if - ! solution head is below the bottom of the model + ! only apply Newton-Raphson under-relaxation if + ! solution head is below the bottom of the model if (x(n) < botm) then inewtonur = 1 xx = xtemp(n) * (DONE - DP9) + botm * DP9 @@ -1125,22 +1113,21 @@ subroutine dfw_nur(this, neqmod, x, xtemp, dx, inewtonur, dxmax, locmax) end if end if end do - ! - ! -- return - return + end subroutine dfw_nur + !> @ brief Calculate flow for each connection and store in flowja + !< subroutine dfw_cq(this, stage, stage_old, flowja) - ! -- dummy - class(SwfDfwType) :: this - real(DP), intent(inout), dimension(:) :: stage - real(DP), intent(inout), dimension(:) :: stage_old - real(DP), intent(inout), dimension(:) :: flowja - ! -- local + ! dummy + class(SwfDfwType) :: this !< this instance + real(DP), intent(inout), dimension(:) :: stage !< calculated head + real(DP), intent(inout), dimension(:) :: stage_old !< calculated head from previous time step + real(DP), intent(inout), dimension(:) :: flowja !< vector of flows in CSR format + ! local integer(I4B) :: n, ipos, m real(DP) :: qnm - ! - ! + do n = 1, this%dis%nodes do ipos = this%dis%con%ia(n) + 1, this%dis%con%ia(n + 1) - 1 m = this%dis%con%ja(ipos) @@ -1151,46 +1138,35 @@ subroutine dfw_cq(this, stage, stage_old, flowja) end do end do - ! - ! -- Return - return end subroutine dfw_cq !> @ brief Model budget calculation for package - !! - !! Budget calculation for the DFW package components. Components include - !! external outflow - !! !< subroutine dfw_bd(this, isuppress_output, model_budget) - ! -- modules + ! modules use BudgetModule, only: BudgetType - ! -- dummy variables - class(SwfDfwType) :: this !< SwfDfwType object + ! dummy variables + class(SwfDfwType) :: this !< this instance integer(I4B), intent(in) :: isuppress_output !< flag to suppress model output type(BudgetType), intent(inout) :: model_budget !< model budget object - ! -- local variables - ! - ! -- Add any DFW budget terms - ! none - ! - ! -- return - return + + ! Add any DFW budget terms + ! none + end subroutine dfw_bd !> @ brief save flows for package !< subroutine dfw_save_model_flows(this, flowja, icbcfl, icbcun) - ! -- dummy - class(SwfDfwType) :: this - real(DP), dimension(:), intent(in) :: flowja - integer(I4B), intent(in) :: icbcfl - integer(I4B), intent(in) :: icbcun - ! -- local + ! dummy + class(SwfDfwType) :: this !< this instance + real(DP), dimension(:), intent(in) :: flowja !< vector of flows in CSR format + integer(I4B), intent(in) :: icbcfl !< flag to indicate if flows should be saved + integer(I4B), intent(in) :: icbcun !< unit number for flow output + ! local integer(I4B) :: ibinun - ! -- formats - ! - ! -- Set unit number for binary output + + ! Set unit number for binary output if (this%ipakcb < 0) then ibinun = icbcun elseif (this%ipakcb == 0) then @@ -1199,42 +1175,40 @@ subroutine dfw_save_model_flows(this, flowja, icbcfl, icbcun) ibinun = this%ipakcb end if if (icbcfl == 0) ibinun = 0 - ! - ! -- Write the face flows if requested + + ! Write the face flows if requested if (ibinun /= 0) then - ! - ! -- flowja + ! flowja call this%dis%record_connection_array(flowja, ibinun, this%iout) end if - ! - ! -- Calculate velocities at cell centers and write, if requested + + ! Calculate velocities at cell centers and write, if requested if (this%isavvelocity /= 0) then if (ibinun /= 0) call this%sav_velocity(ibinun) end if - ! - ! -- Return - return + end subroutine dfw_save_model_flows !> @ brief print flows for package !< subroutine dfw_print_model_flows(this, ibudfl, flowja) - ! -- modules + ! modules use TdisModule, only: kper, kstp use ConstantsModule, only: LENBIGLINE - ! -- dummy - class(SwfDfwType) :: this - integer(I4B), intent(in) :: ibudfl - real(DP), intent(inout), dimension(:) :: flowja - ! -- local + ! dummy + class(SwfDfwType) :: this !< this instance + integer(I4B), intent(in) :: ibudfl !< print flag + real(DP), intent(inout), dimension(:) :: flowja !< vector of flows in CSR format + ! local character(len=LENBIGLINE) :: line character(len=30) :: tempstr integer(I4B) :: n, ipos, m real(DP) :: qnm - ! -- formats + ! formats character(len=*), parameter :: fmtiprflow = & &"(/,4x,'CALCULATED INTERCELL FLOW FOR PERIOD ', i0, ' STEP ', i0)" - ! -- Write flowja to list file if requested + + ! Write flowja to list file if requested if (ibudfl /= 0 .and. this%iprflow > 0) then write (this%iout, fmtiprflow) kper, kstp do n = 1, this%dis%nodes @@ -1252,21 +1226,19 @@ subroutine dfw_print_model_flows(this, ibudfl, flowja) write (this%iout, '(a)') trim(line) end do end if - ! - ! -- Return - return + end subroutine dfw_print_model_flows !> @brief deallocate memory !< subroutine dfw_da(this) - ! -- modules + ! modules use MemoryManagerModule, only: mem_deallocate use MemoryManagerExtModule, only: memorystore_remove use SimVariablesModule, only: idm_context - ! -- dummy - class(SwfDfwType) :: this - ! + ! dummy + class(SwfDfwType) :: this !< this instance + ! Deallocate input memory call memorystore_remove(this%name_model, 'DFW', idm_context) @@ -1296,14 +1268,14 @@ subroutine dfw_da(this) call mem_deallocate(this%nedges) call mem_deallocate(this%lastedge) - ! -- obs package + ! obs package call mem_deallocate(this%inobspkg) call this%obs%obs_da() deallocate (this%obs) nullify (this%obs) nullify (this%cxs) - ! -- deallocate parent + ! deallocate parent call this%NumericalPackageType%da() ! pointers @@ -1312,14 +1284,15 @@ subroutine dfw_da(this) end subroutine dfw_da !> @brief Calculate the 3 components of velocity at the cell center + !! + !! todo: duplicated from NPF; should consolidate !< subroutine calc_velocity(this, flowja) - ! -- modules - use SimModule, only: store_error - ! -- dummy - class(SwfDfwType) :: this - real(DP), intent(in), dimension(:) :: flowja - ! -- local + ! modules + ! dummy + class(SwfDfwType) :: this !< this instance + real(DP), intent(in), dimension(:) :: flowja !< vector of flows in CSR format + ! local integer(I4B) :: n integer(I4B) :: m integer(I4B) :: ipos @@ -1361,34 +1334,34 @@ subroutine calc_velocity(this, flowja) real(DP), allocatable, dimension(:) :: bix real(DP), allocatable, dimension(:) :: biy logical :: nozee = .true. - ! - ! -- Ensure dis has necessary information - ! todo: do we need this? + + ! Ensure dis has necessary information + ! todo: do we need this for SWF? if (this%icalcvelocity /= 0 .and. this%dis%con%ianglex == 0) then call store_error('Error. ANGLDEGX not provided in '// & 'discretization file. ANGLDEGX required for '// & 'calculation of velocity.', terminate=.TRUE.) end if - ! - ! -- Find max number of connections and allocate weight arrays + + ! Find max number of connections and allocate weight arrays nc = 0 do n = 1, this%dis%nodes - ! - ! -- Count internal model connections + + ! Count internal model connections ic = this%dis%con%ia(n + 1) - this%dis%con%ia(n) - 1 - ! - ! -- Count edge connections + + ! Count edge connections do m = 1, this%nedges if (this%nodedge(m) == n) then ic = ic + 1 end if end do - ! - ! -- Set max number of connections for any cell + + ! Set max number of connections for any cell if (ic > nc) nc = ic end do - ! - ! -- Allocate storage arrays needed for cell-centered calculation + + ! Allocate storage arrays needed for cell-centered calculation allocate (vi(nc)) allocate (di(nc)) allocate (viz(nc)) @@ -1400,11 +1373,11 @@ subroutine calc_velocity(this, flowja) allocate (wiz(nc)) allocate (bix(nc)) allocate (biy(nc)) - ! - ! -- Go through each cell and calculate specific discharge + + ! Go through each cell and calculate specific discharge do n = 1, this%dis%nodes - ! - ! -- first calculate geometric properties for x and y directions and + + ! first calculate geometric properties for x and y directions and ! the specific discharge at a face (vi) ic = 0 iz = 0 @@ -1441,13 +1414,13 @@ subroutine calc_velocity(this, flowja) end if end do - ! - ! -- Look through edge flows that may have been provided by an exchange - ! and incorporate them into the averaging arrays + + ! Look through edge flows that may have been provided by an exchange + ! and incorporate them into the averaging arrays do m = 1, this%nedges if (this%nodedge(m) == n) then - ! - ! -- propsedge: (Q, area, nx, ny, distance) + + ! propsedge: (Q, area, nx, ny, distance) ihc = this%ihcedge(m) area = this%propsedge(2, m) @@ -1463,12 +1436,12 @@ subroutine calc_velocity(this, flowja) end if end do - ! - ! -- Assign number of vertical and horizontal connections + + ! Assign number of vertical and horizontal connections ncz = iz nc = ic - ! - ! -- calculate z weight (wiz) and z velocity + + ! calculate z weight (wiz) and z velocity if (ncz == 1) then wiz(1) = DONE else @@ -1492,8 +1465,8 @@ subroutine calc_velocity(this, flowja) do iz = 1, ncz vz = vz + wiz(iz) * viz(iz) end do - ! - ! -- distance-based weighting + + ! distance-based weighting nc = ic dsumx = DZERO dsumy = DZERO @@ -1504,19 +1477,19 @@ subroutine calc_velocity(this, flowja) dsumx = dsumx + wix(ic) dsumy = dsumy + wiy(ic) end do - ! - ! -- Finish computing omega weights. Add a tiny bit - ! to dsum so that the normalized omega weight later - ! evaluates to (essentially) 1 in the case of a single - ! relevant connection, avoiding 0/0. + + ! Finish computing omega weights. Add a tiny bit + ! to dsum so that the normalized omega weight later + ! evaluates to (essentially) 1 in the case of a single + ! relevant connection, avoiding 0/0. dsumx = dsumx + DEM10 * dsumx dsumy = dsumy + DEM10 * dsumy do ic = 1, nc wix(ic) = (dsumx - wix(ic)) * abs(nix(ic)) wiy(ic) = (dsumy - wiy(ic)) * abs(niy(ic)) end do - ! - ! -- compute B weights + + ! compute B weights dsumx = DZERO dsumy = DZERO do ic = 1, nc @@ -1535,14 +1508,14 @@ subroutine calc_velocity(this, flowja) axy = axy + bix(ic) * niy(ic) ayx = ayx + biy(ic) * nix(ic) end do - ! - ! -- Calculate specific discharge. The divide by zero checking below - ! is problematic for cells with only one flow, such as can happen - ! with triangular cells in corners. In this case, the resulting - ! cell velocity will be calculated as zero. The method should be - ! improved so that edge flows of zero are included in these - ! calculations. But this needs to be done with consideration for LGR - ! cases in which flows are submitted from an exchange. + + ! Calculate specific discharge. The divide by zero checking below + ! is problematic for cells with only one flow, such as can happen + ! with triangular cells in corners. In this case, the resulting + ! cell velocity will be calculated as zero. The method should be + ! improved so that edge flows of zero are included in these + ! calculations. But this needs to be done with consideration for LGR + ! cases in which flows are submitted from an exchange. vx = DZERO vy = DZERO do ic = 1, nc @@ -1554,15 +1527,15 @@ subroutine calc_velocity(this, flowja) vx = vx / denom vy = vy / denom end if - ! + this%vcomp(1, n) = vx this%vcomp(2, n) = vy this%vcomp(3, n) = vz this%vmag(n) = sqrt(vx**2 + vy**2 + vz**2) - ! + end do - ! - ! -- cleanup + + ! cleanup deallocate (vi) deallocate (di) deallocate (nix) @@ -1572,33 +1545,31 @@ subroutine calc_velocity(this, flowja) deallocate (wiz) deallocate (bix) deallocate (biy) - ! - ! -- Return - return + end subroutine calc_velocity !> @brief Reserve space for nedges cells that have an edge on them. !! - !! This must be called before the npf%allocate_arrays routine, which is - !! called from npf%ar. - !< + !! todo: duplicated from NPF; should consolidate + !! This must be called before the swf%allocate_arrays routine, which is + !< called from swf%ar. subroutine increase_edge_count(this, nedges) - ! -- dummy - class(SwfDfwType) :: this + ! dummy + class(SwfDfwType) :: this !< this instance integer(I4B), intent(in) :: nedges - ! + this%nedges = this%nedges + nedges - ! - ! -- Return - return + end subroutine increase_edge_count - !> @brief Provide the npf package with edge properties + !> @brief Provide the swf package with edge properties + !! + !! todo: duplicated from NPF; should consolidate !< subroutine set_edge_properties(this, nodedge, ihcedge, q, area, nx, ny, & distance) - ! -- dummy - class(SwfDfwType) :: this + ! dummy + class(SwfDfwType) :: this !< this instance integer(I4B), intent(in) :: nodedge integer(I4B), intent(in) :: ihcedge real(DP), intent(in) :: q @@ -1606,9 +1577,9 @@ subroutine set_edge_properties(this, nodedge, ihcedge, q, area, nx, ny, & real(DP), intent(in) :: nx real(DP), intent(in) :: ny real(DP), intent(in) :: distance - ! -- local + ! local integer(I4B) :: lastedge - ! + this%lastedge = this%lastedge + 1 lastedge = this%lastedge this%nodedge(lastedge) = nodedge @@ -1618,28 +1589,28 @@ subroutine set_edge_properties(this, nodedge, ihcedge, q, area, nx, ny, & this%propsedge(3, lastedge) = nx this%propsedge(4, lastedge) = ny this%propsedge(5, lastedge) = distance - ! - ! -- If this is the last edge, then the next call must be starting a new - ! edge properties assignment loop, so need to reset lastedge to 0 + + ! If this is the last edge, then the next call must be starting a new + ! edge properties assignment loop, so need to reset lastedge to 0 if (this%lastedge == this%nedges) this%lastedge = 0 - ! - ! -- Return - return + end subroutine set_edge_properties !> @brief Save specific discharge in binary format to ibinun + !! + !! todo: should write 2d velocity; what about for 1D channel? !< subroutine sav_velocity(this, ibinun) - ! -- dummy - class(SwfDfwType) :: this + ! dummy + class(SwfDfwType) :: this !< this instance integer(I4B), intent(in) :: ibinun - ! -- local + ! local character(len=16) :: text character(len=16), dimension(3) :: auxtxt integer(I4B) :: n integer(I4B) :: naux - ! - ! -- Write the header + + ! Write the header text = ' DATA-VCOMP' naux = 3 auxtxt(:) = [' vx', ' vy', ' vz'] @@ -1647,51 +1618,45 @@ subroutine sav_velocity(this, ibinun) this%packName, this%name_model, & this%packName, naux, auxtxt, ibinun, & this%dis%nodes, this%iout) - ! - ! -- Write a zero for Q, and then write qx, qy, qz as aux variables + + ! Write a zero for Q, and then write qx, qy, qz as aux variables do n = 1, this%dis%nodes call this%dis%record_mf6_list_entry(ibinun, n, n, DZERO, naux, & this%vcomp(:, n)) end do - ! - ! -- Return - return + end subroutine sav_velocity !> @brief Define the observation types available in the package !! - !! Method to define the observation types available in the package. - !! - !< + !< Method to define the observation types available in the package. subroutine dfw_df_obs(this) - ! -- dummy variables - class(SwfDfwType) :: this !< SwfDfwType object - ! -- local variables + ! dummy variables + class(SwfDfwType) :: this !< this instance + ! local variables integer(I4B) :: indx - ! - ! -- Store obs type and assign procedure pointer + + ! Store obs type and assign procedure pointer ! for ext-outflow observation type. call this%obs%StoreObsType('ext-outflow', .true., indx) this%obs%obsData(indx)%ProcessIdPtr => dfwobsidprocessor - ! - ! -- return - return + end subroutine dfw_df_obs subroutine dfwobsidprocessor(obsrv, dis, inunitobs, iout) - ! -- dummy + ! dummy type(ObserveType), intent(inout) :: obsrv class(DisBaseType), intent(in) :: dis integer(I4B), intent(in) :: inunitobs integer(I4B), intent(in) :: iout - ! -- local + ! local integer(I4B) :: n character(len=LINELENGTH) :: string - ! - ! -- Initialize variables + + ! Initialize variables string = obsrv%IDstring read (string, *) n - ! + if (n > 0) then obsrv%NodeNumber = n else @@ -1699,26 +1664,23 @@ subroutine dfwobsidprocessor(obsrv, dis, inunitobs, iout) call store_error(errmsg) call store_error_unit(inunitobs) end if - ! - return + end subroutine dfwobsidprocessor !> @brief Save observations for the package !! - !! Method to save simulated values for the package. - !! - !< + !< Method to save simulated values for the package. subroutine dfw_bd_obs(this) - ! -- dummy variables - class(SwfDfwType) :: this !< SwfDfwType object - ! -- local variables + ! dummy variables + class(SwfDfwType) :: this !< this instance + ! local variables integer(I4B) :: i integer(I4B) :: j integer(I4B) :: n real(DP) :: v character(len=100) :: msg type(ObserveType), pointer :: obsrv => null() - ! + ! Write simulated values for all observations if (this%obs%npakobs > 0) then call this%obs%obs_bd_clear() @@ -1735,42 +1697,37 @@ subroutine dfw_bd_obs(this) call this%obs%SaveOneSimval(obsrv, v) end do end do - ! - ! -- write summary of package error messages + + ! write summary of package error messages if (count_errors() > 0) then call store_error_filename(this%input_fname) end if end if - ! - ! -- return - return + end subroutine dfw_bd_obs !> @brief Read and prepare observations for a package !! - !! Method to read and prepare observations for a package. - !! - !< + !< Method to read and prepare observations for a package. subroutine dfw_rp_obs(this) - ! -- modules + ! modules use TdisModule, only: kper - ! -- dummy variables - class(SwfDfwType), intent(inout) :: this !< SwfDfwType object - ! -- local variables + ! dummy + class(SwfDfwType), intent(inout) :: this !< this instance + ! local integer(I4B) :: i integer(I4B) :: j integer(I4B) :: nn1 class(ObserveType), pointer :: obsrv => null() - ! -- formats - ! - ! -- process each package observation - ! only done the first stress period since boundaries are fixed - ! for the simulation + + ! process each package observation + ! only done the first stress period since boundaries are fixed + ! for the simulation if (kper == 1) then do i = 1, this%obs%npakobs obsrv => this%obs%pakobs(i)%obsrv - ! - ! -- get node number 1 + + ! get node number 1 nn1 = obsrv%NodeNumber if (nn1 < 1 .or. nn1 > this%dis%nodes) then write (errmsg, '(a,1x,a,1x,i0,1x,a,1x,i0,a)') & @@ -1786,8 +1743,8 @@ subroutine dfw_rp_obs(this) call store_error(errmsg) end if end if - ! - ! -- check that node number 1 is valid; call store_error if not + + ! check that node number 1 is valid; call store_error if not do j = 1, obsrv%indxbnds_count nn1 = obsrv%indxbnds(j) if (nn1 < 1 .or. nn1 > this%dis%nodes) then @@ -1799,15 +1756,14 @@ subroutine dfw_rp_obs(this) end if end do end do - ! - ! -- evaluate if there are any observation errors + + ! evaluate if there are any observation errors if (count_errors() > 0) then call store_error_filename(this%input_fname) end if + end if - ! - ! -- return - return + end subroutine dfw_rp_obs end module SwfDfwModule diff --git a/src/Model/SurfaceWaterFlow/swf.f90 b/src/Model/SurfaceWaterFlow/swf.f90 index b67afd2d300..178b2bfb138 100644 --- a/src/Model/SurfaceWaterFlow/swf.f90 +++ b/src/Model/SurfaceWaterFlow/swf.f90 @@ -23,12 +23,9 @@ module SwfModule implicit none private - public :: swf_cr public :: SwfModelType - public :: SWF_NBASEPKG, SWF_NMULTIPKG - public :: SWF_BASEPKG, SWF_MULTIPKG - type, extends(NumericalModelType) :: SwfModelType + type, abstract, extends(NumericalModelType) :: SwfModelType type(SwfIcType), pointer :: ic => null() ! initial conditions package type(SwfDfwType), pointer :: dfw => null() !< diffusive wave package type(SwfCxsType), pointer :: cxs => null() !< cross section package @@ -45,6 +42,7 @@ module SwfModule integer(I4B), pointer :: iss => null() ! steady state flag integer(I4B), pointer :: inewtonur => null() ! newton under relaxation flag contains + procedure :: initialize procedure :: allocate_scalars procedure :: allocate_arrays procedure :: model_df => swf_df @@ -68,109 +66,45 @@ module SwfModule procedure :: package_create procedure :: ftype_check procedure :: get_iasym => swf_get_iasym - procedure, private :: create_packages + procedure :: create_packages procedure, private :: create_bndpkgs - procedure, private :: log_namfile_options + !procedure :: log_namfile_options procedure, private :: steady_period_check end type SwfModelType - !> @brief SWF base package array descriptors - !! - !! SWF model base package types. Only listed packages are candidates - !< for input and these will be loaded in the order specified. + ! todo: these should be removed and entirely delegated to CHF and OLF integer(I4B), parameter :: SWF_NBASEPKG = 9 - character(len=LENPACKAGETYPE), dimension(SWF_NBASEPKG) :: & - SWF_BASEPKG = ['DISV1D6', 'DIS2D6 ', 'DISV2D6', & - 'DFW6 ', 'CXS6 ', 'OC6 ', & - 'IC6 ', 'OBS6 ', 'STO6 '] - - !> @brief SWF multi package array descriptors - !! - !! SWF model multi-instance package types. Only listed packages are - !< candidates for input and these will be loaded in the order specified. integer(I4B), parameter :: SWF_NMULTIPKG = 50 - character(len=LENPACKAGETYPE), dimension(SWF_NMULTIPKG) :: SWF_MULTIPKG - data SWF_MULTIPKG/'FLW6 ', 'CHD6 ', 'CDB6 ', 'ZDG6 ', ' ', & ! 5 - &45*' '/ ! 50 - - ! size of supported model package arrays integer(I4B), parameter :: NIUNIT_SWF = SWF_NBASEPKG + SWF_NMULTIPKG contains - !> @brief Create a new surface water flow model object + !> @brief Initialize common swf members !< - subroutine swf_cr(filename, id, modelname) + subroutine initialize(this, modelftype, filename, id, modelname) ! modules - use ListsModule, only: basemodellist - use BaseModelModule, only: AddBaseModelToList use MemoryHelperModule, only: create_mem_path - use MemoryManagerExtModule, only: mem_set_value - use SimVariablesModule, only: idm_context - use SwfNamInputModule, only: SwfNamParamFoundType - use BudgetModule, only: budget_cr ! dummy + class(SwfModelType) :: this + character(len=*), intent(in) :: modelftype !< abbreviation for model type (CHF or OLF) character(len=*), intent(in) :: filename !< input file integer(I4B), intent(in) :: id !< consecutive model number listed in mfsim.nam character(len=*), intent(in) :: modelname !< name of the model ! local - type(SwfModelType), pointer :: this - class(BaseModelType), pointer :: model - character(len=LENMEMPATH) :: input_mempath - character(len=LINELENGTH) :: lst_fname - type(SwfNamParamFoundType) :: found - - ! Allocate a new model (this) and add it to basemodellist - allocate (this) ! Set memory path before allocation in memory manager can be done this%memoryPath = create_mem_path(modelname) + ! allocate scalars call this%allocate_scalars(modelname) - model => this - call AddBaseModelToList(basemodellist, model) ! Assign values this%filename = filename this%name = modelname - this%macronym = 'SWF' + this%macronym = trim(modelftype) this%id = id - ! set input model namfile memory path - input_mempath = create_mem_path(modelname, 'NAM', idm_context) - - ! copy option params from input context - call mem_set_value(lst_fname, 'LIST', input_mempath, found%list) - call mem_set_value(this%inewton, 'NEWTON', input_mempath, found%newton) - call mem_set_value(this%inewtonur, 'UNDER_RELAXATION', input_mempath, & - found%under_relaxation) - call mem_set_value(this%iprpak, 'PRINT_INPUT', input_mempath, & - found%print_input) - call mem_set_value(this%iprflow, 'PRINT_FLOWS', input_mempath, & - found%print_flows) - call mem_set_value(this%ipakcb, 'SAVE_FLOWS', input_mempath, found%save_flows) - - ! create the list file - call this%create_lstfile(lst_fname, filename, found%list, & - 'SURFACE WATER FLOW MODEL (SWF)') - - ! activate save_flows if found - if (found%save_flows) then - this%ipakcb = -1 - end if - - ! log set options - if (this%iout > 0) then - call this%log_namfile_options(found) - end if - - ! Create utility objects - call budget_cr(this%budget, this%name) - - ! create model packages - call this%create_packages() - - end subroutine swf_cr + end subroutine initialize !> @brief Allocate memory for scalar members !< @@ -982,8 +916,18 @@ subroutine ftype_check(this, indis) 'DFW6 Package must be specified.' call store_error(errmsg) end if + if (this%incxs > 0) then + if (this%dis%ndim /= 1) then + write (errmsg, '(1x,a)') & + 'CXS6 Package can only be used for one-dimensional discretization & + &package (DISV1D). Remove CXS6 Package from model or convert & + &discretization package to DISV1D.' + call store_error(errmsg) + end if + end if if (count_errors() > 0) then - write (errmsg, '(a)') 'One or more required package(s) not specified.' + write (errmsg, '(a)') 'One or more required package(s) not specified & + &and/or there are package incompatibilities.' call store_error(errmsg) call store_error_filename(this%filename) end if @@ -1164,34 +1108,6 @@ subroutine create_packages(this) end subroutine create_packages - !> @brief Write model namfile options to list file - !< - subroutine log_namfile_options(this, found) - use SwfNamInputModule, only: SwfNamParamFoundType - class(SwfModelType) :: this - type(SwfNamParamFoundType), intent(in) :: found - - write (this%iout, '(1x,a)') 'NAMEFILE OPTIONS:' - - if (found%print_input) then - write (this%iout, '(4x,a)') 'STRESS PACKAGE INPUT WILL BE PRINTED '// & - 'FOR ALL MODEL STRESS PACKAGES' - end if - - if (found%print_flows) then - write (this%iout, '(4x,a)') 'PACKAGE FLOWS WILL BE PRINTED '// & - 'FOR ALL MODEL PACKAGES' - end if - - if (found%save_flows) then - write (this%iout, '(4x,a)') & - 'FLOWS WILL BE SAVED TO BUDGET FILE SPECIFIED IN OUTPUT CONTROL' - end if - - write (this%iout, '(1x,a)') 'END NAMEFILE OPTIONS:' - - end subroutine log_namfile_options - !> @brief Check for steady state period !! !! Write warning message if steady state diff --git a/src/SimulationCreate.f90 b/src/SimulationCreate.f90 index 33993be2fca..22eb27db4f9 100644 --- a/src/SimulationCreate.f90 +++ b/src/SimulationCreate.f90 @@ -212,10 +212,11 @@ subroutine models_create() use MemoryManagerModule, only: mem_setptr, mem_allocate use SimVariablesModule, only: idm_context, errmsg use DistributedSimModule, only: DistributedSimType, get_dsim + use ChfModule, only: chf_cr use GwfModule, only: gwf_cr use GwtModule, only: gwt_cr use GweModule, only: gwe_cr - use SwfModule, only: swf_cr + use OlfModule, only: olf_cr use PrtModule, only: prt_cr use NumericalModelModule, only: NumericalModelType, GetNumericalModelFromList use VirtualGwfModelModule, only: add_virtual_gwf_model @@ -309,13 +310,24 @@ subroutine models_create() model_loc_idx(n) = im end if call add_virtual_gwe_model(n, model_names(n), num_model) - case ('SWF6') + case ('CHF6') if (model_ranks(n) == proc_id) then im = im + 1 write (iout, '(4x,2a,i0,a)') trim(model_type), " model ", & n, " will be created" - call swf_cr(fname, n, model_names(n)) - call dev_feature('SWF is still under development, install the & + call chf_cr(fname, n, model_names(n)) + call dev_feature('CHF is still under development, install the & + &nightly build or compile from source with IDEVELOPMODE = 1.') + num_model => GetNumericalModelFromList(basemodellist, im) + model_loc_idx(n) = im + end if + case ('OLF6') + if (model_ranks(n) == proc_id) then + im = im + 1 + write (iout, '(4x,2a,i0,a)') trim(model_type), " model ", & + n, " will be created" + call olf_cr(fname, n, model_names(n)) + call dev_feature('OLF is still under development, install the & &nightly build or compile from source with IDEVELOPMODE = 1.') num_model => GetNumericalModelFromList(basemodellist, im) model_loc_idx(n) = im @@ -355,13 +367,14 @@ subroutine exchanges_create() use MemoryHelperModule, only: create_mem_path use MemoryManagerModule, only: mem_setptr use SimVariablesModule, only: idm_context + use ChfGwfExchangeModule, only: chfgwf_cr use GwfGwfExchangeModule, only: gwfexchange_create use GwfGwtExchangeModule, only: gwfgwt_cr use GwfGweExchangeModule, only: gwfgwe_cr use GwfPrtExchangeModule, only: gwfprt_cr use GwtGwtExchangeModule, only: gwtexchange_create use GweGweExchangeModule, only: gweexchange_create - use SwfGwfExchangeModule, only: swfgwf_cr + use OlfGwfExchangeModule, only: olfgwf_cr use VirtualGwfExchangeModule, only: add_virtual_gwf_exchange use VirtualGwtExchangeModule, only: add_virtual_gwt_exchange use VirtualGweExchangeModule, only: add_virtual_gwe_exchange @@ -445,6 +458,11 @@ subroutine exchanges_create() end if select case (exgtype) + case ('CHF6-GWF6') + write (exg_name, '(a,i0)') 'CHF-GWF_', exg_id + if (both_local) then + call chfgwf_cr(fname, exg_name, exg_id, m1_id, m2_id, exg_mempath) + end if case ('GWF6-GWF6') write (exg_name, '(a,i0)') 'GWF-GWF_', exg_id if (.not. both_remote) then @@ -476,10 +494,10 @@ subroutine exchanges_create() exg_mempath) end if call add_virtual_gwe_exchange(exg_name, exg_id, m1_id, m2_id) - case ('SWF6-GWF6') - write (exg_name, '(a,i0)') 'SWF-GWF_', exg_id + case ('OLF6-GWF6') + write (exg_name, '(a,i0)') 'OLF-GWF_', exg_id if (both_local) then - call swfgwf_cr(fname, exg_name, exg_id, m1_id, m2_id, exg_mempath) + call olfgwf_cr(fname, exg_name, exg_id, m1_id, m2_id, exg_mempath) end if case default write (errmsg, '(a,a)') & diff --git a/src/meson.build b/src/meson.build index 721cba6bb34..2bad8af850e 100644 --- a/src/meson.build +++ b/src/meson.build @@ -33,20 +33,23 @@ modflow_sources = files( 'Exchange' / 'GhostNode.f90', 'Exchange' / 'GwfExchangeMover.f90', 'Exchange' / 'NumericalExchange.f90', + 'Exchange' / 'exg-chfgwf.f90', 'Exchange' / 'exg-gwfgwf.f90', 'Exchange' / 'exg-gwfgwt.f90', 'Exchange' / 'exg-gwtgwt.f90', 'Exchange' / 'exg-gwfgwe.f90', 'Exchange' / 'exg-gwegwe.f90', - 'Exchange' / 'exg-swfgwf.f90', 'Exchange' / 'exg-gwfprt.f90', + 'Exchange' / 'exg-olfgwf.f90', + 'Exchange' / 'exg-swfgwf.f90', + 'Idm' / 'exg-chfgwfidm.f90', 'Idm' / 'exg-gwfgwfidm.f90', 'Idm' / 'exg-gwfgwtidm.f90', 'Idm' / 'exg-gwtgwtidm.f90', 'Idm' / 'exg-gwfgweidm.f90', 'Idm' / 'exg-gwegweidm.f90', - 'Idm' / 'exg-swfgwfidm.f90', 'Idm' / 'exg-gwfprtidm.f90', + 'Idm' / 'exg-olfgwfidm.f90', 'Idm' / 'gwe-cndidm.f90', 'Idm' / 'gwe-ctpidm.f90', 'Idm' / 'gwe-disidm.f90', @@ -89,6 +92,30 @@ modflow_sources = files( 'Idm' / 'swf-cdbidm.f90', 'Idm' / 'swf-stoidm.f90', 'Idm' / 'swf-zdgidm.f90', + 'Idm' / 'chf-disv1didm.f90', + 'Idm' / 'chf-dis2didm.f90', + 'Idm' / 'chf-disv2didm.f90', + 'Idm' / 'chf-namidm.f90', + 'Idm' / 'chf-cxsidm.f90', + 'Idm' / 'chf-dfwidm.f90', + 'Idm' / 'chf-icidm.f90', + 'Idm' / 'chf-flwidm.f90', + 'Idm' / 'chf-chdidm.f90', + 'Idm' / 'chf-cdbidm.f90', + 'Idm' / 'chf-stoidm.f90', + 'Idm' / 'chf-zdgidm.f90', + 'Idm' / 'olf-disv1didm.f90', + 'Idm' / 'olf-dis2didm.f90', + 'Idm' / 'olf-disv2didm.f90', + 'Idm' / 'olf-namidm.f90', + 'Idm' / 'olf-cxsidm.f90', + 'Idm' / 'olf-dfwidm.f90', + 'Idm' / 'olf-icidm.f90', + 'Idm' / 'olf-flwidm.f90', + 'Idm' / 'olf-chdidm.f90', + 'Idm' / 'olf-cdbidm.f90', + 'Idm' / 'olf-stoidm.f90', + 'Idm' / 'olf-zdgidm.f90', 'Idm' / 'sim-namidm.f90', 'Idm' / 'sim-tdisidm.f90', 'Idm' / 'prt-namidm.f90', @@ -102,10 +129,13 @@ modflow_sources = files( 'Idm' / 'selector' / 'IdmGweDfnSelector.f90', 'Idm' / 'selector' / 'IdmGwfDfnSelector.f90', 'Idm' / 'selector' / 'IdmGwtDfnSelector.f90', + 'Idm' / 'selector' / 'IdmChfDfnSelector.f90', 'Idm' / 'selector' / 'IdmSwfDfnSelector.f90', + 'Idm' / 'selector' / 'IdmOlfDfnSelector.f90', 'Idm' / 'selector' / 'IdmPrtDfnSelector.f90', 'Idm' / 'selector' / 'IdmSimDfnSelector.f90', 'Idm' / 'selector' / 'IdmUtlDfnSelector.f90', + 'Model' / 'ChannelFlow' / 'chf.f90', 'Model' / 'Connection' / 'ConnectionBuilder.f90', 'Model' / 'Connection' / 'CellWithNbrs.f90', 'Model' / 'Connection' / 'CsrUtils.f90', @@ -175,6 +205,7 @@ modflow_sources = files( 'Model' / 'GroundWaterTransport' / 'gwt-sft.f90', 'Model' / 'GroundWaterTransport' / 'gwt-src.f90', 'Model' / 'GroundWaterTransport' / 'gwt-uzt.f90', + 'Model' / 'OverlandFlow' / 'olf.f90', 'Model' / 'SurfaceWaterFlow' / 'swf.f90', 'Model' / 'SurfaceWaterFlow' / 'swf-cxs.f90', 'Model' / 'SurfaceWaterFlow' / 'swf-dfw.f90', diff --git a/utils/idmloader/dfns.txt b/utils/idmloader/dfns.txt index e547a7cff8d..2145fce29df 100644 --- a/utils/idmloader/dfns.txt +++ b/utils/idmloader/dfns.txt @@ -42,7 +42,35 @@ gwe-disv.dfn gwe-disu.dfn gwe-dis.dfn -# swf model +# chf model +chf-nam.dfn +chf-disv1d.dfn +chf-dis2d.dfn +chf-disv2d.dfn +chf-cxs.dfn +chf-dfw.dfn +chf-ic.dfn +chf-cdb.dfn +chf-chd.dfn +chf-flw.dfn +chf-sto.dfn +chf-zdg.dfn + +# olf model +olf-nam.dfn +olf-disv1d.dfn +olf-dis2d.dfn +olf-disv2d.dfn +olf-cxs.dfn +olf-dfw.dfn +olf-ic.dfn +olf-cdb.dfn +olf-chd.dfn +olf-flw.dfn +olf-sto.dfn +olf-zdg.dfn + +# olf model swf-nam.dfn swf-disv1d.dfn swf-dis2d.dfn @@ -63,13 +91,14 @@ prt-disv.dfn prt-mip.dfn # exchanges +exg-chfgwf.dfn exg-gwfgwf.dfn exg-gwfgwt.dfn exg-gwtgwt.dfn exg-gwfgwe.dfn exg-gwegwe.dfn -exg-swfgwf.dfn exg-gwfprt.dfn +exg-olfgwf.dfn # utils utl-hpc.dfn