Hello. Hi, everyone. You'll have to excuse me. I don't have any notes or my slides in front of me. We had some technical difficulties. But I'm here today to chat with you about caching in WordPress. So a little bit about me. As was mentioned, I am a software engineer at Pagely. We are a managed WordPress host, so we deal with a lot of interesting caching challenges that come up at scale and on enterprise client sites. And before that, I worked at TimeInc as a WordPress engineer working on large multi-site networks. I'm also a bit of an emoji and meme enthusiast, so you can find my Slack emoji repo. Feel free to add a pull request or request there. They're all formatted and ready to go. And I am always happy to chat about it. So we're talking today about caching. It's a little bit of an enigma to some people. But when we're talking about caching, we're mostly talking about data that is stored closer to the end user, or at least it's closer to where it needs to be utilized the most. And that's my desktop. So yeah, that's a beautiful desert scene that I took. So we're talking about data that's stored closer to the end user. And here's kind of a quick example of what we're looking at when a user requests a website. Now the first request, caching is not on. So a user requests the site, it goes out, it runs PHP, it's fetching data, perhaps making a remote API call, a remote database call, something like that, building out all the posts, et cetera, coming back, maybe fetching some more data, building things, putting things together in PHP, and then turning the resulting information into the website. So the next person comes and requests a site. This is where it gets interesting when you have caching enabled. Caching provides an option to store some information temporarily in a caching layer of some sort in some sort of area. So say you're fetching all that data, and you put a little bit out in the caching layer, you save it in there. The next person that requests the website is going to have a much quicker response. You don't have to reach all the way out to that remote API, you can look right into a caching layer that's much closer on the server to where you need it. So the next requests are all much faster because you've stored information in the cache. So what about caching? There are a couple of types. Object caching is one of the primary ways that we cache things. It's a little bit more advanced. This is a server-level option that needs a little bit more setup. And so usually when we're talking about object caching, we're talking about memcached or Redis, something along those lines. But out of the box with WordPress, there's some other alternative storage mechanisms. This storage, when you install WordPress, if you have nothing additional set up on your site, transients will be stored in WP options table. So we've got an additional little spot to store there. Some people create additional database tables that are just meant to store cached items. And finally, we've got local browser-level storage. That's certainly a little bit different, local cache, but it's one of the other elements that we're dealing with when we're talking about caching. So one of the items that I wanted to mention, I didn't want to forget to discuss this, is caching and the data that we store in cache is not meant to exist forever. This is a temporary form of storage that we're working with. So when you store something in cache, you set an expiration date. Even if you don't set an expiration date, this temporary storage is meant to be cleared out easier and refreshed to go fetch new information. It's not like storing something in the database and always depending on it being there. For some reason, we might need to clear that out to refresh the server, to restart it, something like that. And when things are stored in a place like memory, that information can be easily cleared out. So do not store things like keys in there. Any specific data that you need to know is there forever, or for a long period of time. Okay. So we have a basic understanding of what caching is. Let's talk about the quickest way to getting your site cached. The quickest way to get some extra performance out of your site. What is that quick win? That is full page caching. And a lot of WordPress hosts take advantage of this. It's a fantastic way to get a super quick response if you've got a static WordPress site, something like that, where you are storing information, you're basically taking the full HTML output of a page and then saving it into this cache. So that caching layer that I talked about earlier, it's stored in this cache, all of the rendered HTML markup. Imagine how quick that is when it visits your site. And they get the HTML immediately. There's no need to go run PHP. There's no need to call the database. No need to make any extra API calls. It's all there and ready. And that's great, except for when we start talking about what logged in users need to see. So logged in content poses a bit more of a challenge. It needs to potentially be specific to the user. We can't store that in raw HTML in the cache, unless it's specific to that user. Even then, it creates this need for something a bit more dynamic. And full page cache does solve that issue. Similarly, if we're talking about admin content and frequently changing content, when you're dealing with a ton of logged in users at the same time, usually even caching plugins in WordPress are excluding any logged in content, any administrative screens, things like that. So frequently changing content falls under the same category that we're dealing with people needing to edit posts, needing to see information in real time, needing to edit other authors' information. All of this information, we need to make sure that we deal with. And this basic idea of full page caching doesn't solve it. So to state simply, we do not just cache all the things. We do not just take the entire lump and some of the HTML that we've created and store it for anything more complex than a basic blog. For a basic WordPress website, it's perfectly effective. But usually once we start talking about caching more and going into more complex ways of storing this information, it's because we've got more than a basic blog or a basic WordPress site. So what do we cache? Let's talk a little bit about that. Well, there are a couple of different things that you can store when you're looking at a basic WordPress website or a basic blog site that we can take chunks of. One of the really obvious things that we could do if we take our concept of full page caching is take a piece of the page. So say a sidebar widget with popular posts. If we're looking at that, we could take the rendered HTML and stick that somewhere in cache. I don't advise that for what it's worth. Generally would say that you should take the next option, which is taking JSON output or some sort of chunk of information that's not fully rendered into HTML and then turning that into whatever you need. Additionally, we could say cache the entire footer of a site, cache the entire header, cache a remote API call response. So we've got all of that information, a couple of chunks of data that we might want to store. And WordPress Out of the Box comes with this beautiful Transients API. Now when it's initially set up, like I said, it would just put information into the WP Options table. And you can see here what you would set is a key that is specific to the data that you want to fetch. Much like in the database itself, you've got key value information that you're storing and fetching quickly. So we're using getTransient, and that's going to pull all the data. SetTransient is exactly what it says on the tin. So we're going to place the value, which could be any sort of information, JSON, an array, again, a string of HTML markup, anything else that you would normally store in the database you could store in this field. And then again, deleteTransient. Now I should note that deleteTransient is a little bit interesting because it goes beyond just setting an expiration date. You can store things in the cache for a minute, an hour, a day, whatever custom date you want. And that expires as in seconds. So you can get quite fine-grained with it. But deleteTransient is extremely useful when you're talking about dynamic content. Because you can take advantage of, say, storing a WP post in the cache if it needs to be super quickly accessible and utilized in many places. But then, say, you have an author come in and update the title. Well, that cache needs purged. It needs cleared. You don't want to have to clear the entire cache of the website just for one post that you edited. You have the key there. So you can delete that one transient out of the database or object cache, what have you. And it will clear out quite nicely. The site will keep performing. You won't have to add anything else into the cache all over again. It's incredibly useful. And here's a quick example of what a function looks like to fetch data from a cache. And that is we're getting transient. If that data is expired or if it wasn't there to begin with, we never trust that it was there. So we always have a method that's checking an if statement. And that if statement is going to say, OK, well, if it's not there, if it's resolving to false, then fetch the data all over again. This could be my remote API call. This could be a complex query that we're making to the database, anything like that. We're going to refetch it, and then we're going to set the transient again. This is really important, obviously, to make sure that we save that data. And again, don't set it to false. I should make that note in here. Do not set it to false if you can help it, because we're also checking for false. And that's why I have a hard check there, 3 equals sign in a row. So I'm ensuring that it's false, not just empty. Because we could also potentially save an empty value to the cache. And finally, we're always going to return the data. And notice I've used the same variable in both places, so we're always returning the most fresh information that we have. So secondary to that, we'll get into WP cache set and Git. This is a slightly different API. When you have object on, the transient's actually utilized or can utilize it, depending on how complex your setup is. But WP cache set and WP cache Git, you'll note have a group variable set in there, a group parameter. And this parameter provides some really fine-grained and interesting control that allows any site administrator developer to set and manage this so you could potentially, on the server level, clear out a whole set of data without purging your entire site cache. This is something that we tend to utilize a lot at page layer recommend, because if a site clears the entire cache, it might become unstable. But then you've got a tiny group of transients or something in the object cache that is just related to a custom post type, say. Just clearing that and just being able to manage that and find the information separately is a huge help. So again, I mentioned this just earlier, which was if you have object caching enabled, then set transient under the hood actually utilizes WP cache set, where the group is set to transient. We had a recent experience with this where we had to set transients to actually, I can't remember if it was safe to the database or safe to a different area in the cache, but we had to silo that information out of it, and that's where having object caching on can be hugely helpful utilizing those groups. I should also note that WP cache set is something that works out of the tin even when you have WordPress without object caching installed, but the only time it saves this information is in PHP memory. So as PHP runs, it renders the page, then you've got this memory stored when you use WP cache set. But at the end of PHP runtime, that information goes away again, so even if you tell it to expire in five hours, once PHP is done running in that memory, then you don't get it back, you have to refetch it again. So it takes a bit of care and a bit of finangling to know which you should use at which time. Generally, I say stick with transients unless you are going for something with a more complex and managed setup. So that kind of comes to the question, do we need to cache more? And my answer is generally, yes. We always want to cache more. We always want to improve the performance of a site we're working on as developers that's something we're always judged on, be it site speed, be it the amount of CPU usage. There are so many things we tend to be judged on, and so I generally go through a list of different things that I need to evaluate to determine not only do I need to cache more, because the answer is yes, but also where I need to cache and what I need to focus my efforts on. So generally, I look at performance indicators of a site. I look at traffic indicators, so are there any expected upticks? I look at the use of external APIs. Am I heavily reliant on those APIs to serve information to my users? Or am I generally just posting to those APIs? The use of content and access goals. So am I going to be managing a site that has 1800 writers on it that then need to all access the site within a day's time? So that can be admin side under heavy load and something like front end caching isn't that effective. So once we get into performance indicators, generally my favorite personal tool is New Relic. That's a paid tool that you have at the server level. And it can give you a ton of feedback, graphing and information about CPU usage, memory usage, database queries, WP queries. It's extremely effective, but it's a paid tool. So my second recommendation is always to fall back to something like WP query or, sorry, query monitor. Query monitor is a plug-in by John Blackbourne. And it is kind of one of those essential development tools I keep in my toolbox. This runs at PHP load. So it runs and follows the PHP session, keeps an eye on how many database queries you have, how much time it took for each query, what plug-ins are hooking in at what points. Because if you have a plug-in that's in and causes some crazy delay, you can dig in a bit more and try to follow those queries. Next, I'm looking at the traffic indicators. So by traffic indicators, I'm usually talking about any expected upticks. They're going to be a sale that a site needs to focus on, sort of event or holiday that you know you're going to have a ton of traffic coming to the site. Beyond that, I mean, we tend to all want to prepare for events like that. We need to look at the expected usage of the site on a day-to-day basis. What does the traffic look like? Is it a news website that all of the writers are in the middle of the night trying to publish their content at the same time, and at the same time then evaluate and update the content? Is it a site that everyone is browsing and purchasing things late at night, or maybe during the workday when they're bored? How long can you cache things? How long can you get away with caching things to keep things running? But allow users to see the most up-to-date information. All of these things kind of go through my head when I'm evaluating what I need to add. Can I get away with maybe the sidebar caching for longer if I've got related posts? Or does that need to be breaking the most up-to-date information possible to keep people browsing my site and thinking, man, they're really on top of things. This is all fresh content. The use of external APIs. At a previous job, we relied extremely heavy on an extra API that collected all of the post content from our site we've got. It's something that takes a lot of time potentially on how that external API is set up and how your internal setup goes. But you've got time from the server to server to handshake. So that creates however many milliseconds. And depending on distance, that could be seconds. And then you've got time for that server to fetch its information. Then you've got to get the return information and process all of that, perhaps your reformatting into a different JSON blob to send out to the front end. All of these things take time. And if you don't need to get a fresh query from this external API, it should be noted that when you're working with external APIs, occasionally we're tempted to write in loops that say, OK, if the server didn't return a good response, we're going to keep querying against it. So you've got to be careful with whether or not you decide to cache a bad response or whether you add in retries. Usually I'll add a counter and only retry so many times and then accept that that server isn't responding for the time being. We actually ran into a case where we had a very small underpowered API that we were working with. And the API fell down. So we kept making queries to it, trying to get a good response, and eventually our site to the point where we were running into trouble on both ends trying to fix it, with only one dev team between the two. So it's kind of interesting that you can utilize caching. And we wanted to save this information to cache. But even then, working with this additional layer, and the API didn't have any caching on it, by the way, can cause a lot of interest and complexity that we need to evaluate as developers. So I want to take a quick segue here. I want to talk a little bit about the BrowserCache API. Now, I personally am a back-end developer. I work on the REST APIs at Pagely. But the BrowserCache API is something that I personally need to be aware of and as developers we all do. So I'm going to provide a little bit of additional information here for you. But I would recommend you go and research this on your own. The BrowserCache API is a fully front-end focus solution. So when I'm talking about BrowserCache, I'm usually talking about local storage. So storing something like session data right on the user's machine. But it's something that we need to use with great care, because it's very easy to fall into the trap of caching a lot and saving a lot to the user's machine. But what if someone has limited storage on their device? What if they're on a cell phone? And that cell phone is going to throw up an alert saying, hey, this site is trying to download a lot of stuff to your machine. You're going to lose user trust. So it's actually far more concerning to me as a developer when I'm thinking about something like front-end caching, front-end local browser storage. So with great power comes this great responsibility. Here's a quick example, a code example of in the JavaScript BrowserCache API, how you would cache that information. It's still relatively simple.  So as far as becoming comfortable with the concept of caching, this should be pretty cut and dry. Here's a couple of examples. I will be sure to share this later, location to be depending on what the organizers would like. But I would recommend that you definitely dive into reading into this, see what's appropriate to cache and not, because it obviously will be on a case-by-case basis, but there are some good standards to look over. So let's talk a little bit about some of my lessons learned at scale, some of the things that we've seen personally, either at Pagely or otherwise in my career. And this graph is very true to me. I was writing my talk, and I think I had already given it once. And a colleague sent me a message and said, hey, you should check this graph out. He's on the DevOps team. And so he's always helping customers with digging into why is my site performing slowly, why am I maxing out my CPU, anything like that. And you'll notice that's 100% right at the top. There are two lines there. So this site actually has two different nodes that it's running on, as well as a database node. And it's consistently maxing out. And so the DevOps team started to dig into it a little bit. They said, OK, well, they're running this one big plug-in. It makes a ton of queries to the database. I bet it's just running too many.  But then they started digging a little bit deeper. And it turns out there was a recently installed plug-in. So I don't even remember what it did. But it was a pretty narrow focus. It did a small function that they wanted and needed. And they thought, OK, we'll toss this on the site. But that plug-in was calling a method, a PHP method, that was called session start. And in session start, it was actually hooked in all the way up at WordPress in it. So in the process of WordPress itself running, and it is way at the top. And this plug-in was saying, I need to start my own session so that I can capture some additional information. When it did this, all caching that was happening after session start got turned off. This was this underline to be honest. I couldn't tell you if it was server set up or if it is intrinsically within caching that this is usually turned off. But everything after the session start stopped getting cached. And the site continued to max out. So once we found that issue, we notified the developers. And they said, OK, we'll just turn it off for now. And you can see that graph level way back out, back to a normal amount of usage. But it was kind of a surprising thing. We went in. We said, OK, these are some long-running database queries. It's muddling things up. It's slowing things down.  So we talk about some other lessons learned at scale. And that would be cache warming. Cache warming is an interesting thing. I have dealt a lot with it in my time. And when I'm referring to cache warming, I'm talking about the additional layers of caching that you're adding. So you say, OK, I'm going to cache this one query for five posts on my blog. That might be the most recent post that we want to feature. Once we've queried that, we're storing that in cache. And then we say, OK, well, that's cool. That made things way faster. Let's cache some more. Let's cache for the admins, all of the users. Something quicker like that. Maybe not for an administrative need, but for an about us page. We're querying users. And then we're caching some remote API calls. We're like, OK, our site's growing, though. And we're making more unique remote API calls that we're caching. So we've got all of these layers. And all of these things have overlapping expiration dates. So at one time, you might be pulling most of your data from the cache. And this cache is growing, which is good. We also have to account for the fact that cache might get caught at any given time. Don't forget that these cache values, we can never rely on them being there all the time. So say the server goes down, or some developer doesn't think about it and clears out a whole bunch of cache, a whole group of cache that was critical to the site staying up and performing decently. Cache warming is real, and you need to be aware that any time you're writing code that saves and calls the cache, it still needs to be performant at the end. Significantly reducing that load is fantastic. But again, clearing that whole cache, when someone hits that button and says, OK, and the same goes for CDN. If you've got CDN caching assets for your site, when you hit clear cache, you are slowing everything down for the end user potentially. And finally, this kind of goes in a similar vein, is you should load test. So load testing is something that we always mention at Pagely to our customers who want to be sure their site is going to stay up during an event. We say, OK, we'll set up an additional server that's exactly like your existing server. We'll give you the whole same environment, and you can load test against that.  Maybe you're over caching or saving some sort of database value that gets called constantly that doesn't need to be called. So you're loading things into memory that don't need to be coded. All of these elements kind of come into play that you would have never seen had you not load tested your site. And even then, you could also potentially go further and say, OK, well, what would happen if we lost caching at the same time? There are a lot of fantastic things you can do with load testing. I would highly recommend it if you haven't researched it before, you should. It's a bit beyond the scope of this talk, but we could certainly chat about it afterward, and I could get you some resources. So finally, expired does not equal deleted. When you've got WordPress out of the box utilizing caching, utilizing the Transience API, then you're saving things into the cache. You're storing things with this key value pair and giving it an expiration date, say you are storing it for an hour. And then you change your code or you update your code, and that value never gets called again. WordPress doesn't have any garbage collection that's saying, OK, I'm going to look through the WP Options table where these Transience are stored out of the box. I'm going to look through there, and I'm going to say, this needs cleared out. We don't need it anymore. It's expired. No, WordPress does not do that out of the box. So you could potentially be stuffing a user's WP Options table full of bad data that's not even called anymore. I would recommend if you've got an old WordPress site, you should check out that table. You might find information that you have long since deleted, still stored in there, that need tidied up. So it's something to consider. Just because something is expired doesn't mean that data is not hanging around somewhere, taking up space. And finally, I want to leave you with this, which is you can cache all you want, but as developers, it is still our responsibility to write performance code. If you've got a long-running MySQL query, then you should consider that maybe you should look at the performance of that query before you go ahead and cache it. Because at some point, that cache is going to expire, and that query is going to run again and potentially affect a user who is trying to visit the site, slow that down once they're trying to render the page, and the cache is trying to fill that information again. So it's on us to still write good performance code, to still do testing, to still review and analyze what we're working with. Caching is a fantastic tool to improve performance, but always keep an eye on that and write the best code that you possibly can. So finally, I'm Mara Teal. I am working with Pagely. We do WordPress hosting. And feel free to find me afterward. If you have a question here, think about it, because we're going to do a little bit of Q&A. But if you're not comfortable asking your question here, find me at the after party, find me out in the hallways somewhere, and let's chat. Thank you. So thank you, Mara, for your excellent talk. Sorry for a bit of problems we had with the sound. So we're going to get you a microphone now for the Q&A to have that fixed. But in the meantime, if there's someone who wants to ask a question, maybe a microner can go and find you. Who would like to ask a question on caching? Oh, here, sorry. It's very hard to see. Hi, you mentioned load testing. Can you recommend some tools that could be used right out of the box, rather than coding something special? For load testing, there are quite a few tools. Honestly, I think it's specific to the environment. I would have to check in with my team, honestly, to make a good recommendation. I have a couple I'm thinking of. But I don't want to go too far. But a quick search should return some great results for you. So sorry about that. Thank you. OK, thanks. Any other questions? Yes, there's one in the back. This one coming. Thanks. So we use your services, your plugin for caching. So I have a question because when we have some changes on the front end, what will be the safest way to view the changes, to purge all the cache or? Yeah, so depending on what you have set up, there may also be CDN caching that needs purged. So you can clear that CDN cache as needed. There should be a button in the dashboard plugin section. Or any other cache clearing mechanisms at the database level or page caching level should get cleared when you make an update. So occasionally, browser caching comes into play. And as a backend developer, I don't generally have control over that. It's one of those layers that we always have to be watching out for. And I find myself doing a hard refresh, which is Shift R. I usually do Shift Command R on a Mac. But I find that utilizing the hard refresh is still something that I have to do in 2018 to ensure that if I'm telling someone to look at a page that's not logged in content, that they're not a logged in user, they should utilize that hard refresh. So if you're logged in, if you have logged in users, usually that's not that big of a deal. Thanks. Thank you. Question on this side? Yes? Hello. When talking about WordPress, we're using non-sys all the time. So I would like to have your opinion on how you're dealing with those. And the second part of my question is obviously the most important caching is for the first page load. But when on the first page you have something like exit intent pop-ups appearing or you want to check users' location, things like that, how do you do that? I mean, it's really tricky. So for user-specific and JavaScript things like exit intent, different user actions like that, I actually would find that local storage and browser caching or even cookies are good options there. So as far as that, I would say that tends to all lean toward front-end caching of some sort. Because if someone clears out their browser cache and cookies, they should get that same exit intent or policy acceptance, something like that usually. If it's not a logged in user that you can't save that content to the database, that is. Usually in WordPress, for things like administrative notices, you'll notice that actually saves to the user meta so that they never get that information again, or that pop-up, what have you. As far as nonces, and someone can correct me here, but I would say that that's not something that should ever be cached. So that's always something that should be fresh, because you are essentially validating that the user is who they say they are or the request is coming from where it's supposed to be coming from. So that should never touch anything cache related. Should always be fresh, yeah. Excellent. Question here at the front. Mick Runner is actually running to bring the mic. Can you raise your hand again, please? You talk about caching on websites. So for a news website, for example, different people visited different times a day. Do you recommend variable caching depending on traffic or user events? For example, if an admin adds more content to refresh the cache, or if we have a peak in the traffic, thank you. Yes. So certainly, I would recommend, usually my goal is to cache information as long as I can get away with without people seeing really old data. That said, if you've got a front page with latest news on it and you've published a set of latest news or you have some event going on, I would reduce the amount of time that's cached or have an option just to clear sections of the site. Again, that's where things like the groups and object caching would be really helpful because you could save things multiple places or in multiple groups or make sure you have a key set that you can be specific to. That way, you don't have to clear the entire cache of the site and hurt everything, but you're making sure people see the freshest content where it matters most. That might be the sidebar. That might be a banner in the top header. It could be various places, but yeah, that's where getting specific really can help maintain performance while you're under heavy load. So, thank you. So we may have time for one more question. Anyone? Once, yeah, one here. So, last question. So, say you've got a news site and you've got a piece of content that you update. That piece of content could be on dozens of places of the site, right? It could be in a category page, it could be in the sidebar. How do you do cache invalidation when it could be anywhere? It feels like there's no good way to work out where it could be, all the different places. It could be on page 25 of a category page. It could be on the sidebar. How do you cache invalidate without throwing the entire site out? I actually, I ran into a very interesting issue on the news site I worked at at time, which was we were querying for related posts and we were caching the information, but it had an expiration date, obviously. And some of these posts were only ever accessed by bots. We ended up permanently caching that information because these bots would trigger all kinds of MySQL queries and related posts are usually quite expensive queries. It caused a lot of problems. I realized that's not exactly the issue you're experiencing, but it's something worth noting and that's something that we made a concession for, was we accepted that we could not serve fresh new content on an old post that was, you know, five years old. We needed to, we wanted to focus our efforts on the top of Google, on the fresh news content, things like that. So it was something we kind of just accepted, but I would make a similar recommendation in that I would create caches that are group-specific and try to clear a cache based on when you hit update so you could check what category it's set in and perhaps use categories if you're utilizing related posts that way. An additional item that I hadn't mentioned though is for something like that, say you do have a related section and you can query posts from something like Elasticsearch for related so it's much quicker, you could set that up on your server and then instead of loading it within the HTML of the page you could utilize something like an Ajax request. So especially if it's toward the bottom of the page below the fold, you could just utilize an on-scroll event when the div comes into view that you're utilizing for containing related posts, you could either preload, start making the Ajax call early or just say we're loading in fresh content for you. This is especially critical for something like comments on the page to keep those up to date because it's extremely hard to balance caching that information and that's something that I would say you almost can't cache to make sure users feel like they're being heard and seeing the most up-to-date conversation. I hope that answers your question. Okay, thank you. Well, I've seen more people raising their hands but unfortunately we have to leave it here but as you said you're available for questions off-stage so she's easy findable with this lovely heart so that shouldn't be a problem. So thank you for attending and thank you for your talk. So big applause for Mora.


