osmose-model / osmose-web-api

Web service that generates Osmose configuration files from data sources like Fishbase and SeaLifeBase. Used by https://www.config.osmose-model.org .
MIT License
2 stars 2 forks source link

Defining at least one phytoplankton functional group for each OSMOSE case study #119

Closed agruss2 closed 7 years ago

agruss2 commented 7 years ago

@FIN-JBarile @FIN-casey @jhpoelen At least one phytoplankton functional group should be defined for each OSMOSE case study. Phytoplankton species are included in SeaLifeBase. However, their "data richness" - as defined in #59 - is very low (usually 1). I would like: (1) the bridge between FishBase/SeaLifeBase and OSMOSE to define at least one phytoplankton functional group for each OSMOSE case study; and (2) the phytoplankton group(s) defined to have a maximum of 30 species.

Here are some comments: (1) The phytoplankton group(s) defined by the bridge between FishBase/SeaLifeBase and OSMOSE should be "background" functional groups. (2) Since "data richness" is usually equal to 1 for phytoplankton species, here are the default values that should be defined for phytoplankton species only: (i) Minimum size: 0.0002 cm (OSMOSE parameter: “plankton.size.min.plkX”); (ii) Maximum size: 0.02 cm (OSMOSE parameter: “plankton.size.max.plkX”); (iii) Trophic level: 1 (OSMOSE parameter: "plankton.TL.plkX"). (3) If the user selects an ecosystem or a country plus a FAO area (say, the "Iceland Shelf/Sea" ecosystem) and there is no phytoplankton species for the ecosystem or country plus FAO area of interest (e.g., the "Iceland Shelf/Sea" ecosystem), then the UI should still create a "phytoplankton" background functional group in the Table that is provided in Step 2, with the columns "Species" and "Class" both empty. Then, the bridge between FishBase/SeaLifeBase and OSMOSE will provide the following parameter values for the "phytoplankton" group that it created: (i) Minimum size: 0.0002 cm; (ii) Maximum size: 0.02 cm; (iii) Trophic level: 1. (4) If the user attempts to redefine phytoplankton groups as "focal" functional groups, then a warning message should pop up; this warning message should say: "Phytoplankton groups can only be defined as background functional groups" .

Could you please implement all of the above? Please let me know if you have any questions and/or comments. Many thanks.

jhpoelen commented 7 years ago

@agruss2 thanks for your detailed description. In my mind the description contains three separate issues:

  1. UI to always include a phytoplankton background group with specified species
  2. UI to warn user when changing the phytoplankton group to a focal functional group
  3. API to apply specific defaults for phytoplankton groups only

Just to make sure - @agruss2 do you expect background groups other than phytoplankton?

jhpoelen commented 7 years ago

Just implemented functionality to allow setting defaults for background functional groups with name "phytoplankton" in file fishbase-mapping-phytoplankton.csv located at https://github.com/jhpoelen/fb-osmose-bridge/blob/master/src/main/resources/com/github/jhpoelen/fbob/fishbase-mapping-phytoplankton.csv . Please note that any background with phytoplankton species in it with a group name other than "phytoplankton" will not use the suggested default.

@agruss2 please let me know if the current implementation is acceptable. If not, please propose a way to detect whether a background group contains phytoplankton.

agruss2 commented 7 years ago

@jhpoelen To answer your first question: When the user reaches Step 2, the only background functional groups defined by the bridge will be phytoplankton groups. Then, the user will be free to designate some of the focal functional groups as "background functional groups", if they want, before going to Step 3.

agruss2 commented 7 years ago

@jhpoelen To answer your second question; What you are envisioning is great, and should be implemented only for those species that are phytoplankton species. Please let me know when the UI start defining phytoplankton groups in the Table provided in Step 2. At that time, I will run a new test with the bridge to see if I am happy with what has been implemented, and if the present issue should be closed.

jhpoelen commented 7 years ago

@agruss2 you should be able to test the phytoplankton defaults by creating a background group with name "phytoplankton" with some species in it. I understand if you'd like to postpone testing until the UI development is complete. Just let me know if you'd like me to make any changes to the recently introduced phytoplankton implementation.

agruss2 commented 7 years ago

