49 disenum, nctype, iout)
52 character(len=*),
intent(in) :: modelname
53 character(len=*),
intent(in) :: modeltype
54 character(len=*),
intent(in) :: modelfname
55 character(len=*),
intent(in) :: nc_fname
56 integer(I4B),
intent(in) :: disenum
57 integer(I4B),
intent(in) :: nctype
58 integer(I4B),
intent(in) :: iout
61 this%nlay = this%disv%nlay
64 allocate (this%var_ids%dependent(this%nlay))
65 allocate (this%var_ids%export(this%nlay))
68 call this%mesh_init(modelname, modeltype, modelfname, nc_fname, disenum, &
69 nctype, this%disv%lenuni, iout)
76 deallocate (this%var_ids%dependent)
78 call this%mesh_destroy()
79 call this%NCModelExportType%destroy()
89 call this%add_global_att()
91 call this%define_dim()
93 call this%create_mesh()
99 call this%define_dependent()
102 call nf_verify(nf90_enddef(this%ncid), this%nc_fname)
104 call this%add_mesh_data()
107 call this%add_pkg_data()
110 call this%define_gridmap()
112 call nf_verify(nf90_sync(this%ncid), this%nc_fname)
121 real(DP),
dimension(:),
pointer,
contiguous :: dbl1d
122 integer(I4B) :: n, k, nvals, istp
123 integer(I4B),
dimension(2) :: dis_shape
124 real(DP),
dimension(:, :),
pointer,
contiguous :: dbl2d
133 dis_shape(1) = this%disv%ncpl
134 dis_shape(2) = this%disv%nlay
136 nvals = product(dis_shape)
139 if (
size(this%disv%nodeuser) < &
140 size(this%disv%nodereduced))
then
142 allocate (dbl1d(
size(this%disv%nodereduced)))
148 do n = 1,
size(this%disv%nodereduced)
149 if (this%disv%nodereduced(n) > 0)
then
150 dbl1d(n) = this%x(this%disv%nodereduced(n))
154 dbl2d(1:dis_shape(1), 1:dis_shape(2)) => dbl1d(1:nvals)
156 dbl2d(1:dis_shape(1), 1:dis_shape(2)) => this%x(1:nvals)
159 do k = 1, this%disv%nlay
162 this%var_ids%dependent(k), dbl2d(:, k), &
164 count=(/this%disv%ncpl, 1/)), &
169 call nf_verify(nf90_put_var(this%ncid, this%var_ids%time, &
170 totim, start=(/istp/)), &
174 call nf_verify(nf90_sync(this%ncid), this%nc_fname)
177 if (
associated(dbl1d))
deallocate (dbl1d)
191 integer(I4B),
dimension(:),
pointer,
contiguous :: int1d
192 real(DP),
dimension(:),
pointer,
contiguous :: dbl1d, nodes
193 real(DP),
dimension(:, :),
pointer,
contiguous :: dbl2d
194 character(len=LINELENGTH) :: nc_tag
195 integer(I4B) :: iaux, iparam, nvals
197 integer(I4B),
pointer :: nbound
203 do iparam = 1, export_pkg%nparam
205 if (export_pkg%param_reads(iparam)%invar < 1) cycle
210 export_pkg%mf6_input%component_type, &
211 export_pkg%mf6_input%subcomponent_type, &
212 'PERIOD', export_pkg%param_names(iparam),
'')
215 nc_tag = this%input_attribute(export_pkg%mf6_input%subcomponent_name, &
219 select case (idt%datatype)
221 call mem_setptr(int1d, idt%mf6varname, export_pkg%mf6_input%mempath)
222 this%var_ids%export(1) = export_pkg%varids_param(iparam, 1)
224 this%disv, idt, export_pkg%mf6_input%mempath, &
225 nc_tag, export_pkg%mf6_input%subcomponent_name, &
226 this%gridmap_name, this%deflate, this%shuffle, &
227 this%chunk_face,
kper, this%nc_fname)
229 call mem_setptr(dbl1d, idt%mf6varname, export_pkg%mf6_input%mempath)
230 select case (idt%shape)
232 this%var_ids%export(1) = export_pkg%varids_param(iparam, 1)
234 this%disv, idt, export_pkg%mf6_input%mempath, &
235 nc_tag, export_pkg%mf6_input%subcomponent_name, &
236 this%gridmap_name, this%deflate, this%shuffle, &
237 this%chunk_face,
kper, iaux, this%nc_fname)
239 nvals = this%disv%nodesuser
240 allocate (nodes(nvals))
242 do k = 1, this%disv%nlay
243 this%var_ids%export(k) = export_pkg%varids_param(iparam, k)
245 call mem_setptr(dbl1d, idt%mf6varname, export_pkg%mf6_input%mempath)
246 call mem_setptr(int1d,
'NODEULIST', export_pkg%mf6_input%mempath)
247 call mem_setptr(nbound,
'NBOUND', export_pkg%mf6_input%mempath)
249 nodes(int1d(n)) = dbl1d(n)
252 this%disv, idt, export_pkg%mf6_input%mempath, &
253 nc_tag, export_pkg%mf6_input%subcomponent_name, &
254 this%gridmap_name, this%deflate, this%shuffle, &
255 this%chunk_face,
kper, iaux, this%nc_fname)
260 call mem_setptr(dbl2d, idt%mf6varname, export_pkg%mf6_input%mempath)
261 select case (idt%shape)
263 nvals = this%disv%ncpl
264 allocate (nodes(nvals))
265 do iaux = 1,
size(dbl2d, dim=1)
266 this%var_ids%export(1) = export_pkg%varids_aux(iaux, 1)
268 nodes(n) = dbl2d(iaux, n)
271 this%disv, idt, export_pkg%mf6_input%mempath, &
272 nc_tag, export_pkg%mf6_input%subcomponent_name, &
273 this%gridmap_name, this%deflate, this%shuffle, &
274 this%chunk_face,
kper, iaux, this%nc_fname)
278 nvals = this%disv%nodesuser
279 allocate (nodes(nvals))
280 call mem_setptr(int1d,
'NODEULIST', export_pkg%mf6_input%mempath)
281 call mem_setptr(nbound,
'NBOUND', export_pkg%mf6_input%mempath)
282 do iaux = 1,
size(dbl2d, dim=1)
284 do k = 1, this%disv%nlay
285 this%var_ids%export(k) = export_pkg%varids_aux(iaux, k)
288 nodes(int1d(n)) = dbl2d(iaux, n)
291 this%disv, idt, export_pkg%mf6_input%mempath, &
292 nc_tag, export_pkg%mf6_input%subcomponent_name, &
293 this%gridmap_name, this%deflate, this%shuffle, &
294 this%chunk_face,
kper, iaux, this%nc_fname)
305 call nf_verify(nf90_put_var(this%ncid, this%var_ids%time, &
310 call nf_verify(nf90_sync(this%ncid), this%nc_fname)
317 character(len=*),
intent(in) :: pkgtype
318 character(len=*),
intent(in) :: pkgname
319 character(len=*),
intent(in) :: mempath
321 integer(I4B),
dimension(:),
pointer,
contiguous :: int1d
322 integer(I4B),
dimension(:, :),
pointer,
contiguous :: int2d
323 real(DP),
dimension(:),
pointer,
contiguous :: dbl1d
324 real(DP),
dimension(:, :),
pointer,
contiguous :: dbl2d
325 character(len=LINELENGTH) :: nc_tag
326 integer(I4B) :: iper, iaux
332 nc_tag = this%input_attribute(pkgname, idt)
334 select case (idt%datatype)
336 call mem_setptr(int1d, idt%mf6varname, mempath)
338 this%disv, idt, mempath, nc_tag, pkgname, &
339 this%gridmap_name, this%deflate, this%shuffle, &
340 this%chunk_face, iper, this%nc_fname)
342 call mem_setptr(int2d, idt%mf6varname, mempath)
344 this%disv, idt, mempath, nc_tag, pkgname, &
345 this%gridmap_name, this%deflate, this%shuffle, &
346 this%chunk_face, this%nc_fname)
348 call mem_setptr(dbl1d, idt%mf6varname, mempath)
350 this%disv, idt, mempath, nc_tag, pkgname, &
351 this%gridmap_name, this%deflate, this%shuffle, &
352 this%chunk_face, iper, iaux, this%nc_fname)
354 call mem_setptr(dbl2d, idt%mf6varname, mempath)
356 this%disv, idt, mempath, nc_tag, pkgname, &
357 this%gridmap_name, this%deflate, this%shuffle, &
358 this%chunk_face, this%nc_fname)
370 integer(I4B),
dimension(:),
contiguous,
pointer :: ncvert
373 call mem_setptr(ncvert,
'NCVERT', this%dis_mempath)
377 call nf_verify(nf90_def_dim(this%ncid,
'time', this%totnstp, &
378 this%dim_ids%time), this%nc_fname)
379 call nf_verify(nf90_def_var(this%ncid,
'time', nf90_double, &
380 this%dim_ids%time, this%var_ids%time), &
382 call nf_verify(nf90_put_att(this%ncid, this%var_ids%time,
'calendar', &
383 'standard'), this%nc_fname)
384 call nf_verify(nf90_put_att(this%ncid, this%var_ids%time,
'units', &
385 this%datetime), this%nc_fname)
386 call nf_verify(nf90_put_att(this%ncid, this%var_ids%time,
'axis',
'T'), &
388 call nf_verify(nf90_put_att(this%ncid, this%var_ids%time,
'standard_name', &
389 'time'), this%nc_fname)
390 call nf_verify(nf90_put_att(this%ncid, this%var_ids%time,
'long_name', &
391 'time'), this%nc_fname)
395 call nf_verify(nf90_def_dim(this%ncid,
'nmesh_node', this%disv%nvert, &
396 this%dim_ids%nmesh_node), this%nc_fname)
397 call nf_verify(nf90_def_dim(this%ncid,
'nmesh_face', this%disv%ncpl, &
398 this%dim_ids%nmesh_face), this%nc_fname)
399 call nf_verify(nf90_def_dim(this%ncid,
'max_nmesh_face_nodes', &
401 this%dim_ids%max_nmesh_face_nodes), &
405 call nf_verify(nf90_def_dim(this%ncid,
'layer', this%nlay, &
406 this%dim_ids%layer), this%nc_fname)
407 call nf_verify(nf90_def_var(this%ncid,
'layer', nf90_int, &
408 this%dim_ids%layer, this%var_ids%layer), &
410 call nf_verify(nf90_put_att(this%ncid, this%var_ids%layer,
'units',
'1'), &
412 call nf_verify(nf90_put_att(this%ncid, this%var_ids%layer,
'axis',
'Z'), &
414 call nf_verify(nf90_put_att(this%ncid, this%var_ids%layer,
'positive', &
415 'down'), this%nc_fname)
416 call nf_verify(nf90_put_att(this%ncid, this%var_ids%layer,
'long_name', &
417 'model layer'), this%nc_fname)
425 integer(I4B),
dimension(:),
contiguous,
pointer :: ncvert => null()
426 integer(I4B),
dimension(:),
contiguous,
pointer :: icvert => null()
427 real(DP),
dimension(:),
contiguous,
pointer :: cell_xt => null()
428 real(DP),
dimension(:),
contiguous,
pointer :: cell_yt => null()
429 real(DP),
dimension(:),
contiguous,
pointer :: vert_xt => null()
430 real(DP),
dimension(:),
contiguous,
pointer :: vert_yt => null()
431 real(DP) :: x_transform, y_transform
432 integer(I4B) :: n, m, idx, cnt, iv, maxvert, k
433 integer(I4B),
dimension(:),
allocatable :: verts, layers
434 real(DP),
dimension(:),
allocatable :: bnds
435 integer(I4B) :: istop
438 call mem_setptr(ncvert,
'NCVERT', this%dis_mempath)
439 call mem_setptr(icvert,
'ICVERT', this%dis_mempath)
442 allocate (cell_xt(this%disv%ncpl))
443 allocate (cell_yt(this%disv%ncpl))
444 allocate (vert_xt(this%disv%nvert))
445 allocate (vert_yt(this%disv%nvert))
448 call nf_verify(nf90_put_var(this%ncid, this%var_ids%mesh, 1), &
452 allocate (layers(this%nlay))
456 call nf_verify(nf90_put_var(this%ncid, this%var_ids%layer, layers), &
461 do n = 1, this%disv%nvert
466 x_transform, y_transform)
467 vert_xt(n) = x_transform
468 vert_yt(n) = y_transform
472 do n = 1, this%disv%ncpl
477 x_transform, y_transform)
478 cell_xt(n) = x_transform
479 cell_yt(n) = y_transform
483 call nf_verify(nf90_put_var(this%ncid, this%var_ids%mesh_node_x, &
484 vert_xt), this%nc_fname)
485 call nf_verify(nf90_put_var(this%ncid, this%var_ids%mesh_node_y, &
486 vert_yt), this%nc_fname)
489 call nf_verify(nf90_put_var(this%ncid, this%var_ids%mesh_face_x, &
490 cell_xt), this%nc_fname)
491 call nf_verify(nf90_put_var(this%ncid, this%var_ids%mesh_face_y, &
492 cell_yt), this%nc_fname)
495 maxvert = maxval(ncvert)
498 allocate (verts(maxvert))
499 allocate (bnds(maxvert))
503 do n = 1, this%disv%ncpl
504 verts = nf90_fill_int
505 idx = cnt + ncvert(n)
508 do m = idx, istop, -1
511 verts(iv) = icvert(m)
515 if (verts(iv) == verts(1)) verts(iv) = nf90_fill_int
518 call nf_verify(nf90_put_var(this%ncid, this%var_ids%mesh_face_nodes, &
519 verts, start=(/1, n/), &
520 count=(/maxvert, 1/)), &
524 bnds = nf90_fill_double
526 if (verts(m) /= nf90_fill_int)
then
527 bnds(m) = vert_yt(verts(m))
530 call nf_verify(nf90_put_var(this%ncid, this%var_ids%mesh_face_ybnds, &
531 bnds, start=(/1, n/), &
532 count=(/maxvert, 1/)), &
537 bnds = nf90_fill_double
539 if (verts(m) /= nf90_fill_int)
then
540 bnds(m) = vert_xt(verts(m))
543 call nf_verify(nf90_put_var(this%ncid, this%var_ids%mesh_face_xbnds, &
544 bnds, start=(/1, n/), &
545 count=(/maxvert, 1/)), &
562 nc_tag, pkgname, gridmap_name, deflate, shuffle, &
563 chunk_face, iper, nc_fname)
565 integer(I4B),
dimension(:),
pointer,
contiguous,
intent(in) :: p_mem
566 integer(I4B),
intent(in) :: ncid
569 type(
disvtype),
pointer,
intent(in) :: disv
571 character(len=*),
intent(in) :: mempath
572 character(len=*),
intent(in) :: nc_tag
573 character(len=*),
intent(in) :: pkgname
574 character(len=*),
intent(in) :: gridmap_name
575 integer(I4B),
intent(in) :: deflate
576 integer(I4B),
intent(in) :: shuffle
577 integer(I4B),
intent(in) :: chunk_face
578 integer(I4B),
intent(in) :: iper
579 character(len=*),
intent(in) :: nc_fname
580 integer(I4B),
dimension(:),
pointer,
contiguous :: int1d
581 integer(I4B),
dimension(:, :),
pointer,
contiguous :: int2d
582 integer(I4B) :: axis_sz, k
583 integer(I4B),
dimension(:),
allocatable :: var_id
584 character(len=LINELENGTH) :: longname, varname
586 if (idt%shape ==
'NCPL' .or. &
587 idt%shape ==
'NAUX NCPL')
then
592 longname =
export_longname(idt%longname, pkgname, idt%tagname, mempath, &
593 component_type=idt%component_type, &
594 subcomponent_type=idt%subcomponent_type)
597 axis_sz = dim_ids%nmesh_face
600 call nf_verify(nf90_redef(ncid), nc_fname)
601 call nf_verify(nf90_def_var(ncid, varname, nf90_int, &
602 (/axis_sz/), var_id(1)), &
606 call ncvar_chunk(ncid, var_id(1), chunk_face, nc_fname)
608 call ncvar_deflate(ncid, var_id(1), deflate, shuffle, nc_fname)
611 call nf_verify(nf90_put_att(ncid, var_id(1),
'_FillValue', &
612 (/nf90_fill_int/)), nc_fname)
613 call nf_verify(nf90_put_att(ncid, var_id(1),
'long_name', &
621 call nf_verify(nf90_enddef(ncid), nc_fname)
622 call nf_verify(nf90_put_var(ncid, var_id(1), p_mem), &
627 var_ids%export(1), p_mem, &
629 count=(/disv%ncpl, 1/)), nc_fname)
634 int2d(1:disv%ncpl, 1:disv%nlay) => p_mem(1:disv%nodesuser)
637 allocate (var_id(disv%nlay))
640 call nf_verify(nf90_redef(ncid), nc_fname)
646 component_type=idt%component_type, &
647 subcomponent_type=idt%subcomponent_type)
649 call nf_verify(nf90_def_var(ncid, varname, nf90_int, &
650 (/dim_ids%nmesh_face/), var_id(k)), &
654 call ncvar_chunk(ncid, var_id(k), chunk_face, nc_fname)
656 call ncvar_deflate(ncid, var_id(k), deflate, shuffle, nc_fname)
659 call nf_verify(nf90_put_att(ncid, var_id(k),
'_FillValue', &
660 (/nf90_fill_int/)), nc_fname)
661 call nf_verify(nf90_put_att(ncid, var_id(k),
'long_name', &
670 call nf_verify(nf90_enddef(ncid), nc_fname)
672 call nf_verify(nf90_put_var(ncid, var_id(k), int2d(:, k)), nc_fname)
680 int1d(1:disv%ncpl) => int2d(:, k)
682 var_ids%export(k), int1d, &
684 count=(/disv%ncpl, 1/)), nc_fname)
693 nc_tag, pkgname, gridmap_name, deflate, shuffle, &
694 chunk_face, nc_fname)
695 integer(I4B),
dimension(:, :),
pointer,
contiguous,
intent(in) :: p_mem
696 integer(I4B),
intent(in) :: ncid
699 type(
disvtype),
pointer,
intent(in) :: disv
701 character(len=*),
intent(in) :: mempath
702 character(len=*),
intent(in) :: nc_tag
703 character(len=*),
intent(in) :: pkgname
704 character(len=*),
intent(in) :: gridmap_name
705 integer(I4B),
intent(in) :: deflate
706 integer(I4B),
intent(in) :: shuffle
707 integer(I4B),
intent(in) :: chunk_face
708 character(len=*),
intent(in) :: nc_fname
709 integer(I4B),
dimension(:),
allocatable :: var_id
710 character(len=LINELENGTH) :: longname, varname
713 allocate (var_id(disv%nlay))
716 call nf_verify(nf90_redef(ncid), nc_fname)
722 component_type=idt%component_type, &
723 subcomponent_type=idt%subcomponent_type)
725 call nf_verify(nf90_def_var(ncid, varname, nf90_int, &
726 (/dim_ids%nmesh_face/), var_id(k)), &
730 call ncvar_chunk(ncid, var_id(k), chunk_face, nc_fname)
732 call ncvar_deflate(ncid, var_id(k), deflate, shuffle, nc_fname)
735 call nf_verify(nf90_put_att(ncid, var_id(k),
'_FillValue', &
736 (/nf90_fill_int/)), nc_fname)
737 call nf_verify(nf90_put_att(ncid, var_id(k),
'long_name', &
746 call nf_verify(nf90_enddef(ncid), nc_fname)
748 call nf_verify(nf90_put_var(ncid, var_id(k), p_mem(:, k)), nc_fname)
757 nc_tag, pkgname, gridmap_name, deflate, shuffle, &
758 chunk_face, iper, iaux, nc_fname)
760 real(DP),
dimension(:),
pointer,
contiguous,
intent(in) :: p_mem
761 integer(I4B),
intent(in) :: ncid
764 type(
disvtype),
pointer,
intent(in) :: disv
766 character(len=*),
intent(in) :: mempath
767 character(len=*),
intent(in) :: nc_tag
768 character(len=*),
intent(in) :: pkgname
769 character(len=*),
intent(in) :: gridmap_name
770 integer(I4B),
intent(in) :: deflate
771 integer(I4B),
intent(in) :: shuffle
772 integer(I4B),
intent(in) :: chunk_face
773 integer(I4B),
intent(in) :: iper
774 integer(I4B),
intent(in) :: iaux
775 character(len=*),
intent(in) :: nc_fname
776 real(DP),
dimension(:),
pointer,
contiguous :: dbl1d
777 real(DP),
dimension(:, :),
pointer,
contiguous :: dbl2d
778 integer(I4B) :: axis_sz, k
779 integer(I4B),
dimension(:),
allocatable :: var_id
780 character(len=LINELENGTH) :: longname, varname
782 if (idt%shape ==
'NCPL' .or. &
783 idt%shape ==
'NAUX NCPL')
then
790 mempath, iaux=iaux, &
791 component_type=idt%component_type, &
792 subcomponent_type=idt%subcomponent_type)
795 axis_sz = dim_ids%nmesh_face
798 call nf_verify(nf90_redef(ncid), nc_fname)
799 call nf_verify(nf90_def_var(ncid, varname, nf90_double, &
800 (/axis_sz/), var_id(1)), &
804 call ncvar_chunk(ncid, var_id(1), chunk_face, nc_fname)
806 call ncvar_deflate(ncid, var_id(1), deflate, shuffle, nc_fname)
809 call nf_verify(nf90_put_att(ncid, var_id(1),
'_FillValue', &
810 (/nf90_fill_double/)), nc_fname)
811 call nf_verify(nf90_put_att(ncid, var_id(1),
'long_name', &
816 call ncvar_mf6attr(ncid, var_id(1), 0, iaux, nc_tag, nc_fname)
819 call nf_verify(nf90_enddef(ncid), nc_fname)
820 call nf_verify(nf90_put_var(ncid, var_id(1), p_mem), &
825 var_ids%export(1), p_mem, &
827 count=(/disv%ncpl, 1/)), nc_fname)
832 dbl2d(1:disv%ncpl, 1:disv%nlay) => p_mem(1:disv%nodesuser)
835 allocate (var_id(disv%nlay))
838 call nf_verify(nf90_redef(ncid), nc_fname)
841 varname =
export_varname(pkgname, idt%tagname, mempath, layer=k, &
844 mempath, layer=k, iaux=iaux, &
845 component_type=idt%component_type, &
846 subcomponent_type=idt%subcomponent_type)
848 call nf_verify(nf90_def_var(ncid, varname, nf90_double, &
849 (/dim_ids%nmesh_face/), var_id(k)), &
853 call ncvar_chunk(ncid, var_id(k), chunk_face, nc_fname)
855 call ncvar_deflate(ncid, var_id(k), deflate, shuffle, nc_fname)
858 call nf_verify(nf90_put_att(ncid, var_id(k),
'_FillValue', &
859 (/nf90_fill_double/)), nc_fname)
860 call nf_verify(nf90_put_att(ncid, var_id(k),
'long_name', &
865 call ncvar_mf6attr(ncid, var_id(k), k, iaux, nc_tag, nc_fname)
869 call nf_verify(nf90_enddef(ncid), nc_fname)
871 call nf_verify(nf90_put_var(ncid, var_id(k), dbl2d(:, k)), nc_fname)
879 dbl1d(1:disv%ncpl) => dbl2d(:, k)
881 var_ids%export(k), dbl1d, &
883 count=(/disv%ncpl, 1/)), nc_fname)
892 nc_tag, pkgname, gridmap_name, deflate, shuffle, &
893 chunk_face, nc_fname)
894 real(DP),
dimension(:, :),
pointer,
contiguous,
intent(in) :: p_mem
895 integer(I4B),
intent(in) :: ncid
898 type(
disvtype),
pointer,
intent(in) :: disv
900 character(len=*),
intent(in) :: mempath
901 character(len=*),
intent(in) :: nc_tag
902 character(len=*),
intent(in) :: pkgname
903 character(len=*),
intent(in) :: gridmap_name
904 integer(I4B),
intent(in) :: deflate
905 integer(I4B),
intent(in) :: shuffle
906 integer(I4B),
intent(in) :: chunk_face
907 character(len=*),
intent(in) :: nc_fname
908 integer(I4B),
dimension(:),
allocatable :: var_id
909 character(len=LINELENGTH) :: longname, varname
912 allocate (var_id(disv%nlay))
915 call nf_verify(nf90_redef(ncid), nc_fname)
921 component_type=idt%component_type, &
922 subcomponent_type=idt%subcomponent_type)
924 call nf_verify(nf90_def_var(ncid, varname, nf90_double, &
925 (/dim_ids%nmesh_face/), var_id(k)), &
929 call ncvar_chunk(ncid, var_id(k), chunk_face, nc_fname)
931 call ncvar_deflate(ncid, var_id(k), deflate, shuffle, nc_fname)
934 call nf_verify(nf90_put_att(ncid, var_id(k),
'_FillValue', &
935 (/nf90_fill_double/)), nc_fname)
936 call nf_verify(nf90_put_att(ncid, var_id(k),
'long_name', &
945 call nf_verify(nf90_enddef(ncid), nc_fname)
947 call nf_verify(nf90_put_var(ncid, var_id(k), p_mem(:, k)), nc_fname)
subroutine, public dis_transform_xy(x, y, xorigin, yorigin, angrot, xglo, yglo)
Get global (x, y) coordinates from cell-local coordinates.
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, found)
Return parameter definition.
This module defines variable data types.
This module contains the MeshDisvModelModule.
subroutine add_mesh_data(this)
netcdf export add mesh information
subroutine nc_export_dbl1d(p_mem, ncid, dim_ids, var_ids, disv, idt, mempath, nc_tag, pkgname, gridmap_name, deflate, shuffle, chunk_face, iper, iaux, nc_fname)
netcdf export 1D double array
subroutine disv_export_init(this, modelname, modeltype, modelfname, nc_fname, disenum, nctype, iout)
netcdf export disv init
subroutine nc_export_int2d(p_mem, ncid, dim_ids, var_ids, disv, idt, mempath, nc_tag, pkgname, gridmap_name, deflate, shuffle, chunk_face, nc_fname)
netcdf export 2D integer array
subroutine package_step(this, export_pkg)
netcdf export package dynamic input
subroutine nc_export_dbl2d(p_mem, ncid, dim_ids, var_ids, disv, idt, mempath, nc_tag, pkgname, gridmap_name, deflate, shuffle, chunk_face, nc_fname)
netcdf export 2D double array
subroutine define_dim(this)
netcdf export define dimensions
subroutine df(this)
netcdf export define
subroutine nc_export_int1d(p_mem, ncid, dim_ids, var_ids, disv, idt, mempath, nc_tag, pkgname, gridmap_name, deflate, shuffle, chunk_face, iper, nc_fname)
netcdf export 1D integer array
subroutine step(this)
netcdf export step
subroutine disv_export_destroy(this)
netcdf export disv destroy
subroutine export_input_array(this, pkgtype, pkgname, mempath, idt)
netcdf export an input array
This module contains the MeshModelModule.
subroutine, public ncvar_mf6attr(ncid, varid, layer, iaux, nc_tag, nc_fname)
put variable internal attributes
subroutine, public ncvar_gridmap(ncid, varid, gridmap_name, nc_fname)
put variable gridmap attributes
subroutine, public ncvar_chunk(ncid, varid, chunk_face, nc_fname)
define variable chunking
subroutine, public ncvar_deflate(ncid, varid, deflate, shuffle, nc_fname)
define variable compression
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, component_type, subcomponent_type)
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_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
integer(i4b) isim_mode
simulation mode
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 ...
Vertex grid discretization.
type for storing model export dimension ids
type for storing model export variable ids