42 integer(I4B) :: dependent
43 integer(I4B) :: x_bnds
44 integer(I4B) :: y_bnds
45 integer(I4B) :: z_bnds
46 integer(I4B) :: latitude
47 integer(I4B) :: longitude
48 integer(I4B) :: export
57 real(dp),
dimension(:),
pointer,
contiguous :: latitude => null()
58 real(dp),
dimension(:),
pointer,
contiguous :: longitude => null()
59 integer(I4B),
pointer :: chunk_z
60 integer(I4B),
pointer :: chunk_y
61 integer(I4B),
pointer :: chunk_x
62 integer(I4B),
dimension(:),
allocatable :: layers
63 logical(LGP) :: latlon
96 disenum, nctype, iout)
100 character(len=*),
intent(in) :: modelname
101 character(len=*),
intent(in) :: modeltype
102 character(len=*),
intent(in) :: modelfname
103 character(len=*),
intent(in) :: nc_fname
104 integer(I4B),
intent(in) :: disenum
105 integer(I4B),
intent(in) :: nctype
106 integer(I4B),
intent(in) :: iout
107 integer(I4B) :: k, latsz, lonsz
108 logical(LGP) :: found
111 this%nlay = this%dis%nlay
114 allocate (this%chunk_z)
115 allocate (this%chunk_y)
116 allocate (this%chunk_x)
117 allocate (this%layers(this%nlay))
127 this%latlon = .false.
130 call this%NCModelExportType%init(modelname, modeltype, modelfname, nc_fname, &
131 disenum, nctype, iout)
134 if (this%ncf_mempath /=
'')
then
135 call mem_set_value(this%chunk_z,
'CHUNK_Z', this%ncf_mempath, found)
136 call mem_set_value(this%chunk_y,
'CHUNK_Y', this%ncf_mempath, found)
137 call mem_set_value(this%chunk_x,
'CHUNK_X', this%ncf_mempath, found)
139 if (this%chunk_time > 0 .and. this%chunk_z > 0 .and. &
140 this%chunk_y > 0 .and. this%chunk_x > 0)
then
141 this%chunking_active = .true.
142 else if (this%chunk_time > 0 .or. this%chunk_z > 0 .or. &
143 this%chunk_y > 0 .or. this%chunk_x > 0)
then
148 write (
warnmsg,
'(a)')
'Ignoring user provided NetCDF chunking &
149 ¶meters. Define chunk_time, chunk_x, chunk_y and chunk_z input &
150 ¶meters to see an effect in file "'//trim(nc_fname)//
'".'
154 call get_isize(
'LATITUDE', this%ncf_mempath, latsz)
155 call get_isize(
'LONGITUDE', this%ncf_mempath, lonsz)
157 if (latsz > 0 .and. lonsz > 0)
then
159 if (this%wkt /=
'')
then
160 write (
warnmsg,
'(a)')
'Ignoring user provided NetCDF wkt parameter &
161 &as longitude and latitude arrays have been provided. &
162 &Applies to file "'//trim(nc_fname)//
'".'
165 this%gridmap_name =
''
167 call mem_setptr(this%latitude,
'LATITUDE', this%ncf_mempath)
168 call mem_setptr(this%longitude,
'LONGITUDE', this%ncf_mempath)
171 if (this%wkt /=
'')
then
172 if (this%dis%angrot /=
dzero)
then
173 write (
warnmsg,
'(a)')
'WKT parameter set with structured rotated &
174 &grid. Projected coordinates will have grid local values. &
175 &Applies to file "'//trim(nc_fname)//
'".'
181 if (this%dis%lenuni == 1)
then
188 call nf_verify(nf90_create(this%nc_fname, &
189 ior(nf90_clobber, nf90_netcdf4), this%ncid), &
197 call nf_verify(nf90_close(this%ncid), this%nc_fname)
198 deallocate (this%chunk_z)
199 deallocate (this%chunk_y)
200 deallocate (this%chunk_x)
201 deallocate (this%layers)
202 nullify (this%chunk_z)
203 nullify (this%chunk_y)
204 nullify (this%chunk_x)
206 call this%NCModelExportType%destroy()
216 call this%add_global_att()
218 call this%define_dim()
220 call this%define_geocoords()
223 call this%df_export()
226 call this%define_dependent()
229 call nf_verify(nf90_enddef(this%ncid), this%nc_fname)
231 call this%add_grid_data()
233 call this%add_proj_data()
236 call this%add_pkg_data()
239 call this%define_gridmap()
241 call nf_verify(nf90_sync(this%ncid), this%nc_fname)
251 do idx = 1, this%pkglist%Count()
252 export_pkg => this%get(idx)
253 call this%export_df(export_pkg)
263 real(DP),
dimension(:),
pointer,
contiguous :: dbl1d
264 integer(I4B) :: n, istp
269 if (
size(this%dis%nodeuser) < &
270 size(this%dis%nodereduced))
then
271 allocate (dbl1d(
size(this%dis%nodereduced)))
273 do n = 1,
size(this%dis%nodereduced)
274 if (this%dis%nodereduced(n) > 0)
then
275 dbl1d(n) = this%x(this%dis%nodereduced(n))
280 this%var_ids%dependent, dbl1d, &
281 start=(/1, 1, 1, istp/), &
282 count=(/this%dis%ncol, &
284 this%dis%nlay, 1/)), &
290 this%var_ids%dependent, this%x, &
291 start=(/1, 1, 1, istp/), &
292 count=(/this%dis%ncol, &
294 this%dis%nlay, 1/)), &
299 call nf_verify(nf90_put_var(this%ncid, this%var_ids%time, &
300 totim, start=(/istp/)), &
304 call nf_verify(nf90_sync(this%ncid), this%nc_fname)
311 character(len=*),
intent(in) :: pkgtype
312 character(len=*),
intent(in) :: pkgname
313 character(len=*),
intent(in) :: mempath
315 integer(I4B),
dimension(:),
pointer,
contiguous :: int1d
316 integer(I4B),
dimension(:, :),
pointer,
contiguous :: int2d
317 integer(I4B),
dimension(:, :, :),
pointer,
contiguous :: int3d
318 real(DP),
dimension(:),
pointer,
contiguous :: dbl1d
319 real(DP),
dimension(:, :),
pointer,
contiguous :: dbl2d
320 real(DP),
dimension(:, :, :),
pointer,
contiguous :: dbl3d
321 character(len=LINELENGTH) :: nc_tag
322 integer(I4B) :: iper, iaux
329 nc_tag = this%input_attribute(pkgname, idt)
331 select case (idt%datatype)
333 call mem_setptr(int1d, idt%mf6varname, mempath)
335 this%dis, idt, mempath, nc_tag, pkgname, &
336 this%gridmap_name, this%latlon, this%deflate, &
337 this%shuffle, this%chunk_z, this%chunk_y, &
338 this%chunk_x, iper, this%nc_fname)
340 call mem_setptr(int2d, idt%mf6varname, mempath)
342 this%dis, idt, mempath, nc_tag, pkgname, &
343 this%gridmap_name, this%latlon, this%deflate, &
344 this%shuffle, this%chunk_z, this%chunk_y, &
345 this%chunk_x, this%nc_fname)
347 call mem_setptr(int3d, idt%mf6varname, mempath)
349 this%dis, idt, mempath, nc_tag, pkgname, &
350 this%gridmap_name, this%latlon, this%deflate, &
351 this%shuffle, this%chunk_z, this%chunk_y, &
352 this%chunk_x, this%nc_fname)
354 call mem_setptr(dbl1d, idt%mf6varname, mempath)
356 this%dis, idt, mempath, nc_tag, pkgname, &
357 this%gridmap_name, this%latlon, this%deflate, &
358 this%shuffle, this%chunk_z, this%chunk_y, &
359 this%chunk_x, iper, iaux, this%nc_fname)
361 call mem_setptr(dbl2d, idt%mf6varname, mempath)
363 this%dis, idt, mempath, nc_tag, pkgname, &
364 this%gridmap_name, this%latlon, this%deflate, &
365 this%shuffle, this%chunk_z, this%chunk_y, &
366 this%chunk_x, this%nc_fname)
368 call mem_setptr(dbl3d, idt%mf6varname, mempath)
370 this%dis, idt, mempath, nc_tag, pkgname, &
371 this%gridmap_name, this%latlon, this%deflate, &
372 this%shuffle, this%chunk_z, this%chunk_y, &
373 this%chunk_x, this%nc_fname)
387 integer(I4B) :: iparam, iaux
390 do iparam = 1, export_pkg%nparam
396 export_pkg%mf6_input%component_type, &
397 export_pkg%mf6_input%subcomponent_type, &
398 'PERIOD', export_pkg%param_names(iparam),
'')
399 select case (idt%shape)
400 case (
'NCPL',
'NODES')
401 call this%create_timeseries(idt, iparam, iaux, export_pkg)
402 case (
'NAUX NCPL',
'NAUX NODES')
403 do iaux = 1, export_pkg%naux
404 call this%create_timeseries(idt, iparam, iaux, export_pkg)
417 integer(I4B),
intent(in) :: iparam
418 integer(I4B),
intent(in) :: iaux
420 character(len=LINELENGTH) :: varname, longname, nc_tag
421 integer(I4B) :: varid
424 nc_tag = this%input_attribute(export_pkg%mf6_input%subcomponent_name, &
428 varname = export_varname(export_pkg%mf6_input%subcomponent_name, &
429 idt%tagname, export_pkg%mf6_input%mempath, &
431 longname = export_longname(idt%longname, &
432 export_pkg%mf6_input%subcomponent_name, &
433 idt%tagname, export_pkg%mf6_input%mempath, &
437 select case (idt%datatype)
438 case (
'DOUBLE1D',
'DOUBLE2D')
439 if (idt%shape ==
'NCPL' .or. &
440 idt%shape ==
'NAUX NCPL')
then
441 call nf_verify(nf90_def_var(this%ncid, varname, nf90_double, &
444 this%dim_ids%time/), varid), &
447 call nf_verify(nf90_def_var(this%ncid, varname, nf90_double, &
451 this%dim_ids%time/), varid), &
454 call nf_verify(nf90_put_att(this%ncid, varid, &
458 if (idt%shape ==
'NCPL' .or. &
459 idt%shape ==
'NAUX NCPL')
then
460 call nf_verify(nf90_def_var(this%ncid, varname, nf90_int, &
463 this%dim_ids%time/), varid), &
466 call nf_verify(nf90_def_var(this%ncid, varname, nf90_int, &
470 this%dim_ids%time/), varid), &
473 call nf_verify(nf90_put_att(this%ncid, varid, &
474 '_FillValue', (/nf90_fill_int/)), &
479 if (this%chunking_active)
then
480 call nf_verify(nf90_def_var_chunking(this%ncid, &
483 (/this%chunk_x, this%chunk_y, &
484 this%chunk_z, this%chunk_time/)), &
490 this%shuffle, this%nc_fname)
493 call nf_verify(nf90_put_att(this%ncid, varid, &
494 'units', this%lenunits), this%nc_fname)
495 call nf_verify(nf90_put_att(this%ncid, varid, &
496 'long_name', longname), this%nc_fname)
499 call ncvar_gridmap(this%ncid, varid, this%gridmap_name, this%latlon, &
501 call ncvar_mf6attr(this%ncid, varid, iaux, nc_tag, this%nc_fname)
504 if (idt%tagname ==
'AUX')
then
505 export_pkg%varids_aux(iaux, 1) = varid
507 export_pkg%varids_param(iparam, 1) = varid
516 character(len=*),
intent(in) :: pkgtype
517 character(len=*),
intent(in) :: pkgname
518 character(len=*),
intent(in) :: mempath
520 intent(in) :: param_dfns
522 integer(I4B) :: iparam, isize
523 do iparam = 1,
size(param_dfns)
525 idt => param_dfns(iparam)
527 if (idt%blockname ==
'GRIDDATA')
then
529 call get_isize(idt%mf6varname, mempath, isize)
531 call this%export_input_array(pkgtype, pkgname, mempath, idt)
546 integer(I4B),
dimension(:),
pointer,
contiguous :: int1d
547 real(DP),
dimension(:),
pointer,
contiguous :: dbl1d, nodes
548 real(DP),
dimension(:, :),
pointer,
contiguous :: dbl2d
549 character(len=LINELENGTH) :: nc_tag
550 integer(I4B) :: iaux, iparam, nvals, n
551 integer(I4B),
pointer :: nbound
557 do iparam = 1, export_pkg%nparam
558 if (export_pkg%iper /=
kper) cycle
560 if (export_pkg%param_reads(iparam)%invar < 1) cycle
565 export_pkg%mf6_input%component_type, &
566 export_pkg%mf6_input%subcomponent_type, &
567 'PERIOD', export_pkg%param_names(iparam),
'')
570 nc_tag = this%input_attribute(export_pkg%mf6_input%subcomponent_name, &
574 select case (idt%datatype)
576 call mem_setptr(int1d, idt%mf6varname, export_pkg%mf6_input%mempath)
577 this%var_ids%export = export_pkg%varids_param(iparam, 1)
579 this%dis, idt, export_pkg%mf6_input%mempath, &
580 nc_tag, export_pkg%mf6_input%subcomponent_name, &
581 this%gridmap_name, this%latlon, this%deflate, &
582 this%shuffle, this%chunk_z, this%chunk_y, &
583 this%chunk_x,
kper, this%nc_fname)
585 call mem_setptr(dbl1d, idt%mf6varname, export_pkg%mf6_input%mempath)
586 this%var_ids%export = export_pkg%varids_param(iparam, 1)
587 select case (idt%shape)
590 this%dis, idt, export_pkg%mf6_input%mempath, &
591 nc_tag, export_pkg%mf6_input%subcomponent_name, &
592 this%gridmap_name, this%latlon, this%deflate, &
593 this%shuffle, this%chunk_z, this%chunk_y, &
594 this%chunk_x,
kper, iaux, this%nc_fname)
596 nvals = this%dis%nodesuser
597 allocate (nodes(nvals))
599 call mem_setptr(dbl1d, idt%mf6varname, export_pkg%mf6_input%mempath)
600 call mem_setptr(int1d,
'NODEULIST', export_pkg%mf6_input%mempath)
601 call mem_setptr(nbound,
'NBOUND', export_pkg%mf6_input%mempath)
603 nodes(int1d(n)) = dbl1d(n)
606 this%dis, idt, export_pkg%mf6_input%mempath, &
607 nc_tag, export_pkg%mf6_input%subcomponent_name, &
608 this%gridmap_name, this%latlon, this%deflate, &
609 this%shuffle, this%chunk_z, this%chunk_y, &
610 this%chunk_x,
kper, iaux, this%nc_fname)
615 call mem_setptr(dbl2d, idt%mf6varname, export_pkg%mf6_input%mempath)
616 select case (idt%shape)
618 nvals = this%dis%nrow * this%dis%ncol
619 allocate (nodes(nvals))
620 do iaux = 1,
size(dbl2d, dim=1)
621 this%var_ids%export = export_pkg%varids_aux(iaux, 1)
623 nodes(n) = dbl2d(iaux, n)
626 this%dis, idt, export_pkg%mf6_input%mempath, &
627 nc_tag, export_pkg%mf6_input%subcomponent_name, &
628 this%gridmap_name, this%latlon, this%deflate, &
629 this%shuffle, this%chunk_z, this%chunk_y, &
630 this%chunk_x,
kper, iaux, this%nc_fname)
634 nvals = this%dis%nodesuser
635 allocate (nodes(nvals))
636 call mem_setptr(int1d,
'NODEULIST', export_pkg%mf6_input%mempath)
637 call mem_setptr(nbound,
'NBOUND', export_pkg%mf6_input%mempath)
638 do iaux = 1,
size(dbl2d, dim=1)
640 this%var_ids%export = export_pkg%varids_aux(iaux, 1)
642 nodes(int1d(n)) = dbl2d(iaux, n)
645 this%dis, idt, export_pkg%mf6_input%mempath, &
646 nc_tag, export_pkg%mf6_input%subcomponent_name, &
647 this%gridmap_name, this%latlon, this%deflate, &
648 this%shuffle, this%chunk_z, this%chunk_y, &
649 this%chunk_x,
kper, iaux, this%nc_fname)
661 call nf_verify(nf90_put_var(this%ncid, this%var_ids%time, &
666 call nf_verify(nf90_sync(this%ncid), this%nc_fname)
678 character(LENCOMPONENTNAME) :: ptype, pname, pkgtype
680 pointer :: pkgtypes => null()
682 pointer :: pkgnames => null()
684 pointer :: mempaths => null()
686 character(len=LENMEMPATH) :: input_mempath, mempath
688 integer(I4B),
pointer :: export_arrays
689 logical(LGP) :: found
694 call mem_setptr(pkgtypes,
'PKGTYPES', input_mempath)
695 call mem_setptr(pkgnames,
'PKGNAMES', input_mempath)
696 call mem_setptr(mempaths,
'MEMPATHS', input_mempath)
698 do n = 1,
size(mempaths)
700 allocate (export_arrays)
704 mempath = mempaths(n)
709 if (mempath /=
'')
then
711 call mem_set_value(export_arrays,
'EXPORT_NC', mempath, found)
713 if (export_arrays > 0)
then
716 call this%export_input_arrays(ptype, pname, mempath, param_dfns)
721 deallocate (export_arrays)
730 call nf_verify(nf90_put_att(this%ncid, nf90_global,
'title', &
731 this%annotation%title), this%nc_fname)
733 call nf_verify(nf90_put_att(this%ncid, nf90_global,
'source', &
734 this%annotation%source), this%nc_fname)
736 call nf_verify(nf90_put_att(this%ncid, nf90_global,
'modflow_grid', &
737 this%annotation%grid), this%nc_fname)
739 call nf_verify(nf90_put_att(this%ncid, nf90_global,
'modflow_model', &
740 this%annotation%model), this%nc_fname)
742 call nf_verify(nf90_put_att(this%ncid, nf90_global,
'history', &
743 this%annotation%history), this%nc_fname)
745 call nf_verify(nf90_put_att(this%ncid, nf90_global,
'Conventions', &
746 this%annotation%conventions), &
758 call nf_verify(nf90_def_dim(this%ncid,
'bnd', 2, this%dim_ids%bnd), &
763 call nf_verify(nf90_def_dim(this%ncid,
'time', this%totnstp, &
764 this%dim_ids%time), this%nc_fname)
765 call nf_verify(nf90_def_var(this%ncid,
'time', nf90_double, &
766 this%dim_ids%time, this%var_ids%time), &
768 call nf_verify(nf90_put_att(this%ncid, this%var_ids%time,
'calendar', &
769 'standard'), this%nc_fname)
770 call nf_verify(nf90_put_att(this%ncid, this%var_ids%time,
'units', &
771 this%datetime), this%nc_fname)
772 call nf_verify(nf90_put_att(this%ncid, this%var_ids%time,
'axis',
'T'), &
775 call nf_verify(nf90_put_att(this%ncid, this%var_ids%time,
'standard_name', &
776 'time'), this%nc_fname)
777 call nf_verify(nf90_put_att(this%ncid, this%var_ids%time,
'long_name', &
778 'time'), this%nc_fname)
782 call nf_verify(nf90_def_dim(this%ncid,
'z', this%dis%nlay, this%dim_ids%z), &
784 call nf_verify(nf90_def_var(this%ncid,
'z', nf90_double, this%dim_ids%z, &
785 this%var_ids%z), this%nc_fname)
786 call nf_verify(nf90_put_att(this%ncid, this%var_ids%z,
'units',
'layer'), &
788 call nf_verify(nf90_put_att(this%ncid, this%var_ids%z,
'long_name', &
789 'layer number'), this%nc_fname)
799 call nf_verify(nf90_def_dim(this%ncid,
'y', this%dis%nrow, this%dim_ids%y), &
801 call nf_verify(nf90_def_var(this%ncid,
'y', nf90_double, this%dim_ids%y, &
802 this%var_ids%y), this%nc_fname)
803 call nf_verify(nf90_put_att(this%ncid, this%var_ids%y,
'units', &
804 this%lenunits), this%nc_fname)
805 call nf_verify(nf90_put_att(this%ncid, this%var_ids%y,
'axis',
'Y'), &
807 call nf_verify(nf90_put_att(this%ncid, this%var_ids%y,
'standard_name', &
808 'projection_y_coordinate'), this%nc_fname)
809 call nf_verify(nf90_put_att(this%ncid, this%var_ids%y,
'long_name', &
810 'Northing'), this%nc_fname)
811 if (this%wkt /=
'')
then
812 call nf_verify(nf90_put_att(this%ncid, this%var_ids%y,
'grid_mapping', &
813 this%gridmap_name), this%nc_fname)
815 call nf_verify(nf90_put_att(this%ncid, this%var_ids%y,
'bounds',
'y_bnds'), &
817 call nf_verify(nf90_def_var(this%ncid,
'y_bnds', nf90_double, &
818 (/this%dim_ids%bnd, this%dim_ids%y/), &
819 this%var_ids%y_bnds), this%nc_fname)
822 call nf_verify(nf90_def_dim(this%ncid,
'x', this%dis%ncol, this%dim_ids%x), &
824 call nf_verify(nf90_def_var(this%ncid,
'x', nf90_double, this%dim_ids%x, &
825 this%var_ids%x), this%nc_fname)
826 call nf_verify(nf90_put_att(this%ncid, this%var_ids%x,
'units', &
827 this%lenunits), this%nc_fname)
828 call nf_verify(nf90_put_att(this%ncid, this%var_ids%x,
'axis',
'X'), &
830 call nf_verify(nf90_put_att(this%ncid, this%var_ids%x,
'standard_name', &
831 'projection_x_coordinate'), this%nc_fname)
832 call nf_verify(nf90_put_att(this%ncid, this%var_ids%x,
'long_name', &
833 'Easting'), this%nc_fname)
834 if (this%wkt /=
'')
then
835 call nf_verify(nf90_put_att(this%ncid, this%var_ids%x,
'grid_mapping', &
836 this%gridmap_name), this%nc_fname)
838 call nf_verify(nf90_put_att(this%ncid, this%var_ids%x,
'bounds',
'x_bnds'), &
840 call nf_verify(nf90_def_var(this%ncid,
'x_bnds', nf90_double, &
841 (/this%dim_ids%bnd, this%dim_ids%x/), &
842 this%var_ids%x_bnds), this%nc_fname)
851 call nf_verify(nf90_def_var(this%ncid, this%xname, nf90_double, &
852 (/this%dim_ids%x, this%dim_ids%y, &
853 this%dim_ids%z, this%dim_ids%time/), &
854 this%var_ids%dependent), &
858 if (this%chunking_active)
then
859 call nf_verify(nf90_def_var_chunking(this%ncid, &
860 this%var_ids%dependent, &
862 (/this%chunk_x, this%chunk_y, &
863 this%chunk_z, this%chunk_time/)), &
868 call ncvar_deflate(this%ncid, this%var_ids%dependent, this%deflate, &
869 this%shuffle, this%nc_fname)
872 call nf_verify(nf90_put_att(this%ncid, this%var_ids%dependent, &
873 'units', this%lenunits), this%nc_fname)
874 call nf_verify(nf90_put_att(this%ncid, this%var_ids%dependent, &
875 'standard_name', this%annotation%stdname), &
877 call nf_verify(nf90_put_att(this%ncid, this%var_ids%dependent,
'long_name', &
878 this%annotation%longname), this%nc_fname)
879 call nf_verify(nf90_put_att(this%ncid, this%var_ids%dependent,
'_FillValue', &
883 call ncvar_gridmap(this%ncid, this%var_ids%dependent, this%gridmap_name, &
884 this%latlon, this%nc_fname)
891 integer(I4B) :: var_id
892 if (this%wkt /=
'')
then
893 call nf_verify(nf90_redef(this%ncid), this%nc_fname)
894 call nf_verify(nf90_def_var(this%ncid, this%gridmap_name, nf90_int, &
895 var_id), this%nc_fname)
897 call nf_verify(nf90_put_att(this%ncid, var_id,
'crs_wkt', this%wkt), &
899 call nf_verify(nf90_enddef(this%ncid), this%nc_fname)
900 call nf_verify(nf90_put_var(this%ncid, var_id, 1), &
909 if (this%latlon)
then
911 call nf_verify(nf90_def_var(this%ncid,
'lat', nf90_double, &
912 (/this%dim_ids%x, this%dim_ids%y/), &
913 this%var_ids%latitude), this%nc_fname)
914 call nf_verify(nf90_put_att(this%ncid, this%var_ids%latitude, &
915 'units',
'degrees_north'), this%nc_fname)
916 call nf_verify(nf90_put_att(this%ncid, this%var_ids%latitude, &
917 'standard_name',
'latitude'), this%nc_fname)
918 call nf_verify(nf90_put_att(this%ncid, this%var_ids%latitude, &
919 'long_name',
'latitude'), this%nc_fname)
922 call nf_verify(nf90_def_var(this%ncid,
'lon', nf90_double, &
923 (/this%dim_ids%x, this%dim_ids%y/), &
924 this%var_ids%longitude), this%nc_fname)
925 call nf_verify(nf90_put_att(this%ncid, this%var_ids%longitude, &
926 'units',
'degrees_east'), this%nc_fname)
927 call nf_verify(nf90_put_att(this%ncid, this%var_ids%longitude, &
928 'standard_name',
'longitude'), this%nc_fname)
929 call nf_verify(nf90_put_att(this%ncid, this%var_ids%longitude, &
930 'long_name',
'longitude'), this%nc_fname)
938 if (this%latlon)
then
940 call nf_verify(nf90_put_var(this%ncid, this%var_ids%latitude, &
941 this%latitude, start=(/1, 1/), &
942 count=(/this%dis%ncol, this%dis%nrow/)), &
946 call nf_verify(nf90_put_var(this%ncid, this%var_ids%longitude, &
947 this%longitude, start=(/1, 1/), &
948 count=(/this%dis%ncol, this%dis%nrow/)), &
957 integer(I4B) :: ibnd, n
958 real(DP),
dimension(:, :),
pointer,
contiguous :: dbl2d
959 real(DP),
dimension(:),
allocatable :: x, y
960 real(DP) :: xoff, yoff
962 if (this%dis%angrot /=
dzero)
then
966 xoff = this%dis%xorigin
967 yoff = this%dis%yorigin
970 allocate (x(
size(this%dis%cellx)))
971 allocate (y(
size(this%dis%celly)))
973 do n = 1,
size(this%dis%cellx)
974 x(n) = this%dis%cellx(n) + xoff
977 do n = 1,
size(this%dis%celly)
978 y(n) = this%dis%celly(n) + yoff
981 call nf_verify(nf90_put_var(this%ncid, this%var_ids%x, x), &
983 call nf_verify(nf90_put_var(this%ncid, this%var_ids%y, y), &
986 call nf_verify(nf90_put_var(this%ncid, this%var_ids%z, this%layers), &
993 allocate (dbl2d(2,
size(this%dis%cellx)))
995 do n = 1,
size(this%dis%cellx)
997 dbl2d(1, ibnd) = xoff
998 dbl2d(2, ibnd) = xoff + this%dis%delr(ibnd)
1000 dbl2d(1, ibnd) = dbl2d(1, ibnd - 1) + this%dis%delr(ibnd)
1001 dbl2d(2, ibnd) = dbl2d(2, ibnd - 1) + this%dis%delr(ibnd)
1005 call nf_verify(nf90_put_var(this%ncid, this%var_ids%x_bnds, dbl2d), &
1010 allocate (dbl2d(2,
size(this%dis%celly)))
1012 do n =
size(this%dis%celly), 1, -1
1014 dbl2d(1, ibnd) = yoff + sum(this%dis%delc) - this%dis%delc(n)
1015 dbl2d(2, ibnd) = yoff + sum(this%dis%delc)
1017 dbl2d(1, ibnd) = dbl2d(1, ibnd - 1) - this%dis%delc(n)
1018 dbl2d(2, ibnd) = dbl2d(2, ibnd - 1) - this%dis%delc(n)
1022 call nf_verify(nf90_put_var(this%ncid, this%var_ids%y_bnds, dbl2d), &
1030 integer(I4B),
intent(in) :: ncid
1031 integer(I4B),
intent(in) :: varid
1032 integer(I4B),
intent(in) :: chunk_x
1033 integer(I4B),
intent(in) :: chunk_y
1034 character(len=*),
intent(in) :: nc_fname
1035 if (chunk_y > 0 .and. chunk_x > 0)
then
1036 call nf_verify(nf90_def_var_chunking(ncid, varid, nf90_chunked, &
1037 (/chunk_x, chunk_y/)), nc_fname)
1044 integer(I4B),
intent(in) :: ncid
1045 integer(I4B),
intent(in) :: varid
1046 integer(I4B),
intent(in) :: chunk_x
1047 integer(I4B),
intent(in) :: chunk_y
1048 integer(I4B),
intent(in) :: chunk_z
1049 character(len=*),
intent(in) :: nc_fname
1050 if (chunk_z > 0 .and. chunk_y > 0 .and. chunk_x > 0)
then
1051 call nf_verify(nf90_def_var_chunking(ncid, varid, nf90_chunked, &
1052 (/chunk_x, chunk_y, chunk_z/)), &
1060 integer(I4B),
intent(in) :: ncid
1061 integer(I4B),
intent(in) :: varid
1062 integer(I4B),
intent(in) :: deflate
1063 integer(I4B),
intent(in) :: shuffle
1064 character(len=*),
intent(in) :: nc_fname
1066 if (deflate >= 0)
then
1067 call nf_verify(nf90_def_var_deflate(ncid, varid, shuffle=shuffle, &
1068 deflate=1, deflate_level=deflate), &
1076 integer(I4B),
intent(in) :: ncid
1077 integer(I4B),
intent(in) :: varid
1078 character(len=*),
intent(in) :: gridmap_name
1079 logical(LGP),
intent(in) :: latlon
1080 character(len=*),
intent(in) :: nc_fname
1081 if (gridmap_name /=
'')
then
1082 call nf_verify(nf90_put_att(ncid, varid,
'coordinates',
'x y'), &
1084 call nf_verify(nf90_put_att(ncid, varid,
'grid_mapping', gridmap_name), &
1086 else if (latlon)
then
1087 call nf_verify(nf90_put_att(ncid, varid,
'coordinates',
'lon lat'), &
1095 integer(I4B),
intent(in) :: ncid
1096 integer(I4B),
intent(in) :: varid
1097 integer(I4B),
intent(in) :: iaux
1098 character(len=*),
intent(in) :: nc_tag
1099 character(len=*),
intent(in) :: nc_fname
1100 if (nc_tag /=
'')
then
1101 call nf_verify(nf90_put_att(ncid, varid,
'modflow_input', &
1104 call nf_verify(nf90_put_att(ncid, varid,
'modflow_iaux', &
1113 nc_tag, pkgname, gridmap_name, latlon, deflate, &
1114 shuffle, chunk_z, chunk_y, chunk_x, iper, nc_fname)
1116 integer(I4B),
dimension(:),
pointer,
contiguous,
intent(in) :: p_mem
1117 integer(I4B),
intent(in) :: ncid
1120 type(
distype),
pointer,
intent(in) :: dis
1122 character(len=*),
intent(in) :: mempath
1123 character(len=*),
intent(in) :: nc_tag
1124 character(len=*),
intent(in) :: pkgname
1125 character(len=*),
intent(in) :: gridmap_name
1126 logical(LGP),
intent(in) :: latlon
1127 integer(I4B),
intent(in) :: deflate
1128 integer(I4B),
intent(in) :: shuffle
1129 integer(I4B),
intent(in) :: chunk_z
1130 integer(I4B),
intent(in) :: chunk_y
1131 integer(I4B),
intent(in) :: chunk_x
1132 integer(I4B),
intent(in) :: iper
1133 character(len=*),
intent(in) :: nc_fname
1134 integer(I4B) :: var_id, axis_sz
1135 character(len=LINELENGTH) :: varname, longname
1139 if (idt%shape ==
'NROW' .or. &
1140 idt%shape ==
'NCOL' .or. &
1141 idt%shape ==
'NCPL' .or. &
1142 idt%shape ==
'NAUX NCPL')
then
1145 select case (idt%shape)
1152 longname =
export_longname(idt%longname, pkgname, idt%tagname, mempath)
1155 call nf_verify(nf90_redef(ncid), nc_fname)
1156 call nf_verify(nf90_def_var(ncid, varname, nf90_int, &
1157 (/axis_sz/), var_id), &
1161 call ncvar_deflate(ncid, var_id, deflate, shuffle, nc_fname)
1164 call nf_verify(nf90_put_att(ncid, var_id,
'_FillValue', &
1165 (/nf90_fill_int/)), nc_fname)
1166 call nf_verify(nf90_put_att(ncid, var_id,
'long_name', &
1167 longname), nc_fname)
1173 call nf_verify(nf90_enddef(ncid), nc_fname)
1174 call nf_verify(nf90_put_var(ncid, var_id, p_mem), &
1179 var_ids%export, p_mem, &
1180 start=(/1,
kper/), &
1181 count=(/dis%ncol, dis%nrow, 1/)), nc_fname)
1188 call nf_verify(nf90_redef(ncid), nc_fname)
1189 call nf_verify(nf90_def_var(ncid, varname, nf90_int, &
1190 (/dim_ids%x, dim_ids%y, dim_ids%z/), &
1194 call ncvar_chunk3d(ncid, var_id, chunk_x, chunk_y, chunk_z, nc_fname)
1196 call ncvar_deflate(ncid, var_id, deflate, shuffle, nc_fname)
1199 call nf_verify(nf90_put_att(ncid, var_id,
'_FillValue', &
1200 (/nf90_fill_int/)), nc_fname)
1201 call nf_verify(nf90_put_att(ncid, var_id,
'long_name', &
1202 idt%longname), nc_fname)
1205 call ncvar_gridmap(ncid, var_id, gridmap_name, latlon, nc_fname)
1209 call nf_verify(nf90_enddef(ncid), nc_fname)
1210 call nf_verify(nf90_put_var(ncid, var_id, p_mem, start=(/1, 1, 1/), &
1211 count=(/dis%ncol, dis%nrow, dis%nlay/)), &
1216 var_ids%export, p_mem, &
1217 start=(/1, 1, 1,
kper/), &
1218 count=(/dis%ncol, dis%nrow, dis%nlay, 1/)), &
1227 nc_tag, pkgname, gridmap_name, latlon, deflate, &
1228 shuffle, chunk_z, chunk_y, chunk_x, nc_fname)
1229 integer(I4B),
dimension(:, :),
pointer,
contiguous,
intent(in) :: p_mem
1230 integer(I4B),
intent(in) :: ncid
1233 type(
distype),
pointer,
intent(in) :: dis
1235 character(len=*),
intent(in) :: mempath
1236 character(len=*),
intent(in) :: nc_tag
1237 character(len=*),
intent(in) :: pkgname
1238 character(len=*),
intent(in) :: gridmap_name
1239 logical(LGP),
intent(in) :: latlon
1240 integer(I4B),
intent(in) :: deflate
1241 integer(I4B),
intent(in) :: shuffle
1242 integer(I4B),
intent(in) :: chunk_z
1243 integer(I4B),
intent(in) :: chunk_y
1244 integer(I4B),
intent(in) :: chunk_x
1245 character(len=*),
intent(in) :: nc_fname
1246 character(len=LINELENGTH) :: varname
1247 integer(I4B) :: var_id
1252 call nf_verify(nf90_redef(ncid), nc_fname)
1253 call nf_verify(nf90_def_var(ncid, varname, nf90_int, &
1254 (/dim_ids%x, dim_ids%y/), var_id), &
1258 call ncvar_chunk2d(ncid, var_id, chunk_x, chunk_y, nc_fname)
1260 call ncvar_deflate(ncid, var_id, deflate, shuffle, nc_fname)
1263 call nf_verify(nf90_put_att(ncid, var_id,
'_FillValue', &
1264 (/nf90_fill_int/)), nc_fname)
1265 call nf_verify(nf90_put_att(ncid, var_id,
'long_name', &
1266 idt%longname), nc_fname)
1269 call ncvar_gridmap(ncid, var_id, gridmap_name, latlon, nc_fname)
1273 call nf_verify(nf90_enddef(ncid), nc_fname)
1274 call nf_verify(nf90_put_var(ncid, var_id, p_mem, start=(/1, 1/), &
1275 count=(/dis%ncol, dis%nrow/)), &
1282 nc_tag, pkgname, gridmap_name, latlon, deflate, &
1283 shuffle, chunk_z, chunk_y, chunk_x, nc_fname)
1284 integer(I4B),
dimension(:, :, :),
pointer,
contiguous,
intent(in) :: p_mem
1285 integer(I4B),
intent(in) :: ncid
1288 type(
distype),
pointer,
intent(in) :: dis
1290 character(len=*),
intent(in) :: mempath
1291 character(len=*),
intent(in) :: nc_tag
1292 character(len=*),
intent(in) :: pkgname
1293 character(len=*),
intent(in) :: gridmap_name
1294 logical(LGP),
intent(in) :: latlon
1295 integer(I4B),
intent(in) :: deflate
1296 integer(I4B),
intent(in) :: shuffle
1297 integer(I4B),
intent(in) :: chunk_z
1298 integer(I4B),
intent(in) :: chunk_y
1299 integer(I4B),
intent(in) :: chunk_x
1300 character(len=*),
intent(in) :: nc_fname
1301 character(len=LINELENGTH) :: varname
1302 integer(I4B) :: var_id
1307 call nf_verify(nf90_redef(ncid), nc_fname)
1308 call nf_verify(nf90_def_var(ncid, varname, nf90_int, &
1309 (/dim_ids%x, dim_ids%y, dim_ids%z/), var_id), &
1313 call ncvar_chunk3d(ncid, var_id, chunk_x, chunk_y, chunk_z, nc_fname)
1315 call ncvar_deflate(ncid, var_id, deflate, shuffle, nc_fname)
1318 call nf_verify(nf90_put_att(ncid, var_id,
'_FillValue', &
1319 (/nf90_fill_int/)), nc_fname)
1320 call nf_verify(nf90_put_att(ncid, var_id,
'long_name', &
1321 idt%longname), nc_fname)
1324 call ncvar_gridmap(ncid, var_id, gridmap_name, latlon, nc_fname)
1328 call nf_verify(nf90_enddef(ncid), nc_fname)
1329 call nf_verify(nf90_put_var(ncid, var_id, p_mem, start=(/1, 1, 1/), &
1330 count=(/dis%ncol, dis%nrow, dis%nlay/)), &
1337 nc_tag, pkgname, gridmap_name, latlon, deflate, &
1338 shuffle, chunk_z, chunk_y, chunk_x, iper, iaux, &
1341 real(DP),
dimension(:),
pointer,
contiguous,
intent(in) :: p_mem
1342 integer(I4B),
intent(in) :: ncid
1345 type(
distype),
pointer,
intent(in) :: dis
1347 character(len=*),
intent(in) :: mempath
1348 character(len=*),
intent(in) :: nc_tag
1349 character(len=*),
intent(in) :: pkgname
1350 character(len=*),
intent(in) :: gridmap_name
1351 logical(LGP),
intent(in) :: latlon
1352 integer(I4B),
intent(in) :: deflate
1353 integer(I4B),
intent(in) :: shuffle
1354 integer(I4B),
intent(in) :: chunk_z
1355 integer(I4B),
intent(in) :: chunk_y
1356 integer(I4B),
intent(in) :: chunk_x
1357 integer(I4B),
intent(in) :: iper
1358 integer(I4B),
intent(in) :: iaux
1359 character(len=*),
intent(in) :: nc_fname
1360 integer(I4B) :: var_id, axis_sz
1361 character(len=LINELENGTH) :: varname, longname
1363 if (idt%shape ==
'NROW' .or. &
1364 idt%shape ==
'NCOL' .or. &
1365 idt%shape ==
'NCPL' .or. &
1366 idt%shape ==
'NAUX NCPL')
then
1369 select case (idt%shape)
1377 longname =
export_longname(idt%longname, pkgname, idt%tagname, mempath, &
1381 call nf_verify(nf90_redef(ncid), nc_fname)
1382 call nf_verify(nf90_def_var(ncid, varname, nf90_double, &
1383 (/axis_sz/), var_id), &
1387 call ncvar_deflate(ncid, var_id, deflate, shuffle, nc_fname)
1390 call nf_verify(nf90_put_att(ncid, var_id,
'_FillValue', &
1391 (/nf90_fill_double/)), nc_fname)
1392 call nf_verify(nf90_put_att(ncid, var_id,
'long_name', &
1393 longname), nc_fname)
1399 call nf_verify(nf90_enddef(ncid), nc_fname)
1400 call nf_verify(nf90_put_var(ncid, var_id, p_mem), &
1405 var_ids%export, p_mem, &
1406 start=(/1,
kper/), &
1407 count=(/dis%ncol, dis%nrow, 1/)), nc_fname)
1413 varname =
export_varname(pkgname, idt%tagname, mempath, iaux=iaux)
1414 longname =
export_longname(idt%longname, pkgname, idt%tagname, mempath, &
1418 call nf_verify(nf90_redef(ncid), nc_fname)
1419 call nf_verify(nf90_def_var(ncid, varname, nf90_double, &
1420 (/dim_ids%x, dim_ids%y, dim_ids%z/), &
1424 call ncvar_chunk3d(ncid, var_id, chunk_x, chunk_y, chunk_z, nc_fname)
1426 call ncvar_deflate(ncid, var_id, deflate, shuffle, nc_fname)
1429 call nf_verify(nf90_put_att(ncid, var_id,
'_FillValue', &
1430 (/nf90_fill_double/)), nc_fname)
1431 call nf_verify(nf90_put_att(ncid, var_id,
'long_name', &
1432 longname), nc_fname)
1435 call ncvar_gridmap(ncid, var_id, gridmap_name, latlon, nc_fname)
1439 call nf_verify(nf90_enddef(ncid), nc_fname)
1440 call nf_verify(nf90_put_var(ncid, var_id, p_mem, start=(/1, 1, 1/), &
1441 count=(/dis%ncol, dis%nrow, dis%nlay/)), &
1446 var_ids%export, p_mem, &
1447 start=(/1, 1, 1,
kper/), &
1448 count=(/dis%ncol, dis%nrow, dis%nlay, 1/)), &
1457 nc_tag, pkgname, gridmap_name, latlon, deflate, &
1458 shuffle, chunk_z, chunk_y, chunk_x, nc_fname)
1459 real(DP),
dimension(:, :),
pointer,
contiguous,
intent(in) :: p_mem
1460 integer(I4B),
intent(in) :: ncid
1463 type(
distype),
pointer,
intent(in) :: dis
1465 character(len=*),
intent(in) :: mempath
1466 character(len=*),
intent(in) :: nc_tag
1467 character(len=*),
intent(in) :: pkgname
1468 character(len=*),
intent(in) :: gridmap_name
1469 logical(LGP),
intent(in) :: latlon
1470 integer(I4B),
intent(in) :: deflate
1471 integer(I4B),
intent(in) :: shuffle
1472 integer(I4B),
intent(in) :: chunk_z
1473 integer(I4B),
intent(in) :: chunk_y
1474 integer(I4B),
intent(in) :: chunk_x
1475 character(len=*),
intent(in) :: nc_fname
1476 character(len=LINELENGTH) :: varname
1477 integer(I4B) :: var_id
1482 call nf_verify(nf90_redef(ncid), nc_fname)
1483 call nf_verify(nf90_def_var(ncid, varname, nf90_double, &
1484 (/dim_ids%x, dim_ids%y/), var_id), &
1488 call ncvar_chunk2d(ncid, var_id, chunk_x, chunk_y, nc_fname)
1490 call ncvar_deflate(ncid, var_id, deflate, shuffle, nc_fname)
1493 call nf_verify(nf90_put_att(ncid, var_id,
'_FillValue', &
1494 (/nf90_fill_double/)), nc_fname)
1495 call nf_verify(nf90_put_att(ncid, var_id,
'long_name', &
1496 idt%longname), nc_fname)
1499 call ncvar_gridmap(ncid, var_id, gridmap_name, latlon, nc_fname)
1503 call nf_verify(nf90_enddef(ncid), nc_fname)
1504 call nf_verify(nf90_put_var(ncid, var_id, p_mem, start=(/1, 1/), &
1505 count=(/dis%ncol, dis%nrow/)), &
1512 nc_tag, pkgname, gridmap_name, latlon, deflate, &
1513 shuffle, chunk_z, chunk_y, chunk_x, nc_fname)
1514 real(DP),
dimension(:, :, :),
pointer,
contiguous,
intent(in) :: p_mem
1515 integer(I4B),
intent(in) :: ncid
1518 type(
distype),
pointer,
intent(in) :: dis
1520 character(len=*),
intent(in) :: mempath
1521 character(len=*),
intent(in) :: nc_tag
1522 character(len=*),
intent(in) :: pkgname
1523 character(len=*),
intent(in) :: gridmap_name
1524 logical(LGP),
intent(in) :: latlon
1525 integer(I4B),
intent(in) :: deflate
1526 integer(I4B),
intent(in) :: shuffle
1527 integer(I4B),
intent(in) :: chunk_z
1528 integer(I4B),
intent(in) :: chunk_y
1529 integer(I4B),
intent(in) :: chunk_x
1530 character(len=*),
intent(in) :: nc_fname
1531 integer(I4B) :: var_id
1532 character(len=LINELENGTH) :: varname, longname
1535 longname =
export_longname(idt%longname, pkgname, idt%tagname, mempath)
1538 call nf_verify(nf90_redef(ncid), nc_fname)
1539 call nf_verify(nf90_def_var(ncid, varname, nf90_double, &
1540 (/dim_ids%x, dim_ids%y, dim_ids%z/), var_id), &
1544 call ncvar_chunk3d(ncid, var_id, chunk_x, chunk_y, chunk_z, nc_fname)
1546 call ncvar_deflate(ncid, var_id, deflate, shuffle, nc_fname)
1549 call nf_verify(nf90_put_att(ncid, var_id,
'_FillValue', &
1550 (/nf90_fill_double/)), nc_fname)
1551 call nf_verify(nf90_put_att(ncid, var_id,
'long_name', &
1552 longname), nc_fname)
1555 call ncvar_gridmap(ncid, var_id, gridmap_name, latlon, nc_fname)
1559 call nf_verify(nf90_enddef(ncid), nc_fname)
1560 call nf_verify(nf90_put_var(ncid, var_id, p_mem, start=(/1, 1, 1/), &
1561 count=(/dis%ncol, dis%nrow, dis%nlay/)), &
This module contains simulation constants.
integer(i4b), parameter linelength
maximum length of a standard line
integer(i4b), parameter lencomponentname
maximum length of a component name
@ mvalidate
validation mode - do not run time steps
real(dp), parameter dnodata
real no data constant
integer(i4b), parameter lenbigline
maximum length of a big line
real(dp), parameter dhnoflo
real no flow constant
real(dp), parameter dzero
real constant zero
integer(i4b), parameter lenmempath
maximum length of the memory path
This module contains the DefinitionSelectModule.
type(inputparamdefinitiontype) function, pointer, public get_param_definition_type(input_definition_types, component_type, subcomponent_type, blockname, tagname, filename)
Return parameter definition.
This module contains the DisNCStructuredModule.
subroutine add_pkg_data(this)
determine packages to write gridded input
subroutine ncvar_mf6attr(ncid, varid, iaux, nc_tag, nc_fname)
put variable internal modflow6 attributes
subroutine dis_export_destroy(this)
netcdf export dis destroy
subroutine nc_export_int3d(p_mem, ncid, dim_ids, var_ids, dis, idt, mempath, nc_tag, pkgname, gridmap_name, latlon, deflate, shuffle, chunk_z, chunk_y, chunk_x, nc_fname)
netcdf export 3D integer
subroutine ncvar_gridmap(ncid, varid, gridmap_name, latlon, nc_fname)
put variable gridmap attributes
subroutine add_global_att(this)
create file (group) attributes
subroutine dis_export_init(this, modelname, modeltype, modelfname, nc_fname, disenum, nctype, iout)
netcdf export dis init
subroutine export_input_arrays(this, pkgtype, pkgname, mempath, param_dfns)
write package gridded input data
subroutine add_grid_data(this)
add grid coordinates
subroutine define_geocoords(this)
define grid projection variables
subroutine df(this)
netcdf export define
subroutine nc_export_dbl3d(p_mem, ncid, dim_ids, var_ids, dis, idt, mempath, nc_tag, pkgname, gridmap_name, latlon, deflate, shuffle, chunk_z, chunk_y, chunk_x, nc_fname)
netcdf export 3D double
subroutine nc_export_dbl2d(p_mem, ncid, dim_ids, var_ids, dis, idt, mempath, nc_tag, pkgname, gridmap_name, latlon, deflate, shuffle, chunk_z, chunk_y, chunk_x, nc_fname)
netcdf export 2D double
subroutine ncvar_chunk2d(ncid, varid, chunk_x, chunk_y, nc_fname)
define 2d variable chunking
subroutine nc_export_int1d(p_mem, ncid, dim_ids, var_ids, dis, idt, mempath, nc_tag, pkgname, gridmap_name, latlon, deflate, shuffle, chunk_z, chunk_y, chunk_x, iper, nc_fname)
netcdf export 1D integer
subroutine add_proj_data(this)
add grid projection data
subroutine df_export(this)
define timeseries input variables
subroutine step(this)
netcdf export step
subroutine ncvar_deflate(ncid, varid, deflate, shuffle, nc_fname)
define variable compression
subroutine export_df(this, export_pkg)
define export package
subroutine define_dependent(this)
create the model layer dependent variables
subroutine create_timeseries(this, idt, iparam, iaux, export_pkg)
create timeseries export variable
subroutine export_input_array(this, pkgtype, pkgname, mempath, idt)
netcdf export an input array
subroutine ncvar_chunk3d(ncid, varid, chunk_x, chunk_y, chunk_z, nc_fname)
define 3d variable chunking
subroutine nc_export_int2d(p_mem, ncid, dim_ids, var_ids, dis, idt, mempath, nc_tag, pkgname, gridmap_name, latlon, deflate, shuffle, chunk_z, chunk_y, chunk_x, nc_fname)
netcdf export 2D integer
subroutine define_dim(this)
netcdf export define dimensions
subroutine package_step(this, export_pkg)
netcdf export package dynamic input
subroutine nc_export_dbl1d(p_mem, ncid, dim_ids, var_ids, dis, idt, mempath, nc_tag, pkgname, gridmap_name, latlon, deflate, shuffle, chunk_z, chunk_y, chunk_x, iper, iaux, nc_fname)
netcdf export 1D double
subroutine define_gridmap(this)
create the file grid mapping container variable
type(inputparamdefinitiontype) function, dimension(:), pointer, public param_definitions(component, subcomponent)
This module defines variable data types.
character(len=lenmempath) function create_mem_path(component, subcomponent, context)
returns the path to the memory object
subroutine, public get_isize(name, mem_path, isize)
@ brief Get the number of elements for this variable
This module contains the NCModelExportModule.
character(len=linelength) function, public export_varname(pkgname, tagname, mempath, layer, iaux)
build netcdf variable name
character(len=linelength) function, public export_longname(longname, pkgname, tagname, mempath, layer, iaux)
build netcdf variable longname
This module contains the NetCDFCommonModule.
subroutine, public nf_verify(res, nc_fname)
error check a netcdf-fortran interface call
This module contains simulation methods.
subroutine, public store_warning(msg, substring)
Store warning message.
subroutine, public store_error(msg, terminate)
Store an error message.
subroutine, public store_error_filename(filename, terminate)
Store the erroring file name.
This module contains simulation variables.
character(len=maxcharlen) errmsg
error message string
character(len=linelength) idm_context
character(len=maxcharlen) warnmsg
warning message string
integer(i4b) isim_mode
simulation mode
This module contains the SourceCommonModule.
character(len=lencomponentname) function, public idm_subcomponent_type(component, subcomponent)
component from package or model type
real(dp), pointer, public totim
time relative to start of simulation
integer(i4b), pointer, public kper
current stress period number
This class is used to store a single deferred-length character string. It was designed to work in an ...
Structured grid discretization.
abstract type for model netcdf export type