Upstream migration of anadromous and potamodromous brown trout: patterns and triggers in a 25-year overview

River fragmentation and alterations in flow and thermal regimes are the main stressors affecting migrating fish, which could be aggravated by climate change and increasing water demand. To assess these impacts and define mitigation measures, it is vital to understand fish movement patterns and the environmental variables affecting them. This study presents a long-term (1995–2019) analysis of upstream migration patterns of anadromous and potamodromous brown trout in the lower River Bidasoa (Spain). For this, captures in a monitoring station were analyzed using Survival Analysis and Random Forest techniques. Results showed that most upstream movements of potamodromous trout occurred in October–December, whereas in June–July for anadromous trout, although with differences regarding sex and size. Both, fish numbers and dates varied over time and were related to the environmental conditions, with different influence on each ecotype. The information provided from comparative studies can be used as a basis to develop adaptive management strategies to ensure freshwater species conservation. Moreover, studies in the southern distribution range can be crucial under climate warming scenarios, where species are expected to shift coldwards.


Introduction
Current society needs a large volume of fresh water to keep its present lifestyle, whether for irrigation, power generation, flood control, or industrial and domestic supply. These water uses alter the natural hydrological and ecological patterns and processes in freshwater environments Segurado et al., 2016). River fragmentation and alterations in natural river flow and thermal regimes are the most important stressors affecting freshwater fish (Nilsson et al., 2005;Jones & Petreman, 2015;Feng et al., 2018). On the one hand, river fragmentation limits the necessary movements of fish between different habitats to complete their life cycles (Lucas et al., 2001;Brönmark et al., 2014). On the other hand, freshwater fish use flow and thermal regimes as main ecological timers for initiating and maintaining behavioral reactions such as migration, feeding, and spawning (Lucas et al., 2001). Therefore, alterations on these regimes can lead to a loss of the migration signal and a consequent migration delay , difficult obstacle ascent and reduction of habitat connectivity García-Vega et al., 2021), a shift in the phenology, and a mismatch between available and necessary resources (Shuter et al., 2012;Otero et al., 2014). In turn, this can derive in population and diversity reductions caused by the mismatch among offspring and ecological requirements (Nicola & Almodóvar, 2002) and changes in fish assemblages (Shea & Peterson, 2007), as well as a reduction of suitable physical and thermal habitat availability (Almodóvar et al., 2012;Boavida et al., 2015;Junker et al., 2015), endangering the persistence of many migratory fish species (Shuter et al., 2012) such as the brown trout (Salmo trutta Linnaeus, 1758).
Brown trout is a worldwide distributed species. Its natural distribution spreads over Europe, North Africa, and West Asia, but also it has been introduced in South Africa, Russia, and North and South America, among others (MacCrimmon & Marshall, 1968;Klemetsen et al., 2003). This species can display diverse life history tactics, from anadromy (i.e. most of feeding and growth are at sea and adults migrate into freshwater to reproduce) to potamodromy (i.e. movements occurring exclusively in freshwater), or even partial migrations (i.e. where populations are composed of a mixture of resident and migratory individuals) (Lucas et al., 2001;Chapman et al., 2012). Its migration patterns and cues are affected by latitude with a local variation dependence on environmental conditions Aarestrup et al., 2018). In general, the most important upstream movements of southern potamodromous populations are related to the return to the spawning grounds and occur in autumn-winter (Doadrio, 2002;García-Vega et al., 2017) and during summer-autumn in the case of anadromous ones (Caballero et al., 2012(Caballero et al., , 2018, although both ecotypes spawn in autumn-winter. In general, reproductive movements are triggered by changes in photoperiod and water temperature and favored by high flows (Thorpe, 1989;Jonsson & Jonsson, 2011).
Due to its economic and historical importance, brown trout has been deeply studied (Northcote & Lobón-Cerviá, 2008). However, most of the available research on brown trout migration has been focused on anadromous populations, with almost no attention to life-history comparative studies (Ferguson et al., 2019), and studies in the south of its natural distribution range are still scarce (Doadrio et al., 2015;Clavero et al., 2018). The knowledge of migration patterns and cues is fundamental to understand species requirements and to design adaptive management plans, considering all the range of possible ecotypes and different migration patterns, as different life histories can have different requirements (Ferguson et al., 2019). Moreover, studies from the southern ranges are essential in the context of climate change, as many species are expected not only to shift habitat upriver (Hari et al., 2006) but also to shift cold wards on their current distribution ranges (Jonsson & Jonsson, 2009).
Considering the above, a long-term study (from 1995 to 2019) of brown trout (both anadromous and potamodromous) upstream migration in the Northern Iberian Peninsula is presented here. For this, data from a salmonid monitoring station located in the lower River Bidasoa (Navarre, Spain) have been used. The main objective was to evaluate the upstream migration patterns of anadromous and potamodromous brown trout population to (1) identify periods with most upstream movements and possible differences by ecotype, sex, and size, (2) analyze variations among years, considering trends in the fish number and migration dates, and (3) evaluate the relation of these movements with environmental variables. This information has direct applications in fish and water management (e.g. design of fishing closures and quotas, delivery of environmental flows) and restoration measures (e.g. dam removal, fishway construction) to improve both anadromous and potamodromous brown trout populations, as well as to enhance conservation efforts.

Study site
Upstream migration data of brown trout (hereafter referred to as trout) were collected from a salmonid monitoring station in the lower River Bidasoa. The monitoring station was built in 1991 at a weir of a foundry plant (7 m head drop) located between the villages of Bera and Lesaka (ETRS89 43816 0 N, 1841 0 W; Navarre, Spain), 21.7 km upstream from the sea, at an altitude of 40 m above mean sea level (Fig. 1a). This weir derives water through a channel for industrial supply and hydropower generation. To date, is the second obstacle from the sea. The first weir from the sea (downstream of the monitoring station) has a pool-type fishway which was built in 2008 (GAN-NIK, 2017) and during the last decade, other three weirs downstream were removed (one in September 2014 and the other two in October 2016) (c.f. García-Vega et al., 2020). However, there are still numerous weirs upstream of this point (Rodeles et al., 2019). In addition, the regional government conducted controlled fish stockings with native trout from 2003 to 2012 (GANASA, 2013) as well as exceptional complete closures for trout fishing during the years 2008, 2009, and 2010 in the upper salmonid region of Navarre under a regional law (OF 48/2008) as additional protection measures for the recovery of the salmonid populations (c.f. García-Vega et al., 2020).
In the study reach, the trout population comprised anadromous (sea) and potamodromous (riverine) components. The fish assemblage also included other diadromous species, such as Atlantic salmon ( The most important spawning areas in the Bidasoa basin are located in the upstream tributaries (Fig. 1a). The main stem downstream of Bera village presents a low quality of spawning sites (large portions of channeled water, low availability of spawning substratum and silting) (Gosset et al., 2006), although the nearby upstream area provides several tributaries of various sizes and fragmentation degrees (Rodeles et al., 2019). The mean annual discharge in the study   reach was 24.2 m 3 /s and the mean annual water temperature was 13.7°C (MAPAMA, 2019) (Fig. 1b). According to physical and chemical analyses (mean values: PO 4 = 0.04 mg/l NH 4 = 0.03 mg/l, NO 3-= 3.32 mg/l, O 2 = 10.29 mg/l, pH 7.87; (Government of Navarre, 2018), water quality was ''very good'' (based on Spanish Act RD 817/2015).

Monitoring procedure
The monitoring station comprises a stepped fishway of five pools and a fish lift. The cage of the lift works as a capture trap (it has a funnel in the entrance) which is located into the upper pool and is lifted to transport the fish to the measuring room. The only possible way for upstream migration is through the monitoring station. Thus, captures in the monitoring station were likely to represent only a part of the population (i.e. those that found and entered the fishway). Downstream migrants cannot descend through the fishway (due to the configuration for fish trapping). Downstream migration occurred by the volitional drop of fish over the weir (there is a rack at the diversion channel entrance that prevents fish from entering the turbines) and thus, it was not possible to monitor in the current configuration.
Data collected from 24 September 1995 to 24 December 2019 were used in the analyses. The frequency of monitoring was two to three times per week during the whole year, increasing to once a day when high migration rates were observed. The trap was checked and reset in the early daylight hours. Any captured trout were categorized by ecotype (riverine vs sea) based on external characteristics. A misclassification between ecotypes was possible when the anadromous ecotype has spent much time in the river. A previous scale analysis in the monitoring station showed a misclassification error of 1.6% for the riverine and 15.4% for the sea trout and possible doubts to 1.6% and 11.2% respectively (Tobes et al., 2012). The trout were also measured (fork length, FL, in cm; ± 0.1 cm), weighed (W, in g; ± 0.1 g; only since 2001) and the sex identified (only since 2001) based on external characteristics (a sex misclassification could occur in those individuals without clear sexual dimorphism (Reyes-Gavilán et al., 1997)). After data collection, the trout were released upstream of the monitoring station (at an adequate distance from the weir to prevent fallbacks) to allow for migration.

Environmental variables
To characterize the relation of trout movements with environmental variables, the photoperiod, water temperature, and river discharge were selected as potential cues (Jonsson & Jonsson, 2011;García-Vega et al., 2017. Photoperiod (in h) corresponded with the day length (time between sunrise and sunset) and was calculated with the Brock model (Brock, 1981). Water temperature (in°C) was monitored at the monitoring station (HOBO Water Temp Pro v2) from November 2007 to March 2018 throughout the day at 6 h intervals. From April 2018, a water quality station (SAICA-11) was installed at the monitoring station recording water temperature data every 10 min (www. agua.navarra.es). Water temperature previous to the equipment installation on November 2007 and other missing values were completed with a linear regression (R 2 = 0.864) with previous day air temperature (weather station 227 Bera, daily frequency; www. meteo.navarra.es) as a predictor variable (Webb et al., 2003) (data from January to August 2007 were not available, and the weather station 158 Lesaka was used instead). River discharge data (in m 3 /s, daily frequency) were obtained from the gauging station 1106 Endarlatza (www.chcantabrico.es).

General fish characteristics
Firstly, each trout was categorized by ecotype (two categories: riverine and sea trout), sex (three categories: male, female and unidentified sex), and size (four categories: FL \ first quartile; first quartile B FL \ median; median B FL \ third quartile; FL C third quartile). In addition, missing values of weight were completed with the corresponding allometric relationship W = aÁFL b by ecotype. Secondly, and in order to have an overview of the collected data, a frequency analysis of the number of captures by ecotype and sex was carried out, and the test for equality of proportions (EP test) was used to find possible differences between groups. In addition, the Mann-Whitney Wilcoxon (MW) test was used to detect significant differences in fork length and weight by ecotype and sex. This non-parametric test was applied as variables were not normally distributed.

Intra-annual movements
In order to identify the periods with more amount of upstream movements, fish were grouped (summed) by months, and the peak upstream migration period was considered as the months with the highest movements ([ 80%). To describe migration patterns, survival analysis techniques were used, by applying the concept of survival time (time (t) until an event occurs) to migration time (time until a fish is captured in the monitoring station). For this, Kaplan-Meier (KM) survival curves (Kaplan & Meier, 1958) were determined to identify the median migration date (the week when 50% of the captures has occurred) and to show possible different patterns by ecotype, sex, and size. The Log Rank (LR) test was used for KM curve comparison (Mantel, 1966). The starting null hypothesis was that both ecotypes present similar migration patterns, without differences by sex or size. Analyses were performed from January to December (full year) considering the first week of January as t = 1 (data of 1995 were excluded because was not full-monitored). Because fish were not previously tagged, some assumptions were made: (1) Once a fish was captured, it continued its migration. That is to say, as repeat observations of the same individual could not be distinguished, it was assumed that all fish were only captured once. (2) The captured fish were the only ones that participated in the experiments and the exact survival time (capture date) of all participating individuals (captured fish) was known, i.e. there were not censored data.
In addition, in order to identify a possible order of arrival between males and females during peak migration, sex ratios and KM curve comparisons were also carried out, considering in this case only data of the periods of peak upstream migration ± 1 month. Only data of these sub-periods were used in order to avoid a possible bias due to the influence of movements outside of these peaks with other possible biological meanings (e.g. thermoregulatory upstream movements Ovidio, 1999;García-Vega et al., 2017)).

Inter-annual variations
To answer the second objective, i.e. identify possible variations among years, first, fish were grouped (summed) by month and year. This allowed to evaluate changes in the number of captures and peak migration months throughout time. The trend over time in the total number of captured fish during peak migration period ± 1 month was evaluated using linear regression. To detect possible significant differences in migration patterns between both ecotypes among years, annual KM curves by ecotype were also calculated, using the LR test for curve comparison. In this case, the starting null hypothesis was that migration patterns were similar all years. In addition, the trend of median migration dates was evaluated using linear regression considering only data of the peak upstream migration periods ± 1 month.

Influence of environmental variables
In order to evaluate the relation between trout movements and the selected environmental variables, first weekly mean values of each considered variable were calculated, i.e. the mean weekly photoperiod (P), mean weekly water temperature (T), the variation in water temperature with respect to the previous week (DT = T t -T t -1 ), mean weekly river discharge (Q) and the variation in river discharge respect to the previous week (DQ = Q t -Q t -1 ). To find possible significant differences of environmental variables among years, P, T and Q were compared by using Kruskall-Wallis (KW) test. Then, linear regression was applied to detect whether an increasing trend in mean annual water temperature or discharge occurred (P is the same all years). In addition, to assess the correlation among the environmental variables (P, T, DT, Q, and DQ), Spearman correlations were calculated.
Finally, the relation between environmental variables and the number of captures was studied. For this, the ranges of the environmental variables within movement occurred were evaluated by means of frequency analysis and Spearman correlations between the number of captures and the environmental variables were also calculated. Then, the influence of environmental variables on the number of captures was assessed by means of Random Forest (RF) regression (Breiman, 2001). This method has been widely applied in freshwater fish studies to predict fish abundance and species response to environmental alterations (Markovic et al., 2012;Ward et al., 2014;Vezza et al., 2015;García-Vega et al., 2018, 2020, 2021 and was selected due to the nature of the data (count data, no-normality, zero-inflation and over-dispersion). Two RF models were created, one for each ecotype, considering the number of weekly captures as response variables whereas P, T, DT, Q, and DQ were the predictor variables. The number of trees to grow was set at 500, whereas the number of variables randomly sampled as candidates at each split was set at the square root of the number of input variables. RF does not require previous data transformation or a separate test set for cross-validation as it is performed internally during the run (Breiman, 2001). However, linear bias correction was applied in order to minimize the over/underestimation of extreme observations (Zhang & Lu, 2012). The final models were evaluated using the coefficient of determination (R 2 ). The importance of the environmental variables was measured using the increase in mean squared error (MSE) of predictions (%IncMSE) and the increase in node purity (IncNodePurity). For both metrics, the higher number, the more important it is. Partial dependence plots for environmental variables were obtained from RF in order to characterize the marginal effect of a variable in the model.
All data processing and statistical analyses were performed using R version 3.5.3 (R Core Team, 2019), and the significance level was established at a = 0.05 for all the analyses. The survival package (Therneau & Grambsch, 2000) was used for the survival analysis, the Hmisc package (Harrel, 2020) for the correlation analysis, and the randomForest package (Liaw & Wiener, 2002) for the random forest regression.

General fish characteristics
In total, 13,646 trout were captured from 1995 to 2019 in the monitoring station during their upstream migration. Riverine trout was more abundant than sea trout (88.3% vs 11.7%; EP test P-value: P \ 0.0001) but with smaller size (Table 1, MW test for FL and W P \ 0.0001). Proportion of females was greater than males for both ecotypes (riverine trout: sex ratio F:M = 1.41; sea trout sex ratio F:M = 1.76; both EP test P \ 0.0001). Males were significantly larger and heavier than females for both ecotypes (riverine male median FL = 30.5 cm and W = 300 g; female FL = 28.5 cm and W = 240 g; both MW test P \ 0.0001; sea male median FL = 38.5 cm and W = 580 g; female FL = 36.0 cm and W = 480 g; MW test P FL = 0.0001 and W = 0.0060).

Intra-annual movements
Trout upstream movements occurred throughout the year and varied among months. Riverine trout had a peak of migration from October to December (80.7% of captures, Fig. 2a, b) with a median date of migration on the second week of November, whereas sea trout migration peak was during June and July (81.3% of captures, Fig. 2a, c) with a median date of migration on the last week of June. In addition, sea trout presented a small increase of captures (9.2%) in the period October-December (median migration day on the third week of November) (the riverine ecotype did not present any sub-peak during summer). These substantially different migration patterns were also indicated by the estimated KM curves (Fig. 3a, d; LR test P \ 0.0001).
The proportion of females during peak upstream migration months was higher than males for both ecotypes (riverine trout: October-December sex ratio F:M = 1.43; sea trout: June-July sex ratio F:M = 1.75; all EP test P \ 0.0001), as well as Table 1 General characteristics of the captured riverine and sea trout (n = fish number; FL = fork length; W = weight; SD = standard deviation; IqR (q 1 -q 3 ) = interquartile range (first quartile-third quartile); R 2 = determination coefficient)

Variable
Riverine trout Sea trout  (Fig. 3b) and only the autumn period (Fig. 3g)), with males moving slightly earlier than females (close to one week shift in median migration date). Sea trout KM curves for females and males were statistically equivalent (LR test: full-year P = 0.6 (Fig. 3e); autumn P = 0.08 (Fig. 3i)), meaning similar global migration patterns. However, when considering only the summer migration period, slightly significant differences were found (Fig. 3h, P = 0.01), with similar median migration date but earlier (close to a week) patterns for female sea trout. Different migration patterns were also observed regarding fish size, as KM curves were found not statistically equivalent ( Fig. 3c and f, LR test P \ 0.0001 for both ecotypes). In the case of riverine trout, the most of upstream movements occurred in October-December (median migration dates for all size groups between weeks 45-46). The individuals of the smallest size range performed more movements along the year (74.6% in October-December; 25.4% in January-September) when comparing with other size groups (that were more concentrated, with[ 80% in October-December). In addition, fish from the largest range (8.7% of individuals of this group) were detected migrating in June-July (Fig. 3c). For the sea trout, while the most of movements of the three smaller size categories occurred in June-July, in the case of the largest size group, there was an additional small peak (17.3%) of migration during October-December.

Migration throughout time
The number of trout during peak migrations varied among years (Fig. 2), with a significant increasing trend in the number of both ecotypes along the study period (Fig. 4a, b) and significantly greater numbers for both ecotypes in the period after 2003 (after management and restoration measures) (Fig. 4a, b; MW test: riverine P = 0.003; sea: P = 0.0002). However, this trend was not significant for those sea trout captured during autumn migration (Fig. 4c). In addition, despite the major proportion during all studied years was concentrated in October-December for  riverine and June-July for sea trout (Fig. 2b and c), significant differences in migration patterns (i.e. KM curves) among years were found for each ecotype (both LR test P \ 0.0001; Fig. 3a and d). Median migration dates of autumn movements of riverine trout ranged from the last week of October to the second week of December, with a decreasing trend in median migration date, that is earlier migrations over time (trend slope = -0.08; P = 0.0415; Fig. 4d). Regarding sea trout, median migration dates of summer movements ranged from the second week of June to the third week of July, whereas in autumn the range was from the last week of October to the second week of January, both migrations with a slightly decreasing trend over time (trend slope = -0.05 and -0.13   Fig. 3 Kaplan Meier curves representing upstream migration patterns in the monitoring station regarding the total number, by sex, and by size (n = fish number; q 1 = first quartile; q 2 = second quartile (median); q 3 = third quartile; see Table 1) for riverine (a-c) and sea (d-f) trout respectively considering the full year (1995 was not considered because incomplete). In addition, female and male sub-period comparison for riverine (g) and sea trout (h and i) are shown (pie chart of the number of female vs male fish during peak migration). p stands for Log Rank test P-values (a = 0.05) for comparison among curves. Shadow areas represent the peak migration period for each ecotype (i.e. the months with [ 80% of movements) respectively) although without statistical significance (P = 0.2357 and 0.1508 respectively) ( Fig. 4e and f).

Influence of environmental variables on trout migration
There were no significant differences among years in mean weekly photoperiod and mean weekly water temperature (Table 2) (they were found positively correlated), although significant differences among years were found for the temperature when considering only riverine peak migration months (October-December P = 0.02) but not for sea trout peak months (June-July P = 0.37). In the case of mean weekly river discharge, there were significant differences among years when considering the full year (Table 2), as well as for peak migration months (both P \ 0.0001), and it was found negatively correlated with both water temperature and photoperiod ( Table 2). The number of riverine trout was negatively correlated to photoperiod and variation in water temperature (Table 2), and the most of upstream movements (81%) occurred when P \ 10.5 h and 64% with 9.5 \ T \ 14.5°C. On the contrary, sea trout number was positively correlated to these variables ( Table 2) and 85% of movements occurred when P [ 14.5 h and 75% with 16.5 \ T \ 20.5°C. For both ecotypes, migration occurred in a range of medium-moderated river discharges. On the one hand, 71% of riverine trout movements occurred within  , 2020). As the peak migration of sea trout occurred from June to July, some actions were not meant to come into effect until the next year discharges 5 \ Q \ 50 m 3 /s during discharge peak events (both ascending and descending phases). On the other hand, 69% of sea trout movements in the monitoring station occurred within 5 \ Q \ 20 m 3 /s, during the descending phase of peak discharges, presenting a negative correlation to river discharge (Table 2). RF regressions showed a good performance in the prediction of the number of both riverine (Fig. 5a) and sea trout (Fig. 5b) during peak migration season. The most important variable for predicting the number of riverine trout was the water temperature whereas for the sea trout it was the photoperiod (Fig. 5c and d), with the other way around for the second variable, and followed by the river discharge, and then, the changes of these variables (DT and DQ) with respect to the previous week. According to partial dependence plots (Fig. 5e to i), a potential increase in riverine trout will occur when P \ 12 h (with a peak near 10 h), T between 9.5 and 16.5 (with a peak near 13°C), and moderate-high discharge (without clear pattern respect to the variation on Q and T respect to the previous week). In the case of sea trout, the model predicts an increase in number when P [ 14.7 h (peak near the maximum P), T [ 15°C, during increasing temperatures (i.e. DT [ 0) and moderate discharge (with decreasing discharge respect to the previous week, i.e. DQ \ 0).

Discussion
The contribution of this study is to bring a long-term (25 years) and full-year analysis of upstream migration patterns of both anadromous and potamodromous brown trout in the lower River Bidasoa, in the southern natural distribution area of this species. Results showed a bimodal timing of upstream migration. While most upstream movements of riverine trout were concentrated from October to December (80.7%), movements of sea trout occurred much earlier, mainly focused on June and July (81.3%) with only a 9.2% from October to December. This separation in two migration runs in anadromous trout has been previously reported (Hellawell et al., 1974;Caballero et al., 2018). In general, the upstream migration of anadromous trout within a river may occur over several months (Aarestrup et al., 2018), and returning dates seems to be associated with the type of river where the natal spawning grounds are, being (b) Spearman correlation among variables (n sea = weekly number of sea trout; n riverine = weekly number of riverine trout, P = mean weekly photoperiod, Q = mean weekly river discharge, T = mean weekly water temperature, DQ = variation in river discharge respect to the previous week, DT = variation in water temperature respect to the previous week) Values above the diagonal correspond to the correlation coefficient. Values below the diagonal correspond to P-values of the correlation test (a = 0.05) sooner in mainstem rivers and closer to the spawning seasons in tributaries and small rivers (Caballero et al., 2018). Atlantic anadromous trout populations in southern latitudes have been reported to return to their natal river from May to September and later (from April to December) in northern ones (Jonsson & Jonsson, 2002;Caballero et al., 2012). In the case of potamodromous populations of the Iberian Peninsula, Variable importance regarding c increase in mean squared error (%IncMSE, which represents how much the model fit decreases when a variable drops of the model) and d increase in node purity (IncNodePurity, which measures the quality of a split for every variable (node) of a tree and it is calculated by the difference between the sum of squared residuals before and after the split on that variable) (for both metrics, the higher number, the more important the variable is). Partial dependence plots (e-i) for assessing the marginal effect of each variable in predicting the number of riverine and sea trout migrants (i.e. the impact that a unit change in one of the predictors has on the response variable while all other variables remain constant) upstream movements usually occur from October to January (Doadrio, 2002;García-Vega et al., 2017), showing a narrower window (movements more concentrated in November and December) in upper parts of the Bidasoa basin . Despite the detected time life-history shift in the returning to the spawning grounds, both anadromous and potamodromous trout spawning occurs in late autumn or winter (González et al., 2017). Therefore, both ecotypes can co-exist in the spawning season and thus, spawn at the same time and place with interbreeding, i.e., making it possible for reproduction between the two ecotypes (Caballero et al., 2012;Goodwin et al., 2016;Ferguson et al., 2019). Riverine trout males migrated slightly earlier than females, which agrees with other populations in upper parts of the River Bidasoa . In general, males of salmonids usually enter the spawning grounds before females to establish dominance (Jonsson & Jonsson, 2011;Esteve, 2017). However, in the case of sea trout, both sexes presented similar migration patterns in their comeback from the sea in the study reach. This could be due to the wide period between return migration (summer) and spawning times (autumn), as well as to the distance to the final spawning grounds. In addition, the observed sex ratio was tipped in favor of females for both ecotypes. This agrees with other Atlantic anadromous populations of the north of the Iberian Peninsula (2-3 females per male, Caballero et al., 2012) and northern ones (Jonsson & Jonsson, 2011), as well as with potamodromous populations of upper tributaries of the River Bidasoa (1.5 females per male, García-Vega et al., 2018), with males usually more resident than females (Jonsson, 1989). On the other hand, besides the two main migration peaks detected in a year, there were also movements outside those intervals, with a great proportion of smaller fish (the largest trout (both riverine and sea) were found near the spawning season). These outside reproduction movements can be associated with the fulfillment of other ecological requirements, such as feeding, refuge, or exploration (Lucas et al., 2001) and have been previously reported in several studies for both riverine (Ovidio, 1999;Benitez et al., 2015;García-Vega et al., 2017) and sea trout (Jonsson & Gravem, 1985;Jensen et al., 2015).
The results showed a general decreasing trend in median migration dates (as well as a similar pattern of interquartile dates), with significantly earlier migrations in the case of riverine trout. This may be explained by the connectivity measures (three weir removals in 2014-2016 and a fishway construction in 2008) carried out downstream of the monitoring station (see García-Vega et al. (2020) for the full analyses), which can be translated into lower delays during migrations. These actions, together with additional management measures (fishing closures (2008-2011) with a posterior establishment of size limits and quotas, and fish stocking (2003-2012)), seem also responsible for the increasing trend in the number of returning sea trout and the number of riverine trout. However, the results of these measures seemed to be also affected by the environmental conditions during the migration window as well as during early fry development stages (Lobón-Cerviá & Rincón, 2004;Lobón-Cerviá, 2007;Nicola et al., 2009).
Environmental variables act as stimuli for the onset and maintenance of migration (Smith, 1985;Lucas et al., 2001). The relative importance of each parameter is different for each species or population and, in general, it is the combination of several variables which triggers migration (Ovidio et al., 1998;Lucas et al., 2001). Occasionally, when a relevant environmental cue is missing, this is replaced by alternative stimuli, avoiding important delays in the migration (DWA, 2005). Water temperature has a strong influence on internal physiological processes for gonadal development (Lahnsteiner & Leitner, 2013) and had a high influence on the timing of migration , more evident for riverine populations (it was the most important variable in the RF model) as movements were closer to breeding time than for sea trout, where it was in the second place, below photoperiod. Other works have also shown that the influence of temperature on the river entrance of sea trout seems to be conflicting and inconclusive (Aarestrup et al., 2018). Photoperiod and water temperature showed a clear positive correlation, as their combination is usually what regulates the movements of salmonids (Zydlewski et al., 2014). While most part movements of riverine trout occurred in autumn when decreasing photoperiod, as a signal of the proximity to the spawning season (it intervenes in hormonal regulation during maturation Smith, 1985;Jonsson, 1991)), sea trout upstream movements occurred in summer, when the photoperiod is near maximum. This can be also a signal to entry from the sea to the river, with enough time to reach the spawning grounds in upper tributaries. However, even if favorable photoperiod is encountered, migration can be delayed if the adequate water temperature does not occur (Teichert et al., 2020). Moreover, as the photoperiod is the same on each specific day every year, inter-annual variations in time of migration were likely induced by changes in water temperature and the local increase in river discharge. The increase in river discharge is considered a stimulant factor and a facilitator for overcoming obstacles (Clapp et al., 1990;. However, extremely high discharges may limit migration as it is energetically demanding to swim against strong currents (Jonsson & Jonsson, 2002). For riverine trout, discrepancies in migration dates among years could be due to the timing of moderate discharge peak events . In the case of sea trout, the peaks in number occurred after a moderate increase in discharge rate, during the descending phase. The increase in discharge has been demonstrated as an important stimulating factor for the river entrance of salmonids, especially in smaller rivers (Aarestrup et al., 2018). Thus, sea trout probably entered from the Cantabrian Sea to the River Bidasoa during these increases in discharge, and then, when they passed through the monitoring station, the discharge peaks had already passed.
The differential discharge requirements of both ecotypes and the existence of movements throughout the year reinforce the necessity of adequate scheduling of environmental flow deliveries as well as to provide full-year river connectivity in regulated rivers where these two ecotypes coexist. In this regard, the variations in the hydrological conditions of a river can also compromise the efficiency of a fishway if this has not been considered during design . Under certain hydrological conditions, fishways may be too much demanding and thus selective for small fish or fish with lower swimming abilities , 2019, or even the attractiveness of the entrance can be hindered, so its localization rate can decrease (Bravo-Córdoba et al., 2018). These can introduce some bias in the population size estimations. In order to solve this, studies of tagged individuals can constitute a highly valuable source of demographic data (Nater et al., 2020), and could be a good complement in long-term monitoring studies.

Summary and conclusion
This study presents a long-term (25 years) and fullyear analysis of upstream migration patterns of anadromous and potamodromous brown trout in the lower River Bidasoa (Spain), in the southern natural distribution area of this species. Results showed different peak migration dates for both ecotypes, with different patterns regarding sex and size. Both, the number of migrants and migration dates, varied over time, with a clear relation to the environmental conditions, that affected in a different way each ecotype, and also benefited from the different conservation measures in the Bidasoa basin.
Comparative studies of different migration patterns and cues within different life histories are essential not only to understand their ecology and environmental requirements but also to evaluate the effect of human impacts as well as to assess the effect of mitigation measures and management decisions. In addition, the information provided from comparative studies can be used as a basis to develop adaptive management strategies that encompass the conservation of freshwater species together with the future projections of climate and the increasing demand. Moreover, studies in the southern range of species distribution can be very relevant under climate warming scenarios, where species are expected to shift not only upriver but also coldwards in their distribution ranges. restrictions apply to the availability of these data, which were used under license for the current study, and so are not publicly available.
Code availability Not applicable.

Declarations
Conflict of interest The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.
Ethical approval All experiments and procedures were performed following European Union ethical guidelines (Directive 2010/63/UE) and Spanish Act RD 53/2013, with the approval of the competent authorities (Regional Government on Natural Resources and Water Management Authority).
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.