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

Group3 #94

Merged
merged 59 commits into from
Jul 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
b4b75ee
adjust fishing effort files
thiasB May 29, 2024
d75f1e5
Remove hidden flags from group3 data
jochenklar May 29, 2024
2a570b6
Add a new forcing data table and remove datasets from specifier tables
jochenklar May 30, 2024
4b19567
Rename forcing to forcing_data and add remaining forcing data
jochenklar Jun 10, 2024
c2a3ed1
Add group3 to forcing data table
jochenklar Jun 10, 2024
6539714
Add path_comment to forcing data table
jochenklar Jun 10, 2024
c08dea0
Add group3_requirements table
jochenklar Jun 10, 2024
b10f0f1
Fix typo
jochenklar Jun 10, 2024
6b74af1
Add biophysical forcings
jochenklar Jun 12, 2024
23c6ddb
Fix groups
jochenklar Jun 12, 2024
6047740
Add group3_ranking table
jochenklar Jun 20, 2024
2b2a4a3
Add rocket icon for group3
jochenklar Jun 24, 2024
cc81f95
Add group3 sens scenarios
jochenklar Jun 24, 2024
d4d4f02
Update app.js
jochenklar Jun 24, 2024
f517721
Add badges for group3 to Config component
jochenklar Jun 26, 2024
43fbc1d
Rename Group 3 -> Group III
jochenklar Jun 26, 2024
76f1a24
Increase config width
jochenklar Jun 26, 2024
4d1930f
Move forcing data table to Input data section and bias adjustment table
jochenklar Jun 26, 2024
9c8c96e
Remove exposure table
jochenklar Jun 26, 2024
671cda2
Simplify ScenarioTable
jochenklar Jun 26, 2024
b92d522
Refactor group3 ranking table
jochenklar Jun 26, 2024
043ed9c
Update group3 requirements table
jochenklar Jun 26, 2024
cf94f86
Remove sortRanking from store again
jochenklar Jun 26, 2024
f169602
Update app.js
jochenklar Jun 26, 2024
95f3875
update input paths and comments
thiasB May 16, 2024
5837775
Merge branch 'main' into effort_filenames
thiasB Jun 27, 2024
7a853e0
Fix typo
jochenklar Jun 27, 2024
80f7b72
Add group3 update
jochenklar Jun 27, 2024
f9f2d94
Update group3 update text
jochenklar Jun 27, 2024
9301d14
update land transformation
thiasB Jun 27, 2024
d8fd967
Merge pull request #97 from ISI-MIP/soc_updates
jochenklar Jul 1, 2024
4847d94
Add nowrap class
jochenklar Jul 1, 2024
a74a316
Update soc_dataset and forcing_data for Group III
jochenklar Jul 1, 2024
874c0ce
Update ForcingTable
jochenklar Jul 2, 2024
e8f2c7d
Update forcing data for group3
jochenklar Jul 2, 2024
1a68414
Update group3 requirements
jochenklar Jul 2, 2024
fe046ff
Reorder soc_dataset groups
jochenklar Jul 2, 2024
696fb74
Add water_global to group3 tables
jochenklar Jul 2, 2024
849d074
Improve text
jochenklar Jul 2, 2024
48c5b96
Small fixes
jochenklar Jul 4, 2024
1c571f1
Update group3 badges in Config component
jochenklar Jul 3, 2024
0adaaac
Update definitions
jochenklar Jul 3, 2024
86f4262
Adjust styling
jochenklar Jul 4, 2024
befd688
Update sectors
jochenklar Jul 4, 2024
a76097e
Adjust styling
jochenklar Jul 4, 2024
962300f
Update group3 notes
jochenklar Jul 4, 2024
070e8a1
Adjust styling
jochenklar Jul 4, 2024
48d8e12
Fix typo
jochenklar Jul 4, 2024
a218b69
Update soc scenarios
jochenklar Jul 4, 2024
51406df
Remove soc_pathway from patterns
jochenklar Jul 4, 2024
11ad220
Rename water_abstraction
jochenklar Jul 5, 2024
85d1625
Update histsoc and sspsoc tables
jochenklar Jul 8, 2024
5f5cddd
Fix missing )
jochenklar Jul 8, 2024
efd524d
Fix data is -> data are
jochenklar Jul 8, 2024
97aabe4
Update group3 requirements text
jochenklar Jul 8, 2024
55bdc7b
Update sectors
jochenklar Jul 8, 2024
94b72f0
Hide headlines which are not shown from TOC
jochenklar Jul 8, 2024
e7b2aff
Update ranking group
jochenklar Jul 8, 2024
bd4c594
Update sspsoc
jochenklar Jul 8, 2024
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ISIMIP3 simulation protocol
===========================

