Output control data module.
|
| subroutine, public | ocd_cr (ocdobj) |
| | @ brief Create a new output control data type. More...
|
| |
| subroutine | ocd_rp_check (this, input_fname) |
| | @ brief Check the output control data type for consistency. More...
|
| |
| subroutine | ocd_ot (this, ipflg, kstp, endofperiod, iout, iprint_opt, isav_opt) |
| | Write to list file and/or save to binary file, depending on settings. More...
|
| |
| subroutine | ocd_da (this) |
| | Deallocate the output control data type. More...
|
| |
| subroutine | init_dbl (this, cname, dblvec, dis, cdefpsm, cdeffmp, iout, dnodata) |
| | Initialize the output control data type for double precision data. More...
|
| |
| subroutine | init_int (this, cname, intvec, dis, cdefpsm, cdeffmp, iout, inodata) |
| | @ brief Initialize the output control data type for integer data. More...
|
| |
| subroutine | allocate (this) |
| | @ brief Allocate scalar variables More...
|
| |
| subroutine | set_prnfmt (this, prnfmt, inunit) |
| | @ brief Set PRINT_FORMAT based on an input string. More...
|
| |
| subroutine | set_ocfile (this, ocfile, iout) |
| |
◆ allocate()
- Parameters
-
| this | OutputControlDataType object |
Definition at line 195 of file OutputControlData.f90.
199 class(OutputControlDataType) :: this
201 allocate (this%cname)
202 allocate (this%cdatafmp)
203 allocate (this%idataun)
204 allocate (this%editdesc)
205 allocate (this%nvaluesp)
206 allocate (this%nwidthp)
207 allocate (this%dnodata)
208 allocate (this%inodata)
218 this%psm => create_psm()
This module contains simulation constants.
real(dp), parameter dzero
real constant zero
◆ init_dbl()
| subroutine outputcontroldatamodule::init_dbl |
( |
class(outputcontroldatatype) |
this, |
|
|
character(len=*), intent(in) |
cname, |
|
|
real(dp), dimension(:), intent(in), pointer, contiguous |
dblvec, |
|
|
class(disbasetype), intent(in), pointer |
dis, |
|
|
character(len=*), intent(in) |
cdefpsm, |
|
|
character(len=*), intent(in) |
cdeffmp, |
|
|
integer(i4b), intent(in) |
iout, |
|
|
real(dp), intent(in) |
dnodata |
|
) |
| |
|
private |
- Parameters
-
| this | OutputControlDataType object |
| [in] | cname | Name of variable |
| [in] | dblvec | Data array that will be managed by this object |
| [in] | dis | Discretization package |
| [in] | cdefpsm | String for defining the print/save manager |
| [in] | cdeffmp | String for print format |
| [in] | iout | Unit number for output |
| [in] | dnodata | No data value |
Definition at line 152 of file OutputControlData.f90.
154 class(OutputControlDataType) :: this
155 character(len=*),
intent(in) :: cname
156 real(DP),
dimension(:),
pointer,
contiguous,
intent(in) :: dblvec
157 class(DisBaseType),
pointer,
intent(in) :: dis
158 character(len=*),
intent(in) :: cdefpsm
159 character(len=*),
intent(in) :: cdeffmp
160 integer(I4B),
intent(in) :: iout
161 real(DP),
intent(in) :: dnodata
164 this%dbldata => dblvec
166 this%dnodata = dnodata
167 if (cdefpsm /=
'')
call this%psm%read(cdefpsm, iout)
168 call print_format(cdeffmp, this%cdatafmp, &
169 this%editdesc, this%nvaluesp, this%nwidthp, 0)
◆ init_int()
| subroutine outputcontroldatamodule::init_int |
( |
class(outputcontroldatatype) |
this, |
|
|
character(len=*), intent(in) |
cname, |
|
|
integer(i4b), dimension(:), intent(in), pointer, contiguous |
intvec, |
|
|
class(disbasetype), intent(in), pointer |
dis, |
|
|
character(len=*), intent(in) |
cdefpsm, |
|
|
character(len=*), intent(in) |
cdeffmp, |
|
|
integer(i4b), intent(in) |
iout, |
|
|
integer(i4b), intent(in) |
inodata |
|
) |
| |
|
private |
- Parameters
-
| this | OutputControlDataType object |
| [in] | cname | Name of variable |
| [in] | intvec | Data array that will be managed by this object |
| [in] | dis | Discretization package |
| [in] | cdefpsm | String for defining the print/save manager |
| [in] | cdeffmp | String for print format |
| [in] | iout | Unit number for output |
| [in] | inodata | No data value |
Definition at line 173 of file OutputControlData.f90.
175 class(OutputControlDataType) :: this
176 character(len=*),
intent(in) :: cname
177 integer(I4B),
dimension(:),
pointer,
contiguous,
intent(in) :: intvec
178 class(DisBaseType),
pointer,
intent(in) :: dis
179 character(len=*),
intent(in) :: cdefpsm
180 character(len=*),
intent(in) :: cdeffmp
181 integer(I4B),
intent(in) :: iout
182 integer(I4B),
intent(in) :: inodata
185 this%intdata => intvec
187 this%inodata = inodata
189 if (cdefpsm /=
'')
call this%psm%read(cdefpsm, iout)
190 call print_format(cdeffmp, this%cdatafmp, this%editdesc, this%nvaluesp, &
◆ ocd_cr()
- Parameters
-
Definition at line 46 of file OutputControlData.f90.
47 type(OutputControlDataType),
pointer :: ocdobj
49 call ocdobj%allocate_scalars()
◆ ocd_da()
Definition at line 138 of file OutputControlData.f90.
139 class(OutputControlDataType) :: this
141 deallocate (this%cname)
142 deallocate (this%cdatafmp)
143 deallocate (this%idataun)
144 deallocate (this%editdesc)
145 deallocate (this%nvaluesp)
146 deallocate (this%nwidthp)
147 deallocate (this%dnodata)
148 deallocate (this%inodata)
◆ ocd_ot()
| subroutine outputcontroldatamodule::ocd_ot |
( |
class(outputcontroldatatype) |
this, |
|
|
integer(i4b), intent(inout) |
ipflg, |
|
|
integer(i4b), intent(in) |
kstp, |
|
|
logical(lgp), intent(in) |
endofperiod, |
|
|
integer(i4b), intent(in) |
iout, |
|
|
integer(i4b), intent(in), optional |
iprint_opt, |
|
|
integer(i4b), intent(in), optional |
isav_opt |
|
) |
| |
- Parameters
-
| this | OutputControlDataType object |
| [in,out] | ipflg | Flag indicating if something was printed |
| [in] | kstp | Current time step |
| [in] | endofperiod | End of period logical flag |
| [in] | iout | Unit number for output |
| [in] | iprint_opt | Optional print flag override |
| [in] | isav_opt | Optional save flag override |
Definition at line 83 of file OutputControlData.f90.
85 class(OutputControlDataType) :: this
86 integer(I4B),
intent(inout) :: ipflg
87 integer(I4B),
intent(in) :: kstp
88 logical(LGP),
intent(in) :: endofperiod
89 integer(I4B),
intent(in) :: iout
90 integer(I4B),
optional,
intent(in) :: iprint_opt
91 integer(I4B),
optional,
intent(in) :: isav_opt
93 integer(I4B) :: iprint
94 integer(I4B) :: idataun
103 if (
present(iprint_opt))
then
104 if (iprint_opt /= 0)
then
109 if (this%psm%should_print(kstp, endofperiod))
then
116 if (
present(isav_opt))
then
117 if (isav_opt /= 0)
then
118 idataun = this%idataun
121 if (this%psm%should_save(kstp, endofperiod)) idataun = this%idataun
125 if (
associated(this%dbldata)) &
126 call this%dis%record_array(this%dbldata, iout, iprint, idataun, &
127 this%cname, this%cdatafmp, this%nvaluesp, &
128 this%nwidthp, this%editdesc, this%dnodata)
◆ ocd_rp_check()
| subroutine outputcontroldatamodule::ocd_rp_check |
( |
class(outputcontroldatatype) |
this, |
|
|
character(len=*) |
input_fname |
|
) |
| |
|
private |
- Parameters
-
Definition at line 53 of file OutputControlData.f90.
58 class(OutputControlDataType) :: this
59 character(len=*) :: input_fname
61 character(len=LINELENGTH) :: errmsg
63 character(len=*),
parameter :: fmtocsaveerr = &
64 "(1X,'REQUESTING TO SAVE ',A,' BUT ',A,' SAVE FILE NOT SPECIFIED. ', &
65 &A,' SAVE FILE MUST BE SPECIFIED IN OUTPUT CONTROL OPTIONS.')"
68 if (this%psm%save_steps%any())
then
69 if (this%idataun == 0)
then
70 write (errmsg, fmtocsaveerr) trim(adjustl(this%cname)), &
71 trim(adjustl(this%cname)), &
72 trim(adjustl(this%cname))
integer(i4b), parameter linelength
maximum length of a standard line
This module contains simulation methods.
subroutine, public store_error(msg, terminate)
Store an error message.
integer(i4b) function, public count_errors()
Return number of errors.
subroutine, public store_error_filename(filename, terminate)
Store the erroring file name.
◆ set_ocfile()
| subroutine outputcontroldatamodule::set_ocfile |
( |
class(outputcontroldatatype) |
this, |
|
|
character(len=*), intent(in) |
ocfile, |
|
|
integer(i4b), intent(in) |
iout |
|
) |
| |
- Parameters
-
| this | OutputControlDataType object |
| [in] | ocfile | OC output filename |
| [in] | iout | Unit number for output |
Definition at line 234 of file OutputControlData.f90.
239 class(OutputControlDataType) :: this
240 character(len=*),
intent(in) :: ocfile
241 integer(I4B),
intent(in) :: iout
243 character(len=*),
parameter :: fmtocsave = &
244 "(4X,A,' INFORMATION WILL BE WRITTEN TO:', &
245 &/,6X,'UNIT NUMBER: ', I0,/,6X, 'FILE NAME: ', A)"
247 write (iout, fmtocsave) trim(adjustl(this%cname)), this%idataun, &
249 call openfile(this%idataun, iout, ocfile,
'DATA(BINARY)', &
@ mnormal
normal output mode
◆ set_prnfmt()
| subroutine outputcontroldatamodule::set_prnfmt |
( |
class(outputcontroldatatype) |
this, |
|
|
character(len=*), intent(in) |
prnfmt, |
|
|
integer(i4b), intent(in) |
inunit |
|
) |
| |
- Parameters
-
| this | OutputControlDataType object |
| [in] | inunit | Unit number for input |
Definition at line 222 of file OutputControlData.f90.
226 class(OutputControlDataType) :: this
227 character(len=*),
intent(in) :: prnfmt
228 integer(I4B),
intent(in) :: inunit
230 call print_format(prnfmt, this%cdatafmp, this%editdesc, &
231 this%nvaluesp, this%nwidthp, inunit)