1367 real(DP),
dimension(:),
pointer,
contiguous,
intent(in) :: p_mem
1368 integer(I4B),
intent(in) :: ncid
1369 type(StructuredNCDimIdType),
intent(inout) :: dim_ids
1370 type(StructuredNCVarIdType),
intent(inout) :: var_ids
1371 type(DisType),
pointer,
intent(in) :: dis
1372 type(InputParamDefinitionType),
pointer,
intent(in) :: idt
1373 character(len=*),
intent(in) :: mempath
1374 character(len=*),
intent(in) :: nc_tag
1375 character(len=*),
intent(in) :: pkgname
1376 character(len=*),
intent(in) :: gridmap_name
1377 logical(LGP),
intent(in) :: latlon
1378 integer(I4B),
intent(in) :: deflate
1379 integer(I4B),
intent(in) :: shuffle
1380 integer(I4B),
intent(in) :: chunk_z
1381 integer(I4B),
intent(in) :: chunk_y
1382 integer(I4B),
intent(in) :: chunk_x
1383 integer(I4B),
intent(in) :: iper
1384 integer(I4B),
intent(in) :: iaux
1385 character(len=*),
intent(in) :: nc_fname
1386 integer(I4B) :: var_id, axis_sz
1387 character(len=LINELENGTH) :: varname, longname
1389 if (idt%shape ==
'NROW' .or. &
1390 idt%shape ==
'NCOL' .or. &
1391 idt%shape ==
'NCPL' .or. &
1392 idt%shape ==
'NAUX NCPL')
then
1395 select case (idt%shape)
1402 varname = export_varname(pkgname, idt%tagname, mempath)
1403 longname = export_longname(idt%longname, pkgname, idt%tagname, mempath, &
1405 component_type=idt%component_type, &
1406 subcomponent_type=idt%subcomponent_type)
1409 call nf_verify(nf90_redef(ncid), nc_fname)
1410 call nf_verify(nf90_def_var(ncid, varname, nf90_double, &
1411 (/axis_sz/), var_id), &
1415 call ncvar_deflate(ncid, var_id, deflate, shuffle, nc_fname)
1418 call nf_verify(nf90_put_att(ncid, var_id,
'_FillValue', &
1419 (/nf90_fill_double/)), nc_fname)
1420 call nf_verify(nf90_put_att(ncid, var_id,
'long_name', &
1421 longname), nc_fname)
1424 call ncvar_mf6attr(ncid, var_id, iaux, nc_tag, nc_fname)
1427 call nf_verify(nf90_enddef(ncid), nc_fname)
1428 call nf_verify(nf90_put_var(ncid, var_id, p_mem), &
1432 call nf_verify(nf90_put_var(ncid, &
1433 var_ids%export, p_mem, &
1434 start=(/1, 1,
kper/), &
1435 count=(/dis%ncol, dis%nrow, 1/)), nc_fname)
1441 varname = export_varname(pkgname, idt%tagname, mempath, iaux=iaux)
1442 longname = export_longname(idt%longname, pkgname, idt%tagname, mempath, &
1444 component_type=idt%component_type, &
1445 subcomponent_type=idt%subcomponent_type)
1448 call nf_verify(nf90_redef(ncid), nc_fname)
1449 call nf_verify(nf90_def_var(ncid, varname, nf90_double, &
1450 (/dim_ids%x, dim_ids%y, dim_ids%z/), &
1454 call ncvar_chunk3d(ncid, var_id, chunk_x, chunk_y, chunk_z, nc_fname)
1456 call ncvar_deflate(ncid, var_id, deflate, shuffle, nc_fname)
1459 call nf_verify(nf90_put_att(ncid, var_id,
'_FillValue', &
1460 (/nf90_fill_double/)), nc_fname)
1461 call nf_verify(nf90_put_att(ncid, var_id,
'long_name', &
1462 longname), nc_fname)
1465 call ncvar_gridmap(ncid, var_id, gridmap_name, latlon, nc_fname)
1466 call ncvar_mf6attr(ncid, var_id, iaux, nc_tag, nc_fname)
1469 call nf_verify(nf90_enddef(ncid), nc_fname)
1470 call nf_verify(nf90_put_var(ncid, var_id, p_mem, start=(/1, 1, 1/), &
1471 count=(/dis%ncol, dis%nrow, dis%nlay/)), &
1475 call nf_verify(nf90_put_var(ncid, &
1476 var_ids%export, p_mem, &
1477 start=(/1, 1, 1,
kper/), &
1478 count=(/dis%ncol, dis%nrow, dis%nlay, 1/)), &
integer(i4b), pointer, public kper
current stress period number