Skip to content

feat(netcdf): support creating and loading model netcdf input files #2417

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 15 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,302 changes: 1,302 additions & 0 deletions autotest/regression/test_model_netcdf.py

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions etc/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,6 @@ dependencies:
- scipy
- shapely>=2.0
- vtk
- xarray
- xmipy
- h5py
Binary file not shown.
Binary file not shown.
Binary file not shown.
13 changes: 13 additions & 0 deletions examples/data/mf6/netcdf/test_gwf_disv01b/disv01b/disv01b.chd
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# File generated by Flopy version 3.10.0.dev1 on 01/14/2025 at 13:13:00.
BEGIN options
END options

BEGIN dimensions
MAXBOUND 2
END dimensions

BEGIN period 1
1 1 1.00000000E+00
1 9 0.00000000E+00
END period 1

47 changes: 47 additions & 0 deletions examples/data/mf6/netcdf/test_gwf_disv01b/disv01b/disv01b.disv
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# NOT generated by Flopy
BEGIN options
END options

BEGIN dimensions
NLAY 3
NCPL 9
NVERT 16
END dimensions

BEGIN griddata
top NETCDF
botm NETCDF
idomain NETCDF
END griddata

BEGIN vertices
1 1.00000000E+08 1.00000030E+08
2 1.00000010E+08 1.00000030E+08
3 1.00000020E+08 1.00000030E+08
4 1.00000030E+08 1.00000030E+08
5 1.00000000E+08 1.00000020E+08
6 1.00000010E+08 1.00000020E+08
7 1.00000020E+08 1.00000020E+08
8 1.00000030E+08 1.00000020E+08
9 1.00000000E+08 1.00000010E+08
10 1.00000010E+08 1.00000010E+08
11 1.00000020E+08 1.00000010E+08
12 1.00000030E+08 1.00000010E+08
13 1.00000000E+08 1.00000000E+08
14 1.00000010E+08 1.00000000E+08
15 1.00000020E+08 1.00000000E+08
16 1.00000030E+08 1.00000000E+08
END vertices

BEGIN cell2d
1 1.00000005E+08 1.00000025E+08 4 1 2 6 5
2 1.00000015E+08 1.00000025E+08 4 2 3 7 6
3 1.00000025E+08 1.00000025E+08 4 3 4 8 7
4 1.00000005E+08 1.00000015E+08 4 5 6 10 9
5 1.00000015E+08 1.00000015E+08 4 6 7 11 10
6 1.00000025E+08 1.00000015E+08 4 7 8 12 11
7 1.00000005E+08 1.00000005E+08 4 9 10 14 13
8 1.00000015E+08 1.00000005E+08 4 10 11 15 14
9 1.00000025E+08 1.00000005E+08 4 11 12 16 15
END cell2d

7 changes: 7 additions & 0 deletions examples/data/mf6/netcdf/test_gwf_disv01b/disv01b/disv01b.ic
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# NOT generated by Flopy
BEGIN options
END options

BEGIN griddata
strt NETCDF
END griddata
5 changes: 5 additions & 0 deletions examples/data/mf6/netcdf/test_gwf_disv01b/disv01b/disv01b.ims
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# File generated by Flopy version 3.10.0.dev1 on 01/14/2025 at 13:12:59.
BEGIN options
PRINT_OPTION summary
END options

Binary file not shown.
12 changes: 12 additions & 0 deletions examples/data/mf6/netcdf/test_gwf_disv01b/disv01b/disv01b.nam
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# NOT generated by Flopy
BEGIN options
NETCDF FILEIN disv01b.in.nc
END options

BEGIN packages
DISV6 disv01b.disv disv
IC6 disv01b.ic ic
NPF6 disv01b.npf npf
CHD6 disv01b.chd chd_0
OC6 disv01b.oc oc
END packages
8 changes: 8 additions & 0 deletions examples/data/mf6/netcdf/test_gwf_disv01b/disv01b/disv01b.npf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# NOT generated by Flopy
BEGIN options
END options

