“You don't have to cook fancy or complicated masterpieces – just good food from fresh ingredients” --Julia Child
The year before I started my travels I made it a resolution to make a perfect french macaron. I tried every week making dozens of them and failed. They are the most technically difficult of all baked goods, they are what Chefs use when they battle one other. I thought I got close but it wasn’t until I made it to France that I realized how far I still had to go. It is said you don’t “make macarons” you “try to sneak past the macaron gatekeeper”.
The perfect macaron. What usually goes wrong is that their crusts crack or they don’t develop symmetrical feet.
Although I walked away defeated, I learned much about cooking and found many parallels with making forecasts and doing hydrologic modeling (there is even an excellent website “Cooking for Engineers”). I wrote about this when I was a forecaster in the US:
Generating a water supply forecast is much like preparing a meal. The freshest, highest quality ingredients (input data) are a necessary but not sufficient condition for a winning dish. A variety of utensils, sharp knifes, and pots and pans of all sizes (forecast tools), all help the chef (hydrologist) transform the ingredients. While presentation (visualization) can increase a dish’s appeal and make a great first impression, ultimately the proof of the pudding is in the tasting (forecast accuracy). There is no last minute spice (except perhaps a vivid color bar and slick product design) that can mask over the results of poor preparation or ingredients.
Just imagine the challenge of acquisition of data, preparation of guidance, and timely distribution of product. A network of NRCS data collection personnel throughout the Western US gather and prepare the ingredients and send them to the kitchen at the National Water and Climate Center in Portland, Oregon. Immediately, four hydrologists set upon the data, each preparing the equivalent of 150-200 different dishes simultaneously, every one of which has to be just right in its own way. These are then handed off to the NRCS state water supply specialists who have the task of whisking the plates out of the chaos of the kitchen and placing them before thousands of water users. If the product doesn’t satisfy or has gone cold by the time it reaches the decision-maker (e.g., a major storm has dramatically changed basin conditions since the data was first collected), some users don’t hesitate in sending it back to the kitchen with their regards.
A going away cake for one of my employees
Then last year I wrote a modeling “cookbook” that included these 10 commandments
1 Skim the recipe at the start
2 Plan your meals
3 Taste test at every step
4 Clean as you go
5 Use high quality ingredients
6 Be careful when using substitutions
7 Ingredient preparation determines the success of all that follows
8 Know your equipment, have the right tools
9 Master the way things should be done before experimenting
10 Balance taste with presentation
Here’s an explanation of each
1 Skim the recipe at the start
The temptation with any new recipe is to want to dive in and start mixing things up. However, it helps to at least skim all of the instructions to give a feel for what is to come; most importantly, it lessens the chance that you will come to a critical step and lack some essential ingredient. Clearly, it takes experience to understand what is meant by each instruction. Similarly, do not just open up any modeling computer application and start clicking away, assuming that it is all intuitive.
2 Plan your meals
Cooking, like modeling, has many steps, some of which are time consuming and some of which can be done in parallel with others. Think of what you have to start first and what needs done last. Anything that can wait, should wait. However, also anticipate how the rest of the process will be affected if one part is delayed or has to be done over.
3 Taste test at every step
A common mistake for modelers is to start the computer doing a long model run only to find out hours or days later that there was some mistake in the code. Start with small tasks and verify that each part is working. Reworking failed long jobs is the epitome of waste and should be avoided at all costs. Monitor early results and do not hesitate to cancel bad model runs in process. That said, realize that the cookie will not taste just like the dough, so learn to recognize what good dough tastes like.
“Ils sont magnifiques!” A tower of french macarons at the Paris airport.
4 Clean as you go
It is good to keep a tidy and organized work area. It is more effective to clean many small messes than one giant mess and you don’t want past messes contaminating your batch. Always operate from the assumption that someone else will have to go into your workspace and understand what you have done. As a modeler, name your files and directories informatively (i.e. not “junk1”,”junk2”), and delete or archive non-essential files. Write down where all your various datasets came from and how they were modified. Nearly identical files or folders in several locations (e.g. on several computers) are a recipe for disaster. Keep notes as you go instead of waiting until the end to try and recall what you did. Documenting is like exercising; do not set too ambitious goals (i.e. document every minutiae) only to overwork yourself and give up a few weeks later. Be consistent and practical and it will become easy and routine as you get more practice.
5 Use high quality ingredients
In most recipes, preparation of ingredients is the most important and time consuming part. Similarly, 60-90% of your effort should occur before the hydrologic model is run for the first time. It almost goes without saying that you would not want rotten and spoiled goods in your dish, but it is surprising how much bad data finds its way into attempted setup of models. Too often people do the modeling equivalent of making the dish, seeing if the result is bad and then trying to guess what ingredient had gone off.
6 Ingredient preparation determines the success of all that follows
I’ve heard people say “Garbage In, Garbage Out” to describe how bad input data will yield bad results. There is also a variant “Garbage In, Gospel Out” to show how much faith we have in model outputs. People also say that “75% of the effort in finishing your dissertation is getting, reformatting, and cleaning up data. About 20% of it is trying to get all your committee members in one room at the same time for your defense.” I am a firm believer that you should spend about twice as much time as you think you need checking all the input data and fixing those problems before going any further.
Eagerly awaiting the next batch out of the oven. I was likely in tears minutes later.
7 Be careful when using substitutions
Clearly, one would never substitute flour for sugar because both are fine white powders. But can sweetener be substituted for sugar? Artificial sweetener can be used in tea and coffee but not for baking. Many other metaphors abound; when can pork substitute for beef? Should diesel be substituted for gasoline (for explosions, perhaps, but not for car fuel)?
Some hydrologic substitutions are appropriate and others are not. Perhaps most importantly, the forcing data (e.g. rainfall) for model setup must be consistent with what is going to be used to drive the model in realtime. For example, you can’t have lots of missing data when you make a forecast. Similarly, weather forecasts or radar rainfall datasets may not have the same “normal” as was used to set up your hydrologic model. Even if these new rainfall fields are better representations of the true rainfall field than what was used to calibrate the hydrologic model, the hydrologic model may not appreciate this. There is a perennial debate among hydrologists about this issue (is it better to be “right” or “consistent”?). My opinion- forecasting may not the best time to try and teach the model a “hard lesson about reality” that it has not been prepared for.
8 Know your equipment, have the right tools
It is not necessary to understand a stove’s innards to cook on it, but it is clearly beneficial to understand in a general sense what all the controls are intended to do. This is even true for functions in which the default is commonly used. Software packages often have a zillion options and maybe you won’t use all of them, but invest some time to learn what they are trying to achieve (otherwise you might end up doing something by hand that could already be automated). For cooking, I am a very strong believer in thermometers because ovens are almost never at their advertised temperature. Would you have a chemistry lab without thermometers?
9 Master the way things should be done before experimenting
It is common for hydrologists to develop their own style when setting up models, perhaps using a series of steps they prefer to go through or set of diagnostics they like to calculate. However, it is best achieve a mastery of the basics before going off and developing new ways of doing things. Learn what good scrambled eggs taste like before charging off with your own technique or falling into a default routine.
A deep fried Mars bar I had in Scotland. A local delicacy, it tastes about the same as it looks.
10 Balance taste with presentation
Diners partly judge a meal based on first impressions. These impressions include presentation, aroma and the initial taste. A poor first impression can be enough to completely turn a diner off a dish. At the same time, cooks can resort to any number of tricks to make a dish appealing, such as serving small portions of off-cuts, ornately decorated with tweezed sprouts. Packing a dish with salt and butter improves the taste but makes it unhealthy. Furthermore, why call a dish “Fingerling mousseline with celery shavings, infused with a sherry-mustard vinaigrette and an emulsion de oeuf and huile de cuisson” when it is only potato salad?
Finally, do not be mystified by hydrologic models or mesmerized by technology. Start simple and build complexity as needed. Use plain language to describe products and forecasting procedures. This will help with transparency and confidence building, assisting the user in making healthy decisions to their long-term benefit. Experiment and be daring but also recognize that unfortunately some customers will pounce on imperfections in early products. Resist the temptation to oversell the quality of something, but instead find a group of users eager to try out new things and who will give constructive feedback.
Tom, great post! Especially #7, a step nearly all real time modeling/forecasting fails (except my old Surface Water Monitor, http://www.hydro.washington.edu/forecast/monitor/) which was explicitly designed to maintain consistency. But there are reasons why that's difficult, some not easy to resolve.
ReplyDeleteAnyway, keep it up! -A. Wood