MODFLOW 6  version 6.6.0.dev0
USGS Modular Hydrologic Model
disncstructuredmodule::nc_export_array Interface Reference
Collaboration diagram for disncstructuredmodule::nc_export_array:
Collaboration graph

Private Member Functions

subroutine nc_export_int1d (ncid, dim_ids, var_ids, dis, p_mem, nc_varname, pkgname, tagname, shapestr, longname, nc_tag, gridmap_name, latlon, deflate, shuffle, chunk_z, chunk_y, chunk_x, iper, nc_fname)
 netcdf export 1D integer More...
 
subroutine nc_export_int2d (ncid, dim_ids, var_ids, dis, p_mem, nc_varname, pkgname, tagname, shapestr, longname, nc_tag, gridmap_name, latlon, deflate, shuffle, chunk_z, chunk_y, chunk_x, nc_fname)
 netcdf export 2D integer More...
 
subroutine nc_export_int3d (ncid, dim_ids, var_ids, dis, p_mem, nc_varname, pkgname, tagname, shapestr, longname, nc_tag, gridmap_name, latlon, deflate, shuffle, chunk_z, chunk_y, chunk_x, nc_fname)
 netcdf export 3D integer More...
 
subroutine nc_export_dbl1d (ncid, dim_ids, var_ids, dis, p_mem, nc_varname, pkgname, tagname, shapestr, longname, nc_tag, gridmap_name, latlon, deflate, shuffle, chunk_z, chunk_y, chunk_x, iper, nc_fname)
 netcdf export 1D double More...
 
subroutine nc_export_dbl2d (ncid, dim_ids, var_ids, dis, p_mem, nc_varname, pkgname, tagname, shapestr, longname, nc_tag, gridmap_name, latlon, deflate, shuffle, chunk_z, chunk_y, chunk_x, nc_fname)
 netcdf export 2D double More...
 
subroutine nc_export_dbl3d (ncid, dim_ids, var_ids, dis, p_mem, nc_varname, pkgname, tagname, shapestr, longname, nc_tag, gridmap_name, latlon, deflate, shuffle, chunk_z, chunk_y, chunk_x, iper, iaux, nc_fname)
 netcdf export 3D double More...
 

Detailed Description

Definition at line 83 of file DisNCStructured.f90.

Member Function/Subroutine Documentation

◆ nc_export_dbl1d()

subroutine disncstructuredmodule::nc_export_array::nc_export_dbl1d ( integer(i4b), intent(in)  ncid,
type(structuredncdimidtype), intent(inout)  dim_ids,
type(structuredncvaridtype), intent(inout)  var_ids,
type(distype), intent(in), pointer  dis,
real(dp), dimension(:), intent(in), pointer, contiguous  p_mem,
character(len=*), intent(in)  nc_varname,
character(len=*), intent(in)  pkgname,
character(len=*), intent(in)  tagname,
character(len=*), intent(in)  shapestr,
character(len=*), intent(in)  longname,
character(len=*), intent(in)  nc_tag,
character(len=*), intent(in)  gridmap_name,
logical(lgp), intent(in)  latlon,
integer(i4b), intent(in)  deflate,
integer(i4b), intent(in)  shuffle,
integer(i4b), intent(in)  chunk_z,
integer(i4b), intent(in)  chunk_y,
integer(i4b), intent(in)  chunk_x,
integer(i4b), intent(in)  iper,
character(len=*), intent(in)  nc_fname 
)
private

Definition at line 1250 of file DisNCStructured.f90.