My name is Chris Martin. I'm the Education Director at the Wisconsin Technical College System for Manufacturing and STEM programs. When you can impart skills on learners that are going to improve their lives, improve their job satisfaction, that is really what drives me to do what I do on a daily basis. I spent a lot of time in the printing industry, and inside of that world a lot of what I did was training and development. So what led me to the Wisconsin Technical College System in part was that desire to create a skill set, teach it to an individual that's passionate about upskilling and using that knowledge to better their career, better their life, and seeing that transformation take place is a really rewarding experience. Why it's important to me to prepare these folks for careers in manufacturing is because it's fun to see people succeed. I really believe that there's some great opportunities that exist and if you jump in and try to learn a new skill, try to expand on the skills that you have, it just leads to a better quality at life, a better job, more happiness.


Don't you think that listening to music at home is a mess? It comes from so many different sources and devices, from both online and offline music libraries, from an app or an MP3 player. And all of that is spread out throughout your house. Your stereo is in the living room, your digital library is in the office, the radio is in the bathroom and your iPod is probably in the bedroom. And when you're having a party, sharing your favorite tune is very difficult. Because we love music, we made it easier. Wouldn't it be magical if you could access every music source with a single device and control both music and speakers with one powerful app? Well stop dreaming, we created it. Let me introduce you to IE Sound System, a new way to listen to music. Connect your IEs to your home Wi-Fi and stream immediately in high quality sound. It's easy to plug to any stereo in every room you want. What a great solution to breathe new life into any stereo. So now open IE's Play app, choose the rooms you want to play music in, watch games you want to listen to and let the magic happen. Don't wait to enjoy IE Sound System. Visit us at IE Sound System.


Mr. District Attorney, starring David Bryan. Mr. District Attorney, champion of the people, defender of truth, guardian of our fundamental rights to life, liberty and the pursuit of happiness. And it shall be my duty as district attorney, not only to prosecute to the limit of the law all persons accused of crimes perpetrated within this county, but to defend with equal vigor the rights and privileges of all its citizens. This is David Bryan. In a moment we'll bring you another case from the files of Mr. District Attorney. But first a word from our sponsor. And now here is our star, David Bryan as Paul Garrett, Mr. District Attorney. A district attorney listens to all kinds of statements in the course of the day. Some are confessions from people who want to pay their debt to society and make a fresh start. But even a confession can be an attempt to outsmart the law. This case began more than 500 miles from my county in another state. How you know, Pete, the old aim didn't give you a phony combination. Oh, she wouldn't do that. Would you, Grandma? Because the wrong combination would mean bruises. Wouldn't it, Grandma? I think we'd better take the gag off and let her open the force. She wrote down the combination, didn't she? She couldn't talk it any better than she could write it. Now keep quiet a minute. This tip better be good, Pete. It's good. Nice old lady, afraid of the bad, bad bank. She keeps all her jewels and money nice and safe at home. Look at this. What rocks in the dough, 20s, 50s, C-notes. Must be 15, 20 grand there. Show it in the great days. Hey, what about her? We just can't leave her like she is. No, because if somebody took that gag off, she could talk. Only one way to stop that. Why didn't you muffle that with a pillow? People else may get that backfire. Come on, let's get going. Car okay? Sure. There it is. Hey, Pete, the other way. Somebody running. A cop.  Get the car started.  They're going. I made them duck into a doorway, didn't I? I suppose the car hadn't started right away. You were right under that streetlight without a hat. Why didn't you leave your picture? There'll be 500 miles from here if I'm warning. He wasn't close enough to get our license number. You might have been close enough to see what state we're from. If he asked for mug shots, you got a record. He might just identify you. I know they're making a mistake. They're making a mistake. Remember, Boland? Never risk ten years of the electric chair when you can get away for six months. And that little hall is worth six months, ain't it? Yeah. It worked for me when I pulled it on with casticle. Yeah. And it'll work for me. It'll work just fine. What time is it? 12.20. When we get home, we'll get the newspapers. See if our DA has any little crimes kicking around unsolved. Anything nice and simple to admit it around midnight. We might save Mr. Garrett a lot of work. Oh, Mr. Garrett, how did it go? I wish I knew. You know how I feel about speaking at luncheons? Oh, this gentleman has been waiting for you since 11 o'clock. I told him you'd be back late. Oh, I'm sorry. I know you, don't I? Yes, I'm afraid you do. My name's Pete Grable. Oh, yes. I remember. Burglar, he wasn't? Yes, sir. Three years ago. I did six months. What can I do for you, Pete? Well, I'm in trouble again, Mr. Garrett. Come into my office. Oh, no calls for a while, please, Miss Miller. Unless they're urgent. Switch the routine stuff to Bretton. Oh, and ask Henry to come up when he's finished at the lab. All right, Mr. Garrett. Sit down, Pete. Thanks. Tell me about it. I don't know where to begin. After I did time on that rap, well, I wanted to straighten myself out. I tried. I got a job. Even went to night school. I guess I wasn't very good at working, though. I got fired. I've been bumming around for a few months, bro. Well, I guess I better give it to you, Streak. The night before last, about 11.30, I guess. I was out walking. I passed this hardware store. The hardware store on Southern Boulevard and Finch Street? Yes. I guess you know what comes next. I went around the back, broke in. There was $94.62 in the cash register, and I took it. Why, Pete? Why after doing time before? I don't know. I've been asking myself the same question all day yesterday in the day. The heat must have gotten me or something. I was crazy. You still have the money? No. I played big shot and spent it. Well, I'm glad you walked in here by yourself, Pete. You were playing it tough the last time when we had to catch you and bring you in. You can hang it on me good this time, Mr. Garrett. I had a chance, and I blew it. I'll deserve everything I get. What you'll get will be up to the judge, Pete. The fact that you came in here is going to weigh in your favor. I recommend a short sentence and probation. And you promise me to work out the money you stole? Make restitution? Oh, Mr. Garrett, I'd do anything for a break like that. I'll pay back every dime. All right. Miss Miller? Yes, sir. Come in, please. Bring your book. I want you to take a statement. Yes, sir. Oh, Harrington said he'd be here in a couple of minutes. Good. Take this. Hit it with a date and location. Statement of Peter Grable. Read the burglary of the amalgamated hardware company at 1154 Southern Boulevard, this city. I'll fill in the date. Date before yesterday. Between 11 and 1130 p.m. Got it? Yes, sir. Now, Pete, do you make the statement you're about to make with the full understanding that we used against you as evidence? I do. Do you do so of your own free will without coercion or other undue influence of force? I do. All right, Pete. Tell us in your own words just what happened. Well, at 1130 Thursday night, the night before last, I was... Oh, Chief, I... Oh, excuse me. I didn't know you had anybody in there. It's all right, Harrington. Come in. This is Pete Grable. Yeah, I remember him. Sit down. He's given us a voluntary confession on the amalgamated hardware burglary. Go ahead, Pete. Where was I now? At 1130 Thursday night, the night before last. Oh, yeah. I was walking past the store. I went into the alley, leading the round to the back. I jimmied my way in. I stole $94.62 from the cash register. I spent it, and I can't give it back. That's all. Are you prepared to sign this statement after it's tight? Yes, sir. Good. All right, Miss Miller. Type it up. Have Kincaid take him out of the county jail. You'll have to be held, Pete, until bail is set. It won't be too long. I'll have you arraigned Monday morning. Thank you. Just a minute, Pete.  Oh, I don't think that'll be necessary, Harrington. He came in voluntarily. You're not going to run, are you, Pete? No, sir. Go ahead. What about those parking lot robberies? You got anything? No, not yet. Stuff the lad had is no good. No, keep on it. Then I want you to ball parks, bowling alleys, fight stadiums. Any place night parking is heavy. Yeah. Chief... Yeah? You know, I like to see a guy get a break if he rates it. But this Pete Grable... he was a tough monkey. We got nothing at all on that amalgamated hot wedged job, but all of a sudden he walks in here like a lamb. It bothers me. I know. It's been bothering me, too. I thought you were sold on him. He wants me to be sold on him. Let him walk around a while until we see what he's got on his mind. While he's walking, he's got a chance to run. He's also got a chance to trip. Yeah, see what you mean. You want me to check on him? Home? Family? No, not until he's arraigned and makes bail. Why wait until then? Because then it can be a friendly visit to... oh, somebody we're sold on. Let's see if that confession is ready yet. I assume we'll that be ready, Miss Miller. Just a few more lines. You take it over to jail and have him sign it, and be friendly. No, Peter hasn't been home yet. I cooked dinner for him and I had to throw it out. He even had to borrow it. Your son's bail was $500, Mrs. Grable. Where did you borrow that? $500. Now where would I ever get my hands on that much money? You mean you didn't put up the money? You're not the one who's borrowed? I didn't even know where he was. Until I got a note from him saying he'd be let out this morning to make a bring him a razor and his best suit to close. I see. Do you know who did arrange for his release? Was it his father? Your husband? His father's been dead since Peter was 15 years old. You don't know where Peter's now? He didn't come home at all after he was released this morning? No. I waited for him outside the prison, but he said he had to go someplace he'd see me later. So I got on the trolley car and came to see that there'd be a good meal on the table for him. The probation officer will be checking on him before he's sentenced, Mrs. Grable. It's after 10 p.m. If he's keeping late hours, it won't help him. I tried to get him to come home with me. Maybe if we can find him and bring him home for you, if you can give us some idea of where he hangs out. Perhaps a name and addresses of some of his friends. He never tells me about his friends.  I'm always finding his matchbox in his clothes. Bowlands, gunands, it says on them.  Name ring a bell with you, Harrington? Yeah. Yeah. There's a dance hall out the south side. No, I'm not familiar with it. And you'd be familiar with the owner if you saw him. Bowland? Ray Bowland. You set him up twice for Larson. I'd have an ex-con get a permit to run a dance hall. We never had him on a felony. Oh, I remember now. Penny Larson at both times. Mr. Meena convictions wouldn't stop him from getting a dance hall license. You remember when it was we last sent him away? Yeah, two, uh, no, no, three years ago. He pulled six months. Oh, that means he and Peter Grable were in prison at the same time. They might even have been cellmates. Yeah, but what's that got to do with this case? Just a small detail from Bowland's last conviction that you may have forgotten. Why? He also walked into my office and confessed. Oh, and now Grable pulls the same stunt. Why? They can't like prison. Maybe they like it better than something else. What? That's what we're going to find out. This is David Bryan. Before we continue with Mr. District Attorney in the case of the man who confessed, here is an important message from my sponsor. Now, here is our star, David Bryan, as Paul Garrett, Mr. District Attorney. A man had walked into jail and confessed to a crime of burglary involving less than $100. His family had no money, but somebody posted $500 bail for him. He was certain to go to jail, but he seemed happy about it. It didn't add up. Harrington and I headed for Bowland's Bonanza, a dance hall on the south side. I ought to have two bands, Bowland, like the uptown joints. Continuous dancing. People don't like to sit around. Do they, darling? Look, when you wake, diamond dancers like I have, you're happy to hear the horn stop. You see, Pete, besides, it's a warm night. Give the concessions a chance to do a little business. I make money there, too, you know. Yeah, and if this don't work, there are other ways, huh?  Hey, uh, you didn't tell me how to go with the D.A. I'll breeze. You should have seen it.  Keep quiet. What's the matter, honey? Most of the time, I'm going to have to go. What's the matter, honey? Those two guys coming across the floor. Garrett, the D.A. and I shadow his Harrington. Don't move. Now they've seen us. It would look funny if you go. Good evening, Pete. Oh, hello, Mr. Garrett. Mr. Harrington.  This week, Mr. Weeks. And, uh, this is Ray Bowland. He owns the place. I believe we've met Mr. Bowland before. Yeah, that's right. I'm glad you're meeting at my place this time. Steady yours. Oh, a band's been off the stand too long. Customers getting restless. I'd better go outside. Wait a minute. Nice to see you gentlemen again. Bye. Hello.  Excuse me, please. Don't you think you should be leaving too, Pete? Yeah. Yeah, I didn't realize it was so late. Well, good night. Good night. Oh, Pete, uh, just a minute. Yeah, Mr. Harrington? Uh, how did you jimmy your way into the hardware store? Through a back door or a window? What difference does it make? One might make a difference in court. Nothing can make any difference in court, Mr. Garrett. I ain't fighting the case. You've got to make confession. Yeah. Yeah, I guess you're right. Skip it. Good night. We can get to the parking lot through the back door. Okay. What was that question all about, Harrington? About whether he jimmyed a door or a window? Oh, just something I remembered. The vaguely gained entry by cutting out a ventilator screen with wire clippers. For a man who says he robbed the store, he doesn't seem to know too much about the details, does he? You ask me, he never saw the inside of that hardware store. His confession is a phony. I know that. But why? Oh, it's psycho. We get them every day, don't we? Trying to make people think they're tough or big shots? He's no psycho, Harrington. At least not that kind. There's another reason. There was another reason when Bowling did it three years ago, too. He had all the... Hey, Chief, look. Yes, Miss Weeks. The girl we just saw with Pete. Yeah, that's quite a car she's got. About 5,000 bucks on wheels. Yes, and she's no society debutante. Come on. You want to follow her? Yes. She turned right going out. Yeah, I saw her. There, Park just passed the entrance to the dance hall. I'm just driving past her. Don't stop until you get to the end of the street. Dark area under those trees is all right. Okay. What's she waiting there for? See for yourself. Mmm, sure. Little Peaty Boy. Should I tag him when they go past? No, just get the license number. Get it? Yep. Got it down? Now what? Take me home. We've got a lot of work to do tomorrow. Yes, Miss Miller? Harrington's on extension one, sir. Okay, put him on. That registration. Now, who owns the car? It belongs to the Dolly Weeks' Dame, all right? She bought it last Saturday. 4,652 bucks cash. Does she have a record? I just got all the reports from the burglary detail on that job at Amalgamated. You were right about the burglar through the ventilator screen. There's something else that doesn't fit, too. What? Pete confessed to stealing $94.62. Yeah, huh? Store owner's statement lists the amount stolen at $84.62. That's funny. I've got an idea about it. I'll have it worked out by the time you get up here. I'll be there in a minute. Wait a minute, no, no. Before you come up, pull the record-view files on both Bowlin and Pete. Everything we've got on them. Bring them with you. Okay, Chief. Be up as fast as I can. Good. Miss Miller? Yes, sir. You get those back issues of the newspapers from last Friday? Yes, sir. I just finished going through them, but there's only one small item on the Amalgamated Hardware burglary. I'll bring it in. It was on page 9 of the post transcript, Mr. Garrett. It's only one paragraph. Well, let me see. The burglar broke in through the rear of the store. Look at the cash register of $94.62. And that's it, all right. And that's what? Well, that's where Pete Gravel got his information in his confession. Only the information happens to be wrong. Get Harrington again in the record room. Tell him to wait for me there. I'm on my way down. Yes, sir. Keep your shirt on. Who is it? It's Pete. Let me in quick. I tried to phone you. It was busy. I'll take it out the hook when I'm sleeping. What's the idea? Get me up so early. I think we're getting hot, that's why. You goof up on something. It's that gum shoe Harrington from the DA's office. We've been checking on Dolly. What's that to get an uproar part? They saw you to get it, that's all. Well, they saw the car too. What car? I gave Dolly Dota by a new car. With hot money less than a week after a killer? Well, I thought it'd be safe in her name. You're... Goodbye, Pete. What do you mean, Bo? I mean goodbye. I'm taking myself a vacation to South America. From now on, I don't know you. Goodbye, Pete. I ought to... You pull that gun on me and you'll really be cooked. Now you got a chance. Be smart. Take it. That's the only reason I'm leaving you alive. Mr. Attorney's office. Miss Miller. This is Mr. Garrett calling from the record room. I want you to get some more newspapers for me. Yes, sir. Which ones? Out of town papers from all surrounding states. Last Friday and Saturday editions. Get the whole staff together and comb them page by page. I want a list of all major crimes committed in those cities last Thursday night. And I want it within an hour. Yes, sir, Mr. Garrett. I'll get right on it. What's the idea of that, Chief? What do you have to... I'll tell you what I'm after. Look at this record on Boland. His confession about stealing a car radio? Yes, a car radio. He does six months in jail for taking something worth less than $50. And two weeks after his release, he buys a dance hall for $20,000, spends another $10,000 decorating. Oh? What are you driving at? Look at this FBI teletype. Received by us while Boland was doing time. Request all available information, Ray Boland, your county. The mug shot selected as possible suspect armored car robbery state capital. Not of October 3rd or last. October 3rd. Hey, that's the same night he confessed to stealing the car radio. Sure. And the record bureau wired back that he was serving time for an offense committed at the same time, the same night, more than 200 miles away. We provided him with an alibi. And now Grable is afraid he was seen on some job and he's pulling the same stunt. Only this time it isn't going to work. Have a squad pick up Dolly Weeks for questioning. Then get up to the office and let's help with those newspapers. Oh, Mr. Carrington, Mr. Harrington. You're son home, Mrs. Grable? Oh, yes, he came home this morning. Says he's going to stay. I can watch over him now and he'll give you no more trouble. He's really not a bad one, you know. Must have been the company was keeping. We'd like to see him, Mrs. Grable. Well, he's in his room. I'll call him. We'll see him in there if you don't mind. Which room is it? The second door. Mr. Carrington. I was just getting dressed to come and see you. Oh, you think? Yeah. I guess I was confused the day I gave you that statement on the hardware store. You see, I really went in through a ventilator screen and then I told you the wrong amount on the money. We know you didn't. We also know that you stopped in the hardware store a couple of hours ago and bought a wrench and spent 10 minutes asking the storekeeper about the burglary. You see, we've been doing a little checking, too. The police at Harrisburg are looking for two men who robbed and murdered a wealthy old woman. You know anything about it? Go ahead, Pete. Go ahead. If the gun's in there, go for it. Or do you only use it on old ladies? Poland. The whole idea was Poland, not mine. I'm here. He's running away. Not far. The police will be waiting for his plane when it lands at Dallas. And Dolly is waiting for you downtown at my office. Please, Mr. Carrington, you've got to give me a break. I'll give you a break, Pete. The only kind of a break the law permits. What's that? The same kind of a break you gave that old lady in Harrisburg. This is David Bryan. I hope you enjoy this case from the files of Mr. District Attorney. I'll be back in just a moment after this message from our sponsor. Now, here's the star of Mr. District Attorney, David Bryan, with a word about the program you have just heard. Pete Grebel, Roy Bolin, and Dolly Weeks were extradited to the county where the brutal murder had been committed. Grebel and Bolin were convicted in the first degree and executed. Dolly Weeks is now serving sentence on a charge of being an accessory after the fact and receiving stolen property. Now, this is David Bryan inviting you to join us when we present our next case based on the facts of crime from the files of Mr. District Attorney. Mr. District Attorney was originated by Phillips H. Lord.


