1255 integer(I4B),
intent(in) :: ncid
1256 type(StructuredNCDimIdType),
intent(inout) :: dim_ids
1257 type(StructuredNCVarIdType),
intent(inout) :: var_ids
1258 type(DisType),
pointer,
intent(in) :: dis
1259 real(DP),
dimension(:),
pointer,
contiguous,
intent(in) :: p_mem
1260 character(len=*),
intent(in) :: nc_varname
1261 character(len=*),
intent(in) :: pkgname
1262 character(len=*),
intent(in) :: tagname
1263 character(len=*),
intent(in) :: shapestr
1264 character(len=*),
intent(in) :: longname
1265 character(len=*),
intent(in) :: nc_tag
1266 character(len=*),
intent(in) :: gridmap_name
1267 logical(LGP),
intent(in) :: latlon
1268 integer(I4B),
intent(in) :: deflate
1269 integer(I4B),
intent(in) :: shuffle
1270 integer(I4B),
intent(in) :: chunk_z
1271 integer(I4B),
intent(in) :: chunk_y
1272 integer(I4B),
intent(in) :: chunk_x
1273 integer(I4B),
intent(in) :: iper
1274 character(len=*),
intent(in) :: nc_fname
1276 integer(I4B) :: var_id, axis_sz
1277 real(DP) :: fill_value
1278 character(len=LINELENGTH) :: longname_l
1280 if (shapestr ==
'NROW' .or. &
1281 shapestr ==
'NCOL' .or. &
1282 shapestr ==
'NCPL')
then
1284 select case (shapestr)
1290 axis_sz = dim_ids%ncpl
1294 call nf_verify(nf90_redef(ncid), nc_fname)
1295 call nf_verify(nf90_def_var(ncid, nc_varname, nf90_double, &
1296 (/axis_sz/), var_id), &
1300 call ncvar_deflate(ncid, var_id, deflate, shuffle, nc_fname)
1303 call nf_verify(nf90_put_att(ncid, var_id,
'_FillValue', &
1304 (/nf90_fill_double/)), nc_fname)
1305 call nf_verify(nf90_put_att(ncid, var_id,
'long_name', &
1306 longname), nc_fname)
1309 call ncvar_mf6attr(ncid, var_id, 0, 0, nc_tag, nc_fname)
1312 call nf_verify(nf90_enddef(ncid), nc_fname)
1313 call nf_verify(nf90_put_var(ncid, var_id, p_mem), &
1321 fill_value = nf90_fill_double
1324 longname_l = export_longname(longname, pkgname, tagname, layer=0, iper=iper)
1327 call nf_verify(nf90_redef(ncid), nc_fname)
1328 call nf_verify(nf90_def_var(ncid, nc_varname, nf90_double, &
1329 (/dim_ids%x, dim_ids%y, dim_ids%z/), var_id), &
1333 call ncvar_chunk3d(ncid, var_id, chunk_x, chunk_y, chunk_z, nc_fname)
1335 call ncvar_deflate(ncid, var_id, deflate, shuffle, nc_fname)
1338 call nf_verify(nf90_put_att(ncid, var_id,
'_FillValue', &
1339 (/fill_value/)), nc_fname)
1340 call nf_verify(nf90_put_att(ncid, var_id,
'long_name', &
1341 longname_l), nc_fname)
1344 call ncvar_gridmap(ncid, var_id, gridmap_name, latlon, nc_fname)
1345 call ncvar_mf6attr(ncid, var_id, iper, 0, nc_tag, nc_fname)
1348 call nf_verify(nf90_enddef(ncid), nc_fname)
1349 call nf_verify(nf90_put_var(ncid, var_id, p_mem, start=(/1, 1, 1/), &
1350 count=(/dis%ncol, dis%nrow, dis%nlay/)), &
This module contains simulation constants.
real(dp), parameter dnodata
real no data constant