MODFLOW 6 version 6.9.0.dev0
USGS Modular Hydrologic Model
Loading...
Searching...
No Matches
loadncinputmodule Module Reference

This module contains the LoadNCInputModule. More...

Data Types

interface  netcdf_read_array

Functions/Subroutines

subroutine error_and_exit (tagname, input_fname)
 Set an error and exit if NetCDF libraries are not available.
subroutine nc_read_int1d (int1d, mshape, idt, mf6_input, nc_vars, input_fname, iout, kper)
 Read a NetCDF integer 1d array.
subroutine nc_read_int2d (int2d, mshape, idt, mf6_input, nc_vars, input_fname, iout)
 Read a NetCDF integer 2d array.
subroutine nc_read_int3d (int3d, mshape, idt, mf6_input, nc_vars, input_fname, iout)
 Read a NetCDF integer 3d array.
subroutine nc_read_dbl1d (dbl1d, mshape, idt, mf6_input, nc_vars, input_fname, iout, kper, iaux)
 Read a NetCDF double 1d array.
subroutine nc_read_dbl2d (dbl2d, mshape, idt, mf6_input, nc_vars, input_fname, iout)
 Read a NetCDF double 2d array.
subroutine nc_read_dbl3d (dbl3d, mshape, idt, mf6_input, nc_vars, input_fname, iout)
 Read a NetCDF double 3d array.

Detailed Description

Access interfaces for netcdf reads optioned from a traditional modflow 6 input. These interfaces throw an error when netcdf libraries aren't compiled in.

Function/Subroutine Documentation

◆ error_and_exit()

subroutine loadncinputmodule::error_and_exit ( character(len=*), intent(in) tagname,
character(len=*), intent(in) input_fname )
private

Definition at line 32 of file LoadNCInput.F90.

33 use simvariablesmodule, only: errmsg
35 character(len=*), intent(in) :: tagname
36 character(len=*), intent(in) :: input_fname
37 write (errmsg, '(a)') &
38 'Cannot load NetCDF array for variable "'//trim(tagname)// &
39 '". NetCDF libraries are not available. Ensure Extended MODFLOW 6 in use.'
41 call store_error_filename(input_fname)
This module contains simulation methods.
Definition Sim.f90:10
subroutine, public store_error(msg, terminate)
Store an error message.
Definition Sim.f90:94
subroutine, public store_error_filename(filename, terminate)
Store the erroring file name.
Definition Sim.f90:208
This module contains simulation variables.
character(len=maxcharlen) errmsg
error message string
Here is the call graph for this function:
Here is the caller graph for this function:

◆ nc_read_dbl1d()

subroutine loadncinputmodule::nc_read_dbl1d ( real(dp), dimension(:), intent(in), pointer, contiguous dbl1d,
integer(i4b), dimension(:), intent(in), pointer, contiguous mshape,
type(inputparamdefinitiontype), intent(in) idt,
type(modflowinputtype), intent(in) mf6_input,
type(ncpackagevarstype), intent(in), pointer nc_vars,
character(len=*), intent(in) input_fname,
integer(i4b), intent(in) iout,
integer(i4b), intent(in), optional kper,
integer(i4b), intent(in), optional iaux )
private
Parameters
[in]mshapemodel shape
[in]idtinput data type object describing this record

Definition at line 105 of file LoadNCInput.F90.

107 real(DP), dimension(:), pointer, contiguous, intent(in) :: dbl1d
108 integer(I4B), dimension(:), contiguous, pointer, intent(in) :: mshape !< model shape
109 type(InputParamDefinitionType), intent(in) :: idt !< input data type object describing this record
110 type(ModflowInputType), intent(in) :: mf6_input
111 type(NCPackageVarsType), pointer, intent(in) :: nc_vars
112 character(len=*), intent(in) :: input_fname
113 integer(I4B), intent(in) :: iout
114 integer(I4B), optional, intent(in) :: kper
115 integer(I4B), optional, intent(in) :: iaux
116#if defined(__WITH_NETCDF__)
117 call netcdf_array_load(dbl1d, mshape, idt, mf6_input, nc_vars, input_fname, &
118 iout, kper=kper, iaux=iaux)
119#else
120 call error_and_exit(idt%tagname, input_fname)
121#endif

◆ nc_read_dbl2d()

subroutine loadncinputmodule::nc_read_dbl2d ( real(dp), dimension(:, :), intent(in), pointer, contiguous dbl2d,
integer(i4b), dimension(:), intent(in), pointer, contiguous mshape,
type(inputparamdefinitiontype), intent(in) idt,
type(modflowinputtype), intent(in) mf6_input,
type(ncpackagevarstype), intent(in), pointer nc_vars,
character(len=*), intent(in) input_fname,
integer(i4b), intent(in) iout )
private
Parameters
[in]mshapemodel shape
[in]idtinput data type object describing this record

Definition at line 126 of file LoadNCInput.F90.

128 real(DP), dimension(:, :), pointer, contiguous, intent(in) :: dbl2d
129 integer(I4B), dimension(:), contiguous, pointer, intent(in) :: mshape !< model shape
130 type(InputParamDefinitionType), intent(in) :: idt !< input data type object describing this record
131 type(ModflowInputType), intent(in) :: mf6_input
132 type(NCPackageVarsType), pointer, intent(in) :: nc_vars
133 character(len=*), intent(in) :: input_fname
134 integer(I4B), intent(in) :: iout
135#if defined(__WITH_NETCDF__)
136 call netcdf_array_load(dbl2d, mshape, idt, mf6_input, nc_vars, input_fname, &
137 iout)
138#else
139 call error_and_exit(idt%tagname, input_fname)
140#endif

◆ nc_read_dbl3d()