1254  use constantsmodule, only: dnodata
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
1275  ! -- local
1276  integer(I4B) :: var_id, axis_sz
1277  real(DP) :: fill_value
1278  character(len=LINELENGTH) :: longname_l
1279  !
1280  if (shapestr == 'NROW' .or. &
1281  shapestr == 'NCOL' .or. &
1282  shapestr == 'NCPL') then
1283  !
1284  select case (shapestr)
1285  case ('NROW')
1286  axis_sz = dim_ids%y
1287  case ('NCOL')
1288  axis_sz = dim_ids%x
1289  case ('NCPL')
1290  axis_sz = dim_ids%ncpl
1291  end select
1292  !
1293  ! -- reenter define mode and create variable
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), &
1297  nc_fname)
1298  !
1299  ! -- NROW/NCOL shapes use default chunking
1300  call ncvar_deflate(ncid, var_id, deflate, shuffle, nc_fname)
1301  !
1302  ! -- put attr
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)
1307  !
1308  ! -- add mf6 attr
1309  call ncvar_mf6attr(ncid, var_id, 0, 0, nc_tag, nc_fname)
1310  !
1311  ! -- exit define mode and write data
1312  call nf_verify(nf90_enddef(ncid), nc_fname)
1313  call nf_verify(nf90_put_var(ncid, var_id, p_mem), &
1314  nc_fname)
1315 
1316  else
1317  !
1318  if (iper > 0) then
1319  fill_value = dnodata
1320  else
1321  fill_value = nf90_fill_double
1322  end if
1323  !
1324  longname_l = export_longname(longname, pkgname, tagname, layer=0, iper=iper)
1325  !
1326  ! -- reenter define mode and create variable
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), &
1330  nc_fname)
1331  !
1332  ! -- apply chunking parameters
1333  call ncvar_chunk3d(ncid, var_id, chunk_x, chunk_y, chunk_z, nc_fname)
1334  ! -- deflate and shuffle
1335  call ncvar_deflate(ncid, var_id, deflate, shuffle, nc_fname)
1336  !
1337  ! -- put attr
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)
1342  !
1343  ! -- add grid mapping and mf6 attr
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)
1346  !
1347  ! -- exit define mode and write data
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/)), &
1351  nc_fname)
1352  end if
This module contains simulation constants.
Definition: Constants.f90:9
real(dp), parameter dnodata
real no data constant
Definition: Constants.f90:95
Here is the call graph for this function:

◆ nc_export_dbl2d()

subroutine disncstructuredmodule::nc_export_array::nc_export_dbl2d ( integer(i4b), intent(in)  ncid,
type(structuredncdimidtype), intent(inout)  dim_ids,
type(structuredncvaridtype), intent(inout)  var_ids,
type(distype), intent(in), pointer  dis,
real(dp), dimension(:, :), intent(in), pointer, contiguous  p_mem,
character(len=*), intent(in)  nc_varname,
character(len=*), intent(in)  pkgname,
character(len=*), intent(in)  tagname,
character(len=*), intent(in)  shapestr,
character(len=*), intent(in)  longname,
character(len=*), intent(in)  nc_tag,
character(len=*), intent(in)  gridmap_name,
logical(lgp), intent(in)  latlon,
integer(i4b), intent(in)  deflate,
integer(i4b), intent(in)  shuffle,
integer(i4b), intent(in)  chunk_z,
integer(i4b), intent(in)  chunk_y,
integer(i4b), intent(in)  chunk_x,
character(len=*), intent(in)  nc_fname 
)
private

Definition at line 1357 of file DisNCStructured.f90.