This project builds sector-specific ISIMIP protocols from a common data source.
Machine-readable data is under [definitions](definitions/), and text under [protocol](protocol/).
Machine-readable data are under [definitions](definitions/), and text under [protocol](protocol/).

The rendered protocols are found at https://protocol.isimip.org.

Expand Down
28 changes: 17 additions & 11 deletions app/src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,15 +137,21 @@ setTimeout(() => {
</Provider>
)
})
}, 100)

setTimeout(() => {
// scroll to anchor or position once everthing is settled
if (anchor) {
anchor.scrollIntoView()
}

// remove the cover div
const cover = document.getElementsByClassName('cover')[0]
cover.remove()
}, 200)
setTimeout(() => {
// scroll to anchor or position once everthing is settled
if (anchor) {
anchor.scrollIntoView()
}

// set the main height to auto
const main = document.getElementsByTagName('main')[0]
main.style.height = 'auto'

setTimeout(() => {
// remove the cover div
const cover = document.getElementsByClassName('cover')[0]
cover.remove()
}, 100)
}, 200)
}, 100)
69 changes: 65 additions & 4 deletions app/src/components/Config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,50 @@ import { actions } from '../store'


const Config = ({ definitions, config, actions }) => {
const dev_note = 'Currently in development.'

const group3_full_note = 'Ready for Group III.'
const group3_half_note = 'Some data are still under construction (see Table 3.1), but models' +
' not needing those data may already start.'
const group3_none_note = 'Since most of the data are still under construction, the sector is not ready for Group III simulations.'

const group3_full_badge = (
<span className="badge-split" title={group3_full_note}>
<span className="badge badge-info badge-left">
<span className="circle circle-green"></span>
</span>
<span className="badge badge-info badge-right">III</span>
</span>
)

const group3_half_badge = (
<span className="badge-split" title={group3_half_note}>
<span className="badge badge-info badge-left">
<span className="circle-left circle-green"></span>
<span className="circle-right circle-yellow"></span>
</span>
<span className="badge badge-info badge-right">III</span>
</span>
)
const group3_none_badge = (
<span className="badge-split" title={group3_none_note}>
<span className="badge badge-info badge-left">
<span className="circle circle-yellow"></span>
</span>
<span className="badge badge-info badge-right">III</span>
</span>
)

const getGroup3Badge = (row) => {
if (row.group3) {
return group3_full_badge
} else if (row.group3_dev) {
return group3_half_badge
} else {
return group3_none_badge
}
}

return (
<div className="config">
<div className="mb-3">
Expand Down Expand Up @@ -42,16 +86,33 @@ const Config = ({ definitions, config, actions }) => {
value={row.specifier}
checked={config.sectors.includes(row.specifier)}
onChange={(event) => actions.changeSector(event.target.value)} />
<label className="form-check-label" htmlFor={id}>{row.title} {row.dev && <span>🚧</span>}</label>
<label className="form-check-label d-flex" htmlFor={id}>
<div>
{row.title}
{row.dev && <span className="ml-1" title={dev_note}>🚧</span>}
</div>
<div className="ml-auto text-nowrap">
&nbsp;{getGroup3Badge(row)}
</div>
</label>
</div>
)
})
}
</div>
</div>
<div className="text-muted">
Sectors marked with the 🚧 sign are currently in development and the protocol will not contain all nessesary information, yet.
</div>
<p className="text-muted mb-1">
🚧: {dev_note}
</p>
<p className="text-muted mb-1">
{group3_full_badge} {group3_full_note}
</p>
<p className="text-muted mb-1">
{group3_half_badge} {group3_half_note}
</p>
<p className="text-muted mb-1">
{group3_none_badge} {group3_none_note}
</p>
</div>
)
}
Expand Down
12 changes: 12 additions & 0 deletions app/src/components/Show.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import Sectors from './badges/Sectors'

