Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add optional detailed intermediate field dumps, for debugging #109

Open
axch opened this issue Apr 20, 2017 · 1 comment
Open

Add optional detailed intermediate field dumps, for debugging #109

axch opened this issue Apr 20, 2017 · 1 comment

Comments

@axch
Copy link
Collaborator

axch commented Apr 20, 2017

I am imagining a flag (possibly an integer flag with several verbosity levels, or a series of independent boolean flags) that causes the core to dump its fields with very high frequency, to enable debugging. The maximum version would be

  • Every time-step (including the RK4 initialization and half-steps)
  • Sub-time-step resolution (before and after applying sponging, before and after the n-layer correction that involves solving the linear system)
  • Interpretable intermediate fields (e.g., the tendencies, or the computed wind that DumpWind calls for)

We now have two places where this came up: helping check momentum conservation #66 (comment), and a generic comment about the usefulness of dumping the first field #107 (comment).

@edoddridge
Copy link
Owner

I like this a lot.

I imagine the levels would look something like:

  • 0: no additional outputs. Output frequency controlled by DumpFreq and AvFreq
  • 1: output tendencies at frequency given by DumpFreq
  • 2: output tendencies and convergence diagnostics from the linear solve at frequency given by DumpFreq.
  • 3: output convergence diagnostics and tendencies before and after applying some or all of sponges, barotropic correction, winds, and boundary conditions at frequency controlled by DumpFreq
  • 4: dump all of the above fields every time step
  • 5: dump everything every time step including the two initial RK4 steps

We may also want to include verbose messages from the input reader subroutines at 3 or 4. The jump from 2 to 3 may also be too large.

edoddridge added a commit that referenced this issue Apr 28, 2017
this variable is an integer between 0 and 5 inclusive that controls how much extra output the model generates.
The possible levels are discussed in #109
edoddridge added a commit that referenced this issue Apr 28, 2017
This commit implements (some of) debug_level = 4 from #109 and dumps fields and tendencies every timestep. It also includes a new test to check that this feature has been correctly implemented along with the config file and blessed outputs from that test.
edoddridge added a commit that referenced this issue May 10, 2017
Adds a description of what happens when debug_level is set to any integer between 0 and 5 inclusive, as discussed in #109. This information is included in the example config file and in more depth in the documentation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants