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

Include background functional groups in osmose_config.zip #68

Closed agruss2 closed 7 years ago

agruss2 commented 8 years ago

@FIN-casey @jhpoelen Could we please test the "osmose_config.zip" file for background functional groups as well now? Currently, the "osmose_config.zip" file provides parameter values (dummy ones at present) for 4 focal functional groups. Could the zip file also provide parameter values (dummy ones) for one background functional group ? Please try with the following functional group:

Bivalves (class: Bivalvia)
Reference species: Donax variabilis, and Argopecten gibbus

==> The present issue is related to #67

jhpoelen commented 8 years ago

@agruss2 working on it - I am assuming that the background groups will render into file called osm_param-ltl.csv and associated files. The background groups will replace the currently, statically defined groups like:

plankton.name.plk0;SmallPhytoplankton
plankton.name.plk1;Diatoms
plankton.name.plk2;Microzooplankton
plankton.name.plk3;Mesozooplankton
plankton.name.plk4;Meiofauna
plankton.name.plk5;SmallInfauna
plankton.name.plk6;SmallMobileEpifauna
plankton.name.plk7;Bivalves
plankton.name.plk8;EchinodermsAndLargeGastropods
jhpoelen commented 8 years ago

@agruss2 osm_param-ltl.csv is now generated using defined background groups.

I noticed that file osm_ltlbiomass.nc contains a spatial-temporal grid of weight (in tons) of background species. Would you like me to generate this file on the dynamically also?

agruss2 commented 8 years ago

@jhpoelen Thanks. "I noticed that file osm_ltlbiomass.nc contains a spatial-temporal grid of weight (in tons) of background species. Would you like me to generate this file on the dynamically also?" ==> No.

jhpoelen commented 8 years ago

@agruss2 A mentioned, a first pass at generating the background groups in configuration has been implemented. Please review and close issue if desired functionality is available.

jhpoelen commented 8 years ago

@agruss2 would you like me to remove the file osm_ltlbiomass.nc from the generated configuration file?

agruss2 commented 8 years ago

@jhpoelen No. Has to stay in the generated configuration file.

jhpoelen commented 8 years ago

Ok thanks for your prompt reply.

Just for the record, please note that the nc file might not be compatible with the other generated configuration file: the dimensions are dependent on the number of background groups.

agruss2 commented 8 years ago

@jhpoelen Then modify the file dynamically. Thanks

jhpoelen commented 8 years ago

Ok, working on it.

jhpoelen commented 8 years ago

Now, the nc file is dynamically generated such that the number of background functional groups are taken into account. @agruss2 please review.

@FIN-casey I've updated the javascript library to check that the configuration defines at least one focal group and at least one background group. Please upgrade.

agruss2 commented 8 years ago

@jhpoelen @FIN-casey Unfortunately, we have now two new issues: (1) For some reason, the zip file (attached here osmose_config.zip ) contains only one file ("osm_all-parameters.csv"); and (2) The zip file refuses to let me extract the "osm_all-parameters.csv" file on my computer. Could you please solve these issues? Thank you.

jhpoelen commented 8 years ago

@agruss2 Please provide the parameters that you provided to the wizard prior to generating the osmose_config.zip. This would help me expedite reproducing and fixing the issue. Thanks!

jhpoelen commented 8 years ago

@agruss2 I inspected the logs of the api service and found that:

org.glassfish.jersey.server.internal.process.MappableException: java.io.IOException: must define at least one background group

This makes me suspect that no background group was defined. Please confirm by selecting at least a single background group and repeat the configuration generation process.

Once @FIN-casey gets the chance to upgrade the javascript library to talk to the configuration api, the library will validate the functional groups prior and (hopefully) let the user know that at least one background group should be provided.

Please let me know if you'd prefer to define default background groups in case none are provided.

agruss2 commented 8 years ago

@jhpoelen @FIN-casey My bad, I forgot to define one of the functional groups as a "background functional group". So, I redid the whole process, this time defining one of the functional groups as a "background functional group", and got a zip file containing files whose content makes perfect sense (this also applying to the netcdf file). It is necessary to have at least one background functional group in an OSMOSE model. Thanks guys.

FIN-casey commented 7 years ago

@agruss2 @jhpoelen I am done updating the javascript library of Jorrit in FIN-casey.github.io. I also update functions that handle the validation of the forms in the wizard specifically on Step 3 Define functional groups for me. The form will check if the user selects at least one focal functional group and at least one background functional group. The wizard will show an alert dialog box once the user didn't select at least one of either group.

agruss2 commented 7 years ago

@FIN-casey @jhpoelen I just did another test and everything is working perfectly. I am therefore going to close this issue. Thank you very much for all the great work on this issue, Casey and Jorrit.