1234 integer(I4B),
intent(in) :: ncid
1235 type(StructuredNCDimIdType),
intent(inout) :: dim_ids
1236 type(StructuredNCVarIdType),
intent(inout) :: var_ids
1237 type(DisType),
pointer,
intent(in) :: dis
1238 real(DP),
dimension(:),
pointer,
contiguous,
intent(in) :: p_mem
1239 character(len=*),
intent(in) :: nc_varname
1240 character(len=*),
intent(in) :: pkgname
1241 character(len=*),
intent(in) :: tagname
1242 character(len=*),
intent(in) :: shapestr
1243 character(len=*),
intent(in) :: longname
1244 character(len=*),
intent(in) :: nc_tag
1245 character(len=*),
intent(in) :: gridmap_name
1246 logical(LGP),
intent(in) :: latlon
1247 integer(I4B),
intent(in) :: deflate
1248 integer(I4B),
intent(in) :: shuffle
1249 integer(I4B),
intent(in) :: chunk_z
1250 integer(I4B),
intent(in) :: chunk_y
1251 integer(I4B),
intent(in) :: chunk_x
1252 integer(I4B),
intent(in) :: iper
1253 character(len=*),
intent(in) :: nc_fname
1254 integer(I4B) :: var_id, axis_sz
1255 real(DP) :: fill_value
1256 character(len=LINELENGTH) :: longname_l
1258 if (shapestr ==
'NROW' .or. &
1259 shapestr ==
'NCOL' .or. &
1260 shapestr ==
'NCPL')
then
1262 select case (shapestr)
1268 axis_sz = dim_ids%ncpl
1272 call nf_verify(nf90_redef(ncid), nc_fname)
1273 call nf_verify(nf90_def_var(ncid, nc_varname, nf90_double, &
1274 (/axis_sz/), var_id), &
1278 call ncvar_deflate(ncid, var_id, deflate, shuffle, nc_fname)
1281 call nf_verify(nf90_put_att(ncid, var_id,
'_FillValue', &
1282 (/nf90_fill_double/)), nc_fname)
1283 call nf_verify(nf90_put_att(ncid, var_id,
'long_name', &
1284 longname), nc_fname)
1287 call ncvar_mf6attr(ncid, var_id, 0, 0, nc_tag, nc_fname)
1290 call nf_verify(nf90_enddef(ncid), nc_fname)
1291 call nf_verify(nf90_put_var(ncid, var_id, p_mem), &
1298 fill_value = nf90_fill_double
1301 longname_l = export_longname(longname, pkgname, tagname, layer=0, iper=iper)
1304 call nf_verify(nf90_redef(ncid), nc_fname)
1305 call nf_verify(nf90_def_var(ncid, nc_varname, nf90_double, &
1306 (/dim_ids%x, dim_ids%y, dim_ids%z/), var_id), &
1310 call ncvar_chunk3d(ncid, var_id, chunk_x, chunk_y, chunk_z, nc_fname)
1312 call ncvar_deflate(ncid, var_id, deflate, shuffle, nc_fname)
1315 call nf_verify(nf90_put_att(ncid, var_id,
'_FillValue', &
1316 (/fill_value/)), nc_fname)
1317 call nf_verify(nf90_put_att(ncid, var_id,
'long_name', &
1318 longname_l), nc_fname)
1321 call ncvar_gridmap(ncid, var_id, gridmap_name, latlon, nc_fname)
1322 call ncvar_mf6attr(ncid, var_id, iper, 0, nc_tag, nc_fname)
1325 call nf_verify(nf90_enddef(ncid), nc_fname)
1326 call nf_verify(nf90_put_var(ncid, var_id, p_mem, start=(/1, 1, 1/), &
1327 count=(/dis%ncol, dis%nrow, dis%nlay/)), &
This module contains simulation constants.
real(dp), parameter dnodata
real no data constant