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

Placing constraints on the estimation of sex ratios #139

Closed agruss2 closed 6 years ago

agruss2 commented 6 years ago

@jhpoelen Regarding sex ratio, defined in OSMOSE as the proportion of females in the population - we should place constraints on the estimation of this parameter ("species.sexratio.spX" in the "osm_param-species.csv" OSMOSE config file). For example, in the Iceland Shelf/Sea case study, the sex ratios provided by the bridge between FishBase/SeaLifeBase and OSMOSE currently vary between 0.01 and 0.59; a sex ratio of 0.01 is extreme, and one would not expect such a value in the real world. --> Therefore, could you please make some modifications in the API, such that, if the sex ratio of a given focal functional group is initially set to a value lower than 0.1 or higher than 0.9, then this value is not entered in the "osm_param-species.csv" file and the sex ratio of the focal functional group is set to 0.5 instead? Many thanks!

jhpoelen commented 6 years ago

@agruss2 I've just prepared a new version of the osmose bridge with a first pass at the sex ratio constraints. Please review.

agruss2 commented 6 years ago

@jhpoelen Thanks a lot for having worked on this. I just ran a test for the Iceland Shelf/Sea ecosystem. However, all the sex ratios provided by the bridge between FishBase/SeaLifeBase and OSMOSE were 0.01 (see the file below). Do you have any ideas why this is happening? Could you please correct for this? Many thanks! osm_param-species.xlsx

jhpoelen commented 6 years ago

@agruss2 thanks for your feedback, attention to detail and patience. I looked into the issue and found that the conversion of the spawning.SexRatiomid to species.sexratio.sp occurred after the defaults were set. This caused values of 0.01 to show up: 0.5/100 = 0.005 ~ 0.01 . Also, since all SexRatiomid are > 0.9, all values were set to the default.

I've implemented, deployed and tested a fix. With iceland shelf the attached osmose config was generated. Now, the fishbase mapping defaults relate to the spawning.SexRatiomid value (current set to 50) and the species.sexratio.sp is calculated from this value. See https://github.com/jhpoelen/fb-osmose-bridge/commit/eaeefa89631d3afc12d32bfb02059c92d5ae4fdb#diff-fe4d6a66c1102a2c829e77ebc46c2ed1L14 for changed made in fishbase-mapping.csv .

Please verify.

osmose_config.zip

agruss2 commented 6 years ago

@jhpoelen Many thanks! The present issue has been fully resolved and can therefore be closed.