1361  integer(I4B), intent(in) :: ncid
1362  type(StructuredNCDimIdType), intent(inout) :: dim_ids
1363  type(StructuredNCVarIdType), intent(inout) :: var_ids
1364  type(DisType), pointer, intent(in) :: dis
1365  real(DP), dimension(:, :), pointer, contiguous, intent(in) :: p_mem
1366  character(len=*), intent(in) :: nc_varname
1367  character(len=*), intent(in) :: pkgname
1368  character(len=*), intent(in) :: tagname
1369  character(len=*), intent(in) :: shapestr
1370  character(len=*), intent(in) :: longname
1371  character(len=*), intent(in) :: nc_tag
1372  character(len=*), intent(in) :: gridmap_name
1373  logical(LGP), intent(in) :: latlon
1374  integer(I4B), intent(in) :: deflate
1375  integer(I4B), intent(in) :: shuffle
1376  integer(I4B), intent(in) :: chunk_z
1377  integer(I4B), intent(in) :: chunk_y
1378  integer(I4B), intent(in) :: chunk_x
1379  character(len=*), intent(in) :: nc_fname
1380  ! -- local
1381  integer(I4B) :: var_id
1382  !
1383  ! -- reenter define mode and create variable
1384  call nf_verify(nf90_redef(ncid), nc_fname)
1385  call nf_verify(nf90_def_var(ncid, nc_varname, nf90_double, &
1386  (/dim_ids%x, dim_ids%y/), var_id), &
1387  nc_fname)
1388  !
1389  ! -- apply chunking parameters
1390  call ncvar_chunk2d(ncid, var_id, chunk_x, chunk_y, nc_fname)
1391  ! -- deflate and shuffle
1392  call ncvar_deflate(ncid, var_id, deflate, shuffle, nc_fname)
1393  !
1394  ! -- put attr
1395  call nf_verify(nf90_put_att(ncid, var_id, '_FillValue', &
1396  (/nf90_fill_double/)), nc_fname)
1397  call nf_verify(nf90_put_att(ncid, var_id, 'long_name', &
1398  longname), nc_fname)
1399  !
1400  ! -- add grid mapping and mf6 attr
1401  call ncvar_gridmap(ncid, var_id, gridmap_name, latlon, nc_fname)
1402  call ncvar_mf6attr(ncid, var_id, 0, 0, nc_tag, nc_fname)
1403  !
1404  ! -- exit define mode and write data
1405  call nf_verify(nf90_enddef(ncid), nc_fname)
1406  call nf_verify(nf90_put_var(ncid, var_id, p_mem, start=(/1, 1/), &
1407  count=(/dis%ncol, dis%nrow/)), &
1408  nc_fname)
Here is the call graph for this function:

◆ nc_export_dbl3d()

subroutine disncstructuredmodule::nc_export_array::nc_export_dbl3d ( integer(i4b), intent(in)  ncid,
type(structuredncdimidtype), intent(inout)  dim_ids,
type(structuredncvaridtype), intent(inout)  var_ids,
type(distype), intent(in), pointer  dis,
real(dp), dimension(:, :, :), intent(in), pointer, contiguous  p_mem,
character(len=*), intent(in)  nc_varname,
character(len=*), intent(in)  pkgname,
character(len=*), intent(in)  tagname,
character(len=*), intent(in)  shapestr,
character(len=*), intent(in)  longname,
character(len=*), intent(in)  nc_tag,
character(len=*), intent(in)  gridmap_name,
logical(lgp), intent(in)  latlon,
integer(i4b), intent(in)  deflate,
integer(i4b), intent(in)  shuffle,
integer(i4b), intent(in)  chunk_z,
integer(i4b), intent(in)  chunk_y,
integer(i4b), intent(in)  chunk_x,
integer(i4b), intent(in)  iper,
integer(i4b), intent(in)  iaux,
character(len=*), intent(in)  nc_fname 
)
private

Definition at line 1413 of file DisNCStructured.f90.

