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

Make separate instantaneous and non-inst. history tapes #2445

Draft
wants to merge 23 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
9c7df7f
Begin to add a file number dimension to permit 2+ files per hist. tape
slevis-lmwg Apr 1, 2024
42d944d
WIP (cont'd): Adding file number dimension to permit 2+ files per tape
slevis-lmwg Apr 13, 2024
a37d9da
WIP (cont'd): Advancing through TODOs to permit 2+ files per tape
slevis-lmwg Apr 17, 2024
15535a0
Minor comment update to keep track of progress
slevis-lmwg May 6, 2024
aff6ac4
Merge tag 'ctsm5.3.009' into sep_hXi_hXa_tapes_iss1059
slevis-lmwg Oct 30, 2024
9ce1a7a
Merge tag 'ctsm5.3.014' into sep_hXi_hXa_tapes_iss1059
slevis-lmwg Dec 17, 2024
7803fd4
Minor update to histFileMod, mainly in TODO comments
slevis-lmwg Dec 18, 2024
2304d59
WIP (cont'd): Allow 2+ restart files per tape to mirror the hist files
slevis-lmwg Dec 18, 2024
93007dd
WIP (cont'd): Part (b) of the last commit
slevis-lmwg Dec 18, 2024
16217fe
WIP (cont'd): Part (c) of the last commit
slevis-lmwg Dec 18, 2024
5810d1d
Clean-up some new and existing do-loops
slevis-lmwg Dec 18, 2024
fbabe7c
Small correction and TODO updates
slevis-lmwg Dec 19, 2024
e574acb
Small correction and some clean-up
slevis-lmwg Dec 19, 2024
30d7904
Corrections to resolve various errors in the SHAREDLIB_BUILD phase
slevis-lmwg Dec 27, 2024
63a4db6
Change history_tape_in_use* from logical to integer for ncd_io to work
slevis-lmwg Dec 27, 2024
6f56d01
Add the 'file' dimension to ntimes; test passes but output is not good
slevis-lmwg Jan 3, 2025
ebf652e
Change hist file labels from h01, h02 to h0i, h0a
slevis-lmwg Jan 3, 2025
d9fdab0
Change "if instantaneous" statemt with more appropriate conditional
slevis-lmwg Jan 3, 2025
16d1e29
Add "file" dimension to actflag to separate the 'I' fields
slevis-lmwg Jan 4, 2025
f1b0685
Correct time-related fields that appear on instantaneous file
slevis-lmwg Jan 4, 2025
ea2218c
Merge tag 'ctsm5.3.021' into sep_hXi_hXa_tapes_iss1059
slevis-lmwg Feb 11, 2025
a037b2a
Fix conflict that slipped through
slevis-lmwg Feb 11, 2025
4190cfd
Merge tag 'ctsm5.3.023' into sep_hXi_hXa_tapes_iss1059
slevis-lmwg Feb 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Minor update to histFileMod, mainly in TODO comments
slevis-lmwg committed Dec 18, 2024
commit 7803fd425636dce875ec099d2806fb0b550e8b4b
14 changes: 10 additions & 4 deletions src/main/histFileMod.F90
Original file line number Diff line number Diff line change
@@ -80,6 +80,10 @@ module histFileMod
hist_dov2xy(max_tapes) = (/.true.,(.true.,ni=2,max_tapes)/) ! namelist: true=> do grid averaging
integer, public :: &
hist_nhtfrq(max_tapes) = (/0, (-24, ni=2,max_tapes)/) ! namelist: history write freq(0=monthly)
! TODO slevis: My intuition currently says that namelist hist_* variables and the User should
! remain agnostic as to whether tapes correspond to instantaneous or non files.
! The split will happen under the covers at runtime, and the hist_* vars should NOT
! have a 2nd (i.e. file) dimension.
character(len=avgflag_strlen), public :: &
hist_avgflag_pertape(max_tapes) = (/(' ',ni=1,max_tapes)/) ! namelist: per tape averaging flag
character(len=max_namlen), public :: &
@@ -260,9 +264,11 @@ end subroutine copy_entry_interface
! These values are specified in hist_addfld* calls but then can be
! overridden by namelist params like hist_fincl1.
type, extends(entry_base) :: allhistfldlist_entry
! 10) TODO DONE Add 2nd dim to avgflag and actflag
! UNDONE because both are also dimensioned by fld which (at least
! for now) is unique per tape; therefore, do not specify file number
logical :: actflag(max_tapes) ! which history tapes to write to.
! 10) TODO NEXT Add second dimension to avgflag as necessary
character(len=avgflag_strlen) :: avgflag(max_tapes, maxsplitfiles) ! type of time averaging
character(len=avgflag_strlen) :: avgflag(max_tapes) ! type of time averaging
contains
procedure :: copy => copy_allhistfldlist_entry
end type allhistfldlist_entry
@@ -335,7 +341,7 @@ end subroutine copy_entry_interface
! Other variables
!
character(len=max_length_filename) :: locfnh(max_tapes, maxsplitfiles) ! local history file names
! 11) TODO History restart files seem to mirror history files => need the second dimension I think
! 11) TODO NEXT History restart files seem to mirror history files => need the second dimension I think
character(len=max_length_filename) :: locfnhr(max_tapes) ! local history restart file names
logical :: htapes_defined = .false. ! flag indicates history output fields have been defined
!
@@ -2299,7 +2305,7 @@ subroutine hfields_normalize (t, f)
! Normalize by number of accumulations for time averaged case

do fld = 1,tape(t)%nflds(f)
avgflag = tape(t)%hlist(fld)%avgflag(f) ! TODO Is this how I'm changing avgflag?
avgflag = tape(t)%hlist(fld)%avgflag
if ( is_mapping_upto_subgrid(tape(t)%hlist(fld)%field%type1d, tape(t)%hlist(fld)%field%type1d_out) )then
beg1d = tape(t)%hlist(fld)%field%beg1d_out
end1d = tape(t)%hlist(fld)%field%end1d_out