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, &
714 if (export_arrays > 0)
then
717 call this%export_input_arrays(ptype, pname, mempath, param_dfns)
722 deallocate (export_arrays)
731 call nf_verify(nf90_put_att(this%ncid, nf90_global,
'title', &
732 this%annotation%title), this%nc_fname)
734 call nf_verify(nf90_put_att(this%ncid, nf90_global,
'source', &
735 this%annotation%source), this%nc_fname)
737 call nf_verify(nf90_put_att(this%ncid, nf90_global,
'modflow_grid', &
738 this%annotation%grid), this%nc_fname)
740 call nf_verify(nf90_put_att(this%ncid, nf90_global,
'modflow_model', &
741 this%annotation%model), this%nc_fname)
743 call nf_verify(nf90_put_att(this%ncid, nf90_global,
'history', &
744 this%annotation%history), this%nc_fname)
746 call nf_verify(nf90_put_att(this%ncid, nf90_global,
'Conventions', &
747 this%annotation%conventions), &
759 call nf_verify(nf90_def_dim(this%ncid,
'bnd', 2, this%dim_ids%bnd), &
764 call nf_verify(nf90_def_dim(this%ncid,
'time', this%totnstp, &
765 this%dim_ids%time), this%nc_fname)
766 call nf_verify(nf90_def_var(this%ncid,
'time', nf90_double, &
767 this%dim_ids%time, this%var_ids%time), &
769 call nf_verify(nf90_put_att(this%ncid, this%var_ids%time,
'calendar', &
770 'standard'), this%nc_fname)
771 call nf_verify(nf90_put_att(this%ncid, this%var_ids%time,
'units', &
772 this%datetime), this%nc_fname)
773 call nf_verify(nf90_put_att(this%ncid, this%var_ids%time,
'axis',
'T'), &
776 call nf_verify(nf90_put_att(this%ncid, this%var_ids%time,
'standard_name', &
777 'time'), this%nc_fname)
778 call nf_verify(nf90_put_att(this%ncid, this%var_ids%time,
'long_name', &
779 'time'), this%nc_fname)
783 call nf_verify(nf90_def_dim(this%ncid,
'z', this%dis%nlay, this%dim_ids%z), &
785 call nf_verify(nf90_def_var(this%ncid,
'z', nf90_double, this%dim_ids%z, &
786 this%var_ids%z), this%nc_fname)
787 call nf_verify(nf90_put_att(this%ncid, this%var_ids%z,
'units',
'layer'), &
789 call nf_verify(nf90_put_att(this%ncid, this%var_ids%z,
'long_name', &
790 'layer number'), this%nc_fname)
800 call nf_verify(nf90_def_dim(this%ncid,
'y', this%dis%nrow, this%dim_ids%y), &
802 call nf_verify(nf90_def_var(this%ncid,
'y', nf90_double, this%dim_ids%y, &
803 this%var_ids%y), this%nc_fname)
804 call nf_verify(nf90_put_att(this%ncid, this%var_ids%y,
'units', &
805 this%lenunits), this%nc_fname)
806 call nf_verify(nf90_put_att(this%ncid, this%var_ids%y,
'axis',
'Y'), &
808 call nf_verify(nf90_put_att(this%ncid, this%var_ids%y,
'standard_name', &
809 'projection_y_coordinate'), this%nc_fname)
810 call nf_verify(nf90_put_att(this%ncid, this%var_ids%y,
'long_name', &
811 'Northing'), this%nc_fname)
812 if (this%wkt /=
'')
then
813 call nf_verify(nf90_put_att(this%ncid, this%var_ids%y,
'grid_mapping', &
814 this%gridmap_name), this%nc_fname)
816 call nf_verify(nf90_put_att(this%ncid, this%var_ids%y,
'bounds',
'y_bnds'), &
818 call nf_verify(nf90_def_var(this%ncid,
'y_bnds', nf90_double, &
819 (/this%dim_ids%bnd, this%dim_ids%y/), &
820 this%var_ids%y_bnds), this%nc_fname)
823 call nf_verify(nf90_def_dim(this%ncid,
'x', this%dis%ncol, this%dim_ids%x), &
825 call nf_verify(nf90_def_var(this%ncid,
'x', nf90_double, this%dim_ids%x, &
826 this%var_ids%x), this%nc_fname)
827 call nf_verify(nf90_put_att(this%ncid, this%var_ids%x,
'units', &
828 this%lenunits), this%nc_fname)
829 call nf_verify(nf90_put_att(this%ncid, this%var_ids%x,
'axis',
'X'), &
831 call nf_verify(nf90_put_att(this%ncid, this%var_ids%x,
'standard_name', &
832 'projection_x_coordinate'), this%nc_fname)
833 call nf_verify(nf90_put_att(this%ncid, this%var_ids%x,
'long_name', &
834 'Easting'), this%nc_fname)
835 if (this%wkt /=
'')
then
836 call nf_verify(nf90_put_att(this%ncid, this%var_ids%x,
'grid_mapping', &
837 this%gridmap_name), this%nc_fname)
839 call nf_verify(nf90_put_att(this%ncid, this%var_ids%x,
'bounds',
'x_bnds'), &
841 call nf_verify(nf90_def_var(this%ncid,
'x_bnds', nf90_double, &
842 (/this%dim_ids%bnd, this%dim_ids%x/), &
843 this%var_ids%x_bnds), this%nc_fname)
852 call nf_verify(nf90_def_var(this%ncid, this%xname, nf90_double, &
853 (/this%dim_ids%x, this%dim_ids%y, &
854 this%dim_ids%z, this%dim_ids%time/), &
855 this%var_ids%dependent), &
859 if (this%chunking_active)
then
860 call nf_verify(nf90_def_var_chunking(this%ncid, &
861 this%var_ids%dependent, &
863 (/this%chunk_x, this%chunk_y, &
864 this%chunk_z, this%chunk_time/)), &
869 call ncvar_deflate(this%ncid, this%var_ids%dependent, this%deflate, &
870 this%shuffle, this%nc_fname)
873 call nf_verify(nf90_put_att(this%ncid, this%var_ids%dependent, &
874 'units', this%lenunits), this%nc_fname)
875 call nf_verify(nf90_put_att(this%ncid, this%var_ids%dependent, &
876 'standard_name', this%annotation%stdname), &
878 call nf_verify(nf90_put_att(this%ncid, this%var_ids%dependent,
'long_name', &
879 this%annotation%longname), this%nc_fname)
880 call nf_verify(nf90_put_att(this%ncid, this%var_ids%dependent,
'_FillValue', &
884 call ncvar_gridmap(this%ncid, this%var_ids%dependent, this%gridmap_name, &
885 this%latlon, this%nc_fname)
892 integer(I4B) :: var_id
893 if (this%wkt /=
'')
then
894 call nf_verify(nf90_redef(this%ncid), this%nc_fname)
895 call nf_verify(nf90_def_var(this%ncid, this%gridmap_name, nf90_int, &
896 var_id), this%nc_fname)
898 call nf_verify(nf90_put_att(this%ncid, var_id,
'crs_wkt', this%wkt), &
900 call nf_verify(nf90_enddef(this%ncid), this%nc_fname)
901 call nf_verify(nf90_put_var(this%ncid, var_id, 1), &
910 if (this%latlon)
then
912 call nf_verify(nf90_def_var(this%ncid,
'lat', nf90_double, &
913 (/this%dim_ids%x, this%dim_ids%y/), &
914 this%var_ids%latitude), this%nc_fname)
915 call nf_verify(nf90_put_att(this%ncid, this%var_ids%latitude, &
916 'units',
'degrees_north'), this%nc_fname)
917 call nf_verify(nf90_put_att(this%ncid, this%var_ids%latitude, &
918 'standard_name',
'latitude'), this%nc_fname)
919 call nf_verify(nf90_put_att(this%ncid, this%var_ids%latitude, &
920 'long_name',
'latitude'), this%nc_fname)
923 call nf_verify(nf90_def_var(this%ncid,
'lon', nf90_double, &
924 (/this%dim_ids%x, this%dim_ids%y/), &
925 this%var_ids%longitude), this%nc_fname)
926 call nf_verify(nf90_put_att(this%ncid, this%var_ids%longitude, &
927 'units',
'degrees_east'), this%nc_fname)
928 call nf_verify(nf90_put_att(this%ncid, this%var_ids%longitude, &
929 'standard_name',
'longitude'), this%nc_fname)
930 call nf_verify(nf90_put_att(this%ncid, this%var_ids%longitude, &
931 'long_name',
'longitude'), this%nc_fname)
939 if (this%latlon)
then
941 call nf_verify(nf90_put_var(this%ncid, this%var_ids%latitude, &
942 this%latitude, start=(/1, 1/), &
943 count=(/this%dis%ncol, this%dis%nrow/)), &
947 call nf_verify(nf90_put_var(this%ncid, this%var_ids%longitude, &
948 this%longitude, start=(/1, 1/), &
949 count=(/this%dis%ncol, this%dis%nrow/)), &
958 integer(I4B) :: ibnd, n
959 real(DP),
dimension(:, :),
pointer,
contiguous :: dbl2d
960 real(DP),
dimension(:),
allocatable :: x, y
961 real(DP) :: xoff, yoff
963 if (this%dis%angrot /=
dzero)
then
967 xoff = this%dis%xorigin
968 yoff = this%dis%yorigin
971 allocate (x(
size(this%dis%cellx)))
972 allocate (y(
size(this%dis%celly)))
974 do n = 1,
size(this%dis%cellx)
975 x(n) = this%dis%cellx(n) + xoff
978 do n = 1,
size(this%dis%celly)
979 y(n) = this%dis%celly(n) + yoff
982 call nf_verify(nf90_put_var(this%ncid, this%var_ids%x, x), &
984 call nf_verify(nf90_put_var(this%ncid, this%var_ids%y, y), &
987 call nf_verify(nf90_put_var(this%ncid, this%var_ids%z, this%layers), &
994 allocate (dbl2d(2,
size(this%dis%cellx)))
996 do n = 1,
size(this%dis%cellx)
998 dbl2d(1, ibnd) = xoff
999 dbl2d(2, ibnd) = xoff + this%dis%delr(ibnd)
1001 dbl2d(1, ibnd) = dbl2d(1, ibnd - 1) + this%dis%delr(ibnd)
1002 dbl2d(2, ibnd) = dbl2d(2, ibnd - 1) + this%dis%delr(ibnd)
1006 call nf_verify(nf90_put_var(this%ncid, this%var_ids%x_bnds, dbl2d), &
1011 allocate (dbl2d(2,
size(this%dis%celly)))
1013 do n =
size(this%dis%celly), 1, -1
1015 dbl2d(1, ibnd) = yoff + sum(this%dis%delc) - this%dis%delc(n)
1016 dbl2d(2, ibnd) = yoff + sum(this%dis%delc)
1018 dbl2d(1, ibnd) = dbl2d(1, ibnd - 1) - this%dis%delc(n)
1019 dbl2d(2, ibnd) = dbl2d(2, ibnd - 1) - this%dis%delc(n)
1023 call nf_verify(nf90_put_var(this%ncid, this%var_ids%y_bnds, dbl2d), &
1031 integer(I4B),
intent(in) :: ncid
1032 integer(I4B),
intent(in) :: varid
1033 integer(I4B),
intent(in) :: chunk_x
1034 integer(I4B),
intent(in) :: chunk_y
1035 character(len=*),
intent(in) :: nc_fname
1036 if (chunk_y > 0 .and. chunk_x > 0)
then
1037 call nf_verify(nf90_def_var_chunking(ncid, varid, nf90_chunked, &
1038 (/chunk_x, chunk_y/)), nc_fname)
1045 integer(I4B),
intent(in) :: ncid
1046 integer(I4B),
intent(in) :: varid
1047 integer(I4B),
intent(in) :: chunk_x
1048 integer(I4B),
intent(in) :: chunk_y
1049 integer(I4B),
intent(in) :: chunk_z
1050 character(len=*),
intent(in) :: nc_fname
1051 if (chunk_z > 0 .and. chunk_y > 0 .and. chunk_x > 0)
then
1052 call nf_verify(nf90_def_var_chunking(ncid, varid, nf90_chunked, &
1053 (/chunk_x, chunk_y, chunk_z/)), &
1061 integer(I4B),
intent(in) :: ncid
1062 integer(I4B),
intent(in) :: varid
1063 integer(I4B),
intent(in) :: deflate
1064 integer(I4B),
intent(in) :: shuffle
1065 character(len=*),
intent(in) :: nc_fname
1067 if (deflate >= 0)
then
1068 call nf_verify(nf90_def_var_deflate(ncid, varid, shuffle=shuffle, &
1069 deflate=1, deflate_level=deflate), &
1077 integer(I4B),
intent(in) :: ncid
1078 integer(I4B),
intent(in) :: varid
1079 character(len=*),
intent(in) :: gridmap_name
1080 logical(LGP),
intent(in) :: latlon
1081 character(len=*),
intent(in) :: nc_fname
1082 if (gridmap_name /=
'')
then
1083 call nf_verify(nf90_put_att(ncid, varid,
'coordinates',
'x y'), &
1085 call nf_verify(nf90_put_att(ncid, varid,
'grid_mapping', gridmap_name), &
1087 else if (latlon)
then
1088 call nf_verify(nf90_put_att(ncid, varid,
'coordinates',
'lon lat'), &
1096 integer(I4B),
intent(in) :: ncid
1097 integer(I4B),
intent(in) :: varid
1098 integer(I4B),
intent(in) :: iaux
1099 character(len=*),
intent(in) :: nc_tag
1100 character(len=*),
intent(in) :: nc_fname
1101 if (nc_tag /=
'')
then
1102 call nf_verify(nf90_put_att(ncid, varid,
'modflow_input', &
1105 call nf_verify(nf90_put_att(ncid, varid,
'modflow_iaux', &
1114 nc_tag, pkgname, gridmap_name, latlon, deflate, &
1115 shuffle, chunk_z, chunk_y, chunk_x, iper, nc_fname)
1117 integer(I4B),
dimension(:),
pointer,
contiguous,
intent(in) :: p_mem
1118 integer(I4B),
intent(in) :: ncid
1121 type(
distype),
pointer,
intent(in) :: dis
1123 character(len=*),
intent(in) :: mempath
1124 character(len=*),
intent(in) :: nc_tag
1125 character(len=*),
intent(in) :: pkgname
1126 character(len=*),
intent(in) :: gridmap_name
1127 logical(LGP),
intent(in) :: latlon
1128 integer(I4B),
intent(in) :: deflate
1129 integer(I4B),
intent(in) :: shuffle
1130 integer(I4B),
intent(in) :: chunk_z
1131 integer(I4B),
intent(in) :: chunk_y
1132 integer(I4B),
intent(in) :: chunk_x
1133 integer(I4B),
intent(in) :: iper
1134 character(len=*),
intent(in) :: nc_fname
1135 integer(I4B) :: var_id, axis_sz
1136 character(len=LINELENGTH) :: varname, longname
1140 if (idt%shape ==
'NROW' .or. &
1141 idt%shape ==
'NCOL' .or. &
1142 idt%shape ==
'NCPL' .or. &
1143 idt%shape ==
'NAUX NCPL')
then
1146 select case (idt%shape)
1153 longname =
export_longname(idt%longname, pkgname, idt%tagname, mempath)
1156 call nf_verify(nf90_redef(ncid), nc_fname)
1157 call nf_verify(nf90_def_var(ncid, varname, nf90_int, &
1158 (/axis_sz/), var_id), &
1162 call ncvar_deflate(ncid, var_id, deflate, shuffle, nc_fname)
1165 call nf_verify(nf90_put_att(ncid, var_id,
'_FillValue', &
1166 (/nf90_fill_int/)), nc_fname)
1167 call nf_verify(nf90_put_att(ncid, var_id,
'long_name', &
1168 longname), nc_fname)
1174 call nf_verify(nf90_enddef(ncid), nc_fname)
1175 call nf_verify(nf90_put_var(ncid, var_id, p_mem), &
1180 var_ids%export, p_mem, &
1181 start=(/1,
kper/), &
1182 count=(/dis%ncol, dis%nrow, 1/)), nc_fname)
1189 call nf_verify(nf90_redef(ncid), nc_fname)
1190 call nf_verify(nf90_def_var(ncid, varname, nf90_int, &
1191 (/dim_ids%x, dim_ids%y, dim_ids%z/), &
1195 call ncvar_chunk3d(ncid, var_id, chunk_x, chunk_y, chunk_z, nc_fname)
1197 call ncvar_deflate(ncid, var_id, deflate, shuffle, nc_fname)
1200 call nf_verify(nf90_put_att(ncid, var_id,
'_FillValue', &
1201 (/nf90_fill_int/)), nc_fname)
1202 call nf_verify(nf90_put_att(ncid, var_id,
'long_name', &
1203 idt%longname), nc_fname)
1206 call ncvar_gridmap(ncid, var_id, gridmap_name, latlon, nc_fname)
1210 call nf_verify(nf90_enddef(ncid), nc_fname)
1211 call nf_verify(nf90_put_var(ncid, var_id, p_mem, start=(/1, 1, 1/), &
1212 count=(/dis%ncol, dis%nrow, dis%nlay/)), &
1217 var_ids%export, p_mem, &
1218 start=(/1, 1, 1,
kper/), &
1219 count=(/dis%ncol, dis%nrow, dis%nlay, 1/)), &
1228 nc_tag, pkgname, gridmap_name, latlon, deflate, &
1229 shuffle, chunk_z, chunk_y, chunk_x, nc_fname)
1230 integer(I4B),
dimension(:, :),
pointer,
contiguous,
intent(in) :: p_mem
1231 integer(I4B),
intent(in) :: ncid
1234 type(
distype),
pointer,
intent(in) :: dis
1236 character(len=*),
intent(in) :: mempath
1237 character(len=*),
intent(in) :: nc_tag
1238 character(len=*),
intent(in) :: pkgname
1239 character(len=*),
intent(in) :: gridmap_name
1240 logical(LGP),
intent(in) :: latlon
1241 integer(I4B),
intent(in) :: deflate
1242 integer(I4B),
intent(in) :: shuffle
1243 integer(I4B),
intent(in) :: chunk_z
1244 integer(I4B),
intent(in) :: chunk_y
1245 integer(I4B),
intent(in) :: chunk_x
1246 character(len=*),
intent(in) :: nc_fname
1247 character(len=LINELENGTH) :: varname
1248 integer(I4B) :: var_id
1253 call nf_verify(nf90_redef(ncid), nc_fname)
1254 call nf_verify(nf90_def_var(ncid, varname, nf90_int, &
1255 (/dim_ids%x, dim_ids%y/), var_id), &
1259 call ncvar_chunk2d(ncid, var_id, chunk_x, chunk_y, nc_fname)
1261 call ncvar_deflate(ncid, var_id, deflate, shuffle, nc_fname)
1264 call nf_verify(nf90_put_att(ncid, var_id,
'_FillValue', &
1265 (/nf90_fill_int/)), nc_fname)
1266 call nf_verify(nf90_put_att(ncid, var_id,
'long_name', &
1267 idt%longname), nc_fname)
1270 call ncvar_gridmap(ncid, var_id, gridmap_name, latlon, nc_fname)
1274 call nf_verify(nf90_enddef(ncid), nc_fname)
1275 call nf_verify(nf90_put_var(ncid, var_id, p_mem, start=(/1, 1/), &
1276 count=(/dis%ncol, dis%nrow/)), &
1283 nc_tag, pkgname, gridmap_name, latlon, deflate, &
1284 shuffle, chunk_z, chunk_y, chunk_x, nc_fname)
1285 integer(I4B),
dimension(:, :, :),
pointer,
contiguous,
intent(in) :: p_mem
1286 integer(I4B),
intent(in) :: ncid
1289 type(
distype),
pointer,
intent(in) :: dis
1291 character(len=*),
intent(in) :: mempath
1292 character(len=*),
intent(in) :: nc_tag
1293 character(len=*),
intent(in) :: pkgname
1294 character(len=*),
intent(in) :: gridmap_name
1295 logical(LGP),
intent(in) :: latlon
1296 integer(I4B),
intent(in) :: deflate
1297 integer(I4B),
intent(in) :: shuffle
1298 integer(I4B),
intent(in) :: chunk_z
1299 integer(I4B),
intent(in) :: chunk_y
1300 integer(I4B),
intent(in) :: chunk_x
1301 character(len=*),
intent(in) :: nc_fname
1302 character(len=LINELENGTH) :: varname
1303 integer(I4B) :: var_id
1308 call nf_verify(nf90_redef(ncid), nc_fname)
1309 call nf_verify(nf90_def_var(ncid, varname, nf90_int, &
1310 (/dim_ids%x, dim_ids%y, dim_ids%z/), var_id), &
1314 call ncvar_chunk3d(ncid, var_id, chunk_x, chunk_y, chunk_z, nc_fname)
1316 call ncvar_deflate(ncid, var_id, deflate, shuffle, nc_fname)
1319 call nf_verify(nf90_put_att(ncid, var_id,
'_FillValue', &
1320 (/nf90_fill_int/)), nc_fname)
1321 call nf_verify(nf90_put_att(ncid, var_id,
'long_name', &
1322 idt%longname), nc_fname)
1325 call ncvar_gridmap(ncid, var_id, gridmap_name, latlon, nc_fname)
1329 call nf_verify(nf90_enddef(ncid), nc_fname)
1330 call nf_verify(nf90_put_var(ncid, var_id, p_mem, start=(/1, 1, 1/), &
1331 count=(/dis%ncol, dis%nrow, dis%nlay/)), &
1338 nc_tag, pkgname, gridmap_name, latlon, deflate, &
1339 shuffle, chunk_z, chunk_y, chunk_x, iper, iaux, &
1342 real(DP),
dimension(:),
pointer,
contiguous,
intent(in) :: p_mem
1343 integer(I4B),
intent(in) :: ncid
1346 type(
distype),
pointer,
intent(in) :: dis
1348 character(len=*),
intent(in) :: mempath
1349 character(len=*),
intent(in) :: nc_tag
1350 character(len=*),
intent(in) :: pkgname
1351 character(len=*),
intent(in) :: gridmap_name
1352 logical(LGP),
intent(in) :: latlon
1353 integer(I4B),
intent(in) :: deflate
1354 integer(I4B),
intent(in) :: shuffle
1355 integer(I4B),
intent(in) :: chunk_z
1356 integer(I4B),
intent(in) :: chunk_y
1357 integer(I4B),
intent(in) :: chunk_x
1358 integer(I4B),
intent(in) :: iper
1359 integer(I4B),
intent(in) :: iaux
1360 character(len=*),
intent(in) :: nc_fname
1361 integer(I4B) :: var_id, axis_sz
1362 character(len=LINELENGTH) :: varname, longname
1364 if (idt%shape ==
'NROW' .or. &
1365 idt%shape ==
'NCOL' .or. &
1366 idt%shape ==
'NCPL' .or. &
1367 idt%shape ==
'NAUX NCPL')
then
1370 select case (idt%shape)
1378 longname =
export_longname(idt%longname, pkgname, idt%tagname, mempath, &
1382 call nf_verify(nf90_redef(ncid), nc_fname)
1383 call nf_verify(nf90_def_var(ncid, varname, nf90_double, &
1384 (/axis_sz/), var_id), &
1388 call ncvar_deflate(ncid, var_id, deflate, shuffle, nc_fname)
1391 call nf_verify(nf90_put_att(ncid, var_id,
'_FillValue', &
1392 (/nf90_fill_double/)), nc_fname)
1393 call nf_verify(nf90_put_att(ncid, var_id,
'long_name', &
1394 longname), nc_fname)
1400 call nf_verify(nf90_enddef(ncid), nc_fname)
1401 call nf_verify(nf90_put_var(ncid, var_id, p_mem), &
1406 var_ids%export, p_mem, &
1407 start=(/1,
kper/), &
1408 count=(/dis%ncol, dis%nrow, 1/)), nc_fname)
1414 varname =
export_varname(pkgname, idt%tagname, mempath, iaux=iaux)
1415 longname =
export_longname(idt%longname, pkgname, idt%tagname, mempath, &
1419 call nf_verify(nf90_redef(ncid), nc_fname)
1420 call nf_verify(nf90_def_var(ncid, varname, nf90_double, &
1421 (/dim_ids%x, dim_ids%y, dim_ids%z/), &
1425 call ncvar_chunk3d(ncid, var_id, chunk_x, chunk_y, chunk_z, nc_fname)
1427 call ncvar_deflate(ncid, var_id, deflate, shuffle, nc_fname)
1430 call nf_verify(nf90_put_att(ncid, var_id,
'_FillValue', &
1431 (/nf90_fill_double/)), nc_fname)
1432 call nf_verify(nf90_put_att(ncid, var_id,
'long_name', &
1433 longname), nc_fname)
1436 call ncvar_gridmap(ncid, var_id, gridmap_name, latlon, nc_fname)
1440 call nf_verify(nf90_enddef(ncid), nc_fname)
1441 call nf_verify(nf90_put_var(ncid, var_id, p_mem, start=(/1, 1, 1/), &
1442 count=(/dis%ncol, dis%nrow, dis%nlay/)), &
1447 var_ids%export, p_mem, &
1448 start=(/1, 1, 1,
kper/), &
1449 count=(/dis%ncol, dis%nrow, dis%nlay, 1/)), &
1458 nc_tag, pkgname, gridmap_name, latlon, deflate, &
1459 shuffle, chunk_z, chunk_y, chunk_x, nc_fname)
1460 real(DP),
dimension(:, :),
pointer,
contiguous,
intent(in) :: p_mem
1461 integer(I4B),
intent(in) :: ncid
1464 type(
distype),
pointer,
intent(in) :: dis
1466 character(len=*),
intent(in) :: mempath
1467 character(len=*),
intent(in) :: nc_tag
1468 character(len=*),
intent(in) :: pkgname
1469 character(len=*),
intent(in) :: gridmap_name
1470 logical(LGP),
intent(in) :: latlon
1471 integer(I4B),
intent(in) :: deflate
1472 integer(I4B),
intent(in) :: shuffle
1473 integer(I4B),
intent(in) :: chunk_z
1474 integer(I4B),
intent(in) :: chunk_y
1475 integer(I4B),
intent(in) :: chunk_x
1476 character(len=*),
intent(in) :: nc_fname
1477 character(len=LINELENGTH) :: varname
1478 integer(I4B) :: var_id
1483 call nf_verify(nf90_redef(ncid), nc_fname)
1484 call nf_verify(nf90_def_var(ncid, varname, nf90_double, &
1485 (/dim_ids%x, dim_ids%y/), var_id), &
1489 call ncvar_chunk2d(ncid, var_id, chunk_x, chunk_y, nc_fname)
1491 call ncvar_deflate(ncid, var_id, deflate, shuffle, nc_fname)
1494 call nf_verify(nf90_put_att(ncid, var_id,
'_FillValue', &
1495 (/nf90_fill_double/)), nc_fname)
1496 call nf_verify(nf90_put_att(ncid, var_id,
'long_name', &
1497 idt%longname), nc_fname)
1500 call ncvar_gridmap(ncid, var_id, gridmap_name, latlon, nc_fname)
1504 call nf_verify(nf90_enddef(ncid), nc_fname)
1505 call nf_verify(nf90_put_var(ncid, var_id, p_mem, start=(/1, 1/), &
1506 count=(/dis%ncol, dis%nrow/)), &
1513 nc_tag, pkgname, gridmap_name, latlon, deflate, &
1514 shuffle, chunk_z, chunk_y, chunk_x, nc_fname)
1515 real(DP),
dimension(:, :, :),
pointer,
contiguous,
intent(in) :: p_mem
1516 integer(I4B),
intent(in) :: ncid
1519 type(
distype),
pointer,
intent(in) :: dis
1521 character(len=*),
intent(in) :: mempath
1522 character(len=*),
intent(in) :: nc_tag
1523 character(len=*),
intent(in) :: pkgname
1524 character(len=*),
intent(in) :: gridmap_name
1525 logical(LGP),
intent(in) :: latlon
1526 integer(I4B),
intent(in) :: deflate
1527 integer(I4B),
intent(in) :: shuffle
1528 integer(I4B),
intent(in) :: chunk_z
1529 integer(I4B),
intent(in) :: chunk_y
1530 integer(I4B),
intent(in) :: chunk_x
1531 character(len=*),
intent(in) :: nc_fname
1532 integer(I4B) :: var_id
1533 character(len=LINELENGTH) :: varname, longname
1536 longname =
export_longname(idt%longname, pkgname, idt%tagname, mempath)
1539 call nf_verify(nf90_redef(ncid), nc_fname)
1540 call nf_verify(nf90_def_var(ncid, varname, nf90_double, &
1541 (/dim_ids%x, dim_ids%y, dim_ids%z/), var_id), &
1545 call ncvar_chunk3d(ncid, var_id, chunk_x, chunk_y, chunk_z, nc_fname)
1547 call ncvar_deflate(ncid, var_id, deflate, shuffle, nc_fname)
1550 call nf_verify(nf90_put_att(ncid, var_id,
'_FillValue', &
1551 (/nf90_fill_double/)), nc_fname)
1552 call nf_verify(nf90_put_att(ncid, var_id,
'long_name', &
1553 longname), nc_fname)
1556 call ncvar_gridmap(ncid, var_id, gridmap_name, latlon, nc_fname)
1560 call nf_verify(nf90_enddef(ncid), nc_fname)
1561 call nf_verify(nf90_put_var(ncid, var_id, p_mem, start=(/1, 1, 1/), &
1562 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, found)
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