1417  use constantsmodule, only: dnodata
1418  integer(I4B), intent(in) :: ncid
1419  type(StructuredNCDimIdType), intent(inout) :: dim_ids
1420  type(StructuredNCVarIdType), intent(inout) :: var_ids
1421  type(DisType), pointer, intent(in) :: dis
1422  real(DP), dimension(:, :, :), pointer, contiguous, intent(in) :: p_mem
1423  character(len=*), intent(in) :: nc_varname
1424  character(len=*), intent(in) :: pkgname
1425  character(len=*), intent(in) :: tagname
1426  character(len=*), intent(in) :: shapestr
1427  character(len=*), intent(in) :: longname
1428  character(len=*), intent(in) :: nc_tag
1429  character(len=*), intent(in) :: gridmap_name
1430  logical(LGP), intent(in) :: latlon
1431  integer(I4B), intent(in) :: deflate
1432  integer(I4B), intent(in) :: shuffle
1433  integer(I4B), intent(in) :: chunk_z
1434  integer(I4B), intent(in) :: chunk_y
1435  integer(I4B), intent(in) :: chunk_x
1436  integer(I4B), intent(in) :: iper
1437  integer(I4B), intent(in) :: iaux
1438  character(len=*), intent(in) :: nc_fname
1439  ! -- local
1440  integer(I4B) :: var_id
1441  real(DP) :: fill_value
1442  character(len=LINELENGTH) :: longname_l
1443  !
1444  if (iper > 0) then
1445  fill_value = dnodata
1446  else
1447  fill_value = nf90_fill_double
1448  end if
1449  !
1450  longname_l = export_longname(longname, pkgname, tagname, layer=0, iper=iper)
1451  !
1452  ! -- reenter define mode and create variable
1453  call nf_verify(nf90_redef(ncid), nc_fname)
1454  call nf_verify(nf90_def_var(ncid, nc_varname, nf90_double, &
1455  (/dim_ids%x, dim_ids%y, dim_ids%z/), var_id), &
1456  nc_fname)
1457  !
1458  ! -- apply chunking parameters
1459  call ncvar_chunk3d(ncid, var_id, chunk_x, chunk_y, chunk_z, nc_fname)
1460  ! -- deflate and shuffle
1461  call ncvar_deflate(ncid, var_id, deflate, shuffle, nc_fname)
1462  !
1463  ! -- put attr
1464  call nf_verify(nf90_put_att(ncid, var_id, '_FillValue', &
1465  (/fill_value/)), nc_fname)
1466  call nf_verify(nf90_put_att(ncid, var_id, 'long_name', &
1467  longname_l), nc_fname)
1468  !
1469  ! -- add grid mapping and mf6 attr
1470  call ncvar_gridmap(ncid, var_id, gridmap_name, latlon, nc_fname)
1471  call ncvar_mf6attr(ncid, var_id, iper, iaux, nc_tag, nc_fname)
1472  !
1473  ! -- exit define mode and write data
1474  call nf_verify(nf90_enddef(ncid), nc_fname)
1475  call nf_verify(nf90_put_var(ncid, var_id, p_mem, start=(/1, 1, 1/), &
1476  count=(/dis%ncol, dis%nrow, dis%nlay/)), &
1477  nc_fname)
Here is the call graph for this function:

◆ nc_export_int1d()

subroutine disncstructuredmodule::nc_export_array::nc_export_int1d ( integer(i4b), intent(in)  ncid,
type(structuredncdimidtype), intent(inout)  dim_ids,
type(structuredncvaridtype), intent(inout)  var_ids,
type(distype), intent(in), pointer  dis,
integer(i4b), dimension(:), intent(in), pointer, contiguous  p_mem,
character(len=*), intent(in)  nc_varname,
character(len=*), intent(in)  pkgname,
character(len=*), intent(in)  tagname,
character(len=*), intent(in)  shapestr,
character(len=*), intent(in)  longname,
character(len=*), intent(in)  nc_tag,
character(len=*), intent(in)  gridmap_name,
logical(lgp), intent(in)  latlon,
integer(i4b), intent(in)  deflate,
integer(i4b), intent(in)  shuffle,
integer(i4b), intent(in)  chunk_z,
integer(i4b), intent(in)  chunk_y,
integer(i4b), intent(in)  chunk_x,
integer(i4b), intent(in)  iper,
character(len=*), intent(in)  nc_fname 
)
private

Definition at line 1039 of file DisNCStructured.f90.