subroutine loadncinputmodule::nc_read_dbl3d ( real(dp), dimension(:, :, :), intent(in), pointer, contiguous dbl3d,
integer(i4b), dimension(:), intent(in), pointer, contiguous mshape,
type(inputparamdefinitiontype), intent(in) idt,
type(modflowinputtype), intent(in) mf6_input,
type(ncpackagevarstype), intent(in), pointer nc_vars,
character(len=*), intent(in) input_fname,
integer(i4b), intent(in) iout )
private
Parameters
[in]mshapemodel shape
[in]idtinput data type object describing this record

Definition at line 145 of file LoadNCInput.F90.

147 real(DP), dimension(:, :, :), pointer, contiguous, intent(in) :: dbl3d
148 integer(I4B), dimension(:), contiguous, pointer, intent(in) :: mshape !< model shape
149 type(InputParamDefinitionType), intent(in) :: idt !< input data type object describing this record
150 type(ModflowInputType), intent(in) :: mf6_input
151 type(NCPackageVarsType), pointer, intent(in) :: nc_vars
152 character(len=*), intent(in) :: input_fname
153 integer(I4B), intent(in) :: iout
154#if defined(__WITH_NETCDF__)
155 call netcdf_array_load(dbl3d, mshape, idt, mf6_input, nc_vars, input_fname, &
156 iout)
157#else
158 call error_and_exit(idt%tagname, input_fname)
159#endif

◆ nc_read_int1d()

subroutine loadncinputmodule::nc_read_int1d ( integer(i4b), dimension(:), intent(in), pointer, contiguous int1d,
integer(i4b), dimension(:), intent(in), pointer, contiguous mshape,
type(inputparamdefinitiontype), intent(in) idt,
type(modflowinputtype), intent(in) mf6_input,
type(ncpackagevarstype), intent(in), pointer nc_vars,
character(len=*), intent(in) input_fname,
integer(i4b), intent(in) iout,
integer(i4b), intent(in), optional kper )
private
Parameters
[in]mshapemodel shape
[in]idtinput data type object describing this record

Definition at line 47 of file LoadNCInput.F90.

49 integer(I4B), dimension(:), pointer, contiguous, intent(in) :: int1d
50 integer(I4B), dimension(:), contiguous, pointer, intent(in) :: mshape !< model shape
51 type(InputParamDefinitionType), intent(in) :: idt !< input data type object describing this record
52 type(ModflowInputType), intent(in) :: mf6_input
53 type(NCPackageVarsType), pointer, intent(in) :: nc_vars
54 character(len=*), intent(in) :: input_fname
55 integer(I4B), intent(in) :: iout
56 integer(I4B), optional, intent(in) :: kper
57#if defined(__WITH_NETCDF__)
58 call netcdf_array_load(int1d, mshape, idt, mf6_input, nc_vars, input_fname, &
59 iout, kper)
60#else
61 call error_and_exit(idt%tagname, input_fname)
62#endif

◆ nc_read_int2d()

subroutine loadncinputmodule::nc_read_int2d ( integer(i4b), dimension(:, :), intent(in), pointer, contiguous int2d,
integer(i4b), dimension(:), intent(in), pointer, contiguous mshape,
type(inputparamdefinitiontype), intent(in) idt,
type(modflowinputtype), intent(in) mf6_input,
type(ncpackagevarstype), intent(in), pointer nc_vars,
character(len=*), intent(in) input_fname,
integer(i4b), intent(in) iout )
private
Parameters
[in]mshapemodel shape
[in]idtinput data type object describing this record

Definition at line 67 of file LoadNCInput.F90.

69 integer(I4B), dimension(:, :), pointer, contiguous, intent(in) :: int2d
70 integer(I4B), dimension(:), contiguous, pointer, intent(in) :: mshape !< model shape
71 type(InputParamDefinitionType), intent(in) :: idt !< input data type object describing this record
72 type(ModflowInputType), intent(in) :: mf6_input
73 type(NCPackageVarsType), pointer, intent(in) :: nc_vars
74 character(len=*), intent(in) :: input_fname
75 integer(I4B), intent(in) :: iout
76#if defined(__WITH_NETCDF__)
77 call netcdf_array_load(int2d, mshape, idt, mf6_input, nc_vars, input_fname, &
78 iout)
79#else
80 call error_and_exit(idt%tagname, input_fname)
81#endif

◆ nc_read_int3d()

subroutine loadncinputmodule::nc_read_int3d ( integer(i4b), dimension(:, :, :), intent(in), pointer, contiguous int3d,
integer(i4b), dimension(:), intent(in), pointer, contiguous mshape,
type(inputparamdefinitiontype), intent(in) idt,
type(modflowinputtype), intent(in) mf6_input,
type(ncpackagevarstype), intent(in), pointer nc_vars,
character(len=*), intent(in) input_fname,
integer(i4b), intent(in) iout )
private
Parameters
[in]mshapemodel shape
[in]idtinput data type object describing this record

Definition at line 86 of file LoadNCInput.F90.

88 integer(I4B), dimension(:, :, :), pointer, contiguous, intent(in) :: int3d
89 integer(I4B), dimension(:), contiguous, pointer, intent(in) :: mshape !< model shape
90 type(InputParamDefinitionType), intent(in) :: idt !< input data type object describing this record
91 type(ModflowInputType), intent(in) :: mf6_input
92 type(NCPackageVarsType), pointer, intent(in) :: nc_vars
93 character(len=*), intent(in) :: input_fname
94 integer(I4B), intent(in) :: iout
95#if defined(__WITH_NETCDF__)
96 call netcdf_array_load(int3d, mshape, idt, mf6_input, nc_vars, input_fname, &
97 iout)
98#else
99 call error_and_exit(idt%tagname, input_fname)
100#endif