Skip to content

Commit

Permalink
Merge pull request #303 from mpaiao/master
Browse files Browse the repository at this point in the history
Option to partially enable site, patch, and cohort averages in the output
  • Loading branch information
mdietze authored Feb 8, 2020
2 parents 3880d01 + 3dbcb02 commit 4ee6179
Show file tree
Hide file tree
Showing 5 changed files with 971 additions and 490 deletions.
41 changes: 20 additions & 21 deletions ED/Template/Template/ED2IN
Original file line number Diff line number Diff line change
Expand Up @@ -276,27 +276,26 @@ $ED_NL
!---------------------------------------------------------------------------------------!
! The following variables control whether site-, patch-, and cohort-level time !
! means and mean sum of squares should be included in the output files or not. !
! !
! Reasons to add them: !
! a. Sub-polygon variables are more comprehensive. !
! b. Explore heterogeneity within a polygon and make interesting analysis. !
! c. More chances to create cool 3-D plots. !
! !
! Reasons to NOT add them: !
! a. Output files will become much larger! !
! b. In regional/coupled runs, the output files will be ridiculously large. !
! c. You may fill up the disk. !
! d. Other people's job may crash due to insufficient disk space. !
! e. You will gain a bad reputation amongst your colleagues. !
! f. And it will be entirely your fault. !
! !
! Either way, polygon-level averages are always included, and so are the instan- !
! taneous site-, patch-, and cohort-level variables needed for resuming the run. !
! !
! IADD_SITE_MEANS -- Add site-level averages to the output (0 = no; 1 = yes) !
! IADD_PATCH_MEANS -- Add patch-level averages to the output (0 = no; 1 = yes) !
! IADD_COHORT_MEANS -- Add cohort-level averages to the output (0 = no; 1 = yes) !
! !
! If these options are on, then they provide much more detailed output, but they may !
! add a lot of disk space (especially if you want the fast output to have the detailed !
! output). !
! !
! IADD_SITE_MEANS -- Add site-level averages to the output !
! IADD_PATCH_MEANS -- Add patch-level averages to the output !
! IADD_COHORT_MEANS -- Add cohort-level averages to the output !
! !
! The options are additive, and the indices below represent the different types of !
! output: !
! !
! 0 -- No detailed output. !
! 1 -- Include the level in monthly output (IMOUTPUT and IQOUTPUT) !
! 2 -- Include the level in daily output (IDOUTPUT). !
! 4 -- Include the level in sub-daily output (IFOUTPUT and IOOUTPUT). !
! !
! For example, in case you don't want any cohort output, set IADD_COHORT_MEANS to zero. !
! In case you want to generate include cohort means to both daily and monthly outputs, !
! but not the sub-daily means, set IADD_COHORT_MEANS to 3 (1 + 2). Any combination of !
! the above outputs is acceptable (i.e., any number from 0 to 7). !
!---------------------------------------------------------------------------------------!
NL%IADD_SITE_MEANS = 1
NL%IADD_PATCH_MEANS = 1
Expand Down
41 changes: 20 additions & 21 deletions ED/run/ED2IN
Original file line number Diff line number Diff line change
Expand Up @@ -275,27 +275,26 @@ $ED_NL
!---------------------------------------------------------------------------------------!
! The following variables control whether site-, patch-, and cohort-level time !
! means and mean sum of squares should be included in the output files or not. !
! !
! Reasons to add them: !
! a. Sub-polygon variables are more comprehensive. !
! b. Explore heterogeneity within a polygon and make interesting analysis. !
! c. More chances to create cool 3-D plots. !
! !
! Reasons to NOT add them: !
! a. Output files will become much larger! !
! b. In regional/coupled runs, the output files will be ridiculously large. !
! c. You may fill up the disk. !
! d. Other people's jobs may crash due to insufficient disk space. !
! e. You will gain a bad reputation amongst your colleagues. !
! f. And it will be entirely your fault. !
! !
! Either way, polygon-level averages are always included, and so are the instan- !
! taneous site-, patch-, and cohort-level variables needed for resuming the run. !
! !
! IADD_SITE_MEANS -- Add site-level averages to the output (0 = no; 1 = yes) !
! IADD_PATCH_MEANS -- Add patch-level averages to the output (0 = no; 1 = yes) !
! IADD_COHORT_MEANS -- Add cohort-level averages to the output (0 = no; 1 = yes) !
! !
! If these options are on, then they provide much more detailed output, but they may !
! add a lot of disk space (especially if you want the fast output to have the detailed !
! output). !
! !
! IADD_SITE_MEANS -- Add site-level averages to the output !
! IADD_PATCH_MEANS -- Add patch-level averages to the output !
! IADD_COHORT_MEANS -- Add cohort-level averages to the output !
! !
! The options are additive, and the indices below represent the different types of !
! output: !
! !
! 0 -- No detailed output. !
! 1 -- Include the level in monthly output (IMOUTPUT and IQOUTPUT) !
! 2 -- Include the level in daily output (IDOUTPUT). !
! 4 -- Include the level in sub-daily output (IFOUTPUT and IOOUTPUT). !
! !
! For example, in case you don't want any cohort output, set IADD_COHORT_MEANS to zero. !
! In case you want to generate include cohort means to both daily and monthly outputs, !
! but not the sub-daily means, set IADD_COHORT_MEANS to 3 (1 + 2). Any combination of !
! the above outputs is acceptable (i.e., any number from 0 to 7). !
!---------------------------------------------------------------------------------------!
NL%IADD_SITE_MEANS = 1
NL%IADD_PATCH_MEANS = 1
Expand Down
12 changes: 6 additions & 6 deletions ED/src/io/ed_opspec.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1396,23 +1396,23 @@ subroutine ed_opspec_misc
call opspec_fatal(reason,'opspec_misc')
ifaterr = ifaterr +1
end if
if (iadd_site_means < 0 .or. iadd_site_means > 1) then
if (iadd_site_means < 0 .or. iadd_site_means > 7) then
write (reason,fmt='(a,1x,i4,a)') &
'Invalid IADD_SITE_MEANS, it must be 0 (no) or 1 (yes). Yours is set to' &
'Invalid IADD_SITE_MEANS, it must be between 0 and 7. Yours is set to' &
,iadd_site_means,'...'
call opspec_fatal(reason,'opspec_misc')
ifaterr = ifaterr +1
end if
if (iadd_patch_means < 0 .or. iadd_patch_means > 1) then
if (iadd_patch_means < 0 .or. iadd_patch_means > 7) then
write (reason,fmt='(a,1x,i4,a)') &
'Invalid IADD_PATCH_MEANS, it must be 0 (no) or 1 (yes). Yours is set to' &
'Invalid IADD_PATCH_MEANS, it must be between 0 and 7. Yours is set to' &
,iadd_patch_means,'...'
call opspec_fatal(reason,'opspec_misc')
ifaterr = ifaterr +1
end if
if (iadd_cohort_means < 0 .or. iadd_cohort_means > 1) then
if (iadd_cohort_means < 0 .or. iadd_cohort_means > 7) then
write (reason,fmt='(a,1x,i4,a)') &
'Invalid IADD_COHORT_MEANS, it must be 0 (no) or 1 (yes). Yours is set to' &
'Invalid IADD_COHORT_MEANS, it must be between 0 and 7. Yours is set to' &
,iadd_cohort_means,'...'
call opspec_fatal(reason,'opspec_misc')
ifaterr = ifaterr +1
Expand Down
Loading

0 comments on commit 4ee6179

Please sign in to comment.