@jhpoelen Since there are almost no data for phytoplankton species in SeaLifeBase, here is what I would like the bridge between FishBase/SeaLifeBase and OSMOSE to do regarding phytoplankton: (1) The bridge between FishBase/SeaLifeBase and OSMOSE should define one single phytoplankton group, which has to be a "background" functional group. (2) The following parameter values that should be provided for the background phytoplankton group: (i) Minimum size: 0.0002 cm (OSMOSE parameter: “plankton.size.min.plkX”); (ii) Maximum size: 0.02 cm (OSMOSE parameter: “plankton.size.max.plkX”); (iii) Trophic level: 1 (OSMOSE parameter: "plankton.TL.plkX"). (3) The following columns should be empty for the background phytoplankton functional group: "Class", "Species", "Maximum length (cm)", "Habitat", and "Depth". (4) If the user attempts to redefine the phytoplankton group as a "focal" functional group, then a warning message should pop up; this warning message should say: "The phytoplankton group can only be defined as a background functional group" .

Could you please implement all this?

jhpoelen commented 7 years ago

This is my current understanding -

(2) has been implemented (or at least, a first pass, see https://github.com/jhpoelen/fb-osmose-bridge/issues/119#issuecomment-306260459).

(1), (3) and (4) are UI issues.

Before moving forward, could you please confirm that this matches with your understanding of the current status?

agruss2 commented 7 years ago

@jhpoelen I am not sure that (2) is implemented. I just ran a test where I queried parameter values for an OSMOSE model for the Iceland Shelf/Sea ecosystem. I defined all the functional groups as "focal" functional groups, except the "cephalopods" group which I defined as a "background" functional group. Then, I clicked on the "Plus" button to create a "phytoplankton" background functional group. I did not enter anything in the "Class" and "Species" columns for that phytoplankton group. However, in the "osm_param-ltl.csv" file provided by the bridge between FishBase/SeaLifeBase and OSMOSE, I got parameter values only for the "cephalopods" background functional group.

--> Could you please let me know how, under your understanding, (2) is currently implemented? Once I am clear about that, I will define the present issue as a "UI High Priority" issue, which Casey and Skit will have to address. Many thanks.

jhpoelen commented 7 years ago

Just now (9 June 2017), I created attached osmose configuration by selecting the "Iceland Shelf/Sea" ecosystem and renaming the last two focal functional groups to "notphytoplankton" and "phytoplankton". The generated configuration archive seems to suggest that the functionality has been implemented. Inspecting the osm_param_ltl.csv shows the values included below. Please confirm that you can reproduce my results.

plankton.name.plk0;notphytoplankton
plankton.name.plk1;phytoplankton
plankton.accessibility2fish.plk0;0.0
plankton.accessibility2fish.plk1;0.0
plankton.conversion2tons.plk0;1
plankton.conversion2tons.plk1;1
plankton.size.max.plk0;NA
plankton.size.max.plk1;0.02
plankton.size.min.plk0;NA
plankton.size.min.plk1;0.0002
plankton.TL.plk0;3.23
plankton.TL.plk1;1

osmose_config_phytoplankton.zip

agruss2 commented 7 years ago

@jhpoelen I confirm that I can reproduce your results. Therefore, I am going to define the present issue as a "UI High Priority" issue, which @FIN-casey and @FIN-JBarile will have to address. Many thanks.

FIN-casey commented 7 years ago

This comment is alsmost similar to my comment in #120. I implemented this issue. If there is no "phytoplankton" functional group in the table, the UI will add the "phytoplankton" functional group with no classes and species. Since the group is required for each OSMOSE study, I put an alert of "The functional group cannot be deselected." whenever the user tries to deselect the functional group. I also put an alert of "The Phytoplankton group can only be defined as a background functional group", when the user tries to switch the group to focal functional group.

Please verify.Thanks

agruss2 commented 7 years ago

@FIN-casey This is wonderful, many thanks! Just one very minor comment: Could you please replace "The functional group cannot be deselected." with: "The phytoplankton group cannot be deselected."?

FIN-casey commented 7 years ago

The alert text is now modified. Please verify. Thanks.

agruss2 commented 7 years ago

@FIN-casey I just ran a test on my laptop, and the old text ("The functional group cannot be deselected.") still appears. Is it because I need to "refresh" the http://fin-casey.github.io/wizard.html link on my laptop (I do not remember the technical term); if so, could you please let me know how to do that?

FIN-casey commented 7 years ago

@agruss2 To load the latest version of the page, just do a 'hard refresh' by pressing CTRL+F5.

agruss2 commented 7 years ago

@FIN-casey Thanks, it worked! The present issue has been solved; therefore, I am closing it now.