<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none"><!-- p { margin-top: 0px; margin-bottom: 0px; }--></style>
</head>
<body dir="ltr" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<div><span style="font-size: 12pt;">I'm getting the error: "</span><span style="font-size: 12pt;">NetCDF: One or more variable sizes violate format constraints</span><span style="font-size: 12pt;">" upon nf90mpi_enddef(ncid</span><span style="font-size: 12pt;">). </span><span style="font-size: 12pt;">I'm
 using the 64bit offset flag, but it doesn't seem to get rid of the error. This works for smaller problem sizes. </span><span style="font-size: 12pt;">Is this simply getting too large to use a record dimension, and do I need to split this up into one file per
 output? If so, is there any way to get things into a single file? <span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">The relevant code is below. I'm using parallel-netcdf version 1.6.1</span>.
 Thanks,</span>
<p><br>
</p>
<p>-Matt<br>
</p>
<p><br>
</p>
<div><span style="font-family: Consolas, monospace; font-size: 9pt;">ntracers = 3</span></div>
<div><span style="font-family: Consolas, monospace; font-size: 9pt;">nx_glob = 400</span></div>
<div><span style="font-family: Consolas, monospace; font-size: 9pt;">ny_glob = 400</span></div>
<div><span style="font-family: Consolas, monospace; font-size: 9pt;">nz_glob = 200</span></div>
<div><span style="font-family: Consolas, monospace; font-size: 9pt;">integer(kind=MPI_OFFSET_KIND) :: len</span></div>
<div><span style="font-family: Consolas, monospace; font-size: 9pt;">call ncwrap( nf90mpi_create( MPI_COMM_WORLD , trim(fname) , ior( nf90_clobber , nf90_64bit_offset ) , MPI_INFO_NULL , ncid ) , __LINE__ )</span></div>
<div><br style="font-family: Consolas, monospace; font-size: 9pt;">
</div>
<div><span style="font-family: Consolas, monospace; font-size: 9pt;">len=nf90_unlimited; call ncwrap( nf90mpi_def_dim( ncid , 't' , len , t_dimid ) , __LINE__ )</span></div>
<div><span style="font-family: Consolas, monospace; font-size: 9pt;">len=nx_glob       ; call ncwrap( nf90mpi_def_dim( ncid , 'x' , len , x_dimid ) , __LINE__ )</span></div>
<div><span style="font-family: Consolas, monospace; font-size: 9pt;">len=ny_glob       ; call ncwrap( nf90mpi_def_dim( ncid , 'y' , len , y_dimid ) , __LINE__ )</span></div>
<div><span style="font-family: Consolas, monospace; font-size: 9pt;">len=nz_glob       ; call ncwrap( nf90mpi_def_dim( ncid , 'z' , len , z_dimid ) , __LINE__ )</span></div>
<div><br style="font-family: Consolas, monospace; font-size: 9pt;">
</div>
<div><span style="font-family: Consolas, monospace; font-size: 9pt;">call ncwrap( nf90mpi_def_var( ncid , 't' , nf90_double , 1 , (/ t_dimid /) , t_varid ) , __LINE__ )</span></div>
<div><span style="font-family: Consolas, monospace; font-size: 9pt;">call ncwrap( nf90mpi_def_var( ncid , 'x' , nf90_double , 1 , (/ x_dimid /) , x_varid ) , __LINE__ )</span></div>
<div><span style="font-family: Consolas, monospace; font-size: 9pt;">call ncwrap( nf90mpi_def_var( ncid , 'y' , nf90_double , 1 , (/ y_dimid /) , y_varid ) , __LINE__ )</span></div>
<div><span style="font-family: Consolas, monospace; font-size: 9pt;">call ncwrap( nf90mpi_def_var( ncid , 'z' , nf90_double , 1 , (/ z_dimid /) , z_varid ) , __LINE__ )</span></div>
<div><br style="font-family: Consolas, monospace; font-size: 9pt;">
</div>
<div><span style="font-family: Consolas, monospace; font-size: 9pt;">call ncwrap( nf90mpi_def_var( ncid , 'hy_dens'       , nf90_double , 1 , (/                     z_dimid           /) ,       hy_dens_varid ) , __LINE__ )</span></div>
<div><span style="font-family: Consolas, monospace; font-size: 9pt;">call ncwrap( nf90mpi_def_var( ncid , 'hy_dens_theta' , nf90_double , 1 , (/                     z_dimid           /) , hy_dens_theta_varid ) , __LINE__ )</span></div>
<div><span style="font-family: Consolas, monospace; font-size: 9pt;">call ncwrap( nf90mpi_def_var( ncid , 'dens'          , nf90_double , 4 , (/ x_dimid , y_dimid , z_dimid , t_dimid /) ,          dens_varid ) , __LINE__ )</span></div>
<div><span style="font-family: Consolas, monospace; font-size: 9pt;">call ncwrap( nf90mpi_def_var( ncid , 'uwnd'          , nf90_double , 4 , (/ x_dimid , y_dimid , z_dimid , t_dimid /) ,          uwnd_varid ) , __LINE__ )</span></div>
<div><span style="font-family: Consolas, monospace; font-size: 9pt;">call ncwrap( nf90mpi_def_var( ncid , 'vwnd'          , nf90_double , 4 , (/ x_dimid , y_dimid , z_dimid , t_dimid /) ,          vwnd_varid ) , __LINE__ )</span></div>
<div><span style="font-family: Consolas, monospace; font-size: 9pt;">call ncwrap( nf90mpi_def_var( ncid , 'wwnd'          , nf90_double , 4 , (/ x_dimid , y_dimid , z_dimid , t_dimid /) ,          wwnd_varid ) , __LINE__ )</span></div>
<div><span style="font-family: Consolas, monospace; font-size: 9pt;">call ncwrap( nf90mpi_def_var( ncid , 'theta'         , nf90_double , 4 , (/ x_dimid , y_dimid , z_dimid , t_dimid /) ,         theta_varid ) , __LINE__ )</span></div>
<div><span style="font-family: Consolas, monospace; font-size: 9pt;">call ncwrap( nf90mpi_def_var( ncid , 'windmag'       , nf90_double , 4 , (/ x_dimid , y_dimid , z_dimid , t_dimid /) ,       windmag_varid ) , __LINE__ )</span></div>
<div><span style="font-family: Consolas, monospace; font-size: 9pt;">call ncwrap( nf90mpi_def_var( ncid , 'ke'            , nf90_double , 4 , (/ x_dimid , y_dimid , z_dimid , t_dimid /) ,            ke_varid ) , __LINE__ )</span></div>
<div><span style="font-family: Consolas, monospace; font-size: 9pt;">call ncwrap( nf90mpi_def_var( ncid , 'vort_xy'       , nf90_double , 4 , (/ x_dimid , y_dimid , z_dimid , t_dimid /) ,       vort_xy_varid ) , __LINE__ )</span></div>
<div><span style="font-family: Consolas, monospace; font-size: 9pt;">call ncwrap( nf90mpi_def_var( ncid , 'vort_xz'       , nf90_double , 4 , (/ x_dimid , y_dimid , z_dimid , t_dimid /) ,       vort_xz_varid ) , __LINE__ )</span></div>
<div><span style="font-family: Consolas, monospace; font-size: 9pt;">do i = 1 , ntracers</span></div>
<div><span style="font-family: Consolas, monospace; font-size: 9pt;">  tname = trim(tracer_names(i))</span></div>
<div><span style="font-family: Consolas, monospace; font-size: 9pt;">  call ncwrap( nf90mpi_def_var( ncid , tname         , nf90_double , 4 , (/ x_dimid , y_dimid , z_dimid , t_dimid /) ,    tracer_varids(i) ) , __LINE__ )</span></div>
<div><span style="font-family: Consolas, monospace; font-size: 9pt;">enddo</span></div>
<div><span style="font-family: Consolas, monospace; font-size: 9pt;">call ncwrap( nf90mpi_enddef( ncid ) , __LINE__ )</span></div>
<div><br>
</div>
</div>
</body>
</html>