1043  integer(I4B), intent(in) :: ncid
1044  type(StructuredNCDimIdType), intent(inout) :: dim_ids
1045  type(StructuredNCVarIdType), intent(inout) :: var_ids
1046  type(DisType), pointer, intent(in) :: dis
1047  integer(I4B), dimension(:), pointer, contiguous, intent(in) :: p_mem
1048  character(len=*), intent(in) :: nc_varname
1049  character(len=*), intent(in) :: pkgname
1050  character(len=*), intent(in) :: tagname
1051  character(len=*), intent(in) :: shapestr
1052  character(len=*), intent(in) :: longname
1053  character(len=*), intent(in) :: nc_tag
1054  character(len=*), intent(in) :: gridmap_name
1055  logical(LGP), intent(in) :: latlon
1056  integer(I4B), intent(in) :: deflate
1057  integer(I4B), intent(in) :: shuffle
1058  integer(I4B), intent(in) :: chunk_z
1059  integer(I4B), intent(in) :: chunk_y
1060  integer(I4B), intent(in) :: chunk_x
1061  integer(I4B), intent(in) :: iper
1062  character(len=*), intent(in) :: nc_fname
1063  ! -- local
1064  integer(I4B) :: var_id, axis_sz
1065  character(len=LINELENGTH) :: longname_l
1066  !
1067  if (shapestr == 'NROW' .or. &
1068  shapestr == 'NCOL' .or. &
1069  shapestr == 'NCPL') then
1070  !
1071  select case (shapestr)
1072  case ('NROW')
1073  axis_sz = dim_ids%y
1074  case ('NCOL')
1075  axis_sz = dim_ids%x
1076  case ('NCPL')
1077  axis_sz = dim_ids%ncpl
1078  end select
1079  !
1080  longname_l = export_longname(longname, pkgname, tagname, layer=0, iper=iper)
1081  !
1082  ! -- reenter define mode and create variable
1083  call nf_verify(nf90_redef(ncid), nc_fname)
1084  call nf_verify(nf90_def_var(ncid, nc_varname, nf90_int, &
1085  (/axis_sz/), var_id), &
1086  nc_fname)
1087  !
1088  ! -- NROW/NCOL shapes use default chunking
1089  call ncvar_deflate(ncid, var_id, deflate, shuffle, nc_fname)
1090  !
1091  ! -- put attr
1092  call nf_verify(nf90_put_att(ncid, var_id, '_FillValue', &
1093  (/nf90_fill_int/)), nc_fname)
1094  call nf_verify(nf90_put_att(ncid, var_id, 'long_name', &
1095  longname_l), nc_fname)
1096  !
1097  ! -- add mf6 attr
1098  call ncvar_mf6attr(ncid, var_id, iper, 0, nc_tag, nc_fname)
1099  !
1100  ! -- exit define mode and write data
1101  call nf_verify(nf90_enddef(ncid), nc_fname)
1102  call nf_verify(nf90_put_var(ncid, var_id, p_mem), &
1103  nc_fname)
1104 
1105  else
1106  !
1107  ! -- reenter define mode and create variable
1108  call nf_verify(nf90_redef(ncid), nc_fname)
1109  call nf_verify(nf90_def_var(ncid, nc_varname, nf90_int, &
1110  (/dim_ids%x, dim_ids%y, dim_ids%z/), var_id), &
1111  nc_fname)
1112  !
1113  ! -- apply chunking parameters
1114  call ncvar_chunk3d(ncid, var_id, chunk_x, chunk_y, chunk_z, nc_fname)
1115  ! -- deflate and shuffle
1116  call ncvar_deflate(ncid, var_id, deflate, shuffle, nc_fname)
1117  !
1118  ! -- put attr
1119  call nf_verify(nf90_put_att(ncid, var_id, '_FillValue', &
1120  (/nf90_fill_int/)), nc_fname)
1121  call nf_verify(nf90_put_att(ncid, var_id, 'long_name', &
1122  longname), nc_fname)
1123  !
1124  ! -- add grid mapping and mf6 attr
1125  call ncvar_gridmap(ncid, var_id, gridmap_name, latlon, nc_fname)
1126  call ncvar_mf6attr(ncid, var_id, 0, 0, nc_tag, nc_fname)
1127  !
1128  ! -- exit define mode and write data
1129  call nf_verify(nf90_enddef(ncid), nc_fname)
1130  call nf_verify(nf90_put_var(ncid, var_id, p_mem, start=(/1, 1, 1/), &
1131  count=(/dis%ncol, dis%nrow, dis%nlay/)), &
1132  nc_fname)
1133  end if
Here is the call graph for this function:

