# An Adapter and Segmentation Network-Based Approach for Automated Atmospheric Front Detection
## 2 Data and Method  
### Data  
The input data used in this study were obtained from the fifth-generation global atmospheric reanalysis dataset (ERA5) produced by the European Centre for Medium-Range Weather Forecasts (ECMWF). This dataset encompasses a wide range of global meteorological observations and model output data for the atmosphere, ocean, and land surface from 1979 to the present.  
The selected variables include the following:  
* Temperature (T), U-wind (U), V-wind (V), and specific humidity (q) at 850 hPa;
* Dew point temperature (Td) at 2 m;
* Mean sea level pressure (Pmsl).  
The spatial coverage ranges from 37\({}^{\circ}\) W to 165\({}^{\circ}\) W and 10\({}^{\circ}\) N to 74\({}^{\circ}\) N, with a horizontal resolution of 0.25\({}^{\circ}\)\(\times\) 0.25\({}^{\circ}\) and a temporal resolution of 3 h. The study period spans from 2009 to 2018, with the following data splits:  
* Test set: 2009.
* Training set: 2010-2017.
* Validation set: 2018.  
Table 1 provides detailed information on the input data used in this study.  
This study produces frontal data for air mass labeling using surface bulletins from the U.S. Weather Prediction Center (WPC). Each frontal system is represented by a series of discrete latitude-longitude coordinate pairs, which are temporally and spatially consistent with the selected ERA5 reanalysis data. To facilitate neural network training, the WPC frontal data undergoes the following processing steps: resolution enhancement, curve fitting, expansion, and labeling of frontal bounding boxes and categories.  
Figure 1 illustrates the transformation of WPC frontal data into training labels for the network. Step A involves increasing the resolution of the original WPC frontal data and applying bilinear interpolation to fit the points into a smooth curve. Step B expands the frontal data by marking adjacent non-frontal grid points as frontal points and iterating this expansion three times, thereby increasing the number of frontal grid points to mitigate severe class imbalance. Step C involves using image annotation software (Labellmg, Install labeling: Enter the following command in cmd, pip install labeling-i pypi.tuna.tsinghua.edu.cn/simple) to label the bounding boxes and categories of the frontal systems.  
\begin{table}
\begin{tabular}{l l l} \hline \hline \multirow{2}{*}{**Coverage**} & \multicolumn{2}{c}{37\({}^{\circ}\) to 165\({}^{\circ}\) W} \\ \cline{2-3}  & 10\({}^{\circ}\) to 74\({}^{\circ}\) N \\ \hline
**Resolution ratio** & 0.25\({}^{\circ}\)\(\times\) 0.25\({}^{\circ}\) \\ \hline
**Interval time** & 3 h \\ \hline \multirow{5}{*}{**Meteorological elements**} & 2 m above ground & Dewpoint Temperature (Td2m) \\ \cline{2-3}  & & Temperature (T\({}_{\text{850h}}\)) \\ \cline{2-3}  & & specific humidity(q) \\ \cline{2-3}  & & U, Vwind \\ \cline{2-3}  & & Pressure (Pmsl) \\ \hline \multirow{5}{*}{**Data set classification**} & Training Set (2010–2017) & \\ \cline{2-3}  & Validation Set (2018) & \\ \cline{1-1} \cline{2-3}  & Test set (2009) & \\ \hline \hline \end{tabular}
\end{table}
Table 1: Details of the input data used in this study.