<p><strong>TL;DR:</strong>
Global NWP models such as NCEP's GFS (free access) and ECMWF's IFS (restricted access) provide  forecasts at a horizontal scale of a few tens of kilometers every few hours. Starting from global NWP data, NCAR's WRF (free) can be used to produce results at a resolution of a few kilometers and stored every few minutes in time.</p>

<hr>

<p>I felt I could give some insights. This answer aims to provide further practical references regarding well-known NWP models. It centers on places to look at and what can be done with available resources. I will only briefly try to illustrate why the underlying physics can be seen as intrinsically complex.</p>

<p>Numerical Weather Prediction (NWP) models are interested in the system composed of the Earth's atmosphere and surface. This system encompasses physical features and processes with a wide range of scales: weather front across thousands of kilometers, cumulus spanning a few kilometers, soil layers varying over a few meters, rain drops smaller than a few millimeters in diameter, interactions with solar radiations shorter than a few micrometers in wavelength, ... The models work at a large scale, trying to resolve the movement of air masses by solving PDEs on a grid, and use physical parametrizations to work on the unresolved subgrid phenomenons. Due to the strong sensitivity to initial conditions, the quality of the input data is of paramount importance. This is especially true if fast varying localized features such as rain are of interest.</p>

<p>Global NWP models consider the entire system. They typically have a horizontal resolution of a few tens of kilometers. The initial conditions can come from many different sources of observations (weather radars, radiosoundings, buoys, satellites, airplanes, ...). The data assimilation job is hardly the easiest part and requires fetching all that data in the first place. Those two centers propose global NWP products:</p>

<ul>
<li>the National Center for Environmental Prediction (NCEP) with the
<a href="http://www.ncdc.noaa.gov/data-access/model-data/model-datasets/global-forcast-system-gfs/" rel="nofollow noreferrer" title="NCEP Global Forecast System">Global Forecast System</a> (GFS). It is freely available and you can download whole datasets directly quite easily.</li>
<li>the European Centre for Medium-Range Weather Forecasts (ECMWF) with the <a href="http://apps.ecmwf.int/auth/login/" rel="nofollow noreferrer" title="ECMWF Mars catalogue">Integrated Forecast System</a> (IFS). You need to register
to download data. Operational forecasts or analyses are not available
for free but re-analyses such as ERA-Interim are. The recent
resolution is better than GFS's. Among other ways to retrieve data,
besides the web interface, is a <a href="http://software.ecmwf.int/wiki/display/WEBAPI/Accessing+ECMWF+data+servers+in+batch/" rel="nofollow noreferrer" title="ECMWF. Accessing ECMWF data servers in batch">python API</a>. The <a href="http://apps.ecmwf.int/codes/grib/param-db" rel="nofollow noreferrer" title="ECMWF Parameter database">IFS parameter
database</a> can also be useful to visit. The <a href="http://www.ecmwf.int/search/elibrary/part?title=part&amp;secondary_title=43R1" rel="nofollow noreferrer" title="ECMWF IFS Documentation">IFS documentation</a> is available online <a href="http://www.ecmwf.int/search/elibrary/part?title=part&amp;secondary_title=43R1" rel="nofollow noreferrer" title="ECMWF IFS Documentation">5</a> and is a good entry point to understand
the constitutive equations and the rest. Look at "Part IV Physical
Processes, Chapter 7: Clouds and large-scale precipitation" if you
are interested in what they do for rain.</li>
</ul>

