@@ -1697,10 +1697,15 @@ void Runner::output_netCDF(std::map<std::string, OutputSpec> &netcdf_outputs, in
1697
1697
1698
1698
#pragma omp critical(outputDRIVINGNIRR)
1699
1699
{
1700
-
1700
+ // This does not need an entry in OutputHolder because the
1701
+ // driving data is already holding a year's worth of values
1702
+ // and daily outputs are not held for multiple years.
1701
1703
if (curr_spec.daily ){
1702
- output_nc_3dim (&curr_spec, file_stage_suffix, &cohort.climate .nirr_d [doy], 1 , day_timestep, dinm);
1704
+ if (end_of_year){
1705
+ output_nc_3dim (&curr_spec, file_stage_suffix, &cohort.climate .nirr_d [0 ], 1 , day_timestep, DINY);
1706
+ }
1703
1707
}
1708
+
1704
1709
}// end critical(outputDRIVINGNIRR)
1705
1710
}// end DRIVINGNIRR
1706
1711
map_itr = netcdf_outputs.end ();
@@ -1716,7 +1721,9 @@ void Runner::output_netCDF(std::map<std::string, OutputSpec> &netcdf_outputs, in
1716
1721
{
1717
1722
// daily
1718
1723
if (curr_spec.daily ){
1719
- output_nc_3dim (&curr_spec, file_stage_suffix, &cohort.climate .rain_d [doy], 1 , day_timestep, dinm);
1724
+ if (end_of_year){
1725
+ output_nc_3dim (&curr_spec, file_stage_suffix, &cohort.climate .rain_d [0 ], 1 , day_timestep, DINY);
1726
+ }
1720
1727
}
1721
1728
// monthly
1722
1729
else if (curr_spec.monthly ){
@@ -1749,7 +1756,9 @@ void Runner::output_netCDF(std::map<std::string, OutputSpec> &netcdf_outputs, in
1749
1756
{
1750
1757
// daily
1751
1758
if (curr_spec.daily ){
1752
- output_nc_3dim (&curr_spec, file_stage_suffix, &cohort.climate .snow_d [doy], 1 , day_timestep, dinm);
1759
+ if (end_of_year){
1760
+ output_nc_3dim (&curr_spec, file_stage_suffix, &cohort.climate .snow_d [0 ], 1 , day_timestep, DINY);
1761
+ }
1753
1762
}
1754
1763
// monthly
1755
1764
else if (curr_spec.monthly ){
@@ -1780,10 +1789,15 @@ void Runner::output_netCDF(std::map<std::string, OutputSpec> &netcdf_outputs, in
1780
1789
1781
1790
#pragma omp critical(outputDRIVINGTAIR)
1782
1791
{
1783
-
1792
+ // This does not need an entry in OutputHolder because the
1793
+ // driving data is already holding a year's worth of values
1794
+ // and daily outputs are not held for multiple years.
1784
1795
if (curr_spec.daily ){
1785
- output_nc_3dim (&curr_spec, file_stage_suffix, &cohort.climate .tair_d [doy], 1 , day_timestep, dinm);
1796
+ if (end_of_year){
1797
+ output_nc_3dim (&curr_spec, file_stage_suffix, &cohort.climate .tair_d [0 ], 1 , day_timestep, DINY);
1798
+ }
1786
1799
}
1800
+
1787
1801
}// end critical(outputDRIVINGTAIR)
1788
1802
}// end DRIVINGTAIR
1789
1803
map_itr = netcdf_outputs.end ();
@@ -1797,10 +1811,15 @@ void Runner::output_netCDF(std::map<std::string, OutputSpec> &netcdf_outputs, in
1797
1811
1798
1812
#pragma omp critical(outputDRIVINGVAPO)
1799
1813
{
1800
-
1814
+ // This does not need an entry in OutputHolder because the
1815
+ // driving data is already holding a year's worth of values
1816
+ // and daily outputs are not held for multiple years.
1801
1817
if (curr_spec.daily ){
1802
- output_nc_3dim (&curr_spec, file_stage_suffix, &cohort.climate .vapo_d [doy], 1 , day_timestep, dinm);
1818
+ if (end_of_year){
1819
+ output_nc_3dim (&curr_spec, file_stage_suffix, &cohort.climate .vapo_d [0 ], 1 , day_timestep, DINY);
1820
+ }
1803
1821
}
1822
+
1804
1823
}// end critical(outputDRIVINGVAPO)
1805
1824
}// end DRIVINGVAPO
1806
1825
map_itr = netcdf_outputs.end ();
0 commit comments