-
Notifications
You must be signed in to change notification settings - Fork 6
Crop suitability #280
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
Crop suitability #280
Conversation
50b5cac
to
ce798ba
Compare
ce798ba
to
e2b33e1
Compare
cc882b5
to
99aa265
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a thorough review, but here are some comments to get you started.
As I said by email, you should check out the dry spell functionality in the onset maproom. It's not exactly what you need, but I think it will help.
For dry spells defined as Tufa did, there is longest_run_length that could be a source of inspiration. Instead of taking the max at the end, could divide by the length that defines a dry spell, that would give a count of spells within a series of continuous spells, and then sum that to count all the spells in the season. I think... need to check what goes into the max is what I claim here, it's been a while... |
Is the analysis meant to be performed on a single year chosen by the user? Or will there be analysis through years at some point (either some reduction to make map or some repetition to make time series)? Asking for a friend. :) I mean: asking to think thoroughly of the dry spell problem. |
@remicousin As of now the crop suitability analysis is used both to generate the map for a single year and a time series plot over all available years of data. So I am trying to build it so that it can work both for a single year and for multiple years. |
99aa265
to
2227d58
Compare
As a general comment, can we name the app similarly to the CSMT Maproom? I think the inspiration comes from there. So something like Climate Suitability fro Crop ... something-something. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did a first review. Key things:
- what seasons do we want as options;
- consider my proposition on how to select seasons/years
- note that when rebasing, the colorscales won't work as the new system has merged
- consider leaving the dry spell component to another PR to limit scope of this PR
- I would like to review more when I am able to build
@remicousin I just pushed the changes so that you should be able to build the maproom by running Where myconfig.yaml just has your db password. Note it is slow so it will take a minute to load the map and time series plot. Going back now to look at the additional comments and will respond to them / push additional commits as it appropriate. |
As simple as: "Seasonal Climate Suitability for Crops in Ethiopia" ? |
It builds without failing but I am not sure how you set this up but it is so that I can't change the port and hostname so basically devi:8050 so I won't do that because you might be using it for testing purposes as you work. But I think we are missing something from @aaron-kaplan to build individual pages again. |
Maybe just Climate Suitability for Crops. I would remove seasonal because CSMT does make a climatological analysis and shows indeed the seasonal cycle only. Here we are going to show year-to-year variability as well. You can add "in Ethiopia" but that part would have to be dealt with through the national config file. I typically would not add it because the app has a vocation to be part on a website dedicated to Ethiopia, so there is no need to add Ethiopia everywhere in titles or so. |
I copied the water balance maproom since that is the other standalone maproom. I am not sure about why you would not be able to change the port and hostname.. I had not tried to do so though I have been working on shortfin if that makes any difference to you. |
In case it wasn't clear, that was the reason for this comment.
I started working on that, but a lot of other things have taken priority. I think the way things are set up here is workable for now, just need the right parameters in the |
2bbb5a5
to
ca2936e
Compare
The remaining tasks to do are:
As Rémi and I discussed, most of this will be done in separate PR's. I will try to fix the loading speed of the current state before merging this branch, and other smaller fixes but then to deal with the additional parameters in the suitability function and the fixing of the season def, I will open new PR's. Sound good? |
c16a388
to
339eeb4
Compare
461348c
to
ca54f35
Compare
Maproom for crop suitability analysis.
To run, navigate to inside of the crop_suitability folder and run the following command:
CONFIG=../config.yaml:../config-nma.yaml:../myconfig.yaml python maproom_crop_suit.py
Current issues:
Slow speed to calculate crop suitability
Trouble with figure out the best way to count number of dry spells in the calculation for crop suitability
Bug in selecting season for DJF (selecting all months of same year instead of the december from the previous year)