<p>Regional NWP models can use global NWP data as initial and boundary conditions. Possibly the best-known freely available regional model is the National Center for Atmospheric Research (NCAR) <a href="http://www2.mmm.ucar.edu/wrf/users/download/get_source.html" rel="nofollow noreferrer" title="NCAR: WRF Source Codes and Graphics Software Downloads">Weather Research and Forecasting</a> (WRF) model. Relevant downloads to run the model are the source code for WRFV3, WPS, and the static geographic data (a few GBs!). It has a <a href="http://www2.mmm.ucar.edu/wrf/OnLineTutorial/compilation_tutorial.php" rel="nofollow noreferrer" title="NCAR. How to Compile WRF: The Complete Process">comprehensive installation procedure</a>, and the WRF tutorials and forums may help too. The <a href="http://www2.mmm.ucar.edu/wrf/users/docs/user_guide_V3/contents.html" rel="nofollow noreferrer" title="NCAR. User’s Guides for the Advanced Research WRF (ARW) Modeling System, Version 3">user's guide</a> and the <a href="http://www2.mmm.ucar.edu/wrf/users/docs/arw_v3.pdf" rel="nofollow noreferrer" title="NCAR. A Description of the Advanced Research WRF Version 3">description of the physics</a> are very interesting to look at besides the code. You can find the <a href="http://www2.mmm.ucar.edu/wrf/users/phys_references.html" rel="nofollow noreferrer" title="NCAR. WRF Model Physics Options and  References">original references</a> for the implemented parametrizations, and many <a href="http://www2.mmm.ucar.edu/wrf/users/workshops/WS2010/presentations/Lectures/Microphysics10.pdf" rel="nofollow noreferrer" title="NCAR. Microphysics Options in WRF">presentations</a> from their workshops (e.g. on the microphysics).  Speaking of the microphysics, looking at WRFV3/phys, you can find individual Fortran modules for some of the parametrization:</p>

<ul>
<li><code>module_mp_kessler.F</code> (~ 250 LOC) (vapor, rain, cloud water),</li>
<li><code>module_mp_lin.F</code> (~ 3000 LOC) (vapor, rain, cloud water, cloud ice, snow, graupel).</li>
</ul>

<p>So it might not be completely unreasonable to speak of ~1000 LOC for rain in NWP, but this would be ignoring the many other thousands LOC needed to run the rest of the physics. For the processing of the outputs many options are described in the manual, and you might be interested in <a href="http://github.com/NCAR/wrf-python" rel="nofollow noreferrer" title="NCAR. A collection of diagnostic and interpolation routines for use with output from the Weather Research and Forecasting (WRF-ARW) Model.">some post-processing code in python</a>.</p>

<p>In conclusion I think an accurate forecast for rain is unrealistic without the entire NWP machinery. For anybody to apply it by him/herself require to get acquainted with available datasets and softwares. With ~1000 LOC of python you can at least draft a framework around GFS/ECMWF data and WRF, and possibly some other work, that suits some of your needs/desires regarding rain forecasts.</p>

<p>As a side note, local/national weather services may otherwise have interesting products from their own models (some of them possibly free). Also, applications that do not actually require an accurate forecast (e.g. only valid on a statistical basis) can rely on other rain models outside of NWPs and use less input data (e.g. only long term rain rate measurements). Some "rain cells" models used in radioscience may fit this description.</p>

<h2>References</h2>

