1339 real(DP),
dimension(:),
pointer,
contiguous,
intent(in) :: p_mem
1340 integer(I4B),
intent(in) :: ncid
1341 type(StructuredNCDimIdType),
intent(inout) :: dim_ids
1342 type(StructuredNCVarIdType),
intent(inout) :: var_ids
1343 type(DisType),
pointer,
intent(in) :: dis
1344 type(InputParamDefinitionType),
pointer,
intent(in) :: idt
1345 character(len=*),
intent(in) :: mempath
1346 character(len=*),
intent(in) :: nc_tag
1347 character(len=*),
intent(in) :: pkgname
1348 character(len=*),
intent(in) :: gridmap_name
1349 logical(LGP),
intent(in) :: latlon
1350 integer(I4B),
intent(in) :: deflate
1351 integer(I4B),
intent(in) :: shuffle
1352 integer(I4B),
intent(in) :: chunk_z
1353 integer(I4B),
intent(in) :: chunk_y
1354 integer(I4B),
intent(in) :: chunk_x
1355 integer(I4B),
intent(in) :: iper
1356 integer(I4B),
intent(in) :: iaux
1357 character(len=*),
intent(in) :: nc_fname
1358 integer(I4B) :: var_id, axis_sz, istp
1359 character(len=LINELENGTH) :: varname, longname
1361 if (idt%shape ==
'NROW' .or. &
1362 idt%shape ==
'NCOL' .or. &
1363 idt%shape ==
'NCPL' .or. &
1364 idt%shape ==
'NAUX NCPL')
then
1367 select case (idt%shape)
1372 case (
'NCPL',
'NAUX NCPL')
1373 axis_sz = dim_ids%ncpl
1376 varname = export_varname(pkgname, idt%tagname, mempath)
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)
1396 call ncvar_mf6attr(ncid, var_id, iaux, nc_tag, nc_fname)
1399 call nf_verify(nf90_enddef(ncid), nc_fname)
1400 call nf_verify(nf90_put_var(ncid, var_id, p_mem), &
1405 call nf_verify(nf90_put_var(ncid, &
1406 var_ids%export, p_mem, &
1407 start=(/1, istp/), &
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)
1437 call ncvar_mf6attr(ncid, var_id, iaux, nc_tag, 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 call nf_verify(nf90_put_var(ncid, &
1448 var_ids%export, p_mem, &
1449 start=(/1, 1, 1, istp/), &
1450 count=(/dis%ncol, dis%nrow, dis%nlay, 1/)), &
This module contains the NetCDFCommonModule.
integer(i4b) function, public ixstp()
step index for timeseries data