to our third installment of our GIST Global Innovation through Science and Technology Guru Web Chat series. Guru Web Chats are a way for you, the global audience, to ask our U.S. subject matter experts questions about topics on innovation and science and technology entrepreneurship. Guru Web Chats are only one of many programs that GIST has to offer. I encourage all of you to look at www.gistnetwork.org to find out more. Our guru today is Dr. Chuck Easley, an assistant professor at Stanford Technology Ventures Program. He will be sharing his insights on the topics success factors for entrepreneurial ventures. Chuck will share his research and findings on entrepreneurial teams and mentors, business models that include fixed models and adaptive models, and then what synergies exist among these areas to provide for the most profitable ventures. Chuck has much experience in this area having spent ten years in and around startups. He has founded three startups of his own, is a board member on three additional startups, and has worked with two venture capital firms, flagship ventures, and Lux Capital. He has also launched NovoEd.com, an online learning platform that provides engaging online learning tools, supports a peer to peer network, and helps entrepreneurs learn how to build and lead teams. I'm also proud to say that Chuck has reached over 200,000 students to date with his courses. Chuck is one of our GIST mentors, and he is able to connect with innovators and entrepreneurs globally, from Kenya to Jordan to Nepal. Now if you have any comments or questions during our chat, please use the chat roll on the right hand side of your screen, or use hashtag just guru. So without further ado, Chuck, welcome to our guru series. Thank you so much, and we're really looking forward to your presentation. Sure thing. Thanks, Jazz. It's a real pleasure to be here with you all, and I'm looking forward to the Q&A, but I wanted to go ahead and just jump right in and present a little bit of background information from some of the research that I've been working on. So if you can see my screen, alright? So I want to talk a little bit about some of the success factors for entrepreneurial ventures that I've been working on in terms of research, and then also incorporating into the classroom here at Stanford and also through my online class. So what's different about this course and this approach? So what I try to do is take a science and engineering approach to entrepreneurship being here in the Engineering School at Stanford. So you can think of this as the scientific method applied to startups. So we really try to combine both theory and practice and to be driven by research and areas such as the optimal team composition, what kind of market to approach, ideal characteristics of the idea or technology, and then what I'm going to be focusing on a little bit today is the optimal startup process. So these are a few photos from my classes here at Stanford and online. So some of the former students that I'm particularly proud of, I had Bobby Murphy in the class who went on to create Snapchat. She's a Shahid, who's the executive director of the Malala Foundation. And then you can also see up in the upper right hand corner, Partha Saxena, who is one of the students in the online class and went on to create a very successful company called Tommy Jams. Chuck, just for a moment, I'm not sure if our viewers are able to see your photos. Oh, is the screen share isn't working? Perhaps not. Oh, let me give it one more try to see if I can get it to work. We'd love to see your presentation. I know our viewers are really excited. Yeah, sorry about that. There we go. It's working now? Okay, great. Okay. Terrific. So these were some of the photos of the former students. You can think of the class and also my approach to entrepreneurship in general in terms of this diagram, which basically breaks the entrepreneurial process down into opportunity recognition and then the pursuit of opportunity, gathering the people and organization and resources in capital that are needed to fulfill that opportunity that you found in the market. And then obviously this is all surrounded by a broader policy and cultural environment. So I'm going to be talking today about two approaches to the startup process, a fixed or planning approach, where you have vision, you then plan out the startup and execute on that plan. Alternatively, there's the adaptive approach, where you're open to adapting your vision. You're very open to changing or pivoting that vision. And this is argued to be much more suitable to a very highly uncertain environment that's rapidly changing, such as the one that many entrepreneurs find themselves in. So the other aspect that's often important in entrepreneurship is finding a good mentor. So when we did this study with the online class, in addition to randomizing teams to different startup processes, we also randomized to different types of mentor ties. So on the one hand, you might look for more cohesive ties. So this would be a mentor where you have a lot of overlapping social connections. There's very high trust and perhaps as a result of that better collaboration. On the other hand, you might look for a mentor that has more diverse ties from your own. These connections to people who you don't know offers more novel information and perhaps more novel resources. So we suspected that there might be some interaction between the social network and the mentor that you find and the approach that you bring to the startup process. So what were the findings? We looked at statistical results from data on over a thousand ventures. We looked at their performance both at the end of the class and then the performance of their startup ventures two years later. What we found was that the worst approach was the adaptive approach with a mentor that had cohesive or overlapping network ties with your own or the planning approach at the two-year follow-up resulted in the worst performance in terms of survival, in terms of revenues, and also in terms of raising external funding. The best approach is planning work best at the end of the class. However, two years later in terms of the actual startup outcomes, the adaptive approach, particularly when combined with a mentor who has diverse social network ties from your own, resulted in the best performance in terms of revenues, survival, and external fundraising. So that's a little bit about one of the research projects that I've been working on. I also want to highlight my online class, which is also available via the GIST network and is offered through NOVOED.com. So there are thousands of students signing up, finding mentors, and going through largely the same class that I'm teaching here at Stanford, but available for free online. So thank you all, and Jazz, I'll turn it back over to you for the Q&A. Well, thank you so much, Chuck. You've offered us a lot of insight into an overview of several aspects of the planning versus adaptive approaches. You spoke a little bit about mentors and teams, and we actually have a lot of questions already coming in from our viewers, and we only have about 40 minutes, so I'm going to go ahead and jump right in. The first one we're going to start with is the discussion of these two types of approaches, the planning model and the adaptive model. Shani Querry commented that many startup companies nowadays are based on rethinking of present technology rather than innovating a completely new one. What are your thoughts on the benefits of pursuing one over the other in terms of time and effort? Yeah, so I think what we find from the previous research is that startups often get started in a new market niche and often with a new technology. Now, this doesn't necessarily have to be a completely new to the world technology, so what Shannon's talking about with some minor modification, that's not necessarily a bad idea. Particularly if you're pursuing it in a new market niche, that can often reduce some of the uncertainty and the risk and increase the speed to market. So I think the important thing is to still be adaptive, even though it's a minor modification to the technology. You still need to understand the market side of it, how to do the sales and marketing, distribution, all these things still need to be tested and experimented with. Of course, and that actually leads to a perfect follow-up question we have from the Franklin Center in Tunisia. They asked how a startup can grow and reach beyond the specific community it originally targeted to meet the needs of a wider range of beneficiaries at an international level. And I think you spoke a bit to this in your previous answer, but the main question here is how do you go from a local community to the international marketplace as you balance having a fixed plan in an adaptive approach? Yeah, so the first thing that I would say there is that you really want to make sure that you're completely making the existing market happy before you start to expand. What we see is that a lot of startups tend to expand too quickly and you really want to work out the bugs and make sure that the existing market and existing customers are really saturated before you think about expanding to other markets. The step to international markets in particular, it's increasingly possible with more web-based technologies, there's less need for physical assets and stores to be opened up. So that tempts a lot of people into trying it, but it's still a big step for a relatively young and small startup company. So you need to go through the process again of laying out your hypotheses, testing that new market, making sure that product is really something that suits that need in the international market. And so before you start spending a lot of resources in terms of time and money in going after international markets, you really want to make sure that you've exhausted and completely saturated the local market there, which you often know much more about. Absolutely, I think it's very beneficial for entrepreneurs to know what kind of entrepreneurial ecosystem and the pre-existing culture that they have, because in some areas you might not have an established innovative support system. And entrepreneurs, as you had mentioned earlier, might be more willing to take risks. But on the other hand, if you have an established ecosystem and you do have in-country support, such as from angel investors, then you might be less tolerant of risk because you have a fixed model. So thank you for that question Tunija. Our next question comes from Ethan Lee-Wanag from the United States. And he would like to know, with entrepreneurs learning so much for their first startups, whether they failed or were successful, what can a budding entrepreneur do to get the most out of their first projects? Is it networking, experimentation with techniques, or just plain experience with the successes and failures? So I think when you're thinking about a first startup project, you want to think carefully about the work experience that you've had up until this point. So there's a lot of research by Steve Klupper and others that has shown that work experience at leading companies within the industry gives your eventual startup a much greater likelihood of success. So if you're using some technology that's related to the technology used in the company that you worked in before, or if you're addressing a market that's related to the market that you worked on in your prior employment, that pre-entry work experience turns out to be a really important success factor for your venture. So that's the first thing, is to be strategic about your work experience and to gather some knowledge of the market and the technology while you're working for what's hopefully one of the leading companies in that industry. The second thing is I did some research on first time entrepreneurs relative to serial entrepreneurs that have more startup experience. And what I found is that the first time entrepreneurs have a more level playing field, the more novel the environment and the startup is. So if this is a brand new industry, social networking sites at the time when Facebook was created for instance, or if this is a very novel technology, then even the people in the industry that have years of experience don't have experience relative to this technology or to this brand new industry. So these new markets and very novel technologies offer more of a level playing field for a first time entrepreneur. Great, and actually in our previous guru we talked a lot about robotics and how that was a niche for first time entrepreneurs. So I think that your comments are very key and very important to keep in mind. Another critical point that we talk about with these two different types of approaches is how to secure investment. So we know that, we mentioned a bit previously, angel investors or other investors really want to have a startup that has a very strong business model and can articulate very simply in their pitch what the model will do and how it will enter the market and why it will satisfy means. But then this entire time we've also talked about the need to be adaptive. How do you merge these two approaches when you're looking for investment and selling to the investors that just because you adapt does not mean that your model will fail. Yeah, so I think one of the keys here is that this adaptive approach should actually get you into the market and showing real traction with customers in the market much earlier because if you're willing to go out there and run small scale experiments quickly then that means you're not waiting for months of doing product development before you expose potential users to your product or to your potential solution. So if you've gone through this adaptive process in the right way where you're getting out there early and trying to make potential sales or at least showing some traction with users in the market then by the time you get around to raising money from investors you're going to have a lot more experience with the market, a lot more people using the product and it turns out that it's those milestones in actually getting users and learning things about the market more quickly that tends to reassure investors that you can make rapid progress and that you're also getting the kind of uptake that they're looking for in the market. The other thing I would say has been a lot of research done on the fundraising process and in terms of raising money one of the important things is to have some social network and some connections with investors ahead of time. Ideally when you got to raise money it's not necessarily the first time that you've met these people. So if you can get to know some of the entrepreneurs that they've invested in previously and get connected with them. My colleague Kathy Eisenhardt and one of her former students they did a study of venture capital fundraising and identified a few tactics one of which they call casual dating where you basically before you're actually raising money you start to meet with the investors and the old conventional wisdom that when you're looking for money ask for advice was very key in kind of building up those relationships and getting some early feedback before you make a more formal pitch for funding. And I think that's a perfect way where our mentor segment will come in when we discuss mentors a little bit later but just to keep on this on this topic for now Cara Luba Maria from Pisa, Italy poses this question. What is the next phase of your personal research going to be or more broadly what do you think about the next best thing in researching entrepreneurial ventures is generally. Sure, sure so at this stage for me a lot of my research is driven by the interests of my PhD students so so I'm largely driven by what they're interested in so some of the first year second year PhD students that I'm working with their interests are in clean energy and entrepreneurship so I have one student from China that's been interested in some potential solutions to the need for cleaner energy sources there. Another student is very interested in digital platforms and the strategies of both the complementers that come on to the platform but also the strategies of platform creators and how they think about what aspects of the API to open up to the community and what kind of culture they create on the platform. So I'm very interested in those areas I also have a student that's doing some work with Alibaba in China and then I'm very interested in continuing to do work with online class because I think that's a great avenue for learning more about the startup process. Fantastic well a meal from Milan would like to know why in your opinion and again this might be a why or a whether you agree that competition between startup ecosystems is based more on competition between cities rather than competition between nations and I think it actually is a whether you agree with that statement and if you do what your the reasons would be behind that. Yeah so there has been you know he's picking up on on this debate about whether it's kind of the national level policy or or more the city level factors that shape an entrepreneurial ecosystem and and you know the I think there's some truth to that because you know here in the US you know I'm lucky enough to be here in Silicon Valley and so obviously this Bay Area ecosystem is very unique even even within the US which has the same national level policies throughout. You know I think the right way to think about it is that there is a complex set of factors you know some of which are policy related some of which are cultural or educational so I think Stanford has played a particularly unique role here in the Bay Area in terms of educating a well-trained workforce of engineers and potential entrepreneurs that know both about the management issues but also about the technology and then creating this culture of openness where people are willing to share and kind of pay it forward and help one another out you know these cultural aspects of kind of being community-based and being very open and willing to listen to new ideas even when they come from young inexperienced entrepreneurs you know these are also very important beyond the policies that are set and tend to be set at a more local level. And that's actually something that we've encountered in other programs as well where this there's this constant difference between whether or not there are regulations as you said at a more national level and how that trickles down or if you're at civil society and you're just trying to make progress in an area that might have more economic and developmental challenges so I think that's a fantastic point for our viewers. Yeah this this is actually an area where I've been doing a lot of research in particular so those that are interested can check out my website but we've been looking at both the policy related factors and and also through startup Chile which is an interesting initiative of the Chilean government we've been looking at the transmission of some of these more informal cultural factors and looking at ways that we might actually be able to influence that cultural side as well. And I encourage everyone to go to Chuck's website and we'll also have a link to his presentation on our GIST Network website if you'd like to look at that after the program. So let's go to Icy Kosevo and Christina who asks is it okay to fail or should you be thinking about the entire process clearly from the beginning. So I think what the group is asking here is that maybe you can be a bit more experimental and not have your entire model laid out at first as you're looking for customers or should you have a plan from the time that you have your idea to the time that you're going to the international market. What do you think is better? Yeah so so there's there's a saying that you know you want to avoid paralysis by analysis and and so that's the idea that rather than getting out there and trying things and experimenting you're going to do all the analysis up front and and so I think you know that's that's really a recipe for delaying action and as an entrepreneur I think you've really got to have a bias towards action and so you're never going to have everything planned out from the very beginning and even if you do the world is just too complex and moves too quickly and so you know you certainly want to think carefully about what first experiment you're going to run and what data you're going to try to gather from that first quick and cheap small scale experiment but you really want to be getting out there and running as many quick and easy experiments as possible I mean this shouldn't be on the order of weeks even this should be on the order of hours or days you know so if you're just getting started with with your startup think about you know what's an experiment that I could run in the next two hours that would give me some actual data on the market whether people have this problem and whether they see my potential prototype as a potential solution so that's that's the kind of scale that we're talking about in terms of being adaptive getting out there and actually running some real-world experiments but there's no pressure on entrepreneurs for a two-hour or three-hour experiment these should be cheap and easy you know if it's a two-hour experiment and you fail that's not a disaster it's maybe a disappointment but if you invest you know months or years of your life and then you fail that's that's the problem so it's much easier to fail when it's cheap and quick absolutely and it's interesting when you're talking about action most of our questions look at entrepreneurs as a single individual or we're speaking as though they are siloed from other members of their team because a successful startup especially when you're talking about S&T needs a bunch of other team members you might have web designers you might have engineers and university systems for example often don't have schools interacting with each other that would form these strong teams so this is a natural shift into my next question which is could you tell us a little more of your research on what types of founding teams are the strongest yeah definitely so so the founding team is one of the strongest determinants of the future performance of the venture and and so some of the things that we found through looking at data on thousands of startups and their eventual performance is that larger teams tend to be better performing on average so you know two three person teams even four person teams much more successful than smaller one or two person teams and so the first thing is to have a larger team and part of the reason behind that is one there's just so much work to be done you need the extra hands and sets of brains working on it the second thing is that you then get a greater diversity of skills and so there's been a lot of research showing that the greater functional diversity on the team where functions are defined as marketing engineering sales finance then that you know diversity of skills and diversity of information leads to greater likelihood of performance some of the research that I did looks at how you need to take into consideration the strategy of the startup and also the industry context that you're working in when you're thinking about these team composition matters so in terms of strategy if the venture is taking a very high-tech innovative strategy so you mentioned before robotics for instance so those those types of startups are going to benefit from having a more engineer and scientist heavy founding team and then you also need to think about the industry context that you're in so in an area like biotech where most of the competition is to create the innovation and you're then going to partner with a larger pharmaceutical firm that's going to do the commercialization the downstream marketing and sales then it's also okay to have a more engineer and scientist heavy team but if you're in an area where you really need to develop those downstream capabilities in terms of marketing and distribution you're doing something in retail for instance then you're much much better off having a more functionally diverse team where you have all those different skill sets on the team great and we do know that the heterogeneous teams that tend to do better so that is another important point Jamila from Bermuda asks what is your opinion of accelerators versus incubators to support startups and are they important to have in a developing entrepreneurial ecosystem yeah yeah so so you know accelerators and incubators are type of organization within the startup ecosystem that provides some milestones in terms of development for the startups that are in them but also potentially provide some mentorship and some office space so these have become very popular in recent years and the growth has really been tremendous you know I think the key thing here is not to confuse the organizational form of having an accelerator incubator with the services that are provided so I think the key thing is you know having hard-working talented people supporting the entrepreneurial ecosystem and entrepreneurial community so there's functions of mentorship and coaching startups these are important things but just having an accelerator just having an incubator particularly if it's only offering office space is not particularly likely to lead to a successful ecosystem sure and one of the other questions that we always have is that if you're looking for funding whether the accelerators and incubators would be able to help with that aspect yeah yeah so you know when you're looking to raise money you have to turn over a lot of rocks and pitch a lot of people so I think you know having more sources for funding and potential avenues to raise money through is very helpful but you know everyone still has to be doing their job you know it doesn't take away the hard work that needs to be done on the part of the investors and doing due diligence on the startups that are you know likely to have success in the market it doesn't take away the work that need hard work that needs to be done on the entrepreneur side in terms of going out there running experiments being careful to collect data you know finding a technology that's not just a cool technology but that also you know fits some need in the market and and you know putting together the right kind of team so so these factors are still important and you know if talented individuals are you know willing to put in the work to put together an accelerator I think that's that's helpful that keeps you know good people engaged in the ecosystem but it really comes down to startup by startup basis you know doing that hard work that's involved in finding a good opportunity and then putting together an appropriate organization to pursue it and we actually have two questions some are related to each other about funding then also finding the right people and running the experimentations as you've been saying throughout the presentation one of the viewers developed a new social networking platform and is looking for funding and he said how does he go about finding a venture capitalist even in a place like Silicon Valley and if there are other fundraising strategies you would recommend outside of what you've already asked similarly I'll make it a two-part question Jean Menendez asks what advice you could give someone who's in one field say ICT who is working on a tech startup but in a different discipline so those two so go somewhat together and I was interested in your opinion on both yeah yeah sure so so the first one on fundraising you know I think the first thing is particularly if you're in an environment or in a region in the world where there's not a lot of venture capital or angel investment then I think you want to try to find startup opportunities where you can bootstrap you know it just is going to make things a lot easier if you can start charging money from the users or from the potential customers as a screen to whether you should pursue this kind of startup opportunity so you know it's very difficult to pursue raising money outside of the region that you're living in most angel investors and venture capitalists like to invest locally you know they can monitor the startup more easily gather information better so it's going to tend to be better if you can try to raise money from successful business people or angel investors or you know VCs if they're there locally in your environment if they're not there locally in your environment then you've just got to screen through more startup opportunities to find ones where you can really bootstrap and start charging customers and if you can start charging customers and actually making some money on on your own then it becomes much easier to raise money so ironically the less that you need it the easier that it becomes so so I think in that kind of region you know if you're having you know first of all you should try different revenue models experiment to find what works and then try to find something where you can bootstrap the venture if if at all possible the second question on startup ideas that are outside of the area of your industry expertise so this often happens so one of the interesting things a former colleague Kareem Lakhani who's now at HBS has found that often people that solve difficult technical problems often come at it with a novel approach and that usually means an approach from outside of the traditional industry but everything that I said before about the importance of work experience in the industry still applies so I think that's a case where you've really got to find some co-founders that have experience work experience in that industry so it may take a bit of networking to find people who both have the relevant industry experience and who you have a shared vision and some some common trust with that you could imagine you know working these long hours that are often the case in startups with but that time that you spend in building the right team is really going to pay off down down the line in terms of the success of the venture and we have heard that a lot of startups end up working from 7 a.m. until 10 p.m. seven days a week so you probably do want to like the the team members that you've chosen that's right that's right so it's it's a tricky trade-off I mean on the one hand ideally you want people that you've worked with in the past as part of your work experience because then you know you can get through those long days and still enjoy being around this person on the other hand you want to you know look broadly enough that you're getting the diversity of skills and diversity of backgrounds that are going to make your venture more successful on average sure well I'm going to change topics completely we have a group called cram a that is based in scuola santa ana in pisa italy and they have a question about intellectual property rights also called IPR and appropriation strategies in web based ecosystems how should startups manage IPR to balance collaborative communities in competitive markets and what they're clarifying a bit is without bearing the risk of losing their technological knowledge and we do get this a lot is that when you find individuals how do you know that they're not going to have their their concepts stolen as they're trying to be collaborative so if you could speak to IPR a little bit that would that would be helpful sure sure yeah so intellectual property rights using patents or copyright to to protect your inventions so you know this is a tricky thing for startups because you know while it's good to apply for a patent or copyright and have that actually enforcing it and protecting it usually requires a lot of money if you're going to actually sue someone for infringement and so most startups don't have a lot of extra cash lying around to to be paying lawyers and and so speed to market winds up being really important uh and and you know i'd say the way to think about this the way i tell my students is that you're trading off two different risks so one risk which i think on average people tend to overweight the likelihood of is the risk of getting your idea stolen and successfully developed by someone else uh the other risk which i think is actually much more prevalent and and should be more top of mind to people is the risk that you don't talk with enough people to sufficiently develop your idea and and to rapidly enough learn you know learn about the market and learn about the true customer needs and and as i've been saying you adapt the solution and and the business model to to really work uh so so you know there's a tendency i think especially among technologists to overweight the importance of the technology and the likelihood that it's going to be stolen and to underweight all of the other aspects of the startup in terms of learning about the market putting together the people and the organization um and and so i think you know uh while while you want to be careful uh with your technology and certainly uh you know apply for patents when appropriate and and you know not share all of the technical details too widely uh the much bigger risk is that you're not going to talk with enough people to sufficiently develop the idea and and to test the market so this is also why it's very important to run these kind of quick and easy small scale experiments so for instance you know if jaz if you and i were doing a startup and we were going to do another grocery delivery company uh you know one one approach that we might take is that we might do a very quick and easy experiment for instance where we might target um you know an office building or one one residential building and we might go through and and distribute flyers you know advertising or grocery delivery business and saying you know if you're interested send an email to this address or you know go go to this uh splash page landing page and leave your email address there uh and so we can very quickly determine okay there's probably 200 people in this office building uh and you know two days later we got uh 50 emails so you know one quarter of the people in this office building were interested in our our jazz and chucks grocery delivery service uh then we could go out and you know it wouldn't be too much work to make uh 50 grocery deliveries over the coming week and we'd actually have some revenue coming in we'd be start starting to bootstrap uh now that you know that doesn't advertise the startup idea everywhere right we didn't put it out there on social media uh we we didn't you know put all the details of how it works up on the web you know the the risk of it being stolen was confined to one of those 200 people in that particular building which is pretty unlikely and we quickly got some feedback from the market in terms of people expressing real interest so that's the kind of thing that i'm talking about with you know a small scale quick and easy experiment uh limited in scope you know if it didn't work out with that particular building we could try a different idea on you know building a few blocks down and and no harm done well if you do start a grocery delivery business i will happily be your co-founder i think um chuck and chaz has a nice ring to it definitely keep me in mind um so we have another question tony chi asks how do early startup handle risks which you've gone into a little bit and it's plain conservatively helpful for a startup and i think this is probably more of an emphasis of what you just described but um perhaps in some of the countries where our viewers are watching from there's a cultural resistance to risk and i think that might be where the the question might be leading yeah yeah so this is this is a great question and you know the way to handle risk is to think about it in terms of uncertainty or knowledge that you don't have and then to think about the the cheapest quickest experiment that you can run in the real world uh that would reduce that uncertainty uh so so in the case that i was just talking about um you know there's some uncertainty about whether there's going to be sufficient market demand for this uh so so you know risk is painful you know if we spent if we spent the next year developing this great website and mobile app with all these grocery delivery technologies and you know working out the algorithm of how it was going to send drivers to which location at what optimal time uh you know we invest a year of our lives in all of this before launching it to those 200 people in the residential complex then that's real risk you know we're risking a year of our lives you know potentially a lot of our own personal savings and developing it but you know if we spend three days uh printing out some flyers and putting them up in one building you know it might not even take three days it might take an afternoon uh you know then you're risking really very little and and you're very quickly uh learning uh those things that were uncertain to you and that were causing the risk right so so once we start to get customers coming in then then that reduces the risk that that there's not enough market demand to support this venture so i so i'd say you know the way to think about risk is turn it into very quick very easy small scale experiments uh where you're you know carefully tracking some data uh that's gonna either disconfirm your idea uh or that's gonna provide you with some real users and some real customers to to carry the idea forward uh and and so if you're doing things in that kind of quick cheap experimentation adaptive kind of way uh then risk turns out to be much less of a big deal um so so uh so did that did that answer the question was there was there a second i feel like there was a second follow-up that i that i forgot about uh no actually and we're running uh short on time so i want to just go to cover mentors before we finish for today sure you focused on mentors initially as being a key success for your entrepreneurs what was the process that your students undertook to find those mentors was it the same as finding team members or was there a different component yeah so in the online class there's two different ways to find a mentor so one is through the platform itself uh so on the novo ad site uh a number of uh we have a couple of hundred mentors that typically sign up and post a bio and students can search among them to find someone with relevant industry expertise the other way is to search in their local communities so i encourage people to try to think of someone who's either done a related startup uh or who is a business person working in a in a related industry uh in their local environment and you know related to what i've been talking about these kinds of people who are uh you know a bit older and have a bit more industry experience they've seen a lot of experiments so to speak having been run in the market you know they might have launched related products in the same market they've seen how that went what worked well what didn't work well uh so this is kind of the equivalent of reading the scientific literature so to speak uh before you come up with your hypothesis for your venture so you want to know what experiments have been run already so that you're not repeating experiments that people have already run but you're actually running new experiments where you're going to learn new things uh so i think networking in your community um you know is is a key way and again looking for people that have diverse ties from your own uh that can bring in some novel information and that have industry experience in the sector that your startup is working in and i think it's really important that you emphasize that using um novo ed or other online platforms to both find resources and mentors is very good advice especially or the the gist network as well exactly yeah and um on our new website if if you our viewers would like to go and register on gist you get a whole host of mentors and uh peer-to-peer network just kind of like novo ed and we encourage you to fill out a profile and it is another resource that you have if it's not easy to find a local mentor you never know what you'll come up with so we'd like to ask a question that's very similar to having the right team members as we spoke of before can you give us an example of a mentor entrepreneur relationship that led to a successful venture or maybe on the other hand uh give us the the reverse of this and say whether or not a mentor entrepreneur relationship was not successful in advancing the startup yeah let's see um so so there have been a number of uh successful mentor-mentee relationships uh from my classes um uh so i'm trying to think of particular examples uh so tommy jams uh who i mentioned before uh parth saksina uh was an entrepreneur in india uh he and he and his co-founder were working at microsoft and intel in india uh they joined my online class uh they wound up uh getting mentored uh by by a couple of mentors um benson young i think was one of them um uh greg jorgensen is another one who's been doing a lot of mentoring um and and so they really credit uh that mentorship with helping them uh get to market quickly and and encouraging them to you know really get out there so what they were doing is basically matching up music venues uh with fans and and bands and musical artists and allowing the local fans to vote on which musicians they wanted to see local venues uh so this is worked very well they've expanded throughout india and and also in chile and and the united states now uh and and so parth i know really credits a lot of the mentors that he worked with uh through novo ad with providing the guidance in in the early market experience experiments and uh feedback on the early prototypes and helping them get to market um you know in terms of uh in terms of less successful ones um you know i think it's it's really a two-way street you know both both the entrepreneur has to you know kind of organize their schedule around the mentor the mentors are usually quite busy people and and they they want a mentor but they want this process to to be an easy and enjoyable one so the entrepreneur has got to do some things you know in in terms of some of the feedback that i've heard from from entrepreneurs from mentors is that they want the entrepreneur to approach with a short message that lays out specifically what they're looking for in terms of help from the mentor and then that makes it much easier for the mentors to engage and and in an ideal relationship the mentor also learns something from this you know they get to see what the entrepreneur is doing you know this this new uh entrepreneurial idea and and in the best relationships the learning really goes in both directions so when you invest in the entrepreneur you're really also investing in yourself that's right that's right you're extending your network you're getting to learn about new technologies so when when done well there's really benefits both ways great um well we have a viewing group in glow bermuda who wants to know with regard to teams what is the recommended time for a development team to be committed to the startup yeah so i think this is gonna be shaped by the early experiments so you know from the question it sounds like they're already thinking about this in the right way and that you know it's great to work on a startup and what they call them a moonlighting basis where you're you're maybe working full-time but then working on the startup in the evenings and weekends so you want to you know one be careful to really clearly separate your full-time job from the startup you want to be working on those really separately so you don't run into any problems with with your employer but it's you know it's great to be doing some of those initial market experiments and getting the the prototype or getting you know some really basic form of the potential solution in front of potential users and potential customers and and hopefully actually making some sales or getting some purchase orders for that potential product once once you start you know getting to that point where you're actually making some money and beginning to bootstrap the startup you know that's that's obviously one point where you can decide okay it's time to to leave a full-time job and and work on this in a more committed way if you're getting enough traction in the market in terms of accumulating users that you're able to take that to an investor and raise some money from an angel or local VC then obviously that's going to be a point before an investor puts in money they're going to want to see you working on this full-time so you know once once you're able to raise enough money that you have you know a few months to a year where you can work on this separately then that's also a good time but but you know it's going to depend on on the feedback from the experiments that you're doing in the market and and you know if those are going well then you're going to move closer to actually leaving if those aren't going well then you need to spend more time in this adaptation experimentation and until you get something that is working in the market better great now we have one last question from our viewers before we go and Chuck I am not going to make this easy for you at all the question is what do you think about the current debate on quote disrupting the disruptive innovation model unquote has disruptive innovation outlived its usefulness that you viewer asks or is there a new model that you think will take its place yeah so the way I think about this is that you know this is kind of what what my PhD students and colleagues and I have been working on in terms of thinking about the optimal startup process you know so so I think you know there are ways that people have been going about doing startups for years and what we're really trying to do is to study that whole process and to gather some data that really shows you know how what are the success factors early on in the life of the venture that we can show with data actually work and then what does that inform us about about the startup process so so I think you know this this is the endeavor that that we're all engaged in you know some of it is through is going to be through people from the world of practice from industry you know doing new models of accelerators or incubators and I think the experimentation there is very important you know people talk about is there a bubble in accelerators you know there's been such growth in that area and I think that's a sign that rather than just replicating the exact same models and another accelerator what you want to be doing is trying to innovate on the model and and you know trying something new offering different services to the entrepreneurs figuring out what problems are people encountering and finding a solution to those problems so I think it's the same thing with the with the disruptive startup process you want to figure out you know what real world problems are entrepreneurs or investors encountering and then if you can think of a new creative idea on how to solve that problem then that's a great way to to disrupt or to improve on the startup model but to me the whole thing really comes down to problem solving you know there's got to be a real world problem there and and if there's a potential solution then it's worth trying a different model and I think this this idea of the disruptive approach can be a presentation in of itself so that's right we can do a whole another session so we'll invite you back Chuck and next month we will we'll do this disruption that'd be terrific I am going to exercise my rights as a moderator to have the privilege to ask you the same question we always ask of our guru experts which is of everything that you discussed today Chuck what is the one takeaway you want our viewers to have yeah so I think the one takeaway is that an adaptive approach to the startup process when paired with the right kind of mentor that has diverse network ties from your own is a great recipe for increasing the likelihood of a successful venture and and that's what I really try to do with my work I want the next generation of entrepreneurs to have the greatest chances of success possible and so hopefully some of the things that I've said about rapid cheap and easy experimentation and and being open to adaptation and forming the right kind of team around the venture will lead some of the folks who have been watching to create the next successful venture and and hopefully pass along that knowledge to others thank you Chuck well I know that I found this to be a truly thought-provoking presentation and discussion I am really sorry that we have to end for today but to our viewers we will have a link to all of Chuck's presentations and his online resources on the just network website so once the presentation concludes you can always reference it and if you want to follow Chuck go to his website and then I also want to give a special thanks to the viewing groups we have in Icy Kosovo and Christina Franklin Center in Tunisia participants in Pisa, Italy and Bermuda and to everyone else who's viewing there around the world I'd also like to remind viewers that our just tech eye semifinalists are posted to the tech eye voting portion of our website and you should vote daily for your favorite semifinalists or semifinalists and also for the opportunity to win a just regional start-up bootcamp which teaches entrepreneurs starting skills and gives mentors to individuals who are selected so please start voting today and you can continue to vote until May 1st so again I'd like to thank you Chuck thank you viewers and that's all we have for today I'm Jazz Ossary saying thank innovate and improve our world