<ol>
<li><a href="http://www.ncdc.noaa.gov/data-access/model-data/model-datasets/global-forcast-system-gfs/" rel="nofollow noreferrer">http://www.ncdc.noaa.gov/data-access/model-data/model-datasets/global-forcast-system-gfs/</a> "NCEP Global Forecast System"</li>
<li><a href="http://apps.ecmwf.int/auth/login/" rel="nofollow noreferrer">http://apps.ecmwf.int/auth/login/</a> "ECMWF Mars catalogue"</li>
<li><a href="http://software.ecmwf.int/wiki/display/WEBAPI/Accessing+ECMWF+data+servers+in+batch/" rel="nofollow noreferrer">http://software.ecmwf.int/wiki/display/WEBAPI/Accessing+ECMWF+data+servers+in+batch/</a> "ECMWF. Accessing ECMWF data servers in batch"</li>
<li><a href="http://apps.ecmwf.int/codes/grib/param-db" rel="nofollow noreferrer">http://apps.ecmwf.int/codes/grib/param-db</a> "ECMWF Parameter database"</li>
<li><a href="http://www.ecmwf.int/search/elibrary/part?title=part&amp;secondary_title=43R1" rel="nofollow noreferrer">http://www.ecmwf.int/search/elibrary/part?title=part&amp;secondary_title=43R1</a> "ECMWF IFS Documentation"</li>
<li><a href="http://www2.mmm.ucar.edu/wrf/users/download/get_source.html" rel="nofollow noreferrer">http://www2.mmm.ucar.edu/wrf/users/download/get_source.html</a> "NCAR: WRF Source Codes and Graphics Software Downloads" </li>
<li><a href="http://www2.mmm.ucar.edu/wrf/OnLineTutorial/compilation_tutorial.php" rel="nofollow noreferrer">http://www2.mmm.ucar.edu/wrf/OnLineTutorial/compilation_tutorial.php</a> "NCAR. How to Compile WRF: The Complete Process"</li>
<li><a href="http://www2.mmm.ucar.edu/wrf/users/docs/user_guide_V3/contents.html" rel="nofollow noreferrer">http://www2.mmm.ucar.edu/wrf/users/docs/user_guide_V3/contents.html</a> "NCAR. User’s Guides for the Advanced Research WRF (ARW) Modeling System, Version 3"</li>
<li><a href="http://www2.mmm.ucar.edu/wrf/users/docs/arw_v3.pdf" rel="nofollow noreferrer">http://www2.mmm.ucar.edu/wrf/users/docs/arw_v3.pdf</a> "NCAR. A Description of the Advanced Research WRF Version 3"</li>
<li><a href="http://www2.mmm.ucar.edu/wrf/users/phys_references.html" rel="nofollow noreferrer">http://www2.mmm.ucar.edu/wrf/users/phys_references.html</a> "NCAR. WRF Model Physics Options and  References"</li>
<li><a href="http://www2.mmm.ucar.edu/wrf/users/workshops/WS2010/presentations/Lectures/Microphysics10.pdf" rel="nofollow noreferrer">http://www2.mmm.ucar.edu/wrf/users/workshops/WS2010/presentations/Lectures/Microphysics10.pdf</a> "NCAR. Microphysics Options in WRF"</li>
<li><a href="http://github.com/NCAR/wrf-python" rel="nofollow noreferrer">http://github.com/NCAR/wrf-python</a> "NCAR. A collection of diagnostic and interpolation routines for use with output from the Weather Research and Forecasting (WRF-ARW) Model."</li>
</ol>

CC BY-SA 3.0
2017-08-01T14:00:55.357Z
2017-08-02T08:55:20.083Z
2017-08-02T08:55:20.083Z
Nerevar
<p>You could look further into how currently used <a href="https://earthscience.stackexchange.com/questions/19/how-do-weather-models-work">weather models actually work</a>. If you want to do a prediction you will have to run a model which is not just as simple as your question would imply. There are actually many equations in parallel and that describe how motions in a grid behave. Sub grid phenomena like rain are parametrized also. Rain depends e.g. on moisture convergence and aerosol physics describing water droplet growth. This is really a broad question and I suggest you to ask another question if you want information about something more specific about forecasting.</p>

CC BY-SA 3.0
2017-07-31T11:39:13.253Z
Do you know any Matlab / Python / Fortran code that can run an NWP   and generate this moisture / water droplet growth numbers, preferably tied to a book that explains also the model? There are a lot of formulas out there, with no code, when there is code, it is not focused on rainfalls. I have no problem digging into this stuff, but I need to look at something running.
BBSysDyn
CC BY-SA 3.0
2017-07-31T12:50:47.310Z
Simply: It's not that simple.
Communisty
CC BY-SA 3.0
2017-07-31T13:10:24.843Z
Isn't this odd though? That there is _nothing_ out that can generate prediction on fundamental variables (including moisture) for around 1000 LOC. That'd be a slam-dunk example for NWP. Too bad. I believe it can be that simple. Lecturers, educators seem to have dropped the ball on this one.
BBSysDyn
CC BY-SA 3.0
2017-07-31T15:38:12.543Z
@user423805 It is not odd. You may be underestimating the complexity of the problem. The basic system of primitive equations (dynamics) can be coded up in several hundred lines of Fortran. Sub-grid physics schemes (turbulence, cloud microphysics etc) each can go to thousand lines of code.
milancurcic
CC BY-SA 3.0
2017-07-31T15:45:19.850Z
For appropriate literature explaining the model, you will need to dig through both the code manuals and academic journals describing the dynamics, numerics, and subgrid parameterizations. Yes, unfortunately, there is no wiki summarizing all that yet.
milancurcic
CC BY-SA 3.0
2017-08-01T06:56:39.697Z
I wonder if there are any free models you can download? By getting your hand on actual code would quickly show what I mean.
Communisty
CC BY-SA 3.0
2017-07-31T10:41:46.030Z
2017-07-31T10:41:46.030Z
Communisty
<p>The Barotropic vorticity equation is insufficient to model rain. Part of this is due to the word 'Barotropic,' which indicates a lack of thermal gradient. The other reason is that while vorticity is a useful quantity, it lacks explicit information on the atmospheric state.</p>

