Skip to content

Commit

Permalink
Adds explanatory comments about the output holding process
Browse files Browse the repository at this point in the history
  • Loading branch information
rarutter committed Nov 30, 2021
1 parent 67a2a1a commit a2a157a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
9 changes: 9 additions & 0 deletions include/OutputHolder.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@

/* When running a region with many concurrent batches, outputting at every
* year timestep creates a bottleneck in the run. Output at the monthly
* timestep is correspondingly worse.
*
* This class is a basic repository for output data to be held until
* outputting is triggered based on the user's specifications.
* */


#ifndef OUTPUTHOLDER_H
#define OUTPUTHOLDER_H

Expand Down
5 changes: 5 additions & 0 deletions src/Runner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1016,6 +1016,11 @@ void Runner::output_nc_5dim(OutputSpec* out_spec, std::string stage_suffix,
}


/* Some of the following outputs are written out at the timesteps
* they have specified in the output_spec file, but some have
* been converted to write to an OutputHolder in order to reduce
* the amount of file I/O that occurs during a large run. The period
* of time to hold data is specified in the config file. */
void Runner::output_netCDF(std::map<std::string, OutputSpec> &netcdf_outputs, int year, int month, std::string stage, int endyr){
int month_timestep = year*12 + month;

Expand Down

0 comments on commit a2a157a

Please sign in to comment.