BEGIN griddata
icelltype NETCDF
k NETCDF
END griddata
9 changes: 9 additions & 0 deletions examples/data/mf6/netcdf/test_gwf_disv01b/disv01b/disv01b.oc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# File generated by Flopy version 3.10.0.dev1 on 01/14/2025 at 13:13:00.
BEGIN options
HEAD FILEOUT disv01b.hds
END options

BEGIN period 1
SAVE HEAD ALL
END period 1

13 changes: 13 additions & 0 deletions examples/data/mf6/netcdf/test_gwf_disv01b/disv01b/disv01b.tdis
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# File generated by Flopy version 3.10.0.dev1 on 01/14/2025 at 13:12:59.
BEGIN options
START_DATE_TIME 2041-01-01t00:00:00-05:00
END options

BEGIN dimensions
NPER 1
END dimensions

BEGIN perioddata
1.00000000 1 1.00000000
END perioddata

19 changes: 19 additions & 0 deletions examples/data/mf6/netcdf/test_gwf_disv01b/disv01b/mfsim.nam
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# File generated by Flopy version 3.10.0.dev1 on 01/14/2025 at 13:12:59.
BEGIN options
END options

BEGIN timing
TDIS6 disv01b.tdis
END timing

BEGIN models
gwf6 disv01b.nam disv01b
END models

BEGIN exchanges
END exchanges

BEGIN solutiongroup 1
ims6 disv01b.ims disv01b
END solutiongroup 1

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# File generated by Flopy version 3.10.0.dev1 on 01/06/2025 at 14:17:11.
BEGIN options
END options

BEGIN dimensions
MAXBOUND 4
END dimensions

BEGIN period 1
1 10 4 0.00000000E+00
1 10 5 0.00000000E+00
1 10 6 0.00000000E+00
1 10 7 0.00000000E+00
END period 1

Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# NOT generated by Flopy
BEGIN options
END options

BEGIN dimensions
NLAY 3
NROW 10
NCOL 10
END dimensions

BEGIN griddata
delr NETCDF
delc NETCDF
top NETCDF
botm NETCDF
END griddata

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# NOT generated by Flopy
BEGIN options
END options

BEGIN griddata
strt NETCDF
END griddata
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# File generated by Flopy version 3.10.0.dev1 on 01/06/2025 at 14:17:11.
BEGIN options
PRINT_OPTION summary
END options

BEGIN nonlinear
OUTER_DVCLOSE 1.00000000E-09
OUTER_MAXIMUM 500
UNDER_RELAXATION none
END nonlinear

BEGIN linear
INNER_MAXIMUM 300
INNER_DVCLOSE 1.00000000E-09
inner_rclose 1.00000000E-06
LINEAR_ACCELERATION bicgstab
RELAXATION_FACTOR 1.00000000
SCALING_METHOD none
REORDERING_METHOD none
END linear

Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# NOT generated by Flopy
BEGIN options
SAVE_FLOWS
NEWTON
NETCDF FILEIN gwf_sto01.in.nc
END options

BEGIN packages
DIS6 gwf_sto01.dis dis
IC6 gwf_sto01.ic ic
NPF6 gwf_sto01.npf npf
STO6 gwf_sto01.sto sto
RCH6 gwf_sto01.rcha rcha_0
WEL6 gwf_sto01.wel wel_0
CHD6 gwf_sto01.chd chd_0
OC6 gwf_sto01.oc oc
END packages
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# NOT generated by Flopy
BEGIN options
END options

BEGIN griddata
icelltype NETCDF
k NETCDF
k33 NETCDF
END griddata
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# File generated by Flopy version 3.10.0.dev1 on 01/06/2025 at 14:17:11.
BEGIN options
BUDGET FILEOUT gwf_sto01.cbc
HEAD FILEOUT gwf_sto01.hds
HEAD PRINT_FORMAT COLUMNS 10 WIDTH 15 DIGITS 6 GENERAL
END options