<p>The <a href="http://www4.ncsu.edu/~nwsfo/storage/training/jets/PE.html" rel="noreferrer">primitive equations</a> are a system of partial differential equations that are used by most numerical weather prediction models to model various quantities. Rainfall rate is a parameterized variable, a diagnosed formula (or formulas) based on atmospheric state, based on research. Sometimes the results of the research can give wildly different answers given the same data, which is a weakness of parameterizations. The idea is to model the Reynolds-averaged primitive equations and intermittently invoke the parameterizations (including turbulence, radiation, cloud cover, and so on).</p>

<p><a href="http://rads.stackoverflow.com/amzn/click/0521126762" rel="noreferrer">Here</a> is a good book that discusses parameterization schemes in general.</p>

CC BY-SA 3.0
2017-07-31T11:46:48.490Z
2017-07-31T11:46:48.490Z
BarocliniCplusplus
<p>Which model is a good starting point for predicting precipitation (rain) for 24 hours in advance? I looked at Kalnay's <em>Atmospheric modeling, data assimilation and predictability</em>, and Holton's <em>An Introduction to Dynamic Meteorology</em> as well as various other sources. These are great references but I could not figure out which part I could use to compute what I needed. It seems there are governing equations which are solved numerically, the output is used for a prediction. I am knowledgeable on numerically solving ODEs, PDEs, and am familiar with Matlab, Python, but there aren't any references that I could find providing clear formula -> data -> code -> output.</p>

<p>The most talked about model with clear solution is the Barotropic Vorticity Equation, which, I believe, models wind and pressure. This model was proposed by Charney, Fjortoft and von Neumann during the 50s, and solved with a computer, the results are recreated by Peter Lynch on 2008 (Matlab code <a href="https://maths.ucd.ie/~plynch/eniac/" rel="nofollow noreferrer">available</a>). Could this model be used for rainfall prediction? </p>

<p>If one has to dig in the basic equations, which part of the governing equations should I focus on? Any pointers, references with running code is most welcome.</p>

