Skip to content

Commit

Permalink
Update bgcval2_make_report.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ledm committed Apr 25, 2023
1 parent d689b03 commit 43e52db
Showing 1 changed file with 41 additions and 16 deletions.
57 changes: 41 additions & 16 deletions bgcval2/bgcval2_make_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ def newImageLocation(fn):
Level1Profiles = True
level2Horizontal = True
level2Physics = False
level2_auto = True
summarySections = False
level3OMZ = False
Level3Salinity = False
Expand Down Expand Up @@ -954,27 +955,51 @@ def newImageLocation(fn):
FileLists=FileLists,
FileOrder=FileOrder)

if level2Physics:
l2Fields = [
'Temperature',
'Salinity',
'MLD',
'ZonalCurrent',
'MeridionalCurrent',
'VerticalCurrent',
]




if level2Physics or level2_auto:
if level2Physics:
l2Fields = [
'Temperature',
'Salinity',
'MLD',
'ZonalCurrent',
'MeridionalCurrent',
'VerticalCurrent',
]
slices = [
'Surface',
'1000m',
'Transect',
]
SectionTitle = 'Level 2 - Physics'
region = 'Global'

if level2_auto:
l2Fields = glob(imagedir + '/' + jobID + '/P2Pplots')
l2Fields = [os.path.basename(fn) for fn in sorted(l2Fields)]
levels = ['Surface', '50m', '100m', '200m', '500m', '750m', '1000m', '1500m', '2000m', '4000m','Transect']
outdict = {}
outlevels = {}
for i, fn in enumerate(l2Fields):
for lv in levels:
if fn.find(lv)>-1:
outlevels[lv]= True
fn = fn.replace(lv, '')
outdict[fn]= True

l2Fields = [key for key, v in outdict.items()]
slices = [key for key, v in outlevels.items()]
SectionTitle = 'Level 2'
region = '*'

hrefs = []
Titles = {}
SidebarTitles = {}
Descriptions = {}
FileLists = {}
SectionTitle = 'Level 2 - Physics'
region = 'Global'
slices = [
'Surface',
'1000m',
'Transect',
]
FileOrder = {}

for key in sorted(l2Fields):
Expand Down

0 comments on commit 43e52db

Please sign in to comment.