◆ nc_export_int2d()

subroutine disncstructuredmodule::nc_export_array::nc_export_int2d ( integer(i4b), intent(in)  ncid,
type(structuredncdimidtype), intent(inout)  dim_ids,
type(structuredncvaridtype), intent(inout)  var_ids,
type(distype), intent(in), pointer  dis,
integer(i4b), dimension(:, :), intent(in), pointer, contiguous  p_mem,
character(len=*), intent(in)  nc_varname,
character(len=*), intent(in)  pkgname,
character(len=*), intent(in)  tagname,
character(len=*), intent(in)  shapestr,
character(len=*), intent(in)  longname,
character(len=*), intent(in)  nc_tag,
character(len=*), intent(in)  gridmap_name,
logical(lgp), intent(in)  latlon,
integer(i4b), intent(in)  deflate,
integer(i4b), intent(in)  shuffle,
integer(i4b), intent(in)  chunk_z,
integer(i4b), intent(in)  chunk_y,
integer(i4b), intent(in)  chunk_x,
character(len=*), intent(in)  nc_fname 
)
private

Definition at line 1138 of file DisNCStructured.f90.

1142  integer(I4B), intent(in) :: ncid
1143  type(StructuredNCDimIdType), intent(inout) :: dim_ids
1144  type(StructuredNCVarIdType), intent(inout) :: var_ids
1145  type(DisType), pointer, intent(in) :: dis
1146  integer(I4B), dimension(:, :), pointer, contiguous, intent(in) :: p_mem
1147  character(len=*), intent(in) :: nc_varname
1148  character(len=*), intent(in) :: pkgname
1149  character(len=*), intent(in) :: tagname
1150  character(len=*), intent(in) :: shapestr
1151  character(len=*), intent(in) :: longname
1152  character(len=*), intent(in) :: nc_tag
1153  character(len=*), intent(in) :: gridmap_name
1154  logical(LGP), intent(in) :: latlon
1155  integer(I4B), intent(in) :: deflate
1156  integer(I4B), intent(in) :: shuffle
1157  integer(I4B), intent(in) :: chunk_z
1158  integer(I4B), intent(in) :: chunk_y
1159  integer(I4B), intent(in) :: chunk_x
1160  character(len=*), intent(in) :: nc_fname
1161  ! -- local
1162  integer(I4B) :: var_id
1163  !
1164  ! -- reenter define mode and create variable
1165  call nf_verify(nf90_redef(ncid), nc_fname)
1166  call nf_verify(nf90_def_var(ncid, nc_varname, nf90_int, &
1167  (/dim_ids%x, dim_ids%y/), var_id), &
1168  nc_fname)
1169  !
1170  ! -- apply chunking parameters
1171  call ncvar_chunk2d(ncid, var_id, chunk_x, chunk_y, nc_fname)
1172  ! -- deflate and shuffle
1173  call ncvar_deflate(ncid, var_id, deflate, shuffle, nc_fname)
1174  !
1175  ! -- put attr
1176  call nf_verify(nf90_put_att(ncid, var_id, '_FillValue', &
1177  (/nf90_fill_int/)), nc_fname)
1178  call nf_verify(nf90_put_att(ncid, var_id, 'long_name', &
1179  longname), nc_fname)
1180  !
1181  ! -- add grid mapping and mf6 attr
1182  call ncvar_gridmap(ncid, var_id, gridmap_name, latlon, nc_fname)
1183  call ncvar_mf6attr(ncid, var_id, 0, 0, nc_tag, nc_fname)
1184  !
1185  ! -- exit define mode and write data
1186  call nf_verify(nf90_enddef(ncid), nc_fname)
1187  call nf_verify(nf90_put_var(ncid, var_id, p_mem, start=(/1, 1/), &
1188  count=(/dis%ncol, dis%nrow/)), &
1189  nc_fname)
Here is the call graph for this function:

