1. 16 Mar, 2018 2 commits
  2. 13 Mar, 2018 1 commit
    • David Deepwell's avatar
      Update gravity_current to only use full zgrid · e938e1be
      David Deepwell authored
      The full xgrid and ygrid are unnecessary since x and y only
      depend on a single variable (or index - ii for x, and jj for y).
      The variables xx and yy can be used instead of xgrid and ygrid,
      respectively. Creating the full grids for these fields is a
      waste of memory.
  3. 30 Jan, 2018 1 commit
  4. 28 Jan, 2018 3 commits
  5. 10 Jan, 2018 1 commit
    • David Deepwell's avatar
      Explicitly set dt_max value · 7f238e06
      David Deepwell authored
      If dt_max is not given in the spins.conf, it is now explicitly
      set to 0 so as to be adjusted later to use the buoyancy frequency.
      The dt_max is also printed in the initialization for clarity.
  6. 06 Nov, 2017 1 commit
  7. 02 Nov, 2017 2 commits
    • David Deepwell's avatar
      Make BPE_from_internal an optional argument · ba41b112
      David Deepwell authored
      Also reorganize how some diagnostics are added to the file.
      This is now a little clearer to read since similar diagnostics
      are placed near each other.
    • Christopher Subich's avatar
      Small fixes for broken build · f69389d7
      Christopher Subich authored
      In the previous merge, compilation of Sorter.o went missing from the
      Makefile, and a typo was introduced in the gravity_current case file;
      each would prevent a build from finishing.  These are fixed.
  8. 01 Nov, 2017 2 commits
    • Christopher Subich's avatar
      Keep checks consistent between compute/write diagnostic · c2b83a9b
      Christopher Subich authored
      In certain cases, diagnostic computation required Nx/y/z > 1, but this
      check was not repeated for adding the diagnostic output to the
      respective file; this could result in unexpectedly writing 0 or
      meaningless data to the file.
    • Christopher Subich's avatar
      Gravity_current: compute v^2 KE if f != 0 · ae19aedf
      Christopher Subich authored
      This change allows the gravity_current case to compute the v^2 component
      of the kinetic energy term even if NY=1 when rot_f != 0; in that case
      the solution can still develop a 2D geostrophic balance where v-velocity
      balances a pressure gradient.
      Additionally, the respective component sums are explicitly initialized to
  9. 24 Oct, 2017 1 commit
  10. 18 Oct, 2017 1 commit
  11. 17 Oct, 2017 1 commit
  12. 04 Oct, 2017 1 commit
    • David Deepwell's avatar
      Add all blitz indices in declaration of rank 3 matrix · 1df50bf9
      David Deepwell authored
      Creating a rank 3 matrix requires all three indices in the declaration
      statement. This is only necessary when debugging, but should be explicit
      wherever possible. Otherwise, too much time will be spent trying to
      remember this fact when it matters.
  13. 04 Aug, 2017 1 commit
  14. 05 May, 2017 1 commit
    • David Deepwell's avatar
      Create BPE calculator · 8701eded
      David Deepwell authored
      The background Potential Energy (BPE) is calculated in
      compute_Background_PE in Science.cpp. The APE can
      be calculated afterwards from the BPE and PE from the
      diagnostic file.
  15. 04 May, 2017 1 commit
    • David Deepwell's avatar
      Create mechanism to easily output diagnostic values · 8b9ecf2c
      David Deepwell authored
      Diagnostic values (like total KE/ total enstrophy/ mass/ etc)
      are often desired outputs at each time-step. These values
      are easily printed to a txt file using two functions:
      add_diagnostic and write_diagnostics.
      add_diagnostic adds the name and value of a diagnostic into a
      pair of strings which will be written into diagnostics.txt
      which the function write_diagnostics.
      Usage of add_diagnostic is as follows:
      add_diagnostic(name, value, header, line);
      This will add the string, 'name', onto the string, 'header', which
      will be the header of the diagnostics.txt file. The double (or
      int), 'value', will be added onto the string, 'line', which will
      be a row (or line) in the diagnostics.txt file.
      write_diagnostics will write these lines (header and line) into
  16. 04 Feb, 2017 3 commits
    • David Deepwell's avatar
      Move time step checker to BaseCase · 428b5399
      David Deepwell authored
      The empty shell of check_timestep in BaseCase has been filled
      with what was essentially the same thing in each case file.
      Again, this is just more case file house cleaning.
      A few ancillary functions have also been written to help.
      The most important might be get_dt_max() which returns dt_max.
      dt_max can either be specified in spins.conf or defined in the
      case file based on the buoyancy frequency. Currently, if
      dt_max > 0 and in spins.conf, then that value is used. Otherwise,
      0.5/sqrt(N2_max) is used.
      The re-definition of check_timestep in each case file can now be
      removed so long as the associated ancillary functions and
      parameters are included.
    • David Deepwell's avatar
      Move restart sequence checking into Options.cpp · 25b5d62f
      David Deepwell authored
      The generic code block to check the restart sequence is not needed
      in the case file and has been moved into Options.cpp. This
      streamlines the case file and makes a single copy for all other
      case files to use.
    • David Deepwell's avatar
      Properly initialize get_restart_sequence() in case file · a1a18e74
      David Deepwell authored
      The re-definition of get_restart_sequence() was missing in
      gravity_current.cpp. This resulted in all restarts to read output
      zero (*.0). Restarting will now properly read the output number
      specified by restart_sequence.
  17. 27 Jan, 2017 2 commits
    • David Deepwell's avatar
      Add filter parameters to case options · b5470525
      David Deepwell authored
      gravity_current.cpp accepts filter parameters (f_cutoff, f_order,
      f_strength) as optional input arguments. Easy adjustment of the
      filter is useful when the flow become suddenly becomes too chaotic.
    • David Deepwell's avatar
      Move expansion parsing into Options.cpp · 3035b35a
      David Deepwell authored
      Parsing of expansion types in gravity_current.cpp moved to
      Options.cpp. This is a general procedure that other case files
      will and should make use of. It also simplifies the case file
      to the specific set-up of that case.
  18. 24 Jan, 2017 2 commits
  19. 16 Jan, 2017 1 commit
    • David Deepwell's avatar
      Creation of a new case file and associated configuration file. · 4a8d478c
      David Deepwell authored
      This case file is restartable and will dump all variables at the end of the requested computation time (stated in spins.conf) when run on SCINET or SHARCNET. The spins.conf enables the quick set-up of a parameter sweep as parameters are set within it and not within the case file which would need to be re-compiled.
      This file will be used as a basis for the upcoming additions and changes to BaseCase.cpp and Science.cpp.