From cc7f930b961345536529942fc57db0c515a1f7fc Mon Sep 17 00:00:00 2001 From: Mike Taves Date: Tue, 26 Nov 2024 10:39:05 +1300 Subject: [PATCH] chore: reformat multi-line statements (#2070) Refactor some multi-line statements. This was mostly automated by temporarily toggling skip-magic-trailing-comma = true in ruff.toml, then selecting some commits that condense multi-line statements to single, while rejecting other statements that are better represented over multiple lines. There was no exact rule-of-thumb for the process, except to try and maintain the same style in surrounding code blocks. Note that while there are fewer lines, there are no functional changes. --- .hpc/sstat_poll.py | 5 +- autotest/cross_section_functions.py | 36 +----- autotest/framework.py | 5 +- autotest/get_exes.py | 4 +- autotest/test_chf_dfw.py | 15 +-- autotest/test_chf_dfw_beg2022.py | 13 +- autotest/test_chf_dfw_bowl.py | 10 +- autotest/test_chf_dfw_loop.py | 26 +--- autotest/test_chf_dfw_swrt2.py | 5 +- autotest/test_chf_dfw_swrt2b.py | 10 +- autotest/test_chf_dis.py | 5 +- autotest/test_chf_dis_fdc.py | 5 +- autotest/test_chf_gwf.py | 9 +- autotest/test_gwe_drycell_cnd4.py | 4 +- autotest/test_gwe_esl01.py | 4 +- autotest/test_gwe_lke_conduction.py | 6 +- autotest/test_gwe_mve.py | 35 +---- autotest/test_gwe_mwe_conduction.py | 20 +-- autotest/test_gwe_obs.py | 14 +- autotest/test_gwe_sfe_strmbedcond.py | 17 +-- autotest/test_gwe_ssm01.py | 5 +- autotest/test_gwe_ssm02.py | 5 +- autotest/test_gwe_uze00.py | 5 +- autotest/test_gwegwe_exchng_with_comp2gwt.py | 5 +- autotest/test_gwf_bnd_negative_cond.py | 5 +- autotest/test_gwf_boundname01.py | 5 +- autotest/test_gwf_buy_lak02.py | 72 +---------- autotest/test_gwf_buy_maw01.py | 20 +-- autotest/test_gwf_csub_db01_nr.py | 49 +------ autotest/test_gwf_csub_distypes.py | 12 +- autotest/test_gwf_csub_inelastic.py | 14 +- autotest/test_gwf_csub_ndb01_nr.py | 46 +------ autotest/test_gwf_csub_sk01.py | 20 +-- autotest/test_gwf_csub_sk02.py | 29 +---- autotest/test_gwf_csub_sk03.py | 29 +---- autotest/test_gwf_csub_sk04_nr.py | 13 +- autotest/test_gwf_csub_sub01_adjmat.py | 14 +- autotest/test_gwf_csub_sub01_elastic.py | 14 +- autotest/test_gwf_csub_wc01.py | 29 +---- autotest/test_gwf_disu.py | 10 +- autotest/test_gwf_disv.py | 12 +- autotest/test_gwf_disv_uzf.py | 10 +- autotest/test_gwf_errors.py | 4 +- autotest/test_gwf_exgmvr01.py | 37 +----- autotest/test_gwf_exgmvr02.py | 37 +----- autotest/test_gwf_ifmod_buy.py | 12 +- autotest/test_gwf_ifmod_mult_exg.py | 11 +- autotest/test_gwf_ifmod_xt3d01.py | 11 +- autotest/test_gwf_lak_bedleak.py | 12 +- autotest/test_gwf_lak_status.py | 12 +- autotest/test_gwf_lak_wetlakbedarea01.py | 12 +- autotest/test_gwf_lak_wetlakbedarea02.py | 10 +- autotest/test_gwf_laket.py | 6 +- autotest/test_gwf_lakobs02.py | 33 +---- autotest/test_gwf_libmf6_ghb01.py | 5 +- autotest/test_gwf_libmf6_ifmod03.py | 11 +- autotest/test_gwf_libmf6_riv02.py | 7 +- autotest/test_gwf_maw03.py | 4 +- autotest/test_gwf_maw05.py | 20 +-- autotest/test_gwf_maw06.py | 30 +---- autotest/test_gwf_maw07.py | 30 +---- autotest/test_gwf_maw08.py | 20 +-- autotest/test_gwf_maw09.py | 20 +-- .../test_gwf_mf6io_app2_examples_distypes.py | 24 +--- autotest/test_gwf_multimvr.py | 6 +- autotest/test_gwf_npf_thickstrt.py | 9 +- autotest/test_gwf_npf_tvk02.py | 10 +- autotest/test_gwf_npf_tvk03.py | 10 +- autotest/test_gwf_pertim.py | 16 +-- autotest/test_gwf_sfr_diversion.py | 37 +----- autotest/test_gwf_sfr_evap.py | 8 +- autotest/test_gwf_sfr_gwdischarge.py | 12 +- autotest/test_gwf_sfr_gwf_conn.py | 18 +-- autotest/test_gwf_sfr_inactive01.py | 120 ++---------------- autotest/test_gwf_sfr_kinematic01.py | 17 +-- autotest/test_gwf_sfr_npoint01.py | 11 +- autotest/test_gwf_sfr_npoint02.py | 5 +- autotest/test_gwf_sto02.py | 8 +- autotest/test_gwf_sto03.py | 5 +- autotest/test_gwf_sto_tvs01.py | 5 +- autotest/test_gwf_ts_lak01.py | 8 +- autotest/test_gwf_ts_uzf01.py | 22 +--- autotest/test_gwf_utl06_tas.py | 17 +-- autotest/test_gwf_uzf01.py | 36 +----- autotest/test_gwf_uzf_gwet.py | 5 +- autotest/test_gwf_uzf_gwet_opt.py | 51 +++----- autotest/test_gwf_uzf_wc_output.py | 7 +- autotest/test_gwf_wel01.py | 20 +-- autotest/test_gwf_zb01.py | 8 +- autotest/test_gwt_henry_gwtgwt.py | 5 +- autotest/test_gwt_ims_issue655.py | 5 +- autotest/test_gwt_ist01.py | 4 +- autotest/test_gwt_mst06_noadv.py | 13 +- autotest/test_gwt_mvt01.py | 15 +-- autotest/test_gwt_mvt02.py | 15 +-- autotest/test_gwt_mvt02fmi.py | 15 +-- autotest/test_gwt_mwt02.py | 29 ++--- autotest/test_gwt_prudic2004t2.py | 33 +---- autotest/test_gwt_prudic2004t2fmi.py | 17 +-- autotest/test_gwt_prudic2004t2fmiats.py | 17 +-- autotest/test_gwt_prudic2004t2gwtgwt.py | 16 +-- autotest/test_gwt_sft01.py | 15 +-- autotest/test_gwt_sft01gwtgwt.py | 26 +--- autotest/test_gwt_sft_inactive01.py | 41 ++---- autotest/test_gwt_ssm03.py | 5 +- autotest/test_gwt_ssm04.py | 5 +- autotest/test_gwt_ssm04fmi.py | 5 +- autotest/test_gwt_ssm05.py | 5 +- autotest/test_gwt_ssm06.py | 5 +- autotest/test_gwt_ssm06fmi.py | 5 +- autotest/test_gwt_uztmvt2x2.py | 30 +---- autotest/test_largetestmodels.py | 6 +- autotest/test_netcdf_gwf_disv.py | 8 +- autotest/test_netcdf_gwt_prudic2004t2.py | 4 +- autotest/test_olf_dfw_swrt2dis.py | 10 +- autotest/test_olf_gwf.py | 5 +- autotest/test_olf_vcatch.py | 5 +- autotest/test_par_gwe_split_analyt.py | 8 +- autotest/test_par_gwt_adv02.py | 6 +- autotest/test_prt_budget.py | 5 +- autotest/test_prt_disv1.py | 23 +--- autotest/test_prt_exg.py | 5 +- autotest/test_prt_fmi.py | 5 +- autotest/test_prt_libmf6_budget.py | 7 +- autotest/test_prt_quad_refinement.py | 5 +- autotest/test_prt_release_timing.py | 5 +- autotest/test_prt_stop_zones.py | 14 +- autotest/test_prt_ternary_methods.py | 14 +- autotest/test_prt_track_events.py | 14 +- autotest/test_prt_triangle.py | 5 +- autotest/test_prt_voronoi1.py | 33 +---- autotest/test_prt_voronoi2.py | 11 +- autotest/test_testmodels_mf6.py | 6 +- distribution/benchmark.py | 34 +---- distribution/build_docs.py | 20 +-- distribution/update_version.py | 6 +- .../python/STO-SpecificStorage.ipynb | 24 +--- doc/mf6io/mf6ivar/mem_allocate.py | 18 +-- utils/idmloader/scripts/dfn2f90.py | 18 +-- 139 files changed, 331 insertions(+), 1829 deletions(-) diff --git a/.hpc/sstat_poll.py b/.hpc/sstat_poll.py index fa18c9e0df0..def27f6ce7c 100644 --- a/.hpc/sstat_poll.py +++ b/.hpc/sstat_poll.py @@ -68,10 +68,7 @@ def _run_command( + "by specifying the format argument " + "(--format=JobID,AveCPU,AveRSS,MaxRSS,...)." ) - parser = argparse.ArgumentParser( - "sstat_poll", - description=description, - ) + parser = argparse.ArgumentParser("sstat_poll", description=description) parser.add_argument("jobid", help="SLURM JobID", type=int) parser.add_argument( "--format", diff --git a/autotest/cross_section_functions.py b/autotest/cross_section_functions.py index 3ea24d4b1fe..ba8484bbdb0 100644 --- a/autotest/cross_section_functions.py +++ b/autotest/cross_section_functions.py @@ -279,14 +279,7 @@ def get_depths( depths = np.zeros(flows.shape, dtype=float) for idx, q in enumerate(flows): depths[idx] = qtodepth( - x, - h, - q, - roughness=roughness, - slope=slope, - conv=conv, - dd=dd, - verbose=False, + x, h, q, roughness=roughness, slope=slope, conv=conv, dd=dd, verbose=False ) return depths @@ -303,42 +296,21 @@ def qtodepth( verbose=False, ): h0 = 0.0 - q0 = manningsq( - x, - h, - h0, - roughness=roughness, - slope=slope, - conv=conv, - ) + q0 = manningsq(x, h, h0, roughness=roughness, slope=slope, conv=conv) r = q0 - q iter = 0 if verbose: print(f"iteration {iter:>2d} - residual={r}") while abs(r) > 1e-12: - q1 = manningsq( - x, - h, - h0 + dd, - roughness=roughness, - slope=slope, - conv=conv, - ) + q1 = manningsq(x, h, h0 + dd, roughness=roughness, slope=slope, conv=conv) dq = q1 - q0 if dq != 0.0: derv = dd / (q1 - q0) else: derv = 0.0 h0 -= derv * r - q0 = manningsq( - x, - h, - h0, - roughness=roughness, - slope=slope, - conv=conv, - ) + q0 = manningsq(x, h, h0, roughness=roughness, slope=slope, conv=conv) r = q0 - q iter += 1 diff --git a/autotest/framework.py b/autotest/framework.py index 484e4b1b8af..c3e2ce32285 100644 --- a/autotest/framework.py +++ b/autotest/framework.py @@ -319,10 +319,7 @@ def _compare_heads( if len(exfiles) > 0: exfile = exfiles[i] if exfile is not None: - print( - f"Exclusion file {i + 1}", - os.path.basename(exfile), - ) + print(f"Exclusion file {i + 1}", os.path.basename(exfile)) # make comparison success = compare_heads( diff --git a/autotest/get_exes.py b/autotest/get_exes.py index 1d83910c71a..5a6f59708b5 100644 --- a/autotest/get_exes.py +++ b/autotest/get_exes.py @@ -49,9 +49,7 @@ def test_rebuild_release(rebuilt_bin_path: Path): # download the release download_path = Path(td) download_and_unzip( - asset["browser_download_url"], - path=download_path, - verbose=True, + asset["browser_download_url"], path=download_path, verbose=True ) # update IDEVELOPMODE diff --git a/autotest/test_chf_dfw.py b/autotest/test_chf_dfw.py index f5ae39a52ff..5760333f0e5 100644 --- a/autotest/test_chf_dfw.py +++ b/autotest/test_chf_dfw.py @@ -80,10 +80,7 @@ def build_models(idx, test): idcxs=0, ) - sto = flopy.mf6.ModflowChfsto( - chf, - save_flows=True, - ) + sto = flopy.mf6.ModflowChfsto(chf, save_flows=True) ic = flopy.mf6.ModflowChfic(chf, strt=1.0) @@ -116,19 +113,13 @@ def build_models(idx, test): # Save to external binary file or into flw package depending on binary keyword binary = True - flw_list = [ - (1, 100), - ] # one-based cell numbers here + flw_list = [(1, 100)] # one-based cell numbers here maxbound = len(flw_list) if binary: ra = np.array(flw_list, dtype=[("irch", " ... # [] [] pak_data = [ - ( - ifno, - -1, - -1, - -1, - dx, - 10.0, - slope, - top, - 1.0, - 0.0, - roughness, - 0, - 0.0, - 0, - ) + (ifno, -1, -1, -1, dx, 10.0, slope, top, 1.0, 0.0, roughness, 0, 0.0, 0) for ifno in range(nreaches) ] sfr_spd = {idx: [(0, "inflow", q)] for idx, q in enumerate(flows[1:])} diff --git a/autotest/test_gwf_sfr_npoint01.py b/autotest/test_gwf_sfr_npoint01.py index b283fe96130..a68f5b36b00 100644 --- a/autotest/test_gwf_sfr_npoint01.py +++ b/autotest/test_gwf_sfr_npoint01.py @@ -139,10 +139,7 @@ def build_models(idx, test): ) # create iterative model solution and register the gwf model with it - ims = flopy.mf6.ModflowIms( - sim, - print_option="ALL", - ) + ims = flopy.mf6.ModflowIms(sim, print_option="ALL") # create gwf model gwf = flopy.mf6.ModflowGwf( @@ -300,11 +297,7 @@ def check_output(idx, test): xs_d = np_data[xs_type] d = get_depths( - obs["INFLOW"], - xs_d["x"], - xs_d["h"], - roughness=xs_d["n"], - slope=slope, + obs["INFLOW"], xs_d["x"], xs_d["h"], roughness=xs_d["n"], slope=slope ) assert np.allclose(obs["DEPTH"], d), ( diff --git a/autotest/test_gwf_sfr_npoint02.py b/autotest/test_gwf_sfr_npoint02.py index 6e32f9424a6..3e46c02da2b 100644 --- a/autotest/test_gwf_sfr_npoint02.py +++ b/autotest/test_gwf_sfr_npoint02.py @@ -70,10 +70,7 @@ def build_models(idx, test): ) # create iterative model solution and register the gwf model with it - ims = flopy.mf6.ModflowIms( - sim, - print_option="ALL", - ) + ims = flopy.mf6.ModflowIms(sim, print_option="ALL") # create gwf model gwf = flopy.mf6.ModflowGwf( diff --git a/autotest/test_gwf_sto02.py b/autotest/test_gwf_sto02.py index 65febebf45b..342779802e8 100644 --- a/autotest/test_gwf_sto02.py +++ b/autotest/test_gwf_sto02.py @@ -11,13 +11,7 @@ cases = ["gwf_sto02a", "gwf_sto02b"] ncols = [1, 2] -( - nlay, - nrow, -) = ( - 1, - 1, -) +(nlay, nrow) = (1, 1) def build_models(idx, test): diff --git a/autotest/test_gwf_sto03.py b/autotest/test_gwf_sto03.py index 10d41415a74..b4f3da7d5c5 100644 --- a/autotest/test_gwf_sto03.py +++ b/autotest/test_gwf_sto03.py @@ -39,10 +39,7 @@ size3d = nlay * nrow * ncol delr, delc = 1.0, 1.0 area = delr * delc -zelev = ( - 0.0, - -100.0, -) +zelev = (0.0, -100.0) strt = zelev[-1] + 1e-7 cmp_offset = 15999.1 obsname = "H1" diff --git a/autotest/test_gwf_sto_tvs01.py b/autotest/test_gwf_sto_tvs01.py index 79fd999182d..c0e353057cd 100644 --- a/autotest/test_gwf_sto_tvs01.py +++ b/autotest/test_gwf_sto_tvs01.py @@ -176,9 +176,8 @@ def check_output(idx, test): expected_results.append(3000.823) # TVS SP2: Decrease SY1. expected_results.append(300.5323) # TVS SP3: Increase SS1. expected_results.append(0.399976) # TVS SP4: Increase SY1. - expected_results.append( - 0.8 - ) # TVS SP5: Revert SS1 and SY1. Check that solution returns to original. + # TVS SP5: Revert SS1 and SY1. Check that solution returns to original. + expected_results.append(0.8) nper = len(expected_results) ex_lay = 1 ex_row = 1 diff --git a/autotest/test_gwf_ts_lak01.py b/autotest/test_gwf_ts_lak01.py index 4abc6f12210..95cb6dd2a4e 100644 --- a/autotest/test_gwf_ts_lak01.py +++ b/autotest/test_gwf_ts_lak01.py @@ -134,13 +134,7 @@ (0, 56, (0, 10, 11), "HORIZONTAL", 0.1, 0, 0, 500, 500), ] -stage, evap, runoff, withdrawal, rate = ( - 110.0, - 0.0103, - 1000.0, - 10000.0, - -225000.0, -) +stage, evap, runoff, withdrawal, rate = (110.0, 0.0103, 1000.0, 10000.0, -225000.0) lakeperioddata0 = [ (0, "status", "active"), (0, "stage", stage), diff --git a/autotest/test_gwf_ts_uzf01.py b/autotest/test_gwf_ts_uzf01.py index 926d6f0b07c..37ce6aa02a4 100644 --- a/autotest/test_gwf_ts_uzf01.py +++ b/autotest/test_gwf_ts_uzf01.py @@ -409,27 +409,9 @@ def get_model(ws, name, timeseries=False): (7, (0, 7, 2), 1, -1, 1.0, kv, 0.2, 0.4, 0.3, 3.5), (8, (0, 7, 3), 1, -1, 1.0, kv, 0.2, 0.4, 0.3, 3.5), ] - ( - finf, - pet, - extdp, - extwc, - ) = ( - 1e-8, - 5e-9, - 1.0, - 0.01, - ) + (finf, pet, extdp, extwc) = (1e-8, 5e-9, 1.0, 0.01) ha, hroot, rootact = 0.0, 0.0, 0.0 - ts_names = [ - "finf", - "pet", - "extdp", - "extwc", - "ha", - "hroot", - "rootact", - ] + auxnames + ts_names = ["finf", "pet", "extdp", "extwc", "ha", "hroot", "rootact"] + auxnames if timeseries: ts_methods = ["linearend"] * len(ts_names) ts_data = [] diff --git a/autotest/test_gwf_utl06_tas.py b/autotest/test_gwf_utl06_tas.py index 55e2c44a7e1..51be22e99ce 100644 --- a/autotest/test_gwf_utl06_tas.py +++ b/autotest/test_gwf_utl06_tas.py @@ -167,9 +167,7 @@ def build_models(idx, test): interpolation_methodrecord=interpolation_methodrecord, ) np.savetxt( - os.path.join(ws, f"{gwfname}.rch4.tas.dat"), - recharge_rate, - fmt="%7.1f", + os.path.join(ws, f"{gwfname}.rch4.tas.dat"), recharge_rate, fmt="%7.1f" ) # output control @@ -199,10 +197,7 @@ def check_output(idx, test): # load gwf budget file fpth = os.path.join(test.workspace, f"{gwfname}.cbc") try: - bobj = flopy.utils.CellBudgetFile( - fpth, - precision="double", - ) + bobj = flopy.utils.CellBudgetFile(fpth, precision="double") except: assert False, f'could not load data from "{fpth}"' @@ -341,13 +336,7 @@ def check_output(idx, test): frac = (totim - 0.5) / 5.0 else: frac = 1.0 - area = np.zeros( - ( - 5, - 5, - ), - dtype=float, - ) + area = np.zeros((5, 5), dtype=float) for i in range(5): for j in range(5): area[i, j] = float((i + 1) * (j + 1)) diff --git a/autotest/test_gwf_uzf01.py b/autotest/test_gwf_uzf01.py index 5da03c75097..7bf9ebfee09 100644 --- a/autotest/test_gwf_uzf01.py +++ b/autotest/test_gwf_uzf01.py @@ -131,43 +131,13 @@ def build_models(idx, test): thti = thtr thts = sy eps = 4 - uzf_pkdat = [ - [ - 0, - (0, 0, 0), - 1, - 1, - sd, - vks, - thtr, - thts, - thti, - eps, - "uzf 001", - ] - ] + [ - [ - k, - (k, 0, 0), - 0, - k + 1, - sd, - vks, - thtr, - thts, - thti, - eps, - f"uzf {k + 1:03d}", - ] + uzf_pkdat = [[0, (0, 0, 0), 1, 1, sd, vks, thtr, thts, thti, eps, "uzf 001"]] + [ + [k, (k, 0, 0), 0, k + 1, sd, vks, thtr, thts, thti, eps, f"uzf {k + 1:03d}"] for k in range(1, nlay - 1) ] uzf_pkdat[-1][3] = -1 infiltration = 2.01 - uzf_spd = { - 0: [ - [0, infiltration, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], - ] - } + uzf_spd = {0: [[0, infiltration, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]]} uzf = flopy.mf6.ModflowGwfuzf( gwf, print_input=True, diff --git a/autotest/test_gwf_uzf_gwet.py b/autotest/test_gwf_uzf_gwet.py index 22f7bb54327..0e4068cfd23 100644 --- a/autotest/test_gwf_uzf_gwet.py +++ b/autotest/test_gwf_uzf_gwet.py @@ -331,9 +331,8 @@ def check_output(idx, test): for i in range(test.model.dis.nrow.get_data()): for j in range(test.model.dis.ncol.get_data()): if (0, i, j) in cell_iuz_dict: - iuz = cell_iuz_dict[ - (0, i, j) - ] # For this test, pET only specified in the top layer + # For this test, pET only specified in the top layer + iuz = cell_iuz_dict[(0, i, j)] for m_row in uzf_strsPerDat[mstp]: if m_row[0] == iuz: pet = float(m_row[2]) diff --git a/autotest/test_gwf_uzf_gwet_opt.py b/autotest/test_gwf_uzf_gwet_opt.py index 7afe53190bf..647373fe4c3 100644 --- a/autotest/test_gwf_uzf_gwet_opt.py +++ b/autotest/test_gwf_uzf_gwet_opt.py @@ -204,40 +204,34 @@ def set_connectiondata(n, lay, top, back, left, right, front, bottom): ihc.append(1) # ihc = 1 for horizontal connection cl12.append(delc / 2) # half the cell width along a column hwva.append(delr) # the width perpendicular to the connection - angldeg.append( - 90.0 - ) # for horizontal connection, 90.0 deg points in the positive y direction + # for horizontal connection, 90.0 deg points in the positive y direction + angldeg.append(90.0) if left: jas.append(n - 1) # left ihc.append(1) # ihc = 1 for horizontal connection cl12.append(delr / 2) # half the cell width along a horizontal connection (row) - hwva.append( - delr - ) # for horizontal connection, value of hwva is width along a row - angldeg.append( - 180.0 - ) # for horizontal connection, value is 180.0 along negative x-axis + # for horizontal connection, value of hwva is width along a row + hwva.append(delr) + # for horizontal connection, value is 180.0 along negative x-axis + angldeg.append(180.0) if right: jas.append(n + 1) # right ihc.append(1) # ihc = 1 for horizontal connection cl12.append(delr / 2) # half the cell width along a horizontal connection row - hwva.append( - delc - ) # for horizontal connection, value of hwva is width along a row - angldeg.append( - 0.0 - ) # for horizontal connection, value is 0.0 along positive x-axis + # for horizontal connection, value of hwva is width along a row + hwva.append(delc) + # for horizontal connection, value is 0.0 along positive x-axis + angldeg.append(0.0) if front: jas.append(n + ncol) ihc.append(1) # ihc = 1 for horizontal connection cl12.append(delc / 2) # half the cell width along a column hwva.append(delr) # the width perpendicular to the connection - angldeg.append( - 2700.0 - ) # for horizontal connection, 90.0 deg points in the positive y direction + # for horizontal connection, 90.0 deg points in the positive y direction + angldeg.append(2700.0) if bottom: jas.append(n + (nrow * ncol)) # below @@ -276,13 +270,9 @@ def get_conndat(n, lay, row, col): elif col == 1: left = True - ( - jas_vals, - ihc_vals, - cl12_vals, - hwva_vals, - angldeg_vals, - ) = set_connectiondata(n, lay, top, back, left, right, front, bottom) + (jas_vals, ihc_vals, cl12_vals, hwva_vals, angldeg_vals) = set_connectiondata( + n, lay, top, back, left, right, front, bottom + ) return iac, jas_vals, ihc_vals, cl12_vals, hwva_vals, angldeg_vals @@ -339,14 +329,9 @@ def append_cell2d(n, xv_lst, yv_lst, cell_vert_lkup): n = (lay * nrow * ncol) + (row * ncol) + col # n will be zero based # Values for CONNECTIONDATA block - ( - iac, - ja_cell, - ihc_cell, - cl12_cell, - hwva_cell, - angldeg_cell, - ) = get_conndat(n, lay, row, col) + (iac, ja_cell, ihc_cell, cl12_cell, hwva_cell, angldeg_cell) = get_conndat( + n, lay, row, col + ) # accumulate connection information in lists iac_lst.append(iac) diff --git a/autotest/test_gwf_uzf_wc_output.py b/autotest/test_gwf_uzf_wc_output.py index e7125fff92e..e46d5006299 100644 --- a/autotest/test_gwf_uzf_wc_output.py +++ b/autotest/test_gwf_uzf_wc_output.py @@ -288,12 +288,7 @@ def build_mf6_model(idx, ws): uzf_obs = { f"{name}.uzfobs": [ ("uzf01_dpth=0.5", "water-content", "uzf01", 0.5), - ( - "uzf01_dpth=1.5", - "water-content", - "uzf01", - 1.5, - ), # Relies on boundnames + ("uzf01_dpth=1.5", "water-content", "uzf01", 1.5), # Relies on boundnames ("uzf01_dpth=2.5", "water-content", "uzf01", 2.5), ("uzf01_dpth=3.5", "water-content", "uzf01", 3.5), ("uzf01_dpth=4.49", "water-content", "uzf01", 4.49), diff --git a/autotest/test_gwf_wel01.py b/autotest/test_gwf_wel01.py index 14e189d65a1..7019e5182d6 100644 --- a/autotest/test_gwf_wel01.py +++ b/autotest/test_gwf_wel01.py @@ -84,10 +84,7 @@ def build_models(idx, test): ) # initial conditions - ic = flopy.mf6.ModflowGwfic( - gwf, - strt=strt, - ) + ic = flopy.mf6.ModflowGwfic(gwf, strt=strt) # node property flow npf = flopy.mf6.ModflowGwfnpf( @@ -128,16 +125,10 @@ def build_models(idx, test): stress_period_data=wel_spd, afrcsv_filerecord=f"{name}.afr.csv", ) - welobs = wel.obs.initialize( - print_input=True, - continuous=obs, - ) + welobs = wel.obs.initialize(print_input=True, continuous=obs) # output control - oc = flopy.mf6.ModflowGwfoc( - gwf, - printrecord=[("HEAD", "ALL"), ("BUDGET", "ALL")], - ) + oc = flopy.mf6.ModflowGwfoc(gwf, printrecord=[("HEAD", "ALL"), ("BUDGET", "ALL")]) return sim, None @@ -145,10 +136,7 @@ def build_models(idx, test): def check_output(idx, test): # MODFLOW 6 observations dtol = 1e-9 - for file_name in ( - "wel.obs.csv", - "wel.obs.dup.csv", - ): + for file_name in ("wel.obs.csv", "wel.obs.dup.csv"): fpth = os.path.join(test.workspace, file_name) try: tc = np.genfromtxt(fpth, names=True, delimiter=",") diff --git a/autotest/test_gwf_zb01.py b/autotest/test_gwf_zb01.py index 4c8c8f98256..e06e531eded 100644 --- a/autotest/test_gwf_zb01.py +++ b/autotest/test_gwf_zb01.py @@ -248,10 +248,7 @@ def check_output(idx, test): # read data from csv file zbd = np.genfromtxt( - test.workspace / "zonebudget.csv", - names=True, - delimiter=",", - deletechars="", + test.workspace / "zonebudget.csv", names=True, delimiter=",", deletechars="" ) # sum the data for all zones @@ -288,8 +285,7 @@ def check_output(idx, test): for key in bud_lst: d[key] = 0.0 cobj = flopy.utils.CellBudgetFile( - test.workspace / f"{os.path.basename(test.name)}.cbc", - precision="double", + test.workspace / f"{os.path.basename(test.name)}.cbc", precision="double" ) kk = cobj.get_kstpkper() times = cobj.get_times() diff --git a/autotest/test_gwt_henry_gwtgwt.py b/autotest/test_gwt_henry_gwtgwt.py index b6368c187e3..3d747951dc9 100644 --- a/autotest/test_gwt_henry_gwtgwt.py +++ b/autotest/test_gwt_henry_gwtgwt.py @@ -80,10 +80,7 @@ def get_gwf_model(sim, model_shape, model_desc): ) pd = [(0, 0.7, 0.0, gwtname, "none")] - _ = flopy.mf6.ModflowGwfbuy( - gwf, - packagedata=pd, - ) + _ = flopy.mf6.ModflowGwfbuy(gwf, packagedata=pd) def chd_value(k): # depth = k * delz + 0.5 * delz diff --git a/autotest/test_gwt_ims_issue655.py b/autotest/test_gwt_ims_issue655.py index 77420882f6b..9b624bf9e5f 100644 --- a/autotest/test_gwt_ims_issue655.py +++ b/autotest/test_gwt_ims_issue655.py @@ -13,10 +13,7 @@ from framework import TestFramework cases = ["issue655a", "issue655b"] -newton = [ - False, - True, -] +newton = [False, True] laytyp = [1] ss = [1.0e-10] sy = [0.1] diff --git a/autotest/test_gwt_ist01.py b/autotest/test_gwt_ist01.py index 7b3cbee9c2a..354dfac249a 100644 --- a/autotest/test_gwt_ist01.py +++ b/autotest/test_gwt_ist01.py @@ -21,9 +21,7 @@ def build_models(idx, test): - perlen = [ - 2.0, - ] + perlen = [2.0] nper = len(perlen) nstp = [14] tsmult = [1.0] diff --git a/autotest/test_gwt_mst06_noadv.py b/autotest/test_gwt_mst06_noadv.py index 8ff67599827..07f88395ba6 100644 --- a/autotest/test_gwt_mst06_noadv.py +++ b/autotest/test_gwt_mst06_noadv.py @@ -135,18 +135,7 @@ def check_output(idx, test): assert False, f'could not load data from "{fpth}"' decay_list = bobj.get_data(text="DECAY-AQUEOUS") decay_rate = [dr[0] for dr in decay_list] - decay_rate_answer = [ - -8.4, - -8.4, - -8.4, - -8.4, - -8.4, - -8.4, - -8.4, - -8.4, - 0.0, - 0.0, - ] + decay_rate_answer = [-8.4, -8.4, -8.4, -8.4, -8.4, -8.4, -8.4, -8.4, 0.0, 0.0] msg = "simulated decay rates do not match with known solution. {} {}".format( decay_rate, decay_rate_answer ) diff --git a/autotest/test_gwt_mvt01.py b/autotest/test_gwt_mvt01.py index ea75c1cce76..45945dfcb23 100644 --- a/autotest/test_gwt_mvt01.py +++ b/autotest/test_gwt_mvt01.py @@ -211,20 +211,7 @@ def build_models(idx, test): if irno in [0, ncol - 1]: ncon = 1 cellid = (0, 0, irno) - t = ( - irno, - cellid, - rlen, - rwid, - rgrd, - rtp, - rbth, - rhk, - rman, - ncon, - ustrf, - ndv, - ) + t = (irno, cellid, rlen, rwid, rgrd, rtp, rbth, rhk, rman, ncon, ustrf, ndv) pak_data.append(t) con_data = [] diff --git a/autotest/test_gwt_mvt02.py b/autotest/test_gwt_mvt02.py index a5b5fb02b1c..d8e4515a5a6 100644 --- a/autotest/test_gwt_mvt02.py +++ b/autotest/test_gwt_mvt02.py @@ -158,20 +158,7 @@ def build_models(idx, test): if irno in [0, ncol - 1]: ncon = 1 cellid = (0, 0, irno) - t = ( - irno, - cellid, - rlen, - rwid, - rgrd, - rtp, - rbth, - rhk, - rman, - ncon, - ustrf, - ndv, - ) + t = (irno, cellid, rlen, rwid, rgrd, rtp, rbth, rhk, rman, ncon, ustrf, ndv) pak_data.append(t) con_data = [] diff --git a/autotest/test_gwt_mvt02fmi.py b/autotest/test_gwt_mvt02fmi.py index 56d1c70bbe1..edefbc5bdf3 100644 --- a/autotest/test_gwt_mvt02fmi.py +++ b/autotest/test_gwt_mvt02fmi.py @@ -148,20 +148,7 @@ def run_flow_model(dir, exe): if irno in [0, ncol - 1]: ncon = 1 cellid = (0, 0, irno) - t = ( - irno, - cellid, - rlen, - rwid, - rgrd, - rtp, - rbth, - rhk, - rman, - ncon, - ustrf, - ndv, - ) + t = (irno, cellid, rlen, rwid, rgrd, rtp, rbth, rhk, rman, ncon, ustrf, ndv) pak_data.append(t) con_data = [] diff --git a/autotest/test_gwt_mwt02.py b/autotest/test_gwt_mwt02.py index 26e505cb950..860796c072e 100644 --- a/autotest/test_gwt_mwt02.py +++ b/autotest/test_gwt_mwt02.py @@ -177,24 +177,12 @@ def build_models(idx, test): head_filerecord=f"{gwfname}.hds", headprintrecord=[("COLUMNS", 10, "WIDTH", 15, "DIGITS", 6, "GENERAL")], saverecord=[ - ( - "HEAD", - "ALL", - ), - ( - "BUDGET", - "ALL", - ), + ("HEAD", "ALL"), + ("BUDGET", "ALL"), ], printrecord=[ - ( - "HEAD", - "LAST", - ), - ( - "BUDGET", - "LAST", - ), + ("HEAD", "LAST"), + ("BUDGET", "LAST"), ], ) @@ -362,13 +350,12 @@ def build_models(idx, test): concentrationprintrecord=[ ("COLUMNS", 10, "WIDTH", 15, "DIGITS", 6, "GENERAL") ], - saverecord=[("CONCENTRATION", "ALL")], + saverecord=[ + ("CONCENTRATION", "ALL"), + ], printrecord=[ ("CONCENTRATION", "ALL"), - ( - "BUDGET", - "ALL", - ), + ("BUDGET", "ALL"), ], ) diff --git a/autotest/test_gwt_prudic2004t2.py b/autotest/test_gwt_prudic2004t2.py index 23332013567..0970b9231d7 100644 --- a/autotest/test_gwt_prudic2004t2.py +++ b/autotest/test_gwt_prudic2004t2.py @@ -134,16 +134,7 @@ def build_models(idx, test): ll = line.strip().split() if len(ll) == 4: k, i, j, hd = ll - chdlist.append( - [ - ( - int(k) - 1, - int(i) - 1, - int(j) - 1, - ), - float(hd), - ] - ) + chdlist.append([(int(k) - 1, int(i) - 1, int(j) - 1), float(hd)]) chd = flopy.mf6.ModflowGwfchd(gwf, stress_period_data=chdlist, pname="CHD-1") rivlist = [] @@ -154,11 +145,7 @@ def build_models(idx, test): k, i, j, s, c, rb, bn = ll rivlist.append( [ - ( - int(k) - 1, - int(i) - 1, - int(j) - 1, - ), + (int(k) - 1, int(i) - 1, int(j) - 1), float(s), float(c), float(rb), @@ -611,21 +598,7 @@ def make_concentration_map(sim): import matplotlib.pyplot as plt - levels = [ - 1, - 10, - 25, - 50, - 100, - 150, - 200, - 250, - 300, - 350, - 400, - 450, - 500, - ] + levels = [1, 10, 25, 50, 100, 150, 200, 250, 300, 350, 400, 450, 500] name = sim.name ws = sim.workspace diff --git a/autotest/test_gwt_prudic2004t2fmi.py b/autotest/test_gwt_prudic2004t2fmi.py index 9671af518c7..7104387ac5b 100644 --- a/autotest/test_gwt_prudic2004t2fmi.py +++ b/autotest/test_gwt_prudic2004t2fmi.py @@ -117,16 +117,7 @@ def run_flow_model(dir, exe): ll = line.strip().split() if len(ll) == 4: k, i, j, hd = ll - chdlist.append( - [ - ( - int(k) - 1, - int(i) - 1, - int(j) - 1, - ), - float(hd), - ] - ) + chdlist.append([(int(k) - 1, int(i) - 1, int(j) - 1), float(hd)]) chd = flopy.mf6.ModflowGwfchd(gwf, stress_period_data=chdlist, pname="CHD-1") rivlist = [] @@ -137,11 +128,7 @@ def run_flow_model(dir, exe): k, i, j, s, c, rb, bn = ll rivlist.append( [ - ( - int(k) - 1, - int(i) - 1, - int(j) - 1, - ), + (int(k) - 1, int(i) - 1, int(j) - 1), float(s), float(c), float(rb), diff --git a/autotest/test_gwt_prudic2004t2fmiats.py b/autotest/test_gwt_prudic2004t2fmiats.py index 4fa0320c4fd..1feeb6d9ba0 100644 --- a/autotest/test_gwt_prudic2004t2fmiats.py +++ b/autotest/test_gwt_prudic2004t2fmiats.py @@ -122,16 +122,7 @@ def run_flow_model(dir, exe): ll = line.strip().split() if len(ll) == 4: k, i, j, hd = ll - chdlist.append( - [ - ( - int(k) - 1, - int(i) - 1, - int(j) - 1, - ), - float(hd), - ] - ) + chdlist.append([(int(k) - 1, int(i) - 1, int(j) - 1), float(hd)]) chd = flopy.mf6.ModflowGwfchd(gwf, stress_period_data=chdlist, pname="CHD-1") rivlist = [] @@ -142,11 +133,7 @@ def run_flow_model(dir, exe): k, i, j, s, c, rb, bn = ll rivlist.append( [ - ( - int(k) - 1, - int(i) - 1, - int(j) - 1, - ), + (int(k) - 1, int(i) - 1, int(j) - 1), float(s), float(c), float(rb), diff --git a/autotest/test_gwt_prudic2004t2gwtgwt.py b/autotest/test_gwt_prudic2004t2gwtgwt.py index 7d5f275303f..e90b04b0df8 100644 --- a/autotest/test_gwt_prudic2004t2gwtgwt.py +++ b/autotest/test_gwt_prudic2004t2gwtgwt.py @@ -798,21 +798,7 @@ def make_concentration_map(sim, ws): import matplotlib.pyplot as plt - levels = [ - 1, - 10, - 25, - 50, - 100, - 150, - 200, - 250, - 300, - 350, - 400, - 450, - 500, - ] + levels = [1, 10, 25, 50, 100, 150, 200, 250, 300, 350, 400, 450, 500] fig, axs = plt.subplots(2, 2, figsize=(5, 7), dpi=300, tight_layout=True) # push combo concentrations into global concentration diff --git a/autotest/test_gwt_sft01.py b/autotest/test_gwt_sft01.py index 0d379995c4b..75557f32201 100644 --- a/autotest/test_gwt_sft01.py +++ b/autotest/test_gwt_sft01.py @@ -158,20 +158,7 @@ def build_models(idx, test): if irno in [0, ncol - 1]: ncon = 1 cellid = (0, 0, irno) - t = ( - irno, - cellid, - rlen, - rwid, - rgrd, - rtp, - rbth, - rhk, - rman, - ncon, - ustrf, - ndv, - ) + t = (irno, cellid, rlen, rwid, rgrd, rtp, rbth, rhk, rman, ncon, ustrf, ndv) pak_data.append(t) con_data = [] diff --git a/autotest/test_gwt_sft01gwtgwt.py b/autotest/test_gwt_sft01gwtgwt.py index 7d6d638e493..1cf76f708ae 100644 --- a/autotest/test_gwt_sft01gwtgwt.py +++ b/autotest/test_gwt_sft01gwtgwt.py @@ -143,16 +143,7 @@ def build_models(idx, test): # add a gwf-gwf exchange gwfgwf_data = [ - ( - (0, 0, ncol - 1), - (0, 0, 0), - 1, - delr / 2.0, - delr / 2.0, - delc, - 0.0, - delr, - ) + ((0, 0, ncol - 1), (0, 0, 0), 1, delr / 2.0, delr / 2.0, delc, 0.0, delr) ] # GWF-GWF @@ -294,20 +285,7 @@ def build_gwfgwt_combo(sim, gwfname, gwtname, icombo): if irno in [0, ncol - 1]: ncon = 1 cellid = (0, 0, irno) - t = ( - irno, - cellid, - rlen, - rwid, - rgrd, - rtp, - rbth, - rhk, - rman, - ncon, - ustrf, - ndv, - ) + t = (irno, cellid, rlen, rwid, rgrd, rtp, rbth, rhk, rman, ncon, ustrf, ndv) pak_data.append(t) con_data = [] diff --git a/autotest/test_gwt_sft_inactive01.py b/autotest/test_gwt_sft_inactive01.py index f4ce8167df5..b10ad2ac28e 100644 --- a/autotest/test_gwt_sft_inactive01.py +++ b/autotest/test_gwt_sft_inactive01.py @@ -193,23 +193,19 @@ def set_connectiondata(n, lay, top, left, right, bottom): jas.append(n - 1) # left ihc.append(1) # ihc = 1 for horizontal connection cl12.append(delc / 2) # half the cell width along a horizontal connection - hwva.append( - delr - ) # for horizontal connection, value of hwva is width along a row - angldeg.append( - 180.0 - ) # for horizontal connection, value is 180.0 along negative x-axis + # for horizontal connection, value of hwva is width along a row + hwva.append(delr) + # for horizontal connection, value is 180.0 along negative x-axis + angldeg.append(180.0) if right: jas.append(n + 1) # right ihc.append(1) # ihc = 1 for horizontal connection cl12.append(delc / 2) # half the cell width along a horizontal connection - hwva.append( - delc - ) # for horizontal connection, value of hwva is width along a row - angldeg.append( - 0.0 - ) # for horizontal connection, value is 0.0 along positive x-axis + # for horizontal connection, value of hwva is width along a row + hwva.append(delc) + # for horizontal connection, value is 0.0 along positive x-axis + angldeg.append(0.0) if bottom: jas.append(n + ncol) # below @@ -259,13 +255,9 @@ def get_conndat(n, lay, col): iac += 1 num_neigh += 1 - ( - jas_vals, - ihc_vals, - cl12_vals, - hwva_vals, - angldeg_vals, - ) = set_connectiondata(n, lay, top, left, right, bottom) + (jas_vals, ihc_vals, cl12_vals, hwva_vals, angldeg_vals) = set_connectiondata( + n, lay, top, left, right, bottom + ) # If bottom most layer, need to .pop() the last values out of the respective lists # This should be done because the bottom connections will always be represented by @@ -328,14 +320,9 @@ def append_cell2d(n, xv_lst, yv_lst, cell_vert_lkup): n = lay * ncol + col # n will be zero based # Values for CONNECTIONDATA block - ( - iac, - ja_cell, - ihc_cell, - cl12_cell, - hwva_cell, - angldeg_cell, - ) = get_conndat(n, lay, col) + (iac, ja_cell, ihc_cell, cl12_cell, hwva_cell, angldeg_cell) = get_conndat( + n, lay, col + ) # accumulate connection information in lists iac_lst.append(iac) diff --git a/autotest/test_gwt_ssm03.py b/autotest/test_gwt_ssm03.py index 7eb0f22f148..fe1856f2d35 100644 --- a/autotest/test_gwt_ssm03.py +++ b/autotest/test_gwt_ssm03.py @@ -233,10 +233,7 @@ def check_output(idx, test): # load transport budget file fpth = os.path.join(test.workspace, f"{gwtname}.cbc") - bobj = flopy.utils.CellBudgetFile( - fpth, - precision="double", - ) + bobj = flopy.utils.CellBudgetFile(fpth, precision="double") ssmbudall = bobj.get_data(text="SOURCE-SINK MIX") for ssmbud in ssmbudall: diff --git a/autotest/test_gwt_ssm04.py b/autotest/test_gwt_ssm04.py index e8400e5fb77..bc6c53f4766 100644 --- a/autotest/test_gwt_ssm04.py +++ b/autotest/test_gwt_ssm04.py @@ -421,10 +421,7 @@ def check_output(idx, test): # load transport budget file fpth = os.path.join(test.workspace, f"{gwtname}.cbc") - bobj = flopy.utils.CellBudgetFile( - fpth, - precision="double", - ) + bobj = flopy.utils.CellBudgetFile(fpth, precision="double") ssmbudall = bobj.get_data(text="SOURCE-SINK MIX") times = cobj.get_times() diff --git a/autotest/test_gwt_ssm04fmi.py b/autotest/test_gwt_ssm04fmi.py index 4187cf1e4ec..7cd9b0d44e3 100644 --- a/autotest/test_gwt_ssm04fmi.py +++ b/autotest/test_gwt_ssm04fmi.py @@ -463,10 +463,7 @@ def eval_transport(wst): # load transport budget file fpth = os.path.join(wst, f"{gwtname}.cbc") - bobj = flopy.utils.CellBudgetFile( - fpth, - precision="double", - ) + bobj = flopy.utils.CellBudgetFile(fpth, precision="double") ssmbudall = bobj.get_data(text="SOURCE-SINK MIX") times = cobj.get_times() diff --git a/autotest/test_gwt_ssm05.py b/autotest/test_gwt_ssm05.py index ff28149bd73..607409099c4 100644 --- a/autotest/test_gwt_ssm05.py +++ b/autotest/test_gwt_ssm05.py @@ -242,10 +242,7 @@ def check_output(idx, test): # load transport budget file fpth = os.path.join(test.workspace, f"{gwtname}.cbc") - bobj = flopy.utils.CellBudgetFile( - fpth, - precision="double", - ) + bobj = flopy.utils.CellBudgetFile(fpth, precision="double") ssmbudall = bobj.get_data(text="SOURCE-SINK MIX") times = cobj.get_times() diff --git a/autotest/test_gwt_ssm06.py b/autotest/test_gwt_ssm06.py index f53c90dcd97..d8d028b708d 100644 --- a/autotest/test_gwt_ssm06.py +++ b/autotest/test_gwt_ssm06.py @@ -292,10 +292,7 @@ def run_flw_and_trnprt_models(dir, exe): pname="SFT-1", ) - mvt = flopy.mf6.modflow.ModflowGwtmvt( - gwt, - pname="MVT-1", - ) + mvt = flopy.mf6.modflow.ModflowGwtmvt(gwt, pname="MVT-1") oc = flopy.mf6.ModflowGwtoc( gwt, diff --git a/autotest/test_gwt_ssm06fmi.py b/autotest/test_gwt_ssm06fmi.py index 70541184c15..366ef643f58 100644 --- a/autotest/test_gwt_ssm06fmi.py +++ b/autotest/test_gwt_ssm06fmi.py @@ -325,10 +325,7 @@ def run_transport_model(dir, exe): pname="SFT-1", ) - mvt = flopy.mf6.modflow.ModflowGwtmvt( - gwt, - pname="MVT-1", - ) + mvt = flopy.mf6.modflow.ModflowGwtmvt(gwt, pname="MVT-1") oc = flopy.mf6.ModflowGwtoc( gwt, diff --git a/autotest/test_gwt_uztmvt2x2.py b/autotest/test_gwt_uztmvt2x2.py index 019d45d92a9..247b1a02d59 100644 --- a/autotest/test_gwt_uztmvt2x2.py +++ b/autotest/test_gwt_uztmvt2x2.py @@ -152,36 +152,10 @@ ustrf = 1.0 ndv = 0 # reach 1 -rp = [ - 0, - (0, 0, 0), - rlen, - rwid, - slope, - top[0, 0, 0], - rbth, - rhk, - roughness, - 1, - ustrf, - 0, -] +rp = [0, (0, 0, 0), rlen, rwid, slope, top[0, 0, 0], rbth, rhk, roughness, 1, ustrf, 0] sfr_pkdat.append(rp) # reach 2 -rp = [ - 1, - (0, 0, 1), - rlen, - rwid, - slope, - top[0, 0, 1], - rbth, - rhk, - roughness, - 1, - ustrf, - 0, -] +rp = [1, (0, 0, 1), rlen, rwid, slope, top[0, 0, 1], rbth, rhk, roughness, 1, ustrf, 0] sfr_pkdat.append(rp) sfr_perdat = {0: [0, "INFLOW", 1.0]} diff --git a/autotest/test_largetestmodels.py b/autotest/test_largetestmodels.py index 4273f9fb745..0856724f1ea 100644 --- a/autotest/test_largetestmodels.py +++ b/autotest/test_largetestmodels.py @@ -1,11 +1,7 @@ from shutil import copytree import pytest -from common_regression import ( - get_mf6_comparison, - setup_mf6, - setup_mf6_comparison, -) +from common_regression import get_mf6_comparison, setup_mf6, setup_mf6_comparison from framework import TestFramework excluded_models = [ diff --git a/autotest/test_netcdf_gwf_disv.py b/autotest/test_netcdf_gwf_disv.py index aa2e912afec..0bf2df8612f 100644 --- a/autotest/test_netcdf_gwf_disv.py +++ b/autotest/test_netcdf_gwf_disv.py @@ -191,13 +191,7 @@ def check_output(idx, test, export, gridded_input): timestep += 1 # NetCDF variables, layered variables end with "_l" - vlist = [ - "disv_top", - "disv_botm_l", - "npf_icelltype_l", - "npf_k_l", - "ic_strt_l", - ] + vlist = ["disv_top", "disv_botm_l", "npf_icelltype_l", "npf_k_l", "ic_strt_l"] # Compare NetCDF package input arrays with FloPy arrays for i, var in enumerate(vlist): diff --git a/autotest/test_netcdf_gwt_prudic2004t2.py b/autotest/test_netcdf_gwt_prudic2004t2.py index ced4bfe0f11..0e0c54004d8 100644 --- a/autotest/test_netcdf_gwt_prudic2004t2.py +++ b/autotest/test_netcdf_gwt_prudic2004t2.py @@ -126,9 +126,7 @@ def check_output(idx, test, export, gridded_input): xds = xa.open_dataset(nc_fpth) cobj = flopy.utils.HeadFile( - os.path.join(ws, f"{gwtname}.ucn"), - precision="double", - text="CONCENTRATION", + os.path.join(ws, f"{gwtname}.ucn"), precision="double", text="CONCENTRATION" ) # Compare NetCDF head arrays with binary headfile concentrations diff --git a/autotest/test_olf_dfw_swrt2dis.py b/autotest/test_olf_dfw_swrt2dis.py index eb6d5ac3f00..a2d15018242 100644 --- a/autotest/test_olf_dfw_swrt2dis.py +++ b/autotest/test_olf_dfw_swrt2dis.py @@ -94,15 +94,9 @@ def build_models(idx, test): idcxs=None, ) - sto = flopy.mf6.ModflowOlfsto( - olf, - save_flows=True, - ) + sto = flopy.mf6.ModflowOlfsto(olf, save_flows=True) - ic = flopy.mf6.ModflowOlfic( - olf, - strt=2.05, - ) + ic = flopy.mf6.ModflowOlfic(olf, strt=2.05) # output control oc = flopy.mf6.ModflowOlfoc( diff --git a/autotest/test_olf_gwf.py b/autotest/test_olf_gwf.py index 918bf1ccc23..bde21ee8b78 100644 --- a/autotest/test_olf_gwf.py +++ b/autotest/test_olf_gwf.py @@ -101,10 +101,7 @@ def add_olf_model(sim): idcxs=None, ) - sto = flopy.mf6.ModflowOlfsto( - olf, - save_flows=True, - ) + sto = flopy.mf6.ModflowOlfsto(olf, save_flows=True) ic = flopy.mf6.ModflowOlfic(olf, strt=1.0) diff --git a/autotest/test_olf_vcatch.py b/autotest/test_olf_vcatch.py index a18794ad650..2e396a454c0 100644 --- a/autotest/test_olf_vcatch.py +++ b/autotest/test_olf_vcatch.py @@ -47,9 +47,8 @@ def build_models(idx, test): dtfailadj = 5.0 nper = 2 - perlen = nper * [ - time_rainfall * 60.0 - ] # convert time_rainfall from minutes to seconds + # convert time_rainfall from minutes to seconds + perlen = nper * [time_rainfall * 60.0] nstp = nper * [1] tsmult = nper * [1] diff --git a/autotest/test_par_gwe_split_analyt.py b/autotest/test_par_gwe_split_analyt.py index 6e0943433d1..cdeaf2418e2 100644 --- a/autotest/test_par_gwe_split_analyt.py +++ b/autotest/test_par_gwe_split_analyt.py @@ -11,18 +11,14 @@ def build_models(idx, test): - from test_gwe_split_analyt import ( - build_models as build, - ) + from test_gwe_split_analyt import build_models as build sim, dummy = build(idx, test) return sim, dummy def check_output(idx, test): - from test_gwe_split_analyt import ( - check_output as check, - ) + from test_gwe_split_analyt import check_output as check check(idx, test) diff --git a/autotest/test_par_gwt_adv02.py b/autotest/test_par_gwt_adv02.py index f02574f23c4..61f00e0b035 100644 --- a/autotest/test_par_gwt_adv02.py +++ b/autotest/test_par_gwt_adv02.py @@ -13,11 +13,7 @@ @pytest.mark.developmode @pytest.mark.parametrize("idx, name", enumerate(cases)) def test_mf6model(idx, name, function_tmpdir, targets): - from test_gwt_adv02_gwtgwt import ( - build_models, - check_output, - number_of_models, - ) + from test_gwt_adv02_gwtgwt import build_models, check_output, number_of_models test = TestFramework( name=name, diff --git a/autotest/test_prt_budget.py b/autotest/test_prt_budget.py index 058d8b64648..52fbe339401 100644 --- a/autotest/test_prt_budget.py +++ b/autotest/test_prt_budget.py @@ -253,10 +253,7 @@ def check_output(idx, test): # check mf6 prt particle track data were written to binary/CSV files # and that different formats are equal - for track_csv in [ - prt_ws / prt_track_csv_file, - prt_ws / prp_track_csv_file, - ]: + for track_csv in [prt_ws / prt_track_csv_file, prt_ws / prp_track_csv_file]: check_track_data( track_bin=prt_ws / prt_track_file, track_hdr=prt_ws / Path(prt_track_file.replace(".trk", ".trk.hdr")), diff --git a/autotest/test_prt_disv1.py b/autotest/test_prt_disv1.py index f7042c59174..98d8bbf65d8 100644 --- a/autotest/test_prt_disv1.py +++ b/autotest/test_prt_disv1.py @@ -70,15 +70,7 @@ # vertex grid properties -disvkwargs = get_disv_kwargs( - nlay, - nrow, - ncol, - delr, - delc, - top, - botm, -) +disvkwargs = get_disv_kwargs(nlay, nrow, ncol, delr, delc, top, botm) # release points in mp7 format releasepts_mp7 = [ @@ -283,10 +275,7 @@ def build_mp7_sim(idx, ws, mp7, gwf): headfilename=f"{gwf.name}.hds", budgetfilename=f"{gwf.name}.cbc", ) - mpbas = flopy.modpath.Modpath7Bas( - mp, - porosity=porosity, - ) + mpbas = flopy.modpath.Modpath7Bas(mp, porosity=porosity) mpsim = flopy.modpath.Modpath7Sim( mp, simulationtype=( @@ -501,13 +490,7 @@ def check_output(idx, test): plot = False if "bprp" not in name and plot: plot_output( - name, - gwf, - head, - (qx, qy), - mf6_pls, - mp7_pls, - gwf_ws / f"test_{simname}.png", + name, gwf, head, (qx, qy), mf6_pls, mp7_pls, gwf_ws / f"test_{simname}.png" ) # compare prt and mp7 results diff --git a/autotest/test_prt_exg.py b/autotest/test_prt_exg.py index a315de514ad..88a71d5cd78 100644 --- a/autotest/test_prt_exg.py +++ b/autotest/test_prt_exg.py @@ -140,10 +140,7 @@ def build_mp7_sim(idx, ws, mp7, gwf): headfilename=f"{gwf.name}.hds", budgetfilename=f"{gwf.name}.bud", ) - mpbas = flopy.modpath.Modpath7Bas( - mp, - porosity=FlopyReadmeCase.porosity, - ) + mpbas = flopy.modpath.Modpath7Bas(mp, porosity=FlopyReadmeCase.porosity) mpsim = flopy.modpath.Modpath7Sim( mp, simulationtype="pathline", diff --git a/autotest/test_prt_fmi.py b/autotest/test_prt_fmi.py index a39f5183efb..c92dacd383a 100644 --- a/autotest/test_prt_fmi.py +++ b/autotest/test_prt_fmi.py @@ -172,10 +172,7 @@ def build_mp7_sim(name, ws, mp7, gwf): headfilename=f"{gwf.name}.hds", budgetfilename=f"{gwf.name}.bud", ) - mpbas = flopy.modpath.Modpath7Bas( - mp, - porosity=FlopyReadmeCase.porosity, - ) + mpbas = flopy.modpath.Modpath7Bas(mp, porosity=FlopyReadmeCase.porosity) mpsim = flopy.modpath.Modpath7Sim( mp, simulationtype="pathline", diff --git a/autotest/test_prt_libmf6_budget.py b/autotest/test_prt_libmf6_budget.py index 454dbd44d99..f4796a5853b 100644 --- a/autotest/test_prt_libmf6_budget.py +++ b/autotest/test_prt_libmf6_budget.py @@ -8,12 +8,7 @@ import pytest from framework import TestFramework from modflow_devtools.markers import requires_pkg -from test_prt_budget import ( - HorizontalCase, - build_mp7_sim, - build_prt_sim, - check_output, -) +from test_prt_budget import HorizontalCase, build_mp7_sim, build_prt_sim, check_output simname = "prt_libmf6" cases = [simname] diff --git a/autotest/test_prt_quad_refinement.py b/autotest/test_prt_quad_refinement.py index d9e23af47bf..8813875c9cb 100644 --- a/autotest/test_prt_quad_refinement.py +++ b/autotest/test_prt_quad_refinement.py @@ -258,10 +258,7 @@ def check_output(idx, test, snapshot): ) # plot nodes - xc, yc = ( - mg.get_xcellcenters_for_layer(0), - mg.get_ycellcenters_for_layer(0), - ) + xc, yc = (mg.get_xcellcenters_for_layer(0), mg.get_ycellcenters_for_layer(0)) for i in range(mg.ncpl): x, y = xc[i], yc[i] ax.annotate(str(i + 1), (x, y), color="grey", alpha=0.5) diff --git a/autotest/test_prt_release_timing.py b/autotest/test_prt_release_timing.py index 0b656bb6363..6fb4a49f528 100644 --- a/autotest/test_prt_release_timing.py +++ b/autotest/test_prt_release_timing.py @@ -230,10 +230,7 @@ def build_mp7_sim(name, ws, mp7, gwf): headfilename=f"{gwf.name}.hds", budgetfilename=f"{gwf.name}.bud", ) - mpbas = flopy.modpath.Modpath7Bas( - mp, - porosity=FlopyReadmeCase.porosity, - ) + mpbas = flopy.modpath.Modpath7Bas(mp, porosity=FlopyReadmeCase.porosity) mpsim = flopy.modpath.Modpath7Sim( mp, simulationtype="pathline", diff --git a/autotest/test_prt_stop_zones.py b/autotest/test_prt_stop_zones.py index 3eaf0f772ee..158e2625d16 100644 --- a/autotest/test_prt_stop_zones.py +++ b/autotest/test_prt_stop_zones.py @@ -187,10 +187,7 @@ def build_mp7_sim(name, ws, mp7, gwf): headfilename=f"{gwf.name}.hds", budgetfilename=f"{gwf.name}.bud", ) - mpbas = flopy.modpath.Modpath7Bas( - mp, - porosity=FlopyReadmeCase.porosity, - ) + mpbas = flopy.modpath.Modpath7Bas(mp, porosity=FlopyReadmeCase.porosity) nlay = int(name[-1]) izone = create_izone(nlay, FlopyReadmeCase.nrow, FlopyReadmeCase.ncol) mpsim = flopy.modpath.Modpath7Sim( @@ -374,14 +371,7 @@ def plot_stop_zone(nn, ax): if row.ireason == 3: # termination continue - x, y, z, t, ilay, icell = ( - row.x, - row.y, - row.z, - row.t, - row.ilay, - row.icell, - ) + x, y, z, t, ilay, icell = (row.x, row.y, row.z, row.t, row.ilay, row.icell) k, i, j = mg.intersect(x, y, z) nn = mg.get_node([k, i, j]) + 1 neighbors = mg.neighbors(nn) diff --git a/autotest/test_prt_ternary_methods.py b/autotest/test_prt_ternary_methods.py index 1645b56d2f5..ef635917031 100644 --- a/autotest/test_prt_ternary_methods.py +++ b/autotest/test_prt_ternary_methods.py @@ -157,18 +157,10 @@ def plot_output(name, gwf, head, spdis, pls, fpath): if "wel" in name: handles.append( mpl.lines.Line2D( - [0], - [0], - marker="o", - linestyle="", - label="Well", - markerfacecolor="red", - ), + [0], [0], marker="o", linestyle="", label="Well", markerfacecolor="red" + ) ) - ax.legend( - handles=handles, - loc="lower right", - ) + ax.legend(handles=handles, loc="lower right") pmv.plot_vector(*spdis, normalize=True, alpha=0.25) if "wel" in name: pmv.plot_bc(ftype="WEL") diff --git a/autotest/test_prt_track_events.py b/autotest/test_prt_track_events.py index 0a4ad472f47..8c28f0f18df 100644 --- a/autotest/test_prt_track_events.py +++ b/autotest/test_prt_track_events.py @@ -274,10 +274,7 @@ def build_mp7_sim(name, ws, mp7, gwf): headfilename=f"{gwf.name}.hds", budgetfilename=f"{gwf.name}.bud", ) - mpbas = flopy.modpath.Modpath7Bas( - mp, - porosity=FlopyReadmeCase.porosity, - ) + mpbas = flopy.modpath.Modpath7Bas(mp, porosity=FlopyReadmeCase.porosity) mpsim = flopy.modpath.Modpath7Sim( mp, simulationtype="pathline", @@ -464,14 +461,7 @@ def all_equal(col, val): if row.ireason == 3: # termination continue - x, y, z, t, ilay, icell = ( - row.x, - row.y, - row.z, - row.t, - row.ilay, - row.icell, - ) + x, y, z, t, ilay, icell = (row.x, row.y, row.z, row.t, row.ilay, row.icell) k, i, j = mg.intersect(x, y, z) nn = mg.get_node([k, i, j]) + 1 neighbors = mg.neighbors(nn) diff --git a/autotest/test_prt_triangle.py b/autotest/test_prt_triangle.py index e11d364abbb..9186f3a0537 100644 --- a/autotest/test_prt_triangle.py +++ b/autotest/test_prt_triangle.py @@ -243,10 +243,7 @@ def plot_output(name, grid, head, spdis, pls): legend=False, color="red" if iprp == 1 else "blue", ) - xc, yc = ( - grid.get_xcellcenters_for_layer(0), - grid.get_ycellcenters_for_layer(0), - ) + xc, yc = (grid.get_xcellcenters_for_layer(0), grid.get_ycellcenters_for_layer(0)) for i in range(grid.ncpl): x, y = xc[i], yc[i] ax.plot(x, y, "o", color="grey", alpha=0.25, ms=2) diff --git a/autotest/test_prt_voronoi1.py b/autotest/test_prt_voronoi1.py index 50e3a5a15f3..2bdb18cfb23 100644 --- a/autotest/test_prt_voronoi1.py +++ b/autotest/test_prt_voronoi1.py @@ -230,17 +230,9 @@ def build_prt_sim(idx, name, gwf_ws, prt_ws, targets, cell_ids): gwf_budget_file = gwf_ws / f"{gwf_name}.bud" gwf_head_file = gwf_ws / f"{gwf_name}.hds" flopy.mf6.ModflowPrtfmi( - prt, - packagedata=[ - ("GWFHEAD", gwf_head_file), - ("GWFBUDGET", gwf_budget_file), - ], - ) - ems = flopy.mf6.ModflowEms( - sim, - pname="ems", - filename=f"{prt_name}.ems", + prt, packagedata=[("GWFHEAD", gwf_head_file), ("GWFBUDGET", gwf_budget_file)] ) + ems = flopy.mf6.ModflowEms(sim, pname="ems", filename=f"{prt_name}.ems") sim.register_solution_package(ems, [prt.name]) return sim @@ -248,12 +240,7 @@ def build_prt_sim(idx, name, gwf_ws, prt_ws, targets, cell_ids): def build_models(idx, test): gwf_sim, cell_ids = build_gwf_sim(test.name, test.workspace, test.targets) prt_sim = build_prt_sim( - idx, - test.name, - test.workspace, - test.workspace / "prt", - test.targets, - cell_ids, + idx, test.name, test.workspace, test.workspace / "prt", test.targets, cell_ids ) return gwf_sim, prt_sim @@ -283,18 +270,10 @@ def plot_output(name, gwf, head, spdis, pls, fpath): if "wel" in name: handles.append( mpl.lines.Line2D( - [0], - [0], - marker="o", - linestyle="", - label="Well", - markerfacecolor="red", - ), + [0], [0], marker="o", linestyle="", label="Well", markerfacecolor="red" + ) ) - ax.legend( - handles=handles, - loc="lower right", - ) + ax.legend(handles=handles, loc="lower right") pmv.plot_vector(*spdis, normalize=True, alpha=0.25) if "wel" in name: pmv.plot_bc(ftype="WEL") diff --git a/autotest/test_prt_voronoi2.py b/autotest/test_prt_voronoi2.py index 2bb10ac0f4a..30cc846b926 100644 --- a/autotest/test_prt_voronoi2.py +++ b/autotest/test_prt_voronoi2.py @@ -243,11 +243,7 @@ def check_output(idx, test): concctr = pmv.contour_array(conc, levels=(0.0001, 0.001, 0.01, 0.1), colors="y") plt.clabel(concctr) plt.colorbar( - concmesh, - shrink=0.25, - ax=ax, - label="Concentration", - location="right", + concmesh, shrink=0.25, ax=ax, label="Concentration", location="right" ) handles = [ @@ -261,10 +257,7 @@ def check_output(idx, test): markerfacecolor="gray", ), ] - ax.legend( - handles=handles, - loc="lower right", - ) + ax.legend(handles=handles, loc="lower right") pmv.plot_vector(qx, qy, normalize=True, alpha=0.25) mf6_plines = pls.groupby(["iprp", "irpt", "trelease"]) for ipl, ((iprp, irpt, trelease), pl) in enumerate(mf6_plines): diff --git a/autotest/test_testmodels_mf6.py b/autotest/test_testmodels_mf6.py index 52a923d2f90..8406a5b9ccd 100644 --- a/autotest/test_testmodels_mf6.py +++ b/autotest/test_testmodels_mf6.py @@ -1,11 +1,7 @@ from shutil import copytree import pytest -from common_regression import ( - get_mf6_comparison, - setup_mf6, - setup_mf6_comparison, -) +from common_regression import get_mf6_comparison, setup_mf6, setup_mf6_comparison from framework import TestFramework excluded_models = [ diff --git a/distribution/benchmark.py b/distribution/benchmark.py index 89344350b3e..203898b246a 100644 --- a/distribution/benchmark.py +++ b/distribution/benchmark.py @@ -42,11 +42,7 @@ def download_previous_version(output_path: PathLike) -> Tuple[str, Path]: f"https://github.com/{GITHUB_REPO}" + f"/releases/download/{version}/{distname}.zip" ) - download_and_unzip( - url, - path=output_path, - verbose=True, - ) + download_and_unzip(url, path=output_path, verbose=True) return version, output_path / distname @@ -54,10 +50,7 @@ def download_previous_version(output_path: PathLike) -> Tuple[str, Path]: def get_mf6_cmdargs(app, argv, text="mf6:", verbose=False): return_text = None proc = subprocess.Popen( - argv, - stdout=subprocess.PIPE, - stderr=subprocess.PIPE, - cwd=os.path.dirname(app), + argv, stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=os.path.dirname(app) ) result, error = proc.communicate() if result is not None: @@ -94,11 +87,7 @@ def get_mf6_compiler(app, verbose=False): def revert_files(app, example): - replace_dict = { - ".ims": { - (6, 1, 1): ("dvclose", "hclose"), - } - } + replace_dict = {".ims": {(6, 1, 1): ("dvclose", "hclose")}} extensions = list(replace_dict.keys()) # get current version @@ -165,16 +154,7 @@ def elapsed_real_to_string(elt): def run_function(id, app, example): - return ( - id, - flopy.run_model( - app, - None, - model_ws=example, - silent=True, - report=True, - ), - ) + return (id, flopy.run_model(app, None, model_ws=example, silent=True, report=True)) def run_model(current_app: PathLike, previous_app: PathLike, model_path: PathLike): @@ -383,11 +363,7 @@ def run_benchmarks( previous_total = 0.0 lines = [] for idx, example in enumerate(example_dirs): - success, t, t0, line = run_model( - current_exe, - previous_exe, - example, - ) + success, t, t0, line = run_model(current_exe, previous_exe, example) if not success: print(f"{example} run failed") current_total += t diff --git a/distribution/build_docs.py b/distribution/build_docs.py index 6e5f73405ff..4ea33a1c459 100644 --- a/distribution/build_docs.py +++ b/distribution/build_docs.py @@ -26,13 +26,7 @@ from modflow_devtools.markers import no_parallel, requires_exe, requires_github from modflow_devtools.misc import run_cmd, run_py_script, set_dir -from utils import ( - assert_match, - convert_line_endings, - get_project_root_path, - glob, - match, -) +from utils import assert_match, convert_line_endings, get_project_root_path, glob, match # paths PROJ_ROOT_PATH = get_project_root_path() @@ -463,18 +457,10 @@ def build_documentation( raise # convert LaTex to PDF - build_pdfs( - tex_paths=TEX_PATHS["full"], - output_path=output_path, - force=force, - ) + build_pdfs(tex_paths=TEX_PATHS["full"], output_path=output_path, force=force) else: # just convert LaTeX to PDF - build_pdfs( - tex_paths=TEX_PATHS["minimal"], - output_path=output_path, - force=force, - ) + build_pdfs(tex_paths=TEX_PATHS["minimal"], output_path=output_path, force=force) # enforce os line endings on all text files windows_line_endings = True diff --git a/distribution/update_version.py b/distribution/update_version.py index 934f7097fbb..a7ca0cdf433 100755 --- a/distribution/update_version.py +++ b/distribution/update_version.py @@ -298,11 +298,7 @@ def update_citation_cff(version: Version, timestamp: datetime): with open(path, "w") as f: yaml.safe_dump( - citation, - f, - allow_unicode=True, - default_flow_style=False, - sort_keys=False, + citation, f, allow_unicode=True, default_flow_style=False, sort_keys=False ) log_update(path, version) diff --git a/doc/SuppTechInfo/python/STO-SpecificStorage.ipynb b/doc/SuppTechInfo/python/STO-SpecificStorage.ipynb index 90259af5d70..d58a63c90d5 100644 --- a/doc/SuppTechInfo/python/STO-SpecificStorage.ipynb +++ b/doc/SuppTechInfo/python/STO-SpecificStorage.ipynb @@ -116,10 +116,7 @@ "outputs": [], "source": [ "fig, axes = plt.subplots(\n", - " nrows=1,\n", - " ncols=1,\n", - " constrained_layout=True,\n", - " figsize=(width, 0.3 * width),\n", + " nrows=1, ncols=1, constrained_layout=True, figsize=(width, 0.3 * width)\n", ")\n", "\n", "ax = axes\n", @@ -140,12 +137,7 @@ "ax.set_ylim(0, 1e6)\n", "ax.set_xlabel(\"Cell thickness, in length units\")\n", "ax.set_ylabel(r\"Q$_{SS}$\" + \" Differences,\\nin cubic length per time units\")\n", - "spnspecs.graph_legend(\n", - " ax,\n", - " ncol=2,\n", - " labelspacing=0.2,\n", - " columnspacing=0.5,\n", - ")\n", + "spnspecs.graph_legend(ax, ncol=2, labelspacing=0.2, columnspacing=0.5)\n", "spnspecs.remove_edge_ticks(ax);\n", "\n", "# fpth = os.path.join(figpth, 'STOSsError.pdf')\n", @@ -191,10 +183,7 @@ "outputs": [], "source": [ "fig, axes = plt.subplots(\n", - " nrows=1,\n", - " ncols=1,\n", - " constrained_layout=True,\n", - " figsize=(width, 0.3 * width),\n", + " nrows=1, ncols=1, constrained_layout=True, figsize=(width, 0.3 * width)\n", ")\n", "\n", "ax = axes\n", @@ -215,12 +204,7 @@ "ax.set_ylim(0, 10)\n", "ax.set_xlabel(\"Cell thickness, in meters\")\n", "ax.set_ylabel(r\"$\\Delta$ Q$_{SS}$, in meters$^3$/ day\")\n", - "spnspecs.graph_legend(\n", - " ax,\n", - " ncol=2,\n", - " labelspacing=0.2,\n", - " columnspacing=0.5,\n", - ")\n", + "spnspecs.graph_legend(ax, ncol=2, labelspacing=0.2, columnspacing=0.5)\n", "spnspecs.remove_edge_ticks(ax)\n", "fpth = os.path.join(figpth, \"STOSsError.pdf\")\n", "fig.savefig(fpth, dpi=dpi);" diff --git a/doc/mf6io/mf6ivar/mem_allocate.py b/doc/mf6io/mf6ivar/mem_allocate.py index 331971b8185..6539351f34f 100755 --- a/doc/mf6io/mf6ivar/mem_allocate.py +++ b/doc/mf6io/mf6ivar/mem_allocate.py @@ -105,14 +105,7 @@ def line_list_to_var_list(line_list, fname): def write_md(memvar_list, fmd): "write markdown table records for list of memory managed variables" for l in memvar_list: - ( - source_name, - current_module, - typename, - fortran_varname, - varname, - dims, - ) = l + (source_name, current_module, typename, fortran_varname, varname, dims) = l write_md_record(fmd, source_name, current_module, typename, varname, dims) return @@ -120,14 +113,7 @@ def write_md(memvar_list, fmd): def write_tex(memvar_list, ftex): "write latex table records for list of memory managed variables" for l in memvar_list: - ( - source_name, - current_module, - typename, - fortran_varname, - varname, - dims, - ) = l + (source_name, current_module, typename, fortran_varname, varname, dims) = l write_tex_record(ftex, typename, varname, dims) return diff --git a/utils/idmloader/scripts/dfn2f90.py b/utils/idmloader/scripts/dfn2f90.py index fdaea6d333e..6478ca06b20 100644 --- a/utils/idmloader/scripts/dfn2f90.py +++ b/utils/idmloader/scripts/dfn2f90.py @@ -586,25 +586,13 @@ def _write_selectors(self): self._write_selector_decl(fh, component=c, sc_list=self._d[c]) self._write_selector_helpers(fh) self._write_selector_defn( - fh, - component=c, - sc_list=self._d[c], - defn="param", - dtype="param", + fh, component=c, sc_list=self._d[c], defn="param", dtype="param" ) self._write_selector_defn( - fh, - component=c, - sc_list=self._d[c], - defn="aggregate", - dtype="param", + fh, component=c, sc_list=self._d[c], defn="aggregate", dtype="param" ) self._write_selector_defn( - fh, - component=c, - sc_list=self._d[c], - defn="block", - dtype="block", + fh, component=c, sc_list=self._d[c], defn="block", dtype="block" ) self._write_selector_multi(fh, component=c, sc_list=self._d[c]) self._write_selector_sub(fh, component=c, sc_list=self._d[c])