Hi Everyone,<div><br></div><div>This commit fixes two, or three bugs. But really two of them are so similar that I just call it two bugs.</div><div><br></div><div>First, I added a second if around the one that checks if the current time step is one to output on, so it only tries to output if config_output_interval is &gt; 0. Also, I split up the if statement around config_restart_interval so it only does the mod if config_restart_interval &gt; 0 as well. I guess not all compilers or implementations allow if statements to short circuit with the first statement, so it&#39;s better to separate them like this. These two modifications simply allow the user to specify config_restart_interval = 0 and config_output_interval = 0 and have restart or output files not written during the simulation. I also did this for config_stats_interval.</div>

<div><br></div><div>Second, I fixed a bug that appeared when running isopycnal levels with a restart file. Basically, what was happening was the restart file was read in to time_levs(1). Then since we have isopycnal levels, rho is never updated, and since it&#39;s not read into time_levs(:) time_levs(2:nTimeLevs) is set to zero. Then in the computation of the Montgomery potential there is a 1/rho that causes a NaN on the second time step, when time_levs(2) is shifted to time_levs(1), so all of the current time_levs rhos are zero.</div>

<div><br></div><div>To fix this, I extended the if statement in mpas_init_block around config_do_restart. Currently this isn&#39;t an issue if you are not using a restart file because module_test_cases.F copies the current time level to all time levels, so they are all initially the same. So this is now what happens when you do a restart. The restart file is now read into time_levs(1), and then copied to time_levs(2:nTimeLevs).</div>

<div><br></div><div>The lines of modification are:</div><div>89 - 96</div><div>134 - 145</div><div>223 - 237</div><div><br></div><div>Let me know if there are any questions or comments. I&#39;ll probably commit this on Wednesday if no one has any objections. Thanks</div>

<div><br></div><div>Doug</div><div><br></div>