So hello and welcome to this tutorial on using the Geoclaw software for modeling Tsunamis, storm surge, dam break problems and other flow over topography. This is a general package of software that I'll tell you a little bit about and go through a short tutorial about how to use it. So my name is Randy Levec. I'm one of the core developers of Geoclaw and I am speaking to you from the University of Washington in Seattle if you're not familiar with this area. Seattle is here in the Qtid Sound and one reason that we worry a lot about Tsunamis in this region is that every few hundred years there's a magnitude 9 subduction zone earthquake, a Cascadia subduction zone offshore and the next time that happens the coast of Washington is going to be in serious trouble. So a lot of what we do in my group is to work on modeling the coast of Washington and assess it for tsunami hazards and help design vertical evacuation structures and other things. So we've been using Geoclaw pretty heavily in some of these applications. So I'm going to start with some slides, introduce the methods and the software a little bit and then go into a hands-on demo. I hope this is coming through. Can somebody just respond to let me know that you're hearing this okay? Yep, I can hear you well. Okay, great. Thank you. Okay, so the software is based on the claw pack package of software which stands for conservation laws package and this is a package that we started developing in 1994 and has been kind of a continuous development ever since that solves systems of hyperbolic partial differential equations that model wave propagation in various applications areas. The tsunami and Geoclaw aspect of it started around 2004 around the time of the big sumatra first wave and tsunami in some pieces worked by David George and he applied claw pack to tsunamis and started tsunami claw and then as we realized that it was useful for many other sorts of overland flow it morphed into Geoclaw. David George still works on Geoclaw and on something called D-Flaw for debris flow without SK's volcano observatory in your port and Oregon and works on a version of the code that can also be used for landslide and the free flow modeling, but I won't talk about that for you. Just some features of the Geoclaw software in general it's for solving two-dimensional shallow water equations typically over topography and it handles shoreline or the edge of the flow by allowing some grid cells to be dry. The depth of water is zero, they're dry, it's positive, they're wet, and that can change dynamically from time step to time step. So we don't impose boundary conditions at a moving boundary. Instead, we just handle the interface between what the dry cells. Another big component of Geoclaw is that it uses adaptive mesh refinement quite typically in sort of block structure and manner which I'll show you some examples of in a moment and then within each adaptive grid it uses shock capturing finite-value methods, high-resolution methods that have been developed over the last 30 years or so, but effectively capture the flow even if you have discontinuities forming a hydraulic jump, for example, as a wave comes on shore and it comes highly non-linear. We don't have sort of massive parallelization built into the Geoclaw software, but it does work with OpenMP on shared memory machines. So I do a lot of tsunami modeling just on my laptop using four cores, for example, or nodes of a cluster using maybe 12 or 24 cores. We'll have used it with 100 cores or so to summarize problems. The main claw pack software is all written in Fortran, the sort of adaptive mesh refinement code, but we use Python for the heavily for the interface for specifying the input parameters and for plotting a solution. All of the development of claw pack and Geoclaw's part of claw pack still is developed on github, so you can sort of follow what's going on through the pull requests and discussions there. We use continuous integration using Travis, so at any time those pull requests or requests get run. There's a number of people who have been heavily involved in developing different aspects of claw pack and Geoclaw, just the two people who've been the core developers over the last few years. Marcia Berger developed the adaptive mesh refinement portions of claw pack originally and they still have been involved. Kyle Mandley, a farmer student in Columbia who's worked a lot on a storm surge modeling, Geoclaw, David Ketchum at Taust has also contributed a lot to the claw pack software. If you're interested in how we go about developing this large software, we have a paper from a couple of years ago that describes a lot of our development approaches may be interesting to you. So Geoclaw is specific from the shallow water equations. There's also some multi-layer shallow water equations in Geoclaw that Kyle's been developing. And as I said, David George, for example, has been looking at more complicated realities for end sites and the pre-flows. But the basic code that we use for tsunami modeling in particular is the two-dimensional shallow water equations. So in these equations, each is the depth of the water fluid. U and V are the velocity in two horizontal directions and they're sort of depth to average velocity. So there's only a single velocity at each point. This one-half gh squared appearing in the momentum equations is the hydrostatic pressure. And the B on the right-hand side, capital B, is the bathymetry or topography. Describing the topography that the flow is going over. If B is negative and it's under water, the bathymetry, if B is positive, then it's above-short topography. Although as the wave inundates dry land, the depth can be positive even in regions of positive topography. So as I mentioned, there's a number of applications that Geoclaw has been used on. And I'll show a couple of examples starting with a dam break problem just because it nicely sort of illustrates the adaptive mesh refinement and the wetting at the margin of the flow. And then a couple of examples from tsunami modeling, which as I said, I mostly work on. And if you're interested in that, the animation that I showed at the very beginning and a number of other animations and reports on different projects can be found at this link. All of these screen links in the PDF file should be clickable, and those are shared. I won't talk about storm surge in particular, but here's one paper in particular by Kyle and Clint Dawson on comparing Geoclaw to answer for storm surge simulation. So just to start showing you how the adaptive refinement works. This is a test problem that Dave Jordan ran many years ago now on the Malta Seydan failure from 1959. This dam in France was filled up and shortly thereafter it exploded and there was a large flood that went down the valley. The dam was up here at the top of the valley. Flood went down this valley and there was probably a bit of information about exactly how it progressed down the valley as it passed out to the power plants along the way, our stations. And so it's been used as a test problem for various overland flooding routes. So these plots came from his work in 2011, which you can find in this paper. And it illustrates that we start with a Cartesian grid over in this case, I think just use coordinates that were meters often we use longitude, but it still logically rectangle the grids that we use. And we typically start with a very coarse grid in the region where nothing is happening, where the dry land is doesn't seem to be modeled with any great resolution since there's no flow over it. So we start with a very coarse grid that they did with 400 meter grid cells. And then what you see here is a level two grid, which has been refined by a factor of eight each direction in this case, I guess from 400 meters down to 50 meters. And you see the original reservoir behind the dam, which is here. And then at this initial time, there's only two levels, but then as the flow starts to move. Additional levels of level three grid was added here for the grid lines aren't shown, but it's at a 12 meter resolution. And then these even smaller patches inside that are three meter resolution over the top. And as the water flows down the valley, the region is of refinement automatically adapt all of the flow. So there's some criterion that's built into the code. And there's actually several that the user can choose from you to specify how to do the adaptive refinement. But the basic idea is that each time step on, well, each regrinding time, which might be several time steps on each level, you would flag a certain set of points as meeting refinements in this case, maybe because there's water there. So flagging a certain wet cell gets flagged. And then those wet cells, applied cells get flustered into rectangular patches. All of these little rectangles that you see here are level four patches. So they're all the same resolution, but they've been chosen to try to cover the area that was flagged with relatively few other cells refined that hadn't been flagged. But also you don't want too many individual grid patches, because you have to exchange information between patches, each time step has boundary conditions and explicit method that's used to advance the solution. So there's a criterion and a parameter that can be set also in the input that controls how many patches it tends to make. And then as the flow evolves, it will define more and more of the region. I wanted to mention one other problem of this nature. If you're interested in dam break problems or overland flow because this paper just came out last week. And in fact, just today, it made the EOS AGU website as a editor's highlight. So I'm very happy about that. Now this is a paper of some work by Mike Krzewski, PhD student in open space sciences here, working with Kate Huntington and myself on the geoclaw modeling. And he modeled a lake that was created by landslide in the Himalayas in the year 2000. That landslide failed and drained the lake. And there was a big flood that went hundreds of kilometers downstream. So he actually modeled a 400 kilometers stretch of this river down to a resolution of 15 meter grid cells in some places compared to different resolutions, different friction factors, compared to numerical results coming out of geoclaw with some field data from field work they've done in this area. So nice results and there's a number of animations that are in the supplementary materials along with this paper. So recommend taking a look at that if you're interested in this type of problem. So going back to the shallow water equations and tsunami modeling. So I mentioned that adaptive refinement is crucial. Let's us follow, for example, complicated river valleys with the fine grids only where there's water essentially. And we can also handle the webbing and drying. The other thing I wanted to point out here, the first issue listed here is that there's in the case of tsunami modeling or storm surge where you're looking at waves long wavelength waves over the ocean. You typically have waves that out in the deep ocean are very small amplitude, compared to the depth of the ocean. And we're solving typically on an ocean at rest initially before things start moving in the tsunami. And so if you look at these equations in the case where you and me, the velocities are both zero, then everything drops out of the momentum equations except the hydrostatic pressure, the one half g h squared, and the right hand side, which depends on the variations and And those two terms can both be very large because you have variations in the depth of the ocean. And so you need to maintain a balance between those two terms. So the way that the numerical methods are implemented have to be done in a manner that we call a well balanced method of this balance in a study state situation. That's exactly preserved by the numerical method. And then that has to also happen when you're using adaptive mesh refinement because you have patch boundaries that are all over the ocean and regions where there is no tsunami yet, for example. And so getting that to work properly with the adaptive mesh refinement on and together with the wedding and drying as flow in and date on land was one of the originals of the major challenges that they've been working on. But that's working well now. So just to give you an idea of some scales I'm talking about this is an example that will look at it as a best problem. This is the 2010 tsunami generated by an earthquake off the coast of Chile. And this is three hours after the earthquake or the wave has propagated out this point that's indicated here with a number is what's called a dark buoy of deep ocean assessment and reporting the tsunamis. And that's what art stands for the pressure gauges at various locations in the ocean on the sea floor that can measure the hydrostatic pressure of water well enough to the sense the tsunami going by, which is a major part of the early warning system for tsunamis in the world. This is also a great source of data for doing comparisons and validation that I put. So I'm going to look at this example that's going to work for the gauge computational gauge to see what tsunami is recorded there and how it compares to the actual tsunami. But at the moment what I want to show you is the along this transect, but it looks like if we take the cross section of the topography. So down on the bottom here, and this is shown at sort of the resolution that we might be using for the tsunami out in the ocean. And so it's a piecewise constant approximation to the sea floor. This is the coast of Chile on the right, and it goes down to a trench here that's more than six kilometers deep. And then the average depth of the ocean is about 4000 meters or so. And you can see that from one grid cell to the next you can have jumps of hundreds of meters. On the other hand, if you look at the surface here, well it looks like nothing is happening here but if you zoom in on the surface in the top plot over the top 20 centimeters what you see is the tsunami wave. And for scale here, this is 500 kilometers. So the wavelength of these tsunamis is very long. The amplitude, on the other hand, is very small compared to the depth of the ocean. But as it approaches the shore, it can amplify the shoaling and give much people to run up in some areas, especially in the near shore area, the part of this one that is actually a little bit chilly. But the part that's traveling across the ocean is typically less than a meter amplitude and very long wavelength. And it's very important to be able to model these small changes in the surface relative to the huge changes in the topography underneath it. And we're solving, again, the shallow water equation with this piecewise constant, the symmetry underneath it. So this well balancing is a critical aspect in doing tsunami simulation or storm surge simulation. So here's one more example of an adaptive mesh refinement in the context of a tsunami model. This was a test problem from a benchmarking workshop a few years ago on looking at currents and cargers. Modeling currents that are generated by tsunamis can be even more sensitive and difficult in modeling the actual inundation depth. So there's a workshop in Portland a couple of years ago sponsored by the National Tsunami Hazard Mitigation Program, where a dozen different tsunami modeling groups came together and tested our codes on a number of different benchmark problems. So this is the North Island of New Zealand, you see here in the center on the Tsunami region where we have the adaptive refinement. This is 15 and a half hours after the Tohoku earthquake off the coast of Japan in 2011. And the zoom in further than what you see on the right here is an entrance to this Taronga Harbor in New Zealand, where there were some gauges that measured both the amplitude and the velocity of the waves as they came into the harbor. So here's a zoom on the entrance of that harbor. There was an APCP acoustic Doppler current profiler in the entrance here that measured current velocities. There's also a point out here and another point, tide gauge in the harbor where the surface elevation was measured. And what you see on the right is the actual data from those locations after moving the tide. You always have to be tied the data that moves out of these sort of gauges or dark blue data. And so this ADPN out here, what you see here, the black is the actual observed surface elevation after detaching at that point. While the red is the geoclaw simulation over the same time period. And again, remember this is 15 and a half hours after the earthquake. We propagated all the way across the ocean and we're capturing waves that are less than half a meter high at this location. And at this tide gauge inside the harbor, similar sort of results. The velocities of the current, as I said, are harder to capture accurately, but we still get at least the right magnitude. This is the east-west or south components of velocity and then the total speed. So that was the test problem that we were looking at in this case. And to go back to the sort of adaptive mesh refinement, as you can see, we have a very fine grid here near the harbor. And a relatively fine grid around the North Island of New Zealand. But going back to the ocean, we see that Australia is not very well resolved. North America is not resolved. Japan doesn't even appear at this resolution. But if we went back to the initial time, or say three hours after the earthquake, then our adaptive mesh refinement is centered around Japan where the earthquake was generated. And at this resolution, we're not resolving New Zealand at all, so we don't see anything in the zoom pictures. And then as the tsunami propagates, we use our adaptive mesh refinement to follow the waves. In this case, we're interested in the ones headed towards New Zealand. So we have some guidance and code to follow the portion of the waves that are headed in that direction. So nine hours after the earthquake, by using adaptive mesh refinement, we've calculated the tsunami up to this point. Using only about three minutes of wall time on quad-core MacBook laptop computer. So propagating across the ocean, since we don't need terribly fine grids in the ocean. And if we judiciously use the adaptive mesh refinement, we can actually solve the tsunami propagation problem quite quickly across the ocean. Then things start to bog down once we start refining near the destination. So 12 hours after the earthquake, the waves are starting to approach New Zealand and they're starting to refine North Island. We still don't have much resolution of the harbor. Obviously it's five minutes of relaxed time now. And then as we start to refine the harbor, you see the computing time starts to go up dramatically. 19 minutes at this point where we're now resolving the harbor fully. And then three hours of computing time to get up to 15 hours is simulated. And almost all of that work is in computing what's going on right around this harbor. But by using adaptive refinement, we only need to put those very fine grids right there. And typically in doing inundation studies of modeling currents and harbors, we want to go down to many locations. There's one third arc second data available, which is about 10 meter resolution. That's very, very fine compared to the grids that we're using out of motion. Okay, so let me turn now to saying a little bit about how they use GeoCa. And the first thing to do is to get it installed. So I'm not going to go through that in detail. But we do have a recently revamped documentation page on installing Plotpack that we hope makes it a little easier to follow. And in many cases you can simply do it with a PIP install. Basically this downloads a version of the code and sets a Python path and some other paths that are needed to find things in Plotpack. There's also a version of Plotpack called Pyclaw, which is kind of a pure Python version, but it still uses Fortran, Remon solvers, the kind of basic building blocks that use finite volume methods for hyperbolic problems. And so it also pre-compiles some Remon solvers using F2Py, so they can actually be called from Python. But that's not used for GeoCa directly. GeoCa we typically use a much bigger set of Fortran regimes than GeoCa. So there are various other options for using Plotpack besides using the PIP install. You can clone the repository and then do a PIP install locally or just use Python path environment variable. You can also use Docker. We have a Docker file that's relatively easy to use Plotpack by bringing down all of the dependencies that it needs. GeoCa and as well as several different Python packages that you don't have to install anything else on your laptop. You have Docker installed. There's also options like binder for Jupyter notebooks, which we'll look at in a moment. Anyway, if you do install it on your own computer, what you'll find when you look in the Plotpack directory, the main rectory is that there's actually the way it's organized on Git. There are several sub-repositories. There are often different people who are working on developing things in different repositories. So we split up the whole Plotpack project into several different sub-repositories that are interrelated and typically use each other. So there's a PyClaw repository and a classic repository, which is the for the FORTRAN code working on a single grid without adaptive mesh refinement. The RIMON directory or repository has RIMON solvers for many different hyperbolic problems, acoustics, objection, boiler equations, and other compressible flavors. Claw utility is some utilities that are used all over the place. And then Vizclaw is a set of visualization tools written in Python for visualizing what comes out of either PyClaw or EMRclaw or GeoClaw. EMRclaw is the adaptive mesh refinement version of Plotpack that is more generic and can be used for industrial gas dynamics, for example. Well, GeoClaw uses many of the routines directly from EMRclaw, but then has its own version of many of the routines in order to properly handle flow. There's also a doc repository where we have all of our documentation, which we develop using Sphinx, and then that's pushed to another repository that displays it on the websites. And then when you install the basic ClawPack, you don't automatically get the apps repository, but we have another repository that has a number of different applications in it that we can develop and that other people have contributed. In particular, there's a tsunami subdirectory and a surge example of subdirectory, which is actually a sub repository of apps. There's a notebooks directory that has some additional Jupyter notebooks that illustrate how to use some of the tools in Plotpack and GeoClaw. Within GeoClaw, if you go into that directory, what you find, there's a set of documentation on that if you go to Plotpack.org. And the GeoClaw documentation describes all these things in more detail. But the main ClawPack slash GeoClaw directory contains a source subdirectory, SRC, that has in particular the source code for shallow water equations. And it also has a Python subdirectory that has a number of Python tools that are specific to working with data that goes into or comes out of GeoClaw. And in particular, there's a module called TopoTools that is designed to help work with topography files, DEM files that describe the topography, but that goes in as one of the inputs in GeoClaw. And DtopoTools, Dtopo, we refer to moving topography, changes in topography. So, for example, when an earthquake happens, the C-floor is uplifted, and there's a standard way of generating C-floor displacement from slip on a fault point called the Okada model that basically solves a elastic half-space problem and computes the uplift of the surface due to a dislocation deep in the interior. And that Okada model, for example, is implemented in the DtopoTools module, so you can read in both parameters for earthquakes in several different formats, and calculate the C-floor definition. Also, within ClawPak slash GeoClaw, and also in the other repositories like AMR Claw and TASLA, there's a test directory that has some basic tests. TravisCI is a continuous integration system that gets automatically invoked in time. This time, we do a pull request on GitHub and it runs all of these tests and reports if any of them fail, which is one way to help make sure that we don't break things inadvertently as we're modifying the code. These are really important since we have these different repositories coupled together that may get changed independently, and so some of these tests are sort of interdependent between repositories as well. So in many of the ClawPak repositories, including GeoClaw and the examples directory, which has within it several subdirectories with different examples to help with your study. So the examples we're going to look at today are based on the example that's in this Chile 2010 example that comes built into GeoClaw. Although I was served to find the other day that there's a MakeTopo.py routine in there that's currently broken because of the ways URL is not getting properly resolved. MakeTopo.py downloads some topography data that's needed to run this example. So if you actually downloaded GeoClaw and go into that directory and try to run the example, it doesn't work at the moment. So the example that I'll show you that some of this GitHub repository specific for this tutorial has that fixed and you could use that. You can make Topo.py or the one that's in the master branch on GitHub. If you want to run the example that's in the current version of the 550 implementation, which hopefully we will be updating soon. So as I mentioned in GeoClaw, mostly what we're running is the actual Fortran code. And we have a MakeFile system to help check dependencies so that you don't have to recompile all of the routines of GeoClaw every time you change one routine. If you changed the specification of how you want to make the plots, you don't necessarily have to rerun the code in order to make the plots. So it's a little bit complicated. There's some documentation that you might want to read through. But the basic idea that is important to understand is that our basic MakeFile has definition of a set of targets that start with dots. And when you do Make.data, for example, it takes setrun.py, which I'll talk about in a moment, which is a file that a Python script that sort of sets up the input parameters for GeoClaw in a relatively user-friendly way. And it converts that Python code, runs that code to create a set of files that's typically in with dot data that are read in by the Fortran. So the Fortran code actually reads in a simpler format than that specified in setrun.py, and doing Make.data run setrun creates the input for the Fortran. But it also, when you do Make.data, creates a file called .data, which is a hidden file on Linux. So if you type this ls, you won't see it, and ls, you'll see the hidden files. But it uses the date of creation of that file for checking dependencies. So if we later rerun the code, it knows whether it has to rerun setrun.py in order to refresh the data or whether it's already up to this. And then there are similar targets like .exe would compile the Fortran code, checking dependencies, and making sure that you don't leave compile. Routine, if it's already been recently compiled, and it uses also the dates of the .o file compared to .f or .f. And then Make.output would run the code. But it checks the dependencies to make sure that the Fortran code is up-to-date, and that the data is up-to-date before running the code. And similarly, Make.outputs will use another Python script setplot.plot that specifies what sort of plots you want. But before doing that, it would check that the output is actually up-to-date. If you do make plots without the .pistol plots, then it would just run the plotting routines based on whatever output is currently there without checking whether it was up-to-date with the setrun.py, for example. So setrun.py, as I mentioned, will look at one in a moment. It's a Python code that allows you to set up the input data and has lots of comments in it. Typically, if you're starting a new example and using Geoflog, and you don't want to write this from scratch, you want to find an example that does something similar to what you're trying to do and just copy it over and modify what you need to to change it. And again, when you execute the setrun.py or type Make.data or Make.data, then it creates a set of files that are actually read-in by the Fortran. And then when you run the code, it creates a directory, which typically we use underscore output as the name of that directory, but that's specified in the Make file, which means that if you want to. And within that directory, it has a set of files that have names like fort.t0000, fort.t001, and so on. One for each output time. How many output times you want is specified in the setrun.py. But for each output time, there's a very short file that just has some basic information about that particular output time, what the time is, how many AMR grids there are at that time, a bit of other information. And then if you're creating ASCII output, there's a set of fort.t0000Q files that go along with it that actually have the solution on all of the grids at that corresponding time. You also have the option when you run the code to specify binary output, which is a little bit smaller, but we look that directly as these look. In which case the fort.t0000Q files would only have headers for each grid that tell what size each grid is, and what the grid resolution is, and the actual data solution values on that grid would end up in the fort.t0000Q files. And then in the set plot, you specify whether you're reading in ASCII or binary as well, consistent with what you output to. And typically at each output time, if you're using adaptive mesh refinement, there may be many grids, there can be thousands of grids instead of each time. So there will be a header for each grid, followed by the data. And then we also have plotting tools. There's a routine in each application, an example directory called setplot.plot that sets up how you want to do the plotting. And we kind of came up with our own little language for specifying the plots because of the fact that we're always plotting or usually plotting adaptive mesh refinement data. So we don't just have a single grid of data to plot. We typically have hundreds or thousands of grids that are overlapping each other and that are many different grid resolutions. In some areas you want to show color maps appropriate for water and other areas for dry land if you have water intruding on top of land. And so trying to kind of write the Python code to do all of that and loop over all the grids gets a little bit messy. And so we've tried to simplify that for the user by writing all that code in part of this block package and then providing a language for specifying what kind of plots you want and then it will hopefully produce the plots that you want. So the basic idea in setplot is that you can specify for each frame, for each output time or you have data, you can specify one or more figures that you want to appear at that particular time. And then each figure, you can specify one or more axes that should appear on it, maybe just one axis or maybe some plots with two by two array of axes. And then within each axis you can specify what plot items you want to appear on that axis, which are typically the curve or contour plot or pseudo color plot or something like that. And then there are various attributes you can set for each of these items to specify what contour levels are, what colors they should be like. And again, there's a lot of examples already in the geoclaw and plot pack repositories and the examples directories and some documentation and examples in the main plot pack documentation. So you can often find something that's very similar to what you want to do with this copy of the adjustments. So the set plot, you know, this is kind of this basic simplest version of a set plot function that would specify, it takes plot beta, which is a particular Python object that's defined by this plot plot beta class. And then that has a method called new plot figure that you would call as many times as you want to create different figures and then within each figure, you would call the new plot axes as many times as you want to create different axes of figures that should go on the map or the axes that should go in that figure. And then within each axis, you can use plot axes, it has a method called new plot item that you can call multiple times to specify different types of items to be partied on top of each other. So we'll briefly look at an example, but we won't have time to go through the much content. And then to actually produce the plots, well, if you type this make that plots, it would check the dependencies and then once it has up to date output it would use the set plot to produce a set of plots and if you do this make that plots it creates actually a set of web pages. It makes PNG files for each of the different figures that you specify that each of the output times. And then it assembles those into web pages that make it easy to kind of browse through them and it also automatically creates some animations that just loop through the PNG files and JavaScript basically. So that's kind of the easiest way to make the plots. On the other hand, you can't really zoom in dynamically or explore the data. Often when I'm developing code, instead, we'll use the icon shell and do things more interactively and in that case we'll have another set of tools. This high plot plot interactive plotting package that allows you to take the same set plot dot pie but loop through it and display one frame at a time in a way that you can interact with the plot and zoom in on it. So if you start this up and then start up a plot loop and type question mark, it would be a different command names that are valid at that point. And in the plot documentation under these glottis description. Okay, so that's the end of the slides and what I'd like to do now is sort of switch to actually running some code and showing some plots. And if you want to follow along there, the examples I'll be using are in this GitHub repository, which also has this tiny URL down here. I also just this morning posted HTML, the two notebooks that we'll be looking at so you can also look at them. Just as HTML files, but you don't have to be running anything but you can still kind of follow through the description of what I'm doing and some animations that are embedded that should work even in HTML versions. So I'm going to switch over to, here's the GitHub repository.  So what's in this repository is a couple of versions of this Chile 2010 example that we were looking at. They kind of walk you through how do you change the number of levels of requirement, how do you add additional regions where you say you want to don't want to find them, how do you add pages and that kind of thing. And I'll go quickly through some of this, we don't have too much time left so, but I hope that these notebooks will help you to kind of walk through things. So, another option for running the notebooks is to launch binder, and you do that then it actually starts up a server in the cloud that has all of the dependencies running and this repository clone so that you can be running the notebooks there. But what I'll be looking at here is just on my own laptop. This is the version on my laptop so if you go to that repository what you'll find is those two directories, geoclog examples and notebooks. Both of them have the same two examples in them, but the geoclog examples version is sort of more the version we would normally use running things in the command line. The notebooks is kind of a tutorial version that walks you through it in the framework of a notebook. So, maybe first I will just show you how we would sort of run things normally out of terminals. So, here's a terminal window. I'm in this directory geoclog examples to the 2010 B, this is more interesting one. But at the moment if I do ls minus a, what you see is that this is sort of the what you should get if you clone the repository, it's set run dot pi, set plot dot pi, and make file, and make topo dot pi, just do flops dot i, pi, and b can be useful if you're running things on Docker and then want to do the flops on your laptop outside the directory that we want to use the next day. So, if we do three, two, four, one, two, no tie dot text is some high gauge or darkly gauge output. And so, if we do, we could just do make dot plots, but if we sort of go through it step by step, make dot exe would create the executable in this case, most of the code is already compiled. So, it's basically just making those dot oh files together, but it makes this ex geoclog executable. So, if I do make that data, it runs set run dot pi, and creates a bunch of data files. It's not a bunch of things about what it's doing. It also, by the way, I think the way this is set up, it makes some KML files, which are often useful. You can open these in Google Earth and it shows, for example, what region the region where the detopo the earthquake source is specified this utopo file is a global topography at 10 minute resolution that's being used as our background topography. You have gauges, there's also a gauges dot KML. So, once we've made the data, we now have a bunch of files that end in dot data. Look at what those look like, but they're basically just lists of parameters that are read in by the foreground code. Oh, also, if we do ls minus a, we now see this spinning file dot data is created. It's the time stamp of that. It's used to tell if I do make that data again, and then probably say it's up to date. Yeah, that data is up to date. Yeah, this other warning about target all is just because we redefined the target all in this particular make file. It specifies where the set run file is, where the output should go, and various other things, and then down to the bottom, it specifies some particular source code that's needed for this geoplaw application. And we've also defined this make topo. If you do make space topo, it runs make topo dot pie, which actually downloads the topography that you need, and creates the topo file using the auto model. And then you can find all to make topo and make plots and look at each of the analogousness and each of the analogousness and these kinds of things. So if we also do make topo, I guess I've already downloaded that, so if you download it again, these files are actually stored in the scratch directory that we're already there, so if we have to generate them, we can just download some topography and create a geoplaw file. And then if you do make that output, it actually runs the code that uses several outputs, and then reports on the timing information at the end and then make that plots. You can actually use the information that's in setplot.py to create a bunch of frames of output, and then eventually that will go into the scratch directory. So once that's run, then if you open up this underscore plots, plot index page, then it shows all of the frames that were created say two different figures that were specified here, one showing the full domain and one zooming in on the post of Peru. You can either look at all of the figures and zoom in on a particular one by clicking on it and step through it, or back from the index page. If you go to the JS movies, the JavaScript version of the movies, this just loops through all of the different frames and shows you the animation. So that's how we typically would use geoplaw using also then editing the setplot.py, for example, whatever editor you like. If you go in here, you'll see that there's many different things specified in terms of the domain, the number of grid cells, lots of other parameters, but rather than trying to walk through that file, these two notebooks that are, that was the binder version I was testing out this morning. So the Chile 2010A notebook that's in the repository in the notebooks directory, walks you through an example like this and there's some instructions on what you do if you are working at command line, but we also have some tools that allow you to do the same kind of thing within the notebook, which we use mostly for making tutorials like this, but could be handy for making other sorts of files that illustrate how you created something that's a geoplaw example. So if what we did in the command line was just to make topo, compile the code with make.exe, create the bots with make.plots, and what it produced is, well, if we had run it in this first version, Chile 2010A, it's set up to use only a single course grid with no adaptive refinement at all. It runs very quickly, but it produces a very forced resolution as we see here. And so there are then some instructions in here about how to go in and modify that file, but you would change in the set run.py file. You could either make it finer by increasing the resolution of the course this grid, or what I suggest here instead is to change the number of AMR levels from one to two. So there's two levels of refinement to start with, and then we'll add more below. And already in this file, there's some lines that look like this that set the refinement factor in X and Y, and also in T. So we refine by a factor of two, going from level one to level two in both X and Y. And actually in the T direction, there's another parameter that tells it to kind of dynamically choose the refinement ratio in time, which typically for these explicit methods, if you're refining by a factor of L in each spatial dimension, you also have to refine by the same factor in time in order to maintain the stability of the explicit enough method. And because the wave speed depends on the depth of the water, if you have very fine grids that are only near shore, then you may not have to refine as much in time as we do in space, because the wave speed may be much smaller in those fine grids than it is in the Corsair grids out in the ocean. And so we have another parameter that's not mentioned here that can be set to tell GeoClaw that it will adaptively choose the time step on each level based on the wave speed. So adding the second level, if you redo make that flux and then look at the flux to get reduced again, then you should see something like this. It's added a second level refining by a factor of two. But it doesn't look like it's done a very good job. You see that it's not really capturing all of the wave as it propagates out. And that's because there's some refinement criterion that's being used in this case to determine which cells need to be refined to the next level. And I've purposely chosen a value that's too large for that tolerance here so that much of the wave is getting lost as it propagates out. So the next experiment would be to go in and change this wave tolerance parameter from 0.1 to 0.02, for example, and then rerun the code. And in that case, what comes out is again using only two levels, but it's now refining pretty much everywhere that there's waves. And it's, you know, flags, points for refining and then clusters, then the rectangles here. That's one big rectangle that covers most of the remains. That's such coarse grids in this example. And then the rest of this notebook sort of walks through adding a third level. So if we have three levels, then we have to tell it how to refine going from level one to two and also how to refine going from level two to three. So we need to add another component to these refinement ratios here. I've set again up a factor of two, but it could be a factor of four or eight, or maybe an odd factor. In some applications, we use factors of 10 or 20, even then from one level to the next. We often have, if we're modeling a tsunami across the ocean and then zooming in on a coastal location, we may have refinement factors of more than 10,000 going from the course this level to the finance level. Six levels of refinement. In this case, I've added in a third level with additional refinement by two. And in the set plot that pie, you can specify that on this finest level, we don't want to plot the grid lines. The other idea would just be solid blocks in there. And so this lets us to see the waves. And also slow the same motion down a bit here. See what's happening. So now we see that the level three grid is really kind of following the waves and it's refining everywhere that the wave tolerance is about this one or two. It's just looking at the amplitude of the surface of the ocean relative to sea level. We thought that it's above two centimeters. In this case, it's like this. Now you might say, well, that's great up here, but we really didn't want to refine this way that's heading towards Antarctica and often to the Atlantic. So there are also capabilities in geoblog to specify that in a certain regions, we want to only allow two levels or force it to always have three levels regardless of the tolerance and combination of those. So you can specify what we call regions, refinement regions that are rectangular space time regions. You can say over one time period, we need to refine this rectangle with a later time period. It's a different rectangle that we want to try to follow the waves as they propagate across the ocean. And so this next example gives an example of how you might do that. We've got an example, then in this case, it's refining the waves that are propagating northward up to the sea. Okay, well, we're about a time. So I think I won't go through the other one in 2010 B, but if you take a look at that one, it walks you through adding some gauges to the simulation and then comparing the results at simulated gauge with some of the actual high gauge data, data in this case, and also how you can, in Python, look with gauges with an additional gauge someplace reading the data and plot, not only the surface elevation, but also the velocities. So these examples should work in this repository. I was having a little trouble getting it all working on binder the other day with the doctor files and all, but I think it's working now. So something isn't working for you. Let me know and I'll try to get that. I hope these will be useful introduction to how we get started with your thought. If you run into problems, we do have a mailing list for a cloud bash users mailing list on Google groups that you can find from the product documentation. We also have in the product repositories, issues and all of the positive for you can raise an issue with you, if you found about your problems, something to look for. So thank you very much for joining this webinar and I hope this has been useful.