const Show = ({ config, simulationRound, sector, html }) => {
let className = 'show-component'
let tocClassName = ''

const simulationRounds = simulationRound === undefined ? [] : simulationRound.split(',')
const sectors = sector === undefined ? [] : sector.split(',')
Expand All @@ -16,13 +17,24 @@ const Show = ({ config, simulationRound, sector, html }) => {

if (!simulationRounds.includes(config.simulation_round)) {
className += ' hidden'
tocClassName = 'hidden'
}
}
if (sectors.length > 0) {
className += ' sectors'

if (!(config.sectors.length == 0 || sectors.filter(sector => config.sectors.includes(sector)).length)) {
className += ' hidden'
tocClassName = 'hidden'
}
}

const matches = html.matchAll('<h3 id="(.*?)"');
for (const match of matches) {
const id = match[1]
const tocLinks = document.querySelectorAll(`a[href="#${id}"]`)
for (let tocLink of tocLinks) {
tocLink.className = tocClassName
}
}

Expand Down
16 changes: 12 additions & 4 deletions app/src/components/Table.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,15 @@ import { actions } from '../store'

import BiasAdjustmentTable from './tables/BiasAdjustmentTable'
import ClimateForcingTable from './tables/ClimateForcingTable'
import InputDatasetTable from './tables/InputDatasetTable'
import InputVariableTable from './tables/InputVariableTable'
import CropTable from './tables/CropTable'
import ForestStandTable from './tables/ForestStandTable'
import ExperimentsTable from './tables/ExperimentsTable'
import ForcingDataTable from './tables/ForcingDataTable'
import ForestStandTable from './tables/ForestStandTable'
import Group3RankingTable from './tables/Group3RankingTable'
import Group3RequirementsTable from './tables/Group3RequirementsTable'
import HarmonizationTable from './tables/HarmonizationTable'
import InputDatasetTable from './tables/InputDatasetTable'
import InputVariableTable from './tables/InputVariableTable'
import IrrigationTable from './tables/IrrigationTable'
import LakeSiteTable from './tables/LakeSiteTable'
import OceanRegionTable from './tables/OceanRegionTable'
Expand All @@ -21,7 +24,6 @@ import ScenarioTable from './tables/ScenarioTable'
import SpeciesTable from './tables/SpeciesTable'
import VariableTable from './tables/VariableTable'


const Table = ({ definitions, config, identifier, caption, actions }) => {
const groups = definitions.group.filter(group => group.identifier == identifier)
const rows = definitions[identifier]
Expand All @@ -39,8 +41,14 @@ const Table = ({ definitions, config, identifier, caption, actions }) => {
return <CropTable config={config} caption={caption} rows={rows} groups={groups} actions={actions} />
case 'experiments':
return <ExperimentsTable definitions={definitions} config={config} caption={caption} rows={rows} actions={actions} />
case 'forcing_data':
return <ForcingDataTable definitions={definitions} config={config} caption={caption} rows={rows} groups={groups} actions={actions} />
case 'forest_stand':
return <ForestStandTable config={config} caption={caption} rows={rows} actions={actions} />
case 'group3_ranking':
return <Group3RankingTable config={config} caption={caption} rows={rows} groups={groups} actions={actions} />
case 'group3_requirements':
return <Group3RequirementsTable config={config} caption={caption} rows={rows} actions={actions} />
case 'geo_dataset':
return <InputDatasetTable config={config} caption={caption} rows={rows} groups={groups} actions={actions} />
case 'harmonization':
Expand Down
26 changes: 26 additions & 0 deletions app/src/components/badges/Mandatory.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import React, { Component} from 'react'
import PropTypes from 'prop-types'

const Mandatory = ({ mandatory }) => {
if (mandatory === undefined) {
return null
} else if (mandatory) {
return (
<span className="badge badge-info badge-mandatory" title="If your models uses input data of this kind, we require to use the specified dataset. Please see the note above.">
mandatory
</span>
)
} else {
return (
<span className="badge badge-light badge-optional">
optional
</span>
)
}
}

Mandatory.propTypes = {
status: PropTypes.string
}

export default Mandatory
3 changes: 3 additions & 0 deletions app/src/components/badges/Sectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ const Sectors = ({ config, sectors }) => {
// sectors are the sectors configured for this badge
if (sectors === undefined) {
return <span className="badge badge-success badge-sector">all sectors</span>
} else if (sectors === []) {
// by setting `sectors: []` the display of sectors can be ommited
return null
} else if (sectors === null) {
// for the title just display the configured sectors
if (config.sectors !== undefined && config.sectors.length > 0) {
Expand Down
14 changes: 14 additions & 0 deletions app/src/components/badges/SocForcing.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import React, { Component} from 'react'
import PropTypes from 'prop-types'

const SocForcing = ({ socForcings }) => {
return socForcings.map(socForcing => {
return <span className="badge badge-secondary badge-soc-forcing" key={socForcing}>{socForcing}</span>
})
}

SocForcing.propTypes = {
socForcings: PropTypes.array
}

export default SocForcing
2 changes: 1 addition & 1 deletion app/src/components/tables/ExperimentsTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const ExperimentsTable = function({ definitions, config, caption, rows, actions
{row.priority && <p><strong>{row.priority}</strong></p>}
<p>
<SimulationRounds config={config} simulationRounds={row.simulation_rounds} />
{row.group3 && <span className="badge badge-info">Group 3</span>}
{row.group3 && <span className="badge badge-info">Group III</span>}
<Sectors config={config} sectors={row.sectors} />
</p>
</td>
Expand Down
Loading