CC BY-SA 3.0
2017-07-31T15:32:56.717Z
I strongly recommend the WRF model (http://www.wrf-model.org), it will do exactly what you are looking for and is relatively straightforward to set up and run. Direct download here: http://www2.mmm.ucar.edu/wrf/src/WRFV3.9.TAR.gz
milancurcic
CC BY-SA 3.0
2017-08-01T14:05:22.657Z
NCAR's reduced complexity model can be useful if you want to dig in https://github.com/NCAR/icar.
milancurcic
CC BY-SA 3.0
2017-08-02T14:17:07.927Z
Thanks. Under physics/mp_thompson.f90 I see a forecast implementation for winter precipitation based on "Explicit Forecasts of winter precipitation using an improved bulk microphysics scheme" paper - http://www4.ncsu.edu/~gary/mea716/pdf_mp/Thompson_etal_2008.pdf
BBSysDyn
<meteorology><models><nwp>
Predicting rainfall with governing equations
BBSysDyn
# Predicting rainfall with governing equations

(Asked by: username_0 on 2017-07-31)

Which model is a good starting point for predicting precipitation (rain) for 24 hours in advance? I looked at Kalnay's *Atmospheric modeling, data assimilation and predictability*, and Holton's *An Introduction to Dynamic Meteorology* as well as various other sources. These are great references but I could not figure out which part I could use to compute what I needed. It seems there are governing equations which are solved numerically, the output is used for a prediction. I am knowledgeable on numerically solving ODEs, PDEs, and am familiar with Matlab, Python, but there aren't any references that I could find providing clear formula -> data -> code -> output.

The most talked about model with clear solution is the Barotropic Vorticity Equation, which, I believe, models wind and pressure. This model was proposed by Charney, Fjortoft and von Neumann during the 50s, and solved with a computer, the results are recreated by Peter Lynch on 2008 (Matlab code [available](https://maths.ucd.ie/~plynch/eniac/)). Could this model be used for rainfall prediction?

If one has to dig in the basic equations, which part of the governing equations should I focus on? Any pointers, references with running code is most welcome.

**Tags:** meteorology, models, nwp

> **Comments:**
> **username_1**: I strongly recommend the WRF model (http://www.wrf-model.org), it will do exactly what you are looking for and is relatively straightforward to set up and run. Direct download here: http://www2.mmm.ucar.edu/wrf/src/WRFV3.9.TAR.gz  
> **username_1**: NCAR's reduced complexity model can be useful if you want to dig in https://github.com/NCAR/icar.  
> **username_0**: Thanks. Under physics/mp_thompson.f90 I see a forecast implementation for winter precipitation based on "Explicit Forecasts of winter precipitation using an improved bulk microphysics scheme" paper - http://www4.ncsu.edu/~gary/mea716/pdf_mp/Thompson_etal_2008.pdf  

---

## 3 answers

### Answer by username_4 on 2017-07-31. Score: 12 | Accepted answer

The Barotropic vorticity equation is insufficient to model rain. Part of this is due to the word 'Barotropic,' which indicates a lack of thermal gradient. The other reason is that while vorticity is a useful quantity, it lacks explicit information on the atmospheric state.

The [primitive equations](http://www4.ncsu.edu/~nwsfo/storage/training/jets/PE.html) are a system of partial differential equations that are used by most numerical weather prediction models to model various quantities. Rainfall rate is a parameterized variable, a diagnosed formula (or formulas) based on atmospheric state, based on research. Sometimes the results of the research can give wildly different answers given the same data, which is a weakness of parameterizations. The idea is to model the Reynolds-averaged primitive equations and intermittently invoke the parameterizations (including turbulence, radiation, cloud cover, and so on).

[Here](http://rads.stackoverflow.com/amzn/click/0521126762) is a good book that discusses parameterization schemes in general.


---

### Answer by username_2 on 2017-08-01. Score: 8

**TL;DR:**
Global NWP models such as NCEP's GFS (free access) and ECMWF's IFS (restricted access) provide forecasts at a horizontal scale of a few tens of kilometers every few hours. Starting from global NWP data, NCAR's WRF (free) can be used to produce results at a resolution of a few kilometers and stored every few minutes in time.

---

I felt I could give some insights. This answer aims to provide further practical references regarding well-known NWP models. It centers on places to look at and what can be done with available resources. I will only briefly try to illustrate why the underlying physics can be seen as intrinsically complex.

Numerical Weather Prediction (NWP) models are interested in the system composed of the Earth's atmosphere and surface. This system encompasses physical features and processes with a wide range of scales: weather front across thousands of kilometers, cumulus spanning a few kilometers, soil layers varying over a few meters, rain drops smaller than a few millimeters in diameter, interactions with solar radiations shorter than a few micrometers in wavelength, ... The models work at a large scale, trying to resolve the movement of air masses by solving PDEs on a grid, and use physical parametrizations to work on the unresolved subgrid phenomenons. Due to the strong sensitivity to initial conditions, the quality of the input data is of paramount importance. This is especially true if fast varying localized features such as rain are of interest.

Global NWP models consider the entire system. They typically have a horizontal resolution of a few tens of kilometers. The initial conditions can come from many different sources of observations (weather radars, radiosoundings, buoys, satellites, airplanes, ...). The data assimilation job is hardly the easiest part and requires fetching all that data in the first place. Those two centers propose global NWP products:

* the National Center for Environmental Prediction (NCEP) with the
  [Global Forecast System](http://www.ncdc.noaa.gov/data-access/model-data/model-datasets/global-forcast-system-gfs/ "NCEP Global Forecast System") (GFS). It is freely available and you can download whole datasets directly quite easily.
* the European Centre for Medium-Range Weather Forecasts (ECMWF) with the [Integrated Forecast System](http://apps.ecmwf.int/auth/login/ "ECMWF Mars catalogue") (IFS). You need to register
  to download data. Operational forecasts or analyses are not available
  for free but re-analyses such as ERA-Interim are. The recent
  resolution is better than GFS's. Among other ways to retrieve data,
  besides the web interface, is a [python API](http://software.ecmwf.int/wiki/display/WEBAPI/Accessing+ECMWF+data+servers+in+batch/ "ECMWF. Accessing ECMWF data servers in batch"). The [IFS parameter
  database](http://apps.ecmwf.int/codes/grib/param-db "ECMWF Parameter database") can also be useful to visit. The [IFS documentation](http://www.ecmwf.int/search/elibrary/part?title=part&secondary_title=43R1 "ECMWF IFS Documentation") is available online [5](http://www.ecmwf.int/search/elibrary/part?title=part&secondary_title=43R1 "ECMWF IFS Documentation") and is a good entry point to understand
  the constitutive equations and the rest. Look at "Part IV Physical
  Processes, Chapter 7: Clouds and large-scale precipitation" if you
  are interested in what they do for rain.

Regional NWP models can use global NWP data as initial and boundary conditions. Possibly the best-known freely available regional model is the National Center for Atmospheric Research (NCAR) [Weather Research and Forecasting](http://www2.mmm.ucar.edu/wrf/users/download/get_source.html "NCAR: WRF Source Codes and Graphics Software Downloads") (WRF) model. Relevant downloads to run the model are the source code for WRFV3, WPS, and the static geographic data (a few GBs!). It has a [comprehensive installation procedure](http://www2.mmm.ucar.edu/wrf/OnLineTutorial/compilation_tutorial.php "NCAR. How to Compile WRF: The Complete Process"), and the WRF tutorials and forums may help too. The [user's guide](http://www2.mmm.ucar.edu/wrf/users/docs/user_guide_V3/contents.html "NCAR. User’s Guides for the Advanced Research WRF (ARW) Modeling System, Version 3") and the [description of the physics](http://www2.mmm.ucar.edu/wrf/users/docs/arw_v3.pdf "NCAR. A Description of the Advanced Research WRF Version 3") are very interesting to look at besides the code. You can find the [original references](http://www2.mmm.ucar.edu/wrf/users/phys_references.html "NCAR. WRF Model Physics Options and  References") for the implemented parametrizations, and many [presentations](http://www2.mmm.ucar.edu/wrf/users/workshops/WS2010/presentations/Lectures/Microphysics10.pdf "NCAR. Microphysics Options in WRF") from their workshops (e.g. on the microphysics). Speaking of the microphysics, looking at WRFV3/phys, you can find individual Fortran modules for some of the parametrization:

* `module_mp_kessler.F` (~ 250 LOC) (vapor, rain, cloud water),
* `module_mp_lin.F` (~ 3000 LOC) (vapor, rain, cloud water, cloud ice, snow, graupel).

So it might not be completely unreasonable to speak of ~1000 LOC for rain in NWP, but this would be ignoring the many other thousands LOC needed to run the rest of the physics. For the processing of the outputs many options are described in the manual, and you might be interested in [some post-processing code in python](http://github.com/NCAR/wrf-python "NCAR. A collection of diagnostic and interpolation routines for use with output from the Weather Research and Forecasting (WRF-ARW) Model.").

In conclusion I think an accurate forecast for rain is unrealistic without the entire NWP machinery. For anybody to apply it by him/herself require to get acquainted with available datasets and softwares. With ~1000 LOC of python you can at least draft a framework around GFS/ECMWF data and WRF, and possibly some other work, that suits some of your needs/desires regarding rain forecasts.

As a side note, local/national weather services may otherwise have interesting products from their own models (some of them possibly free). Also, applications that do not actually require an accurate forecast (e.g. only valid on a statistical basis) can rely on other rain models outside of NWPs and use less input data (e.g. only long term rain rate measurements). Some "rain cells" models used in radioscience may fit this description.

## References

1. <http://www.ncdc.noaa.gov/data-access/model-data/model-datasets/global-forcast-system-gfs/> "NCEP Global Forecast System"
2. <http://apps.ecmwf.int/auth/login/> "ECMWF Mars catalogue"
3. <http://software.ecmwf.int/wiki/display/WEBAPI/Accessing+ECMWF+data+servers+in+batch/> "ECMWF. Accessing ECMWF data servers in batch"
4. <http://apps.ecmwf.int/codes/grib/param-db> "ECMWF Parameter database"
5. <http://www.ecmwf.int/search/elibrary/part?title=part&secondary_title=43R1> "ECMWF IFS Documentation"
6. <http://www2.mmm.ucar.edu/wrf/users/download/get_source.html> "NCAR: WRF Source Codes and Graphics Software Downloads"
7. <http://www2.mmm.ucar.edu/wrf/OnLineTutorial/compilation_tutorial.php> "NCAR. How to Compile WRF: The Complete Process"
8. <http://www2.mmm.ucar.edu/wrf/users/docs/user_guide_V3/contents.html> "NCAR. User’s Guides for the Advanced Research WRF (ARW) Modeling System, Version 3"
9. <http://www2.mmm.ucar.edu/wrf/users/docs/arw_v3.pdf> "NCAR. A Description of the Advanced Research WRF Version 3"
10. <http://www2.mmm.ucar.edu/wrf/users/phys_references.html> "NCAR. WRF Model Physics Options and References"
11. <http://www2.mmm.ucar.edu/wrf/users/workshops/WS2010/presentations/Lectures/Microphysics10.pdf> "NCAR. Microphysics Options in WRF"
12. <http://github.com/NCAR/wrf-python> "NCAR. A collection of diagnostic and interpolation routines for use with output from the Weather Research and Forecasting (WRF-ARW) Model."


---

### Answer by username_3 on 2017-07-31. Score: 5

You could look further into how currently used [weather models actually work](https://earthscience.stackexchange.com/questions/19/how-do-weather-models-work). If you want to do a prediction you will have to run a model which is not just as simple as your question would imply. There are actually many equations in parallel and that describe how motions in a grid behave. Sub grid phenomena like rain are parametrized also. Rain depends e.g. on moisture convergence and aerosol physics describing water droplet growth. This is really a broad question and I suggest you to ask another question if you want information about something more specific about forecasting.

> **Comments:**
> **username_0**: Do you know any Matlab / Python / Fortran code that can run an NWP   and generate this moisture / water droplet growth numbers, preferably tied to a book that explains also the model? There are a lot of formulas out there, with no code, when there is code, it is not focused on rainfalls. I have no problem digging into this stuff, but I need to look at something running.  
> **username_3**: Simply: It's not that simple.  
> **username_0**: Isn't this odd though? That there is _nothing_ out that can generate prediction on fundamental variables (including moisture) for around 1000 LOC. That'd be a slam-dunk example for NWP. Too bad. I believe it can be that simple. Lecturers, educators seem to have dropped the ball on this one.  
> **username_1**: @user423805 It is not odd. You may be underestimating the complexity of the problem. The basic system of primitive equations (dynamics) can be coded up in several hundred lines of Fortran. Sub-grid physics schemes (turbulence, cloud microphysics etc) each can go to thousand lines of code.  
> **username_1**: For appropriate literature explaining the model, you will need to dig through both the code manuals and academic journals describing the dynamics, numerics, and subgrid parameterizations. Yes, unfortunately, there is no wiki summarizing all that yet.  
> **username_3**: I wonder if there are any free models you can download? By getting your hand on actual code would quickly show what I mean.  

---