◆ nc_export_int3d()

subroutine disncstructuredmodule::nc_export_array::nc_export_int3d ( integer(i4b), intent(in)  ncid,
type(structuredncdimidtype), intent(inout)  dim_ids,
type(structuredncvaridtype), intent(inout)  var_ids,
type(distype), intent(in), pointer  dis,
integer(i4b), dimension(:, :, :), intent(in), pointer, contiguous  p_mem,
character(len=*), intent(in)  nc_varname,
character(len=*), intent(in)  pkgname,
character(len=*), intent(in)  tagname,
character(len=*), intent(in)  shapestr,
character(len=*), intent(in)  longname,
character(len=*), intent(in)  nc_tag,
character(len=*), intent(in)  gridmap_name,
logical(lgp), intent(in)  latlon,
integer(i4b), intent(in)  deflate,
integer(i4b), intent(in)  shuffle,
integer(i4b), intent(in)  chunk_z,
integer(i4b), intent(in)  chunk_y,
integer(i4b), intent(in)  chunk_x,
character(len=*), intent(in)  nc_fname 
)
private

Definition at line 1194 of file DisNCStructured.f90.

1198  integer(I4B), intent(in) :: ncid
1199  type(StructuredNCDimIdType), intent(inout) :: dim_ids
1200  type(StructuredNCVarIdType), intent(inout) :: var_ids
1201  type(DisType), pointer, intent(in) :: dis
1202  integer(I4B), dimension(:, :, :), pointer, contiguous, intent(in) :: p_mem
1203  character(len=*), intent(in) :: nc_varname
1204  character(len=*), intent(in) :: pkgname
1205  character(len=*), intent(in) :: tagname
1206  character(len=*), intent(in) :: shapestr
1207  character(len=*), intent(in) :: longname
1208  character(len=*), intent(in) :: nc_tag
1209  character(len=*), intent(in) :: gridmap_name
1210  logical(LGP), intent(in) :: latlon
1211  integer(I4B), intent(in) :: deflate
1212  integer(I4B), intent(in) :: shuffle
1213  integer(I4B), intent(in) :: chunk_z
1214  integer(I4B), intent(in) :: chunk_y
1215  integer(I4B), intent(in) :: chunk_x
1216  character(len=*), intent(in) :: nc_fname
1217  ! -- local
1218  integer(I4B) :: var_id
1219  !
1220  ! -- reenter define mode and create variable
1221  call nf_verify(nf90_redef(ncid), nc_fname)
1222  call nf_verify(nf90_def_var(ncid, nc_varname, nf90_int, &
1223  (/dim_ids%x, dim_ids%y, dim_ids%z/), var_id), &
1224  nc_fname)
1225  !
1226  ! -- apply chunking parameters
1227  call ncvar_chunk3d(ncid, var_id, chunk_x, chunk_y, chunk_z, nc_fname)
1228  ! -- deflate and shuffle
1229  call ncvar_deflate(ncid, var_id, deflate, shuffle, nc_fname)
1230  !
1231  ! -- put attr
1232  call nf_verify(nf90_put_att(ncid, var_id, '_FillValue', &
1233  (/nf90_fill_int/)), nc_fname)
1234  call nf_verify(nf90_put_att(ncid, var_id, 'long_name', &
1235  longname), nc_fname)
1236  !
1237  ! -- add grid mapping and mf6 attr
1238  call ncvar_gridmap(ncid, var_id, gridmap_name, latlon, nc_fname)
1239  call ncvar_mf6attr(ncid, var_id, 0, 0, nc_tag, nc_fname)
1240  !
1241  ! -- exit define mode and write data
1242  call nf_verify(nf90_enddef(ncid), nc_fname)
1243  call nf_verify(nf90_put_var(ncid, var_id, p_mem, start=(/1, 1, 1/), &
1244  count=(/dis%ncol, dis%nrow, dis%nlay/)), &
1245  nc_fname)
Here is the call graph for this function:

The documentation for this interface was generated from the following file: