An Informal Introduction to Numerical Weather Models with Low-Cost Hardware

William E. Foust National Center for Atmospheric Research, Boulder, Colorado

Search for other papers by William E. Foust in
Current site
Google Scholar
PubMed
Close
Full access

Abstract

Weather, climate, and other Earth system models are growing in complexity as computing resources and technologies continue to evolve with time. Thus, models are and will remain a vital tool for scientific research. Exposure and education on the workings of such models can generate interest toward atmospheric science, and it can increase scientific literacy among the general public. Additionally, studies have suggested that early exposure to these models can affect the career trajectory of students. However, gaining exposure and experience remains difficult outside of internships, research settings, and other professional endeavors. Some of these barriers can include hardware and computing costs, curriculum structure, and access to instructors. As a means of addressing these barriers, the goal of this work is to utilize low-cost hardware and abstract away some of the complexities of running a numerical weather model without sacrificing fidelity. The approach is to create a graphical user interface (GUI) where users can quickly configure the model, run it, and analyze the output without knowledge of model configuration, system architecture, or navigation via a command line interface. The Pi-WRF application is packaged such that users can download and run the model within a matter of minutes. The application is designed to promote informal learning through hands-on experience. It is targeted toward lower secondary level students, but it can scale across grade levels, and it can be adapted for general audiences.

© 2022 American Meteorological Society. For information regarding reuse of this content and general copyright information, consult the AMS Copyright Policy (www.ametsoc.org/PUBSReuseLicenses).

Corresponding author: William E. Foust, wefoust@psu.edu

Abstract

Weather, climate, and other Earth system models are growing in complexity as computing resources and technologies continue to evolve with time. Thus, models are and will remain a vital tool for scientific research. Exposure and education on the workings of such models can generate interest toward atmospheric science, and it can increase scientific literacy among the general public. Additionally, studies have suggested that early exposure to these models can affect the career trajectory of students. However, gaining exposure and experience remains difficult outside of internships, research settings, and other professional endeavors. Some of these barriers can include hardware and computing costs, curriculum structure, and access to instructors. As a means of addressing these barriers, the goal of this work is to utilize low-cost hardware and abstract away some of the complexities of running a numerical weather model without sacrificing fidelity. The approach is to create a graphical user interface (GUI) where users can quickly configure the model, run it, and analyze the output without knowledge of model configuration, system architecture, or navigation via a command line interface. The Pi-WRF application is packaged such that users can download and run the model within a matter of minutes. The application is designed to promote informal learning through hands-on experience. It is targeted toward lower secondary level students, but it can scale across grade levels, and it can be adapted for general audiences.

© 2022 American Meteorological Society. For information regarding reuse of this content and general copyright information, consult the AMS Copyright Policy (www.ametsoc.org/PUBSReuseLicenses).

Corresponding author: William E. Foust, wefoust@psu.edu
Keywords: Education; Software

It is well known that weather and climate models are vital tools in the atmospheric sciences and will remain so for the foreseeable future. For students who have an interest in the physical sciences, training on how to install, configure, and run advanced numerical models often begins at the graduate level. Some studies suggest hands-on experience is a significant contributor toward a student’s conceptual understanding, and this can directly impact a student’s performance and career trajectory (Trott et al. 2020; Mackin et al. 2012). Also, evidence has been presented that implies the impact of hands-on experience is significant on secondary school students (Dabney et al. 2012; Sadler et al. 2014). Thus, it is important to provide educational tools and experience for these students, so they can foster and build a foundation for careers in science, technology, engineering, and mathematics (STEM).

Early exposure to weather and climate models is difficult because these models are specific to the field of atmospheric science, and students’ attention is shared among other STEM disciplines (Bhattacharya et al. 2020). Additionally, models are inherently complex and computationally demanding. The software installation requires time and highly technical computing skills, running the model requires detailed knowledge of tunable parameters, and visualizing the model’s output often requires programming skills. There are tools like Science on a Sphere and Educational Global Climate Model (EdGCM) that aim to introduce the general public to models and atmospheric science principles. Although they are effective, they lack portability or are tailored for university level students, which renders them inaccessible to some members of the general populace (Schollaert Uz et al. 2014; EdGCM 2021).

As a means of addressing these difficulties, the Pi-WRF application was created. The overarching goal of this work is to create a user-friendly application that allows people who possess no prior experience or guidance to download and run a weather model in a matter of minutes. The application intends to be an informal educational tool that primarily targets lower secondary students, but the application scales across age, and it can be adapted to convey concepts to a general audience. Users of the application can gain basic insights into the procedures of running a numerical weather model, as well as learn some of the skills needed to make a forecast based on a model’s output.

Hardware

The Pi-WRF application is optimized for Raspberry Pi computers. At the time of this writing, the Raspberry Pi 4 is the latest model, and it is a low-cost system on a chip (SOC). The base model specifications include a quad-core 1.5-GHz processor, 2 GB of memory, expandable storage via a microSD memory card, and a Debian Linux-based operating system. The latest version of the Pi has been shown to perform nearly 8 gigaflops of computation, which is on par with the top 500 supercomputers in the year 1997 (Top500 Project 2021). The latest Pis use either a 5.1-V power supply or power over Ethernet (PoE) connection. The form factors of Raspberry Pis are quite small, where they measure 3.37 in. × 2.22 in., which is comparable to the size of a standard credit card. Last, Raspberry Pis have general purpose input/output (GPIO) pins built into their boards, which allows Pis to interact directly with external hardware and sensors (Raspberry Pi Foundation 2021).

Raspberry Pis are currently used worldwide by hobbyists, educators, and engineers. The popularity of the Raspberry Pi has attracted commercial interest, which has spurred their availability. Pis are relatively easy for individuals and organizations to obtain as individual units or in bulk. They can be purchased through the Raspberry Pi Foundation’s authorized dealers, large online retailers, department stores, and local electronics shops. The base model of the Pi can be purchased for $35. It is important to note the base model does not come with peripherals such as a monitor, keyboard, or mouse. With the inclusion of the peripherals, users can obtain a complete and working system for less than $100. The low-cost nature of these devices allows many individuals to afford them, as well as schools and other programs to purchase them in bulk.

Once the hardware is purchased, a user must install the Raspberry Pi operating system on a microSD card before use. For users who are unfamiliar with the process, there exists a large collection of documentation and video instructions on how to perform this on the Raspberry Pi website. The whole process can be completed within an hour for individuals with limited technical experience depending on their bandwidth and the read/write speed of their memory card. For an extra fee (roughly $5–$10 based on prices listed at the time of this writing), some authorized retailers offer versions of the Pi that are packaged with the operating system preinstalled.

Software

Software containers are essentially lightweight virtual machines that can execute code, but do not need an underlying operating system to do so. This makes container-based applications agnostic of hardware and operating systems. There currently exists efforts to develop code repositories and containers for numerical models as a means increasing portability and circumventing the complexities associated with compiling models (Hacker et al. 2017; Dearden 2021). The use of these containers can be beneficial to the scientific community, but they generally target professionals and advanced students. The Pi-WRF application performs similarly to these containers, except a point and click graphical user interface is included within the container, the code is optimized for the hardware constraints of Raspberry Pis, and many of the configuration options are hidden to make the application more user-friendly for people without technical backgrounds in atmospheric science or computing.

A containerization platform generally consists of three components: an engine, images, and containers. Docker is a specific containerization platform, and Pi-WRF is built on top of it. This platform is driven by Docker-Engine, which is a client-server application that allows a host machine to manage images and use containers (Docker Inc. 2021). The images, known as Docker Images, exist within this system and are complete executable packages of code that can be executed in an isolated environment without the support of an underlying operating system. When a runtime instance of this package of code is created, it becomes a container, where an application and all its dependencies are packaged together.

