---
title: "Calculate FAO-56 Reference Evapotranspiration (ET₀)"
subtitle: "Daily NARO inputs and monthly summaries, 2008–2018"
execute:
eval: true
cache: false
format:
html:
html-math-method: mathml
title-ja: "FAO-56基準蒸発散量(ET₀)の計算"
subtitle-ja: "NAROの日別入力と月別集計(2008〜2018年)"
---
::::: {.content-visible unless-profile="ja"}
[日本語はこちら(JP)](../ja/notebooks/calculate_ET0.html){#language-switch hreflang="ja" lang="ja"}
:::::
::::: {.content-visible when-profile="ja"}
[Read this page in English (EN)](../../notebooks/calculate_ET0.html){#language-switch hreflang="en" lang="en"}
:::::
::::: {.content-visible unless-profile="ja"}
## Scope and relation to PET
This chapter uses the **FAO-56 Penman–Monteith equation** to calculate daily
reference evapotranspiration (ET₀) and combine it into monthly and seasonal totals.
FAO-56 refers to [Irrigation and Drainage Paper 56](https://www.fao.org/4/x0490e/x0490e00.htm),
the technical guide published by the Food and Agriculture Organization of the United Nations (FAO).
All examples run on this page
use **synthetic data or a published FAO example**. The page does not include
actual NARO data or maps made from them.
| Property | Existing [Thornthwaite PET](calculate_PET.qmd) | This ET0 workflow |
|---|---|---|
| Source | JMA Mesh Climatology 2020, distributed by MLIT | NARO Agro-Meteorological Grid Square Data |
| Period | 1991–2020 monthly climate normals | Daily inputs, 2008–2018 |
| Inputs | Monthly mean temperature and latitude/day length | Daily mean, maximum and minimum temperature, solar radiation, RH, wind, elevation, latitude and date |
| Quantity | Temperature-based potential evapotranspiration | Reference evapotranspiration from a hypothetical well-watered grass surface |
| AI denominator | Thornthwaite PET | FAO-56 ET0 |
Neither quantity is measured forest evapotranspiration. Comparing these products
mixes method, input and period differences; it does not isolate a method effect.
The existing PET and AI chapters retain their original definitions and inputs.
Precipitation is needed for AI, but is not an input to the ET0 equation.
::: {.callout-warning}
## Using NARO data
Before using the data, read NARO's [usage terms and application guide](https://amu.rd.naro.go.jp/wiki_open/doku.php?id=subscription).
Each user should apply for access and handle the data according to the terms.
This site provides calculation code and synthetic examples, not NARO data.
Permission to share the ET₀ and precipitation tables prepared for this project,
or maps made from them, has not been confirmed, so they are not published here.
The code and documentation licenses do not grant permission to redistribute
weather data. Keep original files unchanged and actual data outside Git.
:::
:::::
::::: {.content-visible when-profile="ja"}
## 対象範囲とPETとの違い
この章では、**FAO-56 Penman–Monteith式**を使って、1日ごとの**基準蒸発散量(ET₀)**を計算し、
月や季節ごとに集計する方法を説明します。
入力には農研機構メッシュ農業気象データを使います。
FAO-56は、この式を説明したFAO(国連食糧農業機関)の[灌漑排水技術資料第56号](https://www.fao.org/4/x0490e/x0490e00.htm)を指します。
実データの利用には申請が必要なため、ページ内で実行する例には**架空データまたはFAOの公開計算例**を使います。
NAROの実データや、それを使った地図は掲載していません。
| 項目 | 従来の[Thornthwaite法によるPET](calculate_PET.qmd) | この章のET₀ |
|---|---|---|
| データ | [JMAメッシュ平年値2020](https://nlftp.mlit.go.jp/ksj/gml/datalist/KsjTmplt-G02-v3_0.html)(国土交通省から提供) | [農研機構メッシュ農業気象データ](https://amu.rd.naro.go.jp/wiki_open/doku.php?id=start) |
| 期間 | 1991〜2020年の月別平年値 | 2008〜2018年の日別値 |
| 入力 | 月平均気温と緯度・日長 | 日平均・最高・最低気温、日射量、相対湿度、風速、標高、緯度、日付 |
| 物理量 | 気温に基づく潜在蒸発散量 | 十分に給水された仮想的な草地面からの基準蒸発散量 |
| AIの分母 | Thornthwaite法のPET | FAO-56法のET₀ |
いずれも**森林の実蒸発散量の測定値ではありません**。
両者は計算方法だけでなく、入力データや対象期間も異なります。
値に差があっても、計算方法だけが原因とはいえません。
降水量はAIに必要ですが、ET₀式そのものの入力には含まれません。
::: {.callout-warning}
## NAROデータを利用する方へ
利用にあたっては、[農研機構の利用案内・利用規約](https://amu.rd.naro.go.jp/wiki_open/doku.php?id=subscription)を確認し、
データの扱いに注意してください。**利用する際は、各自で利用申請を行ってください。**
このサイトで提供するのは計算コードと架空の入力例であり、NAROの実データは配布していません。
今回作成したET₀・降水量の表や、それらを使った地図を外部へ共有できるかは未確認のため、ここでは公開していません。
コードや文書のライセンスがあっても、気象データを自由に再配布できるわけではありません。
元のファイルは変更せずに保管し、実データはGitの管理対象に含めないでください。
:::
:::::
```{r}
#| label: et0-setup
source("R/et0_support.R")
source("R/pipeline_p0_et0.R")
```
::::: {.content-visible unless-profile="ja"}
## Daily equation and assumptions
The implementation uses [FAO-56 equation 6](https://www.fao.org/4/x0490e/x0490e06.htm):
$$
ET_0 = \frac{0.408\Delta(R_n-G)
+ \gamma\frac{900}{T+273}u_2(e_s-e_a)}
{\Delta+\gamma(1+0.34u_2)}.
$$
ET0 is in mm/day; T is daily mean temperature (°C); Rn and G are net radiation
and soil heat flux (MJ/m²/day); u2 is wind speed at 2 m (m/s); es and ea are
saturation and actual vapour pressure (kPa); Delta and gamma are the slope of
the saturation vapour-pressure curve and psychrometric constant (kPa/°C).
- Daily soil heat flux G is zero; reference albedo is 0.23.
- Saturation pressure is averaged from daily maximum and minimum temperature.
Actual pressure uses mean relative humidity, rather than paired RH extremes.
- Source wind is **assumed** to be at 10 m and converted to 2 m. The source
measurement height remains unconfirmed.
- Interior gaps of at most two days in RH and wind are linearly interpolated
separately within each calendar year. Longer gaps and gaps at year edges
remain missing. Other input variables are not interpolated.
- Missing inputs propagate to daily ET0, monthly totals and multi-year means.
Sums and means do not use `na.rm = TRUE`.
- Negative computed ET0 is retained, without clipping to zero.
With $e^\circ(T)=0.6108\exp[17.27T/(T+237.3)]$, mean-RH vapour pressure is
$e_a=(RH_{mean}/100)[e^\circ(T_{max})+e^\circ(T_{min})]/2$.
Wind conversion is $u_2=u_z4.87/\ln(67.8z-5.42)$ with z = 10 m.
These are [FAO-56 equations 19 and 47](https://www.fao.org/4/x0490e/x0490e07.htm).
Mean RH is less preferable than paired humidity extremes when available.
The available Tmin vapour-pressure fallback is **not** used to fill RH here.
Net radiation uses absorbed shortwave and FAO-estimated longwave radiation;
the solar/clear-sky radiation ratio is capped at 1. Pressure and gamma depend
on elevation. Solar geometry retains the FAO denominator 365 even in leap
years; monthly sums include every actual date, including 29 February.
Polar day/night is outside the implementation's scope.
Monthly mean weather cannot exactly reproduce daily ET0 because the equation
is nonlinear. Changing wind or humidity assumptions requires authorized daily
inputs and recalculation, rather than the monthly tables.
### Relation to Zomer et al. (2022)
The global database described by Zomer et al. also uses FAO Penman–Monteith
reference evapotranspiration [@zomerVersion3Global2022]. However, it uses
WorldClim monthly climate data for 1970–2000, while this chapter uses daily
NARO data for 2008–2018. The basic method is shared, but the inputs, time
steps and resulting values are not identical.
### Published FAO check
The Uccle example (6 July, FAO-56 example 18) uses the published actual vapour
pressure, rather than the NARO mean-RH approximation. The expected result is
about 3.9 mm/day. This checks implementation, not the accuracy of every cell.
:::::
::::: {.content-visible when-profile="ja"}
## 日別計算式と仮定
ET₀は、十分に水が供給された草地を基準にした蒸発散量です。
ここでは、気温に加えて日射量・湿度・風速を使う[FAO-56の式6](https://www.fao.org/4/x0490e/x0490e06.htm)で計算します。
$$
ET_0 = \frac{0.408\Delta(R_n-G)
+ \gamma\frac{900}{T+273}u_2(e_s-e_a)}
{\Delta+\gamma(1+0.34u_2)}.
$$
式に出てくる記号と単位は次のとおりです。
| 記号 | 意味 | 単位 |
|---|---|---|
| $ET_0$ | 1日あたりの基準蒸発散量 | mm/日 |
| $T$ | 日平均気温 | ℃ |
| $R_n$ | 地表が受け取る放射と放出する放射の差(純放射) | MJ/m²/日 |
| $G$ | 地中へ出入りする熱(地中熱流量) | MJ/m²/日 |
| $u_2$ | 地上2 mの風速 | m/s |
| $e_s$, $e_a$ | 飽和水蒸気圧と実際の水蒸気圧 | kPa |
| $\Delta$ | 飽和水蒸気圧が気温とともに変わる割合 | kPa/℃ |
| $\gamma$ | 気圧などに応じて決まる乾湿計定数 | kPa/℃ |
今回の計算では、次の仮定と欠測の扱いを用います。
- 日別の地中熱流量Gは0、地表が日射を反射する割合(アルベド)は0.23とします。
- 飽和水蒸気圧は日最高・最低気温から求めた値の平均です。実水蒸気圧には、
最高・最低相対湿度の組ではなく日平均相対湿度を用います。
- 元の風速は**地上10 mの値と仮定**し、2 mへ換算します。NAROの元データが表す高度は未確認です。
- 相対湿度と風速は、同じ年の前後の値が揃っている場合に限り、連続2日までの欠測を直線で補います。
3日以上続く欠測や、年初・年末で前後の値が揃わない欠測は残します。他の入力変数は補いません。
- 必要な値に欠測が残る日は、ET₀も欠測になります。その日を含む月合計や、その月を含む多年平均も欠測とします。
欠測を除いて計算する`na.rm = TRUE`は使いません。
- 計算された負のET₀は0に切り上げず、そのまま保持します。
$e^\circ(T)=0.6108\exp[17.27T/(T+237.3)]$として、日平均相対湿度による近似は
$e_a=(RH_{mean}/100)[e^\circ(T_{max})+e^\circ(T_{min})]/2$です。
風速換算は$u_2=u_z4.87/\ln(67.8z-5.42)$、z = 10 mとします。
[FAO-56の式19・47](https://www.fao.org/4/x0490e/x0490e07.htm)に対応します。
最高・最低相対湿度が得られる場合は、それらを使う方法が望まれます。
コードには最低気温から水蒸気圧を推定する関数もありますが、今回の湿度の欠測を補うためには**使いません**。
純放射は、地表が吸収する日射と、FAO式で推定した長波放射から求めます。
日射量を晴天時の日射量で割った比は、1を上限とします。気圧と乾湿計定数は標高から計算します。
太陽位置を求める式では、うるう年も分母を365とします。
ただし月合計には、2月29日を含めて実際にあるすべての日を入れます。白夜・極夜は対象としていません。
この式では、入力値とET₀が単純な比例関係になりません。
そのため、月平均の気象値を式に入れた結果は、日別に計算してから合計した結果とは一致しません。
風速や湿度の仮定を変えたい場合は、利用許可を得た日別データから計算し直す必要があります。
### Zomerら(2022)のデータベースとの関係
Zomerらの全球データベースも、FAO Penman–Monteith法によるET₀を基礎にしています [@zomerVersion3Global2022]。
ただし、同じ式を基礎にしていても、入力データや時間の単位まで同じとは限りません。
ZomerらはWorldClimの1970〜2000年の月別気候値を使い、この章ではNAROの2008〜2018年の日別値を使います。
したがって、基本となる計算方法は共通ですが、計算手順や得られる値がすべて同じとはいえません。
### FAOの公開計算例との照合
Uccleの例(7月6日、FAO-56の例18)は、NARO用の日平均相対湿度による近似ではなく、
公開されている実水蒸気圧を使います。期待値は約3.9 mm/日です。
この例で確認できるのは、コードが公開計算例に近い値を返すことです。
各メッシュのET₀が、現地の値をどれほど正確に表すかを確かめるものではありません。
:::::
```{r}
#| label: et0-worked-example
example_et0 <- pipeline_p0_et0_fao56(
mean_temperature = matrix(16.9),
maximum_temperature = matrix(21.5),
minimum_temperature = matrix(12.3),
solar_radiation = matrix(22.07),
actual_vapour_pressure = matrix(1.409),
wind_2m = matrix(pipeline_p0_wind_at_2m(10 * 1000 / 3600, 10)),
elevation = 100,
latitude = 50.80,
day_of_year = 187
)
stopifnot(abs(as.numeric(example_et0) - 3.9) < 0.08)
data.frame(et0_mm_day = as.numeric(example_et0))
```
::::: {.content-visible unless-profile="ja"}
### Synthetic daily CSV
The CSV below contains three invented days for one cell. They do not constitute
a July total. Matrices have one row per cell and one column per day. Latitude
and elevation have one entry per row; day of year has one per column.
:::::
::::: {.content-visible when-profile="ja"}
### 架空の日別CSVによる例
次のCSVは1地点・3日分の架空入力です。7月全体の合計を意味しません。
計算関数へ渡す行列では、各行を地点、各列を日とします。
緯度と標高は地点ごとに、年初から数えた日番号(通日)は日ごとに指定します。
:::::
```{r}
#| label: et0-daily-csv
daily <- read.csv("data/examples/et0_daily_synthetic.csv")
as_row <- function(x) matrix(x, nrow = 1)
daily$et0_mm_day <- as.numeric(pipeline_p0_et0_fao56(
mean_temperature = as_row(daily$mean_temperature_c),
maximum_temperature = as_row(daily$maximum_temperature_c),
minimum_temperature = as_row(daily$minimum_temperature_c),
solar_radiation = as_row(daily$solar_radiation_mj_m2_day),
actual_vapour_pressure = as_row(pipeline_p0_actual_vapour_pressure_rh(
daily$relative_humidity_percent,
daily$maximum_temperature_c,
daily$minimum_temperature_c
)),
wind_2m = as_row(pipeline_p0_wind_at_2m(daily$wind_10m_m_s, 10)),
elevation = daily$elevation_m[1],
latitude = daily$latitude_degrees[1],
day_of_year = as.integer(format(as.Date(daily$date), "%j"))
))
daily[c("date", "et0_mm_day")]
```
::::: {.content-visible unless-profile="ja"}
For gaps, call `pipeline_p0_fill_short_gaps()` separately on each year's RH
and wind before the equation, as in the local bundle's `export_yearly.R`.
The low-level `pipeline_p0_monthly_sums()` does not check calendar completeness:
supply every date exactly once, in matching order, for a complete month
(28/29/30/31 days) before reporting a monthly total.
## Local monthly products
Year-specific files contain 12 monthly totals per mesh/year, covering January
2008 through December 2018 (132 months per variable per cell). The means table
contains 12 mean monthly totals: July is the mean of the eleven July totals.
These are 11-year averages, **not standard 30-year climate normals**.
The prepared bundle covers 377,449 meshes, 153 primary-mesh blocks and
4,151,939 mesh-year rows. Its `verification.csv` records agreement of yearly
averages with the supplied means within 1e-8 mm (maximum difference
4.77484718430787e-12 mm). This verifies aggregation, not meteorological accuracy.
`SHA256SUMS` records bundle integrity.
Set `PROJECT_DATA_DIR` in the ignored `.Renviron` and restart R after editing.
The following example is deliberately **not executed during rendering**:
:::::
::::: {.content-visible when-profile="ja"}
欠測がある場合は、ローカルの`export_yearly.R`と同様に、年ごとの相対湿度と風速に
それぞれ`pipeline_p0_fill_short_gaps()`を使ってから計算します。
月合計を求める`pipeline_p0_monthly_sums()`自体は、日付の抜けや重複を調べません。
計算前に、その月の全日付が1回ずつ含まれ、すべての入力で日付の順序が揃っていることを確認してください。
## ローカルの月別データ
年別ファイルには、メッシュと年ごとに、12か月分の月合計が入っています。
対象は2008年1月〜2018年12月で、1メッシュ・1変数あたり132か月分です。
平均表には、11年分の月合計を月ごとに平均した値が入っています。
例えば7月の値は11個の7月合計の平均であり、**標準的な30年平年値ではありません**。
手元で用意したデータは377,449メッシュ分で、153個の一次メッシュのブロックに分かれています。
年別表は1メッシュ・1年を1行とし、合計4,151,939行あります。
`verification.csv`には、年別表から再計算した平均と既存平均表との差が1e-8 mm未満
(最大4.77484718430787e-12 mm)であることが記録されています。
この比較は、集計し直しても同じ値になることを確かめたものです。気象値そのものの正確さを保証するものではありません。
`SHA256SUMS`は、ファイルの内容が変わっていないかを調べるための一覧です。
Git管理外の`.Renviron`に`PROJECT_DATA_DIR`を設定し、変更後はRを再起動します。
以下は、各自で利用申請を行い、同じ構成のデータを用意した場合の読込例です。
**ページのレンダリング時には実行しません**。
:::::
```{r}
#| label: et0-local-access
#| eval: false
bundle <- et0_data_dir() # PROJECT_DATA_DIR/naro-et0/2008-2018
normal <- read_monthly_csv(file.path(
bundle,
"data",
"monthly_normals_2008_2018.csv.gz"
))
yearly_files <- list.files(
file.path(bundle, "data", "yearly"),
pattern = "^monthly_[0-9]{4}_2008_2018[.]csv[.]gz$",
full.names = TRUE
)
# One block, not all Japan:
one_block <- read_monthly_csv(yearly_files[1])
period_summary(one_block, 7:9, "Jul-Sep")
winter_summary(one_block)
```
::::: {.content-visible unless-profile="ja"}
Base R reads gzip CSVs directly. `read_monthly_csv()` keeps `mesh3_code` as
character. `et0_data_dir()` fails if the environment variable is unset.
Monthly columns are `et0_fao56_Jan` through `et0_fao56_Dec` and
`precipitation_Jan` through `precipitation_Dec`, in mm/month. See the bundle's
`data-dictionary.csv` and `STATUS.md`. Annual totals in the means table sum
its 12 months. `et0_filled_days` is the maximum of separate RH and wind
filled-day counts per cell/year, summed across 11 years in the means table.
It is not their union or a count of missing days in all input variables.
## Month windows and AI
For July–September, add the three monthly ET₀ totals and the three precipitation totals:
$$
\begin{aligned}
ET_{0,7:9} &= \sum_{m=7}^{9} ET_{0,m} = ET_{0,7} + ET_{0,8} + ET_{0,9}, \\
P_{7:9} &= \sum_{m=7}^{9} P_m = P_7 + P_8 + P_9, \\
AI_{7:9} &= \frac{P_{7:9}}{ET_{0,7:9}}
= \frac{P_7 + P_8 + P_9}{ET_{0,7} + ET_{0,8} + ET_{0,9}}.
\end{aligned}
$$
Here, $m$ is the month number, $ET_{0,m}$ and $P_m$ are the monthly totals in mm,
and $7:9$ denotes July–September. AI is dimensionless.
Do not multiply the monthly totals by days again. AI is **sum(P)/sum(ET0)** over identical
months, rather than the mean of monthly AI. Missing months propagate and
non-positive or missing ET0 denominators give `NA`. P−ET0 is a climatic water
balance, not a soil-water balance model.
The synthetic CSV below has two invented identifiers and three years of
illustrative monthly totals, independent of the daily example above.
:::::
::::: {.content-visible when-profile="ja"}
base Rでgzip圧縮CSVを直接読めます。`read_monthly_csv()`は`mesh3_code`を文字列として保持します。
環境変数が未設定の場合、`et0_data_dir()`は停止します。
月別列は`et0_fao56_Jan`〜`et0_fao56_Dec`と`precipitation_Jan`〜`precipitation_Dec`で、
単位はmm/月です。ローカル一式の`data-dictionary.csv`と`STATUS.md`も参照してください。
平均表の年合計は、12か月の値を足したものです。
`et0_filled_days`は、各メッシュ・年について、湿度を補った日数と風速を補った日数のうち大きい方です。
平均表では、この日数を11年分足しています。湿度か風速のどちらかを補った日の総数や、
すべての入力変数の欠測日数を表す値ではありません。
## 集計する月の選び方と乾燥指数AI
例えば7〜9月を集計する場合は、その3か月のET₀と降水量をそれぞれ足します。
$$
\begin{aligned}
ET_{0,7:9} &= \sum_{m=7}^{9} ET_{0,m} = ET_{0,7} + ET_{0,8} + ET_{0,9}, \\
P_{7:9} &= \sum_{m=7}^{9} P_m = P_7 + P_8 + P_9, \\
AI_{7:9} &= \frac{P_{7:9}}{ET_{0,7:9}}
= \frac{P_7 + P_8 + P_9}{ET_{0,7} + ET_{0,8} + ET_{0,9}}.
\end{aligned}
$$
ここで、$m$は月の番号、$ET_{0,m}$と$P_m$はそれぞれ$m$月のET₀と降水量の月合計(mm)です。
添字の$7:9$は7〜9月を表します。AIには単位がありません。
もとの値はすでに月合計なので、日数をもう一度掛ける必要はありません。単位は、選んだ期間の合計mmです。
乾燥指数AIは、**同じ期間の降水量の合計をET₀の合計で割った値**(`sum(P) / sum(ET0)`)とします。
月ごとのAIを平均する方法とは区別してください。
選んだ月に欠測があれば集計結果も欠測とし、ET₀の合計が0以下、または欠測の場合はAIを`NA`とします。
降水量からET₀を引いたP−ET₀も計算できますが、これは気候上の水の過不足を表す目安です。
土壌の保水量や流出を計算しているわけではないので、土壌水分そのものとは異なります。
次の架空CSVは、実在メッシュを表さない2個の識別子と3年分の月合計を持ちます。
上の日別CSVとは独立した説明用の数値です。
:::::
```{r}
#| label: et0-synthetic-monthly
yearly <- read_monthly_csv("data/examples/et0_monthly_synthetic.csv")
jas <- period_summary(yearly, 7:9, "Jul-Sep")
jas
columns <- c(
paste0("et0_fao56_", month.abb),
paste0("precipitation_", month.abb)
)
normal <- yearly[yearly$year == 2008, "mesh3_code", drop = FALSE]
for (column in columns) {
normal[[column]] <- vapply(
normal$mesh3_code,
function(key) {
mean(yearly[yearly$mesh3_code == key, column]) # no na.rm
},
numeric(1)
)
}
climate_jas <- period_summary(normal, 7:9, "Jul-Sep")
data.frame(
mesh3_code = normal$mesh3_code,
ratio_of_climatological_sums = climate_jas$aridity_index,
mean_yearly_ai = vapply(
normal$mesh3_code,
function(key) {
mean(jas$aridity_index[jas$mesh3_code == key])
},
numeric(1)
)
)
```
::::: {.content-visible unless-profile="ja"}
A ratio of climatological sums (the original production definition) generally
differs from the mean yearly AI. Averaging monthly AI also changes the weighting:
:::::
::::: {.content-visible when-profile="ja"}
この章のAIは、11年平均の月別値を足してから比を求めます。
各年のAIを先に求めてから平均した値とは、一般に一致しません。
月別AIの平均も、合計同士の比とは異なります。次の例で違いを確認できます。
:::::
```{r}
#| label: et0-ai-weighting
p <- c(50, 200)
et0 <- c(100, 50)
data.frame(ratio_of_sums = sum(p) / sum(et0), mean_monthly_ai = mean(p / et0))
```
::::: {.content-visible unless-profile="ja"}
### Winter crosses years
Winter Y combines December Y−1 with January-February Y.
`period_summary(data, c(12, 1, 2))` only selects months within the same row.
Use `winter_summary()` on year-specific rows for a chronological winter.
It aligns by mesh and year, preserves input rows, and labels winter by the
year of January-February. Missing prior December yields `NA`.
:::::
::::: {.content-visible when-profile="ja"}
### 年をまたぐ冬季
例えば2009年の冬季は、2008年12月と2009年1〜2月を合わせた期間とします。
`period_summary(data, c(12, 1, 2))`では、同じ行にある同じ年の12月・1月・2月を選んでしまいます。
連続した冬の3か月を集計するには、年別表に`winter_summary()`を使ってください。
この関数は同じメッシュの前年12月を探し、1〜2月が属する年を冬季の年として表示します。
入力行は削除せず、前年12月がない場合は`NA`を返します。
:::::
```{r}
#| label: et0-synthetic-winter
winter_summary(yearly)
```
::::: {.content-visible unless-profile="ja"}
For the complete real export, winters ending in 2009–2018 are available.
Winter 2008 lacks December 2007; winter 2019 lacks January-February 2019 and
has no anchor row. Summing December, January and February **means** describes
an average seasonal window, not a specific winter or its variability.
## Reproduction and verification
`R/pipeline_p0_et0.R` is unchanged from the standalone bundle, originating at
`japanese-trees-sdms` commit `1731a9e9fcaba87d718168e5eed0aeaed68b2acd`.
The gap helper is extracted unchanged from its `R/pipeline_p0_naro.R`.
`R/et0_support.R` adds CSV reading, paths and seasonal summaries. No new package
dependency is required. The export environment was R 4.5.3 and terra 1.8.86,
as recorded in the bundle's `build-environment.csv`. Optional regeneration
from authorized NetCDFs uses terra and the local bundle scripts. Raw inputs
remain immutable. This integration does not retrain an SDM.
Download the [calculation functions](../R/pipeline_p0_et0.R),
[support functions](../R/et0_support.R), [synthetic daily CSV](../data/examples/et0_daily_synthetic.csv)
and [synthetic monthly CSV](../data/examples/et0_monthly_synthetic.csv).
From the project root:
```bash
Rscript --vanilla tests/test_et0.R
Rscript tests/verify_et0_local.R
quarto render notebooks/calculate_ET0.qmd --profile en
quarto render notebooks/calculate_ET0.qmd --profile ja
```
The first script uses base R and synthetic inputs. The second reads all local
yearly tables via `PROJECT_DATA_DIR`, validates keys and coverage, and compares
their means with the supplied table. It prints aggregate statistics only.
Rendering this chapter never reads NARO tables.
## References
- Allen et al. (1998), *Crop evapotranspiration*, FAO Paper 56:
[equation and surface](https://www.fao.org/4/x0490e/x0490e06.htm),
[inputs](https://www.fao.org/4/x0490e/x0490e07.htm),
[worked examples](https://www.fao.org/4/x0490e/x0490e08.htm).
- [NARO Agro-Meteorological Grid Square Data System](https://amu.rd.naro.go.jp/),
obtained using [agrmesh (Murakami and Nagasaki, 2023)](https://github.com/KeachMurakami/agrmesh).
- [NARO usage terms and application guide](https://amu.rd.naro.go.jp/wiki_open/doku.php?id=subscription):
apply for access yourself and check the conditions before using the data.
For further reading:
- **Global ET₀ and AI:** Zomer et al. (2022) describe the global database
introduced above [@zomerVersion3Global2022].
- **How NARO temperature and precipitation data are made:** Ohno et al. (2016)
explain how observations, numerical forecasts and climate normals
are combined to produce daily 1 km grid data [@ohno2016mesh].
- **Snow modelling with NARO data:** Kominami et al. (2015) describe a snow
water equivalent model using grid weather data [@kominami2015snow].
This is background reading on NARO data applications; snow water equivalent
is not an input to the ET₀ calculation in this chapter.
:::::
::::: {.content-visible when-profile="ja"}
対象期間のうち、冬の3か月が揃うのは2009〜2018年の冬季です。
2008年の冬季に必要な2007年12月と、2019年の冬季に必要な2019年1〜2月は含まれていません。
一方、11年平均表の12月・1月・2月を足すと、平均的な冬の値を求められます。
ただし、それは特定の年の冬を表す値ではなく、年ごとのばらつきも分かりません。
## 再現と検証
計算を担うのは`R/pipeline_p0_et0.R`、CSVの読込や季節集計を担うのは`R/et0_support.R`です。
このページの例はbase Rで動き、新しいパッケージの追加は不要です。
計算コードは、`japanese-trees-sdms`のコミット`1731a9e9fcaba87d718168e5eed0aeaed68b2acd`を元に、
変更せず取り込んでいます。欠測を補う関数も、同じ版の`R/pipeline_p0_naro.R`から取り出しています。
手元の実データを出力した環境はR 4.5.3・terra 1.8.86で、`build-environment.csv`に記録しています。
利用許可を得たNetCDFから計算し直す場合は、terraと手元の処理スクリプトを使います。元のデータは変更しません。
[計算関数](../R/pipeline_p0_et0.R)、[補助関数](../R/et0_support.R)、
[架空の日別CSV](../data/examples/et0_daily_synthetic.csv)、
[架空の月別CSV](../data/examples/et0_monthly_synthetic.csv)をダウンロードできます。
プロジェクトのルートで実行します。
```bash
Rscript --vanilla tests/test_et0.R
Rscript tests/verify_et0_local.R
quarto render notebooks/calculate_ET0.qmd --profile en
quarto render notebooks/calculate_ET0.qmd --profile ja
```
最初のスクリプトは、架空データとFAOの公開計算例を使って関数の動作を確かめます。
2番目は実データを用意した人向けです。`PROJECT_DATA_DIR`で指定した場所の全ブロックを読み、
メッシュと年の対応、対象期間の抜け、11年平均が合うかを確認します。表示するのは集計結果だけです。
この章のレンダリングでは、NAROの実データは読み込みません。
## 参考文献
- Allen et al. (1998), *Crop evapotranspiration*, FAO Paper 56:
[式と基準面](https://www.fao.org/4/x0490e/x0490e06.htm)、
[気象入力](https://www.fao.org/4/x0490e/x0490e07.htm)、
[計算例](https://www.fao.org/4/x0490e/x0490e08.htm)。
- [農研機構メッシュ農業気象データ](https://amu.rd.naro.go.jp/)。
取得には[agrmesh(Murakami and Nagasaki, 2023)](https://github.com/KeachMurakami/agrmesh)を使用。
- [農研機構の利用案内・利用規約](https://amu.rd.naro.go.jp/wiki_open/doku.php?id=subscription):
利用する際は、各自で申請し、利用条件を確認してください。
関連する手法やNAROデータについて詳しく知りたい方は、次の文献も参考にしてください。
- **全球のET₀・AIデータについて**:Zomerら(2022)は、上で紹介した全球データベースの
作成方法を説明しています [@zomerVersion3Global2022]。
- **気温・降水量データの作り方について**:大野ら(2016)は、実況値・数値予報・平年値を
組み合わせて、約1 kmのメッシュごとに日別の気温と降水量を求める方法を説明しています [@ohno2016mesh]。
- **積雪に関するモデルについて**:小南ら(2015)は、メッシュ農業気象データを使って
積雪水量を推定する方法を説明しています [@kominami2015snow]。
NAROデータの活用方法を知るための参考文献です。この章のET₀計算では、積雪水量は入力に使いません。
:::::