BEGIN period 1
SAVE HEAD ALL
SAVE BUDGET ALL
PRINT HEAD LAST
PRINT BUDGET ALL
END period 1

Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# File generated by Flopy version 3.10.0.dev1 on 01/06/2025 at 14:17:11.
BEGIN options
READASARRAYS
END options

BEGIN period 1
recharge
INTERNAL FACTOR 1.0
0.00150000 0.00150000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00150000 0.00150000
0.00150000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00150000
0.00150000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00150000
0.00150000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000
0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000
0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000
0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000
0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000
0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000
0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000
END period 1

Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# NOT generated by Flopy
BEGIN options
END options

BEGIN griddata
iconvert NETCDF
ss NETCDF
sy NETCDF
END griddata

BEGIN period 1
STEADY-STATE
END period 1

BEGIN period 2
TRANSIENT
END period 2
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# File generated by Flopy version 3.10.0.dev1 on 01/06/2025 at 14:17:11.
BEGIN options
TIME_UNITS days
START_DATE_TIME 2041-01-01t00:00:00-05:00
END options

BEGIN dimensions
NPER 31
END dimensions

BEGIN perioddata
1.00000000 1 1.00000000
365.25000000 6 1.30000000
365.25000000 6 1.30000000
365.25000000 6 1.30000000
365.25000000 6 1.30000000
365.25000000 6 1.30000000
365.25000000 6 1.30000000
365.25000000 6 1.30000000
365.25000000 6 1.30000000
365.25000000 6 1.30000000
365.25000000 6 1.30000000
365.25000000 6 1.30000000
365.25000000 6 1.30000000
365.25000000 6 1.30000000
365.25000000 6 1.30000000
365.25000000 6 1.30000000
365.25000000 6 1.30000000
365.25000000 6 1.30000000
365.25000000 6 1.30000000
365.25000000 6 1.30000000
365.25000000 6 1.30000000
365.25000000 6 1.30000000
365.25000000 6 1.30000000
365.25000000 6 1.30000000
365.25000000 6 1.30000000
365.25000000 6 1.30000000
365.25000000 6 1.30000000
365.25000000 6 1.30000000
365.25000000 6 1.30000000
365.25000000 6 1.30000000
365.25000000 6 1.30000000
END perioddata

Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# File generated by Flopy version 3.10.0.dev1 on 01/06/2025 at 14:17:11.
BEGIN options
PRINT_INPUT
PRINT_FLOWS
END options

BEGIN dimensions
MAXBOUND 4
END dimensions

BEGIN period 2
3 3 6 -1.40000000E+04
3 3 7 -8.00000000E+03
3 4 6 -5.00000000E+03
3 4 7 -3.00000000E+03
END period 2

19 changes: 19 additions & 0 deletions examples/data/mf6/netcdf/test_gwf_sto01_mesh/gwf_sto01/mfsim.nam
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# File generated by Flopy version 3.10.0.dev1 on 01/06/2025 at 14:17:11.
BEGIN options
END options

BEGIN timing
TDIS6 gwf_sto01.tdis
END timing

BEGIN models
gwf6 gwf_sto01.nam gwf_sto01
END models

BEGIN exchanges
END exchanges

BEGIN solutiongroup 1
ims6 gwf_sto01.ims gwf_sto01
END solutiongroup 1

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# File generated by Flopy version 3.10.0.dev1 on 01/06/2025 at 14:17:14.
BEGIN options
END options

BEGIN dimensions
MAXBOUND 4
END dimensions

BEGIN period 1
1 10 4 0.00000000E+00
1 10 5 0.00000000E+00
1 10 6 0.00000000E+00
1 10 7 0.00000000E+00
END period 1

Loading
Loading