When a user desires to run the Pi-WRF application, they must first download and install the Docker-Engine. Once installed, a user will download, or “pull” the Pi-WRF image from a remote server called DockerHub. With a local copy of the image, the Docker-Engine creates an instance of the image at runtime, and the Pi-WRF container is created. Within the container, the Pi-WRF application consists of the Weather Research and Forecasting Model version 3.9.1, the WRF Preprocessing System version 4.0, Python3 with the Tkinter Library (for the graphical user interface), the NCAR Command Language (for visualization), and other miscellaneous scripts for configuring the model (Powers et al. 2017). Figure 1 depicts the complete Pi-WRF software architecture and its relation to the hardware.

Fig. 1.
Fig. 1.

The schematic depicts the architecture of the Pi-WRF software. The lowest level consists of the Pi’s operating system, and Docker is built directly on top of the operating system.

Citation: Bulletin of the American Meteorological Society 103, 1; 10.1175/BAMS-D-20-0146.1

Running the application

To launch the Pi-WRF application, the user should use the Pi’s built-in terminal and execute a short series of commands. The series of commands will download and install Docker, pull a Docker image of Pi-WRF, and then instantiate the Pi-WRF container. The commands are displayed explicitly in Fig. 2. When the application is launched, it establishes a connection with a server hosted by the National Centers for Environmental Information (NCEI). If the application is unable to connect to the NCEI servers, and subsequently fails to execute properly, relevant disclaimers are shown on the application’s home screen.

Fig. 2.
Fig. 2.

The figure is an excerpt from an instruction printout that was distributed during outreach events. The application is started by launching a terminal and entering two commands.

Citation: Bulletin of the American Meteorological Society 103, 1; 10.1175/BAMS-D-20-0146.1

Navigation through the application should feel natural because it utilizes standard navigational aids for the user. As a user begins to navigate through the application, it solicits a model initialization time and forecast duration from the user. After selecting the times, the user is presented with a clickable menu where they can “click and drag” the domain of their choosing. The size of the domain strongly affects the time to solution, where relatively small domains are resolved in a much shorter time than large domains. The size of a user’s domain is constrained to grids less than 15,000 cells because of the Pi’s limited memory. Selection of the domain is shown in Fig. 3.

Fig. 3.
Fig. 3.

A screenshot of the Pi-WRF application as a user selects a domain for their simulation. The domain is limited to 15,000 grid cells, and there is a counter that estimates the total count.

Citation: Bulletin of the American Meteorological Society 103, 1; 10.1175/BAMS-D-20-0146.1

After a user confirms their domain and simulation time, the application connects to NCEI servers to download appropriate initial and lateral boundary conditions based on the 1° Global Forecast System (GFS) analysis and its forecasts. Afterward, the simulation adjusts the time step, physics suite, and output frequency for the user, and runs the WRF Preprocessing System and the WRF Model. The model is preconfigured to utilize the four cores of the Raspberry Pi. Due to memory and storage constraints, as well as a reduction in complexity for users, the simulation grids are fixed at 30 km and use 34 vertical levels regardless of the domain size. After the simulation is completed, the model then runs a series of NCAR Command Language (NCL) scripts to create visualizations of the output. The hourly surface temperature field from a 12-h simulation is shown in Fig. 4. Output from the application includes surface temperature, surface wind speed, accumulated rain, and accumulated snow.

Fig. 4.
Fig. 4.

A screenshot of the Pi-WRF application as a user views and saves the output from their simulation.

Citation: Bulletin of the American Meteorological Society 103, 1; 10.1175/BAMS-D-20-0146.1

Discussion

Accessibility.

An important requirement for the Pi-WRF application is accessibility. The technical requirements associated with WRF are circumvented by Pi-WRF’s graphical user interface (GUI) and use of containers. The application is relatively affordable since it is open-source, and designed for inexpensive hardware. However, it is recognized the application requires an internet connection to make a forecast, and not all users have the bandwidth to download the initial conditions. A similar web-based application with cloud computing resources can be created to address the bandwidth issues, but the host institution must pay for compute services, and students forgo the novel aspect of running a model locally.

With WRF being capable of simulating the weather anywhere on the globe, the application may have appeal to users worldwide. With a broader user base, the accessibility can be expanded by including additional languages in subsequent versions of the application. Currently, text is intentionally minimized within the application to foster language translation. However, more resources are needed to assist and bring about these updates. Another potential feature that can increase accessibility of the application is to impart audio cues for students who are visually impaired.