Today, I am going to talk about monsoon variability and agriculture. You know study of the monsoon and its variability is considered to be very important in an agricultural country such as India because of the large impact of the monsoon on the agricultural production in the country. In fact, a large number of papers on the monsoon begin with stressing the fact you know how important the monsoon is in an agricultural country such as India. Now, before we link monsoon to agriculture, let us first consider how agricultural production in the country has varied and first we deal with the 20th century as a whole. So, I consider first the variation of the agricultural production during 1901 to 1994 assessed by an index of production of the principal crops developed by Kurosaki shown in the next slide. Now, what you see here is a very interesting graph. This is India and this is Pakistan and what you see is an index of production of principal crops and from here to here you know this is when we got our independence 1947 independence from British rule. And what you see is that there is a market difference in the two era. This is the colonial era in which the production has stayed more or less the same. And the population has increased a little bit. So, the per capita availability which is this one value per capita is the dashed line. So, the per capita availability has slightly decreased in the colonial era, but with independence you will see very soon after independence from early 50s itself the production has begun to increase very much. And so, even though the population has increased the per capita availability has remained reasonable interestingly similar story for Pakistan as well. So, this shows you so that what did we see from here that the production of the principal crops was almost at the same level up to about 1950. Since the population increased very slowly in the colonial era the per capita value decreased slightly. After independence the production began to increase and so did the population. The increase in production is seen to have become more rapid since the 70s that you will see here these are the 70s here. And the increase seems to have become more rapid in this period here. After independence from colonial rule the production began to increase and so did the population the increase in production is seen to have become more rapid since the 70s. The per capita value has remained almost constant throughout the post-colonial era. So, now the next question to consider is food security. So, we do not look at agricultural principal crops as the totality of principal crops rather we look at food grain production. This is the all India food grain production and let us see how that has changed. Now this is only post-colonial era only from after independence and you find that actually the food grain production has increased rather rapidly right from here you know right from post independence and we will come to see why that happened. However, in the recent this is up to 2010 and from mid 1990s the rate of growth has slowed down a bit. So, earlier it was increasing the growth rate was increasing at a rate of 2.7 percent now it has become only 1.2 percent. So, the rate of growth has slowed down a bit and unless this growth rate improves the per capita availability of food grains will decrease because if you look at the population that increases at the rate of about 2 percent therefore, if we have a here increase in food grain production only at the rate of 1.2 percent then slowly the per capita availability of food grains will decrease. So, we have to do something about this. Now, I want to consider in greater detail the observed variation of food grain production of critical crops such as pulses and several factors which could contribute to the variation of these for the period 1950 to 1997 where I have a lot more data. Now, the aim is to understand the role of monsoon variability in the variation of food grain production and the challenges in ensuring food security. So, now this is from 1950 to 97 what you see here is the food grain production which I call FGP in millions of tons and what you see is that it has been increasing right from 50 onwards up to this point and if you calculate the per capita food grain availability this is in kilograms per year then you find that by and large it has remained steady somewhat increased towards the end here, but by and large it certainly has not decreased. Of course, there are big dips in the food grain production as you will see here. This is the 65-66 drought and this is the 79 drought and so on and so forth. So, big dips do occur in the food grain production and associated with that you do get dips in the per capita availability, but on the whole the per capita availability has been steady. So, until the 70s the increase in food grain production was associated primarily with the increase in the area under cultivation. Now, what you see is the same food grain production that you saw before then this is the area under cultivation in millions of hectares and this is the yield of the food grain production kilogram per hectare. Now, you can see that from 50s onwards up till the 70s mid 70s the area under cultivation increased steadily and this contributed a lot to the increase in production that you got here. This is post-independence now yield on the other hand you will notice increased only very slowly and it has begun to increase rapidly only from 70s onwards and this in fact is the green revolution which I will come to. So, in fact and the green what was the green revolution. So, until the 70s the increase in FGP was associated primarily with the increase in the area under cultivation whereas, since the 70s the increase in yields in association with the green revolution has also contributed. So, we have seen this that since the 70s increase in yields have has also become very rapid and that has contributed also to this, but initially it was primarily the area under cultivation. Now, what is this green revolution see the green revolution involved the adoption of new dwarf high yielding fertilizer responsive varieties particularly of rice and wheat. Now, the market increase in the yield since the 70s was made possible by a substantial increase in fertilizer application and remember these are fertilizer responsive varieties. So, they can make use of the fertilizer very efficiently. So, there was a substantial increase in fertilizer application and irrigation so, in fact so, this is the same food grain production here this is the fertilizer and you can see that until about 65 also hardly any fertilizer was applied it began to be applied in the 60s and then increase very rapidly in the 70s and irrigation see the government undertook projects to provide irrigation soon after independence. So, irrigation has also been steadily increasing so, this is why the area under cultivation of irrigated lands has also increased. Now, the declining growth of FGP so, to go back to where we were so, this is important to remember that the green revolution was made this market increase in the yield since the 70s was made possible by a substantial increase in fertilizer application and irrigation. Whereas, before 70s it was a substantial increase in irrigation which has also contributed to the increase in food grain production. Now, the declining growth rate in FGP is attributed to the so called fatigue in green revolution. Now, fatigue of the green revolution is seen in the FGP of the country as a whole and let me just remind you what it is we have seen it here see this is the fatigue of the green revolution. See with green revolution it was increasing very rapidly and suddenly the growth rate has decreased substantially if it is less than half of what it was throughout the period from 50s 2.7 and 1.2. So, this is the observed fatigue of the green revolution and so, this declining growth rate in the FGP is attributed to the fatigue of the green revolution fatigue of the green revolution is seen in the FGP of the country as a whole is a manifestation of the fatigue seen in the production of rice and wheat in the bread basket of the country. See places like Punjab and Haryana contributed enormously to the green revolution and what you see here is growth rates of yields we are specifically saying yields and growth rates of yields in Punjab and Haryana and dark is wheat you can see that the growth rate has dropped from the 60 to mid 60 to mid 70 it has dropped already from to mid 70 to mid 80 and even further from mid 80 to mid 90. Now rice also same story Haryana same story in rice, but Haryana for some reason I guess the green revolution technologies were adopted somewhat later. So, you get a very high yield here from 75 to 84, but that has also dropped here. So, we are saying deep in growth rates as we go by and in fact this fatigue of the green revolution is not special only to our country even when we look at world food grain production we see a fatigue that here in the 60s and from 50s onwards and particularly since the 60s there is a rapid growth in food grain production and now what you see is a much slower growth if at all and this is the fatigue of the green revolution that you see on the global scale. Now area under cultivation has decreased slightly from the mid 80s and may be it may be here. So, this is the old graph that you have seen this is food grain production and this is the area under cultivation you can see that it reached a maximum from around here and after that it has begun to decrease somewhat. So, area under cultivation has decreased slightly from the mid 80s this decrease is more market for the area under Khareef crops. And so now this is for Khareef which is the summer monsoon season if you wish and if you look at Khareef then you see the decrease in growth rate is even sharper you see it has reached a plateau here and it is not increasing at all and the area under cultivation is decreasing very rapidly you see this whereas, the yields are gone have gone up to some extent. So, since the mid 80s. So, area under cultivation has decreased slightly from mid 80s for the country as a whole and for all the both the seasons Rabbi and Khareef, but the decrease is more market for the area under Khareef crops and since the mid 80s the land under irrigation is increasing more slowly then earlier with a substantial fraction of the irrigated land going out of production due to salinity water logging etcetera. So, there has been this kind of a change that irrigated land is also not growing at the rate it was before. Now, impact of the year to year variation of the Indian summer monsoon rainfall is large particularly for the droughts and that you will see in the next slide. See this is the all India summer monsoon rainfall this is the ISMR anomaly. So, that above 0 means the rainfall is more than average below 0 means it is less than average. So, these sharp dips are droughts and what you see is associated with each of these sharp droughts you get dips here. This is the same Khareef food grain production that you saw in the earlier slide and corresponding to each and every drought you can see actually sharp dips in the food grain production. So, the decrease in the rate of growth of production since the 90s the fatigue of the green revolution is seen to be even more market for the production of the Khareef crops with the rate becoming close to 0 leading to a plateau which you have already seen here. This is the rate has become almost 0 in this period and this is a plateau the food grain production for Khareef has become a plateau. Now, so far I have considered the total production of food grains in the country, but and we have what we have seen is that the rate of growth of food grains has certainly dipped and it has dipped below the rate of growth of population. So, this is not a very good sign and we have to do something about it. Now, let us look now at some important rainfed crops and see what has happened to their production. In fact, the production of pulses has hardly increased over the next decades. Now, this is the pulses production again from 50 to 95 and what you find is that it has hardly increased. You remember the food grain production of the country increased by a factor of 4. If you looked at the total food grain production even here see it was around this is for Khareef it was around 50 here and for Khareef it has doubled. Whereas, if we look at the non-khareef the entire food grain production then it has gone all the way from 50 to almost 200. So, it has increased 4 fold. In the period in which this FGP has increased 4 fold when we consider both the seasons and in which the Khareef has increased about by a factor of 2. In the same period what you find is that the pulses have remained more or less at the same level since about mid 50s. Why this increase occurred one I really do not know, but the pulses after that have remained more or less static since the mid 50s. Now, if you therefore look at the per capita pulses is going to decrease with time simply because the population is growing and the production is not growing. So, you see a huge decrease in the per capita availability it has come down to almost half of what we had in the 50s. See this is a very bad thing that per capita availability of very critical crops like pulses which are one of the major protein sources in a vegetarian diet has come down so drastically. So, in fact the production of pulses has hardly increased over almost 5 decades and hence the per capita availability has reduced to almost half the value in the mid 50s. So, now here what you see is the per capita availability of food grains on top and per capita availability of pulses here and what you can see is because of the green revolution per capita availability of food grains was maintained very well, but per capita availability of pulses went down by a factor of 2. Therefore, the impact of the green revolution has primarily been on irrigated lands you know in dry land crops in fact there has been hardly any increase in production. So, rain fed areas which provide sustenance to over 60 percent of the Indian population cannot be wished away because after all there is a limit to how much irrigation you can have it depends on the rainfall over the region and it will not be possible to provide irrigation for more than half the cultivated area in the foreseeable future. So, you cannot just say let us convert all the rain fed areas to irrigated areas and hence increase the production. So, we have to deal with rain fed areas and see how we can increase the production of the rain fed areas. Now, therefore, it is critical to identify strategies that can attain and sustain high levels of production over the rain fed regions in the face of rainfall variability. So, it is important to understand why has production of rain fed crops not increased you know we talk so much about the green revolution which came to our rescue. Now, why is it that during the green revolution the production of the rain fed crops did not increase. Now, this question has been posed and answered by none other than MS Swaminathan the great agricultural scientist and what he points out is the following that the research farms programs have mostly been scientist oriented and not farmer or user centered. They were perceived plan implemented supervised and evaluated by scientists the transfer of results followed a top down approach. In this take it or leave it approach the farmer was at best a passive participant. Scientific findings which became the so called technologies were born from small plots and short term research and were invariably not associated with critical cost benefit studies. So, scientific findings really involve you know recommendations about what to do how much fertilizer to use how much pesticide to use when should you show a crop and so on and so forth. These are all recommendations that are born out of the technologies which come from these short term research projects. Now, see another problem has been that the recommendation generated by agricultural scientist even for rain fed regions are often derived without taking into account the variability of rain or variability of climate. Now, why does that happen, but that happens perhaps because the agricultural scientist who were brought up in and subsequent to the green revolution era have expertise relevant primarily for irrigated regions because remember green revolution occurred mainly over the irrigated regions. So, these scientists also have expertise relevant primarily for irrigated regions where the important factors for enhancing yields are not trying to adjust to the climate variability at all because climate is controlled now. Rather it is the choice of crop varieties and the quality of fertile quantity of fertilizer specific sites to be applied and so on.  Now, what is needed for enhancement of yields of rain fed crops is identification of cropping and farming strategies which are tailored to the rainfall variability of the region. So, what we need is to find strategies which are appropriate for the kind of rainfall variability experienced by the different regions. So, they also have to be location specific. Now, while the yield over irrigated areas are assured the yields of rain fed crops vary from year to year. Hence, it becomes critical to evaluate the cost benefit of every strategy as pointed out by Swaminathan. You see because the yields are not assured the farmers do not have that much money to spare they do not make profit consistently. So, they are much more worried about the cost benefit of every strategy that is recommended. And this is why Swaminathan pointed out that cost benefit assessment is absolutely essential. So, what are the main problems then of rain fed farming that there is an enormous impact of climate variability due to adoption of crops and varieties which give high yields in good rainfall years, but very poor in poor rainfall years. See recently there has been a change in cropping patterns which came about with the green revolution even over rain fed regions. And varieties and crops which give a very high yield in good rainfall years have become common now. So, but they do very poorly in poor rainfall years you see. And so, they have the impact of climate variability on these varieties is very large. Also what has happened is unlike the diverse cropping system that was prevalent before the green revolution, the traditional cropping system. Monocropping over large tracks has resulted in enormous increase in pests and diseases many of which are triggered by wet spells and dry spells. So, in this situation one has to look make recommendations of strategies which will enhance the yield for the farmer. Now, we actually have been working in this Paugada region Paugada Anandpur region with farmers who are right now cultivating ground nut. Now, what we could do with the farmer's help was actually assess what would be the cause if all the recommendations official recommendations had to be implemented. You know that our agricultural scientist through the university of agricultural sciences and so on actually generate recommendations for farmers of semi-arid regions for farmers of ground nut in this region also. Now, what we found was and this was based on farmers calculations that if all the official recommendations for ground nut cultivation were followed the farmers would incur losses every year only the magnitude would vary with the rainfall in the growing season. So, this is the problem that the recommendation generated by agricultural scientist as such that they are never going to be cost effective for the farmer. And this is just to give you an example I do not want to get into details, but this is a representative example you know how much they recommend for seed etc etc this is all per hectare and farmland manure and various other things. By the way what we have not calculated here is pesticides. So, actually they also recommend pesticides and that would mean the cost would go even higher in the event of attacking pests. So, now if they went according to the recommendation the cost per hectare would be 12705 whereas, what the farmer does is he does not put too much fertilizers at all and ends up spending something like 6000. So, less than half of what would be the cost as per the recommended strategies. And we again I note that in the estimation of the cost of cultivation it has been assumed that no investment is made in pesticides although pesticide application has been recommended in the case of pest or disease attack. Now, even when yields are reasonable. So, suppose one were to spend in all this and you got reasonable yields and no investment is made in pesticides even then what would happen is now this is an estimate of the yields 8 and 1.0 this is tons per hectare 0.8 and 1. So, what you get is the gross income would be 9000 and 12000 here and in that case if the farmer had actually applied all the recommended strategy then his he would get a loss when he got only 800 per kgs per hectare he would lose 3000 rupees per hectare and in even when he got a good yield which was 1000 kg per hectare he would still lose 705 rupees per hectare whereas, here the farmer would gain 3600 and 6000. So, what is happening is that even when the yields are reasonable no investment is made in pesticide the farmers would incur a loss if they actually adopt the recommendations. So, this is the problem that the recommended strategies that are generated by agricultural scientists cannot be applied by farmers because they are not cost effective. Now, the farmers also told us that several recommended strategies for example, when should the ground not be sown that is to say which is the appropriate sowing window or how much seed should you put per hectare which they call seed rate they were also found to be inappropriate by the farmers. So, I will come to this, but for example, it was recommended that if you do not get sowing rains till the end of July do not sown ground at all in August. So, something else like soybean and so on, but our farmers told us that often when they had to sown in August they got extremely good yields. So, clearly what the recommendations were not appropriate. So, what we need to do is if our aim is to enhance the production of rainfed regions we need to identify farmer acceptable strategies which are optimum for the rainfall variability of the region. And so, what are the farming strategies we are looking for we are looking for cropping patterns you know which crops would be optimum in the crops which variety would be optimum management strategies which would mean choice of sowing date, plant population density and so on appropriate to the nature of the observed climate variability of the region or a given prediction. So, if you happen to have a prediction for a specific year that is fine one should be able to even derive the strategy which would get maximum yield given that the prediction would be correct. So, what are these farming strategies optimum for what is the final aim either for maximizing production or profit or for minimizing risk that depends on the farmers. Some farmers may want to minimize risk particularly the marginal ones whereas, the people with large land holding would want to maximize profit because they can carry it over to the next year. In addition to these farming strategies one also needs coping strategies for extreme events such as droughts vulnerability and so on. And I will come to that in this set of lectures what sort of coping strategies that these people adopt and could be adopted one also needs sustainable strategies for irrigated and rain fed regions. Now, why has this fatigue of the green revolution come? The fatigue of the green revolution in the irrigated areas has come because we have used the resources in an unsustainable manner. You know the soil nutrients have got depleted. So, the soil has become less rich in nutrients and therefore, for the same yield you need to add more fertilizers also because so many pests have grown with monocropping and so on one has to also invest in pesticides. In any event you know maintaining the soil health is absolutely essential if you want sustainable strategies. Obviously, right now we have taken more out of the system and gotten good production then we put into the system and this is why we are beginning to feel the effects of that. Now, there are some strategies to enhance production such as application of fertilizers and pesticides and we already saw an example of this application of fertilizers specific recommendations were made about how much fertilizers need to be applied and so on. So, application of fertilizers and pesticides which actually contributed substantially to enhancement of production of irrigated areas have also been identified for rain fed regions. However, farmers have been reluctant to adopt these over rain fed regions as they are not cost effective in poor monsoon season. Hence, it is important to ensure that the strategies can in fact be adopted. How are these strategies to be identified? Now, so the question is how do you decide what would be a good showing window and what variety would do better in a particular agro climatic regime or given the soil and the rainfall variability of the region. Now, until the 80s most of the work investigating variation of yields for different crops or for different management options. See what you want to do is you try and study what will happen if you show at different dates on different plots and see in which case you get maximum yield for example. So, until 80s most of the work investigating how the yields vary as you vary some strategy. It may be choice of showing window or it may be you know competition between different crops which crop would do better in terms of yields and so on. So, all these strategies were identified on the basis of field experiments and these field experiments are extremely time consuming and energy consuming and they were typically conducted for 2 to 3 years. Now, the results were dependent on the pattern of climate particularly rainfall that occurred in those particular years. If you had a drought in those years you would get some result if you did not have a drought at all you would get some other result for example. So, these were short studies this is exactly what Professor Swaminathan commented on that generally these technologies were born from these very very short experiments of 2 to 3 years. Now, we have another tool at our disposal which has been developed extremely well in the last 3 decades and this is a thing called a crop model. So, this is a model in a computer in which we specify the kind of seeds that there are we specify what rainfall will occur what is the kind of soil and in the computer the plant actually grows and depending on various incidents that occur at different stages and so on you know the computer model called calculates everything how the soil moisture evolves how the plant grows and eventually in the case of ground on how many what is the kind of yield you get. So, we have now this development of crop models that has taken place and this is a very very interesting tool because with this tool now we can get an enormous insight into the variation of yields either for different crops or management options and because we can just run the crop model with different options that we are trying to look at with different varieties if you are choosing between different varieties with different crops if you are choosing with different crops and then see under what conditions is the yield maximized. So, crop model is an extremely important tool for identification of strategies of course I must mention at this point it is extremely critical that crop models that we use are validated for the varieties we are going to explore and for the region of interest this is extremely important because in the crop models there are many things specified about the physiology of the crop and so many other things and one should be able to give the parameters involved by using observations of the specific varieties in the field trials at agricultural stations and furthermore try and validate the extent to which the crop model can simulate the impact of say rainfall variability from year to year. So, this is very important but given that we have a good crop model then it becomes possible to explore the different options available and crop models can also simulate the inter-annual variation of yields for specific crop management options from the available metrological data. So, if you want to look at for example our problem that the farmers posed for us what is the optimum sowing window for ground nut in the Anandpur region then for Anandpur we have almost 100 years of rainfall data and we can run the crop model for each of those years provided it is validated and that will give us insight on which is the optimum sowing window. So, it becomes possible for identification of strategies which are appropriate for the climate variability or rainfall variability of the region. So, this crop model is a very very important tool in the hands of scientists and with that we should be able to find strategies which can actually lead to maximizing our rain fed production but the approach to be adopted in that has to be very carefully selected. The approach has to be genuinely interdisciplinary because you need people who are agricultural scientists who know crop models, you need meteorologists because they have to tell you what sort of rainfall variability occurs in that region or what sort of rainfall variability is expected in the next season and so on. Thirdly farmers have to play a very very important role because eventually you are looking for an optimum strategy from amongst a slew of strategies. Now, you have to know from the farmer what are the options available to him in terms of cropping patterns, in terms of various other management options and so on. It is also you need to know from him what are the costs involved and then you should be able to estimate the likely benefit of the strategy using your models crop models and so on. So, what is needed is a genuinely interdisciplinary approach with participation of farmers, agricultural scientists and meteorologists on an equal footing not top down. It is not a matter of generating recommendations and simply handing them to the farmers and asking them to obey that has not failed. See this lab to land approach actually worked for the green revolution thing because most of the technologies were actually discovered in the lab and then the farmers were given recommendations which worked in the field. In rain fed areas it is very clear that the recommendations generated by the traditional methods by agricultural scientists are simply not working. They are not a farmer acceptable and therefore, to generate recommendations, generate strategies which are acceptable to the farmers we need this kind of genuine interdisciplinary approach. So, what is it? We need a three way interaction. Farmers should tell what the farming practices are? What are the farm level decisions to be made? For example, the choice of sowing window as I said and also what are the critical climate events? They will tell you that a wet spell at a certain stage will have a very large impact on the yield for example, or on some pest or on some disease and so on. So, it is farmers who have the knowledge of the ecological system they are dealing with and they can give a lot of information on farming practices, on farm level decisions, on critical climate events and so on and so forth. Now, agricultural scientists have of course, a very important role to play because they know the plant physiology of the crops you are growing what are the critical stages then there are also pathologies and people who work on pests and diseases and there are people who work on crop models. So, all these know how the modern know how has to go into the system and you also need atmospheric scientists and actually hydrologists as well because you need inputs on the nature of rainfall variability and what sort of predictions are possible and they should generate for you predictions on the basis of historical data also of what are the probabilities of the critical events occurring in a specific region. They should be able to do hydrological modeling so that they can see if the soil moisture can be predicted in a situation and so for all this you need a background in atmospheric science and hydrology. So, all this science which you see in the bottom has to be put together along with the knowledge that the farmers have on the traditional ecosystem before one can actually generate what are strategies which can be implemented. Now, with the objective of addressing the problem of using climate variability information and prediction to identify strategies for enhancing production or reducing risks and vulnerability of agriculture in the semi-arid tropics. We actually develop such an approach which involved active collaboration with the stakeholders that is the farmers. Now, we have applied it to the specific case of rain fed ground nut in the Anandpur region in a semi-arid part of the Indian peninsula. So, in fact this is the ground nut growing region of India all these dots are where ground nut is grown and Anandpur is right here in the heart of this dense packet here I should also mention Gujarat also has a lot of ground nut being grown. So, Anandpur is a place here in the heart of the ground nut growing region of the peninsula. This is what we have chosen and this what you see here is a beautiful ground nut plant. Now, this tells you what the rainfall is like actually this is a semi-arid region it has rainfall of 75 centimeters less than 75 centimeters a year. So, the rainfall is not much and this is where Anandpur is located you can see that rainfall is very high on the west coast very high here and also very reasonable in the monsoon zone here which we have seen earlier, but this is a part of semi-arid part of the region. Now, what is the nature of rainfall variability at Anandpur I have been harping that the critical thing to look at is how much the rainfall varies from year to year. There is no point in assuming that the rain will be like the average rain it never is and this shows you how variable it is. So, what this is is weakly rainfall at Anandpur and the circle here represents the average rainfall for that week you can see that most of the rain there is a peak here around April May which we call the pre-monsoon rain and after that most of the rain occurs from September, October and so on. So, this is a little bit similar to Bangalore region and then it decreases rapidly. So, that by end of November there is hardly any rain. So, this is the mean picture. Now, what are these big sticks? These big sticks tell you how what is the variation of 50 percent of the years around the mean. In other words see every year the rainfall will be different in a given week right. Suppose you this bar that you have covers 50 percent of the years that is 75 percent of years below the top edge and 25 percent below the bottom edge. So, 25 percent of the years are below this bottom edge of the thing and 25 percent of the years are above this top edge. So, in between the 50 percent years what is the range of variation that is shown and you can see that the range of variation is extremely large particularly during the high rainfall. Here you can see that although the mean is reasonable actually 50 percent of the years would not even get anywhere near the mean it is much smaller and that is by and large true in the pre-monsoon events. You can see that by and large the mean is above the 50 percent thing and it is only here that you get some chance of getting more than the mean and even then you can see that the variability is huge. So, here if the mean is about 5 or 6 centimeters you can see if you took only the 50 percent of the years near the near this thing then it can vary from anywhere near almost 0 to 9.5 centimeters. So, this is the kind of huge variability that can occur from year to year and we have to find strategies which can take this variability in its stride so to speak and still deliver the goods. Now, this is the yield for Anandpur this is the average yield for Anandpur district for ground nut again and this is from 70 onwards and what you see is this line 500 kg is the minimum you need to meet the cost of cultivation when you get less than 500 that means it is a total loss and that is what you got here and here. So, there are years in which it is a total loss there are years in which it is very close to a total loss very little profit then there are some years in which you would make reasonable profit. So, there is a lot of variation here and we have to see if we can derive strategies by adopting which they could make much more profit in then they are making here.  And we were particular that we actually interact with the farmers. So, these are my collaborators on this Dr. Narhari Rao who worked on the crop model part who was my associate in the Centre for Atmospheric Oceanic Sciences Sheshgiri Rao is an ecologist farmer who was really one of the main people in this project because he could talk to farmers as well as to us and the three of us formed a team and did this work the people you see here are two farmers of whom this one Mr. Lakshmana is particularly intelligent and one of the most successful farmers of that region. In fact, he is the person who brought the specific variety they grow TMV2 from Coimture to this region. So, this is the way we have interacted with them over the years and had meetings not only with the big farmers, but also with the marginal farmers. We had a network of marginal farmers farmers who own less than 2 hectares of land. So, that we come to know what are the options available to them also what are the kind of strategies we should look for. So, that they do not end up making losses year after year. This again is Mr. Lakshmana about whom I have told you and I will have occasion to talk about his contribution to our work when I talk about the showing window thing. Now, what has happened is that over this region the cropping patterns have changed enormously since the 70s and the traditional cropping pattern over most of the country actually before the 70s comprised the large diversity of crops. See we may expect that over the years with experience of cultivation in variable climate rules about the cropping pattern adopted and the management practices had evolved to be optimum for the climate of the region. What I am saying is that when you are growing a set of crops over a region for hundreds and hundreds of years then by trial and error you would know when each crop should be planted in what succession they should be planted and so on because over hundreds of years farmers would be trying out various things and eventually hit on the successful strategy for that region. See this is how natural selection takes place and this is how farmers would have identified the strategies for each region. But now for example in our study region when an opportunity for planting that is adequate moisture in the top layer of the soil occurs that determines which set of crops will be cultivated. So, what you see here now is again Anandpur weekly rainfall which you saw before in May there is a peak and the bigger peak occurring in October November and so on. So, background hill is the rainfall. Now this is the traditional cropping system and you can see the enormous variety of crops. So, depending on when the sowing window occurred you know they would plant pigeon pea, sorghum, caster if the sowing window is somewhat later they would plant caster then if much later they would plant minor millets and so on and so forth. So, they had a whole variety of crops that they would plant depending on when the sowing that occurred. Now what has happened in place of this whole variety now they have basically two main crops peanut and horse gram and peanut is planted somewhere during this period and horse gram is planted here and that is it. In addition of course, they have cow pea, horse gram, green gram, caster, pigeon pea etcetera over a very small portion of their land. So, what has happened is from a very complicated system traditional complex diverse system which actually utilize the large part of the rain profile. Now we are getting a system which is much simpler which actually does not use a part of the profile and so there has been a big transition from traditional cropping to current cropping. So, the cropping pattern over most of the regions of India today is rather different from the traditional one even when the traditional crops are cultivated the varieties are also very rarely the same. So, the cropping patterns have changed a lot and this market change from traditional cropping pattern occurred about 3 decades ago. Now I will continue in this and in fact share with you what are the factors that have led to this new cropping pattern. But at this point let me say that what we need to do is given the current cropping pattern we try and find out what are the problems faced by the farmers and the current cropping pattern has been in only for about 2-3 decades. So, there has not been enough time for farmers by trial and error to find what are the optimum sowing windows, what are the what is the optimum seed rate and so on and so forth. To some extent they know something about what may be the better variety on the basis of this experience. So, now with all the science at our command we should be able to using crop models and so on try and identify for them what are the optimum strategies for the current cropping pattern because those are simply not available from their experience. So, we will I will continue with this and talk about this in the next lecture how we come and identify how we go ahead and identify using the armory of the scientific tools that have been developed right up to now. How we identify strategies which will improve the production of rain-fed areas. Thank you.