Use cases.

The current version of Pi-WRF offers a modest suite of features in exchange for simplicity and ease of use. Given this, the application is not expected to be utilized in research applications or in formal curriculum. Instead, the tool has been structured to perform well in informal settings, which are considered to be any setting outside of a traditional classroom and outside traditional class time. A prominent benefit of using the tool in an informal setting is that it can be adapted to accommodate different audiences, and it offers latitude for educators to deliver instruction. Educators can refer to the Pi-WRF instruction set to acquire setup procedures, relevant background, example exercises, and an evaluation rubric that can aid them in creating lessons for their audience (Foust 2021). Examples of use cases are presented in the proceeding text.

Outreach events.

One of the most prominent uses of the Pi-WRF application occurs at outreach events at science centers, universities, schools, community events, and other similar functions. At these events, Raspberry Pi kiosks are set up where event participants can use the application. It is assumed participants have no prior knowledge of weather models or computing. An attendant guides users through the application, as well as imparts knowledge through verbal communication over the course of a few minutes. If users are interested in learning more about weather forecasting or are interested in using the application personally, handouts are given so attendees can pursue further education. It is possible to set up kiosks that do not require an attendant, but adequate printed or audio materials must accompany this to ensure users gain knowledge from their experience.

After-school programs.

In addition to outreach events, the Pi-WRF application can be used in after-school or brief workshop-like settings. Instruction in this setting is usually under an hour. This allows participants to ingest more information and immerse themselves when compared to an outreach setting. After-school use allows for creative and adaptive lesson plans but requires the instructor to have some background knowledge on meteorology. However, there exists resources that are available for instructors (University Corporation for Atmospheric Research 2021).

Because these lessons are intended to be fairly short and self-contained, it may not be warranted for many institutions to purchase Raspberry Pis for the sole purpose of running the current version of Pi-WRF. However, the Pi is quite versatile. There exist education ecosystems that provide a plethora of meteorology and other STEM-related Raspberry Pi projects, and many weather projects can be found on the Raspberry Pi website.

Hobbyist and self-paced learners.

Aside from students, this application may appeal to weather enthusiasts and hobbyists. This is because the application accommodates self-paced learning and provides users with a limited toolset to make their own weather forecast. Beyond a forecasting tool, the application can at least serve as an entry point for users who want to explore atmospheric science concepts in more detail. Since this application serves a general audience, it is expected that the vast majority of users will not have formal training in atmospheric science. Therefore, the application has prominent disclaimers that prohibit the use of the application in any official capacity.

Developers.

Due to the levels of abstraction, advanced and experienced WRF users will find its current suite of features limited as a formal undergraduate teaching tool or as a viable tool for research. However, it is possible for users with knowledge of WRF, Python, and Git to create custom versions that suit their needs. Within the GitHub repository of the application, there exists links to the documentation for developers. Also, supplemental material can be included with the application to expand teaching capabilities, and appeal to students outside of secondary school. This can be done with user-created lesson plans that encourage students to explore weather and climate models in more depth.

Conclusions

The Pi-WRF application joins other efforts in creating a streamlined workflow in running the WRF Model, but the application’s use of a GUI, aesthetics, optimization for Raspberry Pis, and intentionally curtailed model configurations allow it to support introductory experiences into numerical weather prediction. Due to the application’s uncomplicated design and scope, the application can be used effectively in informal settings like outreach events and after-school programs. Overall, it is hoped the low cost of the hardware and simplicity of the application will increase the accessibility of the numerical weather prediction, as well as continue to lower the barrier of entry into the atmospheric sciences.

Acknowledgments.

The author offers special thanks to Dr. Chris Dearden for insightful comments and work toward compiling WRF on Raspberry Pis, and many colleagues at NCAR for discussions and comments on features associated with the software.

Data availability statement.

The application is released under the BSD 3-Clause License. Source code and documentation for the application can be found at the NCAR/Pi-WRF GitHub repository (https://github.com/NCAR/pi-wrf). The Docker Image of the application can be found on DockerHub (https://hub.docker.com/r/ncar/pi-wrf).

References

  • Bhattacharya, D. , K. C. Steward , and C. T. Forbes , 2020: Empirical research on K-16 climate education: A systematic review of the literature. J. Geosci. Educ., 69, 223247, https://doi.org/10.1080/10899995.2020.1838848.

    • Search Google Scholar
    • Export Citation
  • Dabney, K. P. , R. H. Tai , J. T. Almarode , J. L. Miller-Friedmann , G. Sonnert , P. M. Sadler , and Z. Hazari , 2012: Out-of-school time science activities and their association with career interest in stem. Int. J. Sci. Educ., 2, 6379, https://doi.org/10.1080/21548455.2011.629455.

    • Search Google Scholar
    • Export Citation
  • Dearden, C. , 2021: Building and running WRF on a Raspberry Pi. Accessed August 2021, http://chrisdearden.net/WRFRPi/.

  • Docker Inc., 2021: Docker overview. Accessed August 2021, https://docs.docker.com/get-started/overview/.

  • EdGCM, 2021: EdGCM. Accessed August 2021, http://edgcm.columbia.edu/.

  • Foust, E. , 2021: Pi-WRF instructions. Accessed August 2021, https://doi.org/10.5065/sdhd-ft24.

  • Hacker, J. P. , J. Exby , D. Gill , I. Jimenez , C. Maltzahn , T. See , G. Mullendore , and K. Fossell , 2017: A containerized mesoscale model and analysis toolkit to accelerate classroom learning, collaborative research, and uncertainty quantification. Bull. Amer. Meteor. Soc., 98, 11291138, https://doi.org/10.1175/BAMS-D-15-00255.1.

    • Search Google Scholar
    • Export Citation
  • Mackin, K. J. , N. Cook-Smith , L. Illari , J. Marshall , and P. Sadler , 2012: The effectiveness of rotating tank experiments in teaching undergraduate courses in atmospheres, oceans, and climate sciences. J. Geosci. Educ., 60, 6782, https://doi.org/10.5408/10-194.1.

    • Search Google Scholar
    • Export Citation
  • Powers, J. G. , and Coauthors , 2017: The Weather Research and Forecasting Model: Overview, system efforts, and future directions. Bull. Amer. Meteor. Soc., 98, 17171737, https://doi.org/10.1175/BAMS-D-15-00308.1.

    • Search Google Scholar
    • Export Citation
  • Raspberry Pi Foundation, 2021: About us. Accessed August 2021, www.raspberrypi.org/about/.

  • Sadler, P. M. , G. Sonnert , Z. Hazari , and R. Tai , 2014: The role of advanced high school coursework in increasing STEM career interest. Sci. Educ., 23, 113.

    • Search Google Scholar
    • Export Citation
  • Schollaert Uz, S. , W. Ackerman , J. O’Leary , B. Culbertson , P. Rowley , and P. A. Arkin , 2014: The effectiveness of science on a sphere stories to improve climate literacy among the general public. J. Geosci. Educ., 62, 485494, https://doi.org/10.5408/13-075.1.

    • Search Google Scholar
    • Export Citation
  • Top500 Project, 2021: Top500 list. Accessed August 2021, https://top500.org.

  • Trott, C. D. , L. B. Sample McMeeking , C. L. Bowker , and K. J. Boyd , 2020: Exploring the long-term academic and career impacts of undergraduate research in geoscience: A case study. J. Geosci. Educ., 68, 6579, https://doi.org/10.1080/10899995.2019.1591146.

    • Search Google Scholar
    • Export Citation
  • University Corporation for Atmospheric Research, 2021: UCAR Center for Science Education. Accessed August 2021, https://scied.ucar.edu/.

    • Search Google Scholar
    • Export Citation
Save
  • Bhattacharya, D. , K. C. Steward , and C. T. Forbes , 2020: Empirical research on K-16 climate education: A systematic review of the literature. J. Geosci. Educ., 69, 223247, https://doi.org/10.1080/10899995.2020.1838848.

    • Search Google Scholar
    • Export Citation
  • Dabney, K. P. , R. H. Tai , J. T. Almarode , J. L. Miller-Friedmann , G. Sonnert , P. M. Sadler , and Z. Hazari , 2012: Out-of-school time science activities and their association with career interest in stem. Int. J. Sci. Educ., 2, 6379, https://doi.org/10.1080/21548455.2011.629455.

    • Search Google Scholar
    • Export Citation
  • Dearden, C. , 2021: Building and running WRF on a Raspberry Pi. Accessed August 2021, http://chrisdearden.net/WRFRPi/.

  • Docker Inc., 2021: Docker overview. Accessed August 2021, https://docs.docker.com/get-started/overview/.

  • EdGCM, 2021: EdGCM. Accessed August 2021, http://edgcm.columbia.edu/.

  • Foust, E. , 2021: Pi-WRF instructions. Accessed August 2021, https://doi.org/10.5065/sdhd-ft24.

  • Hacker, J. P. , J. Exby , D. Gill , I. Jimenez , C. Maltzahn , T. See , G. Mullendore , and K. Fossell , 2017: A containerized mesoscale model and analysis toolkit to accelerate classroom learning, collaborative research, and uncertainty quantification. Bull. Amer. Meteor. Soc., 98, 11291138, https://doi.org/10.1175/BAMS-D-15-00255.1.

    • Search Google Scholar
    • Export Citation
  • Mackin, K. J. , N. Cook-Smith , L. Illari , J. Marshall , and P. Sadler , 2012: The effectiveness of rotating tank experiments in teaching undergraduate courses in atmospheres, oceans, and climate sciences. J. Geosci. Educ., 60, 6782, https://doi.org/10.5408/10-194.1.

    • Search Google Scholar
    • Export Citation
  • Powers, J. G. , and Coauthors , 2017: The Weather Research and Forecasting Model: Overview, system efforts, and future directions. Bull. Amer. Meteor. Soc., 98, 17171737, https://doi.org/10.1175/BAMS-D-15-00308.1.

    • Search Google Scholar
    • Export Citation
  • Raspberry Pi Foundation, 2021: About us. Accessed August 2021, www.raspberrypi.org/about/.

  • Sadler, P. M. , G. Sonnert , Z. Hazari , and R. Tai , 2014: The role of advanced high school coursework in increasing STEM career interest. Sci. Educ., 23, 113.

    • Search Google Scholar
    • Export Citation
  • Schollaert Uz, S. , W. Ackerman , J. O’Leary , B. Culbertson , P. Rowley , and P. A. Arkin , 2014: The effectiveness of science on a sphere stories to improve climate literacy among the general public. J. Geosci. Educ., 62, 485494, https://doi.org/10.5408/13-075.1.

    • Search Google Scholar
    • Export Citation
  • Top500 Project, 2021: Top500 list. Accessed August 2021, https://top500.org.

  • Trott, C. D. , L. B. Sample McMeeking , C. L. Bowker , and K. J. Boyd , 2020: Exploring the long-term academic and career impacts of undergraduate research in geoscience: A case study. J. Geosci. Educ., 68, 6579, https://doi.org/10.1080/10899995.2019.1591146.

    • Search Google Scholar
    • Export Citation
  • University Corporation for Atmospheric Research, 2021: UCAR Center for Science Education. Accessed August 2021, https://scied.ucar.edu/.

    • Search Google Scholar
    • Export Citation
  • Fig. 1.

    The schematic depicts the architecture of the Pi-WRF software. The lowest level consists of the Pi’s operating system, and Docker is built directly on top of the operating system.

  • Fig. 2.

    The figure is an excerpt from an instruction printout that was distributed during outreach events. The application is started by launching a terminal and entering two commands.

  • Fig. 3.

    A screenshot of the Pi-WRF application as a user selects a domain for their simulation. The domain is limited to 15,000 grid cells, and there is a counter that estimates the total count.

  • Fig. 4.

    A screenshot of the Pi-WRF application as a user views and saves the output from their simulation.

All Time Past Year Past 30 Days
Abstract Views 22 0 0
Full Text Views 1963 302 21
PDF Downloads 1652 178 6