Impact of climate on mental health among university students: a population-based study across 43 cities in China Authors: Tingzhong Yang, Ruoxiang Cao, Sihui Peng Published: 2026 ABSTRACT Individuals are often exposed to multiple climate factors simultaneously, but there is limited research on the combined effects of these factors on mental health. This study aims to explore the simultaneous impact of temperature, humidity, and the number of sunny days on mental health, as well as the potential social and behavioral mechanisms underlying these associations. There were 11,954 university students selected through a multistage survey sampling process. The multilevel logistic regression models showed that temperature and sunny days were significantly associated with probable mental disorder. Compared with students living in cities with low annual average temperature below 10 °C, those in cities with moderate temperature of 10–14.9 °C had lower odds of probable mental disorder in the comprehensive model (OR = 0.69, 95% CI: 0.50–0.95). However, students in cities with annual average temperature of 15 °C or above did not differ significantly from the low-temperature group (OR = 1.03, 95% CI: 0.73–1.45). Similarly, compared with students living in cities with fewer than 130 sunny days per year, those in cities with 170 or more sunny days had lower odds of probable mental disorder (OR = 0.69, 95% CI: 0.50–0.95). Formal tests further supported nonlinear associations between city-level annual average temperature and probable mental disorder. In the overall sample, both lower and higher temperatures were associated with higher levels of probable mental disorder, suggesting a U-shaped pattern. Similar patterns were observed in cities with fewer than 130 (F = 604.32, p < 0.001) and 130–169 sunny days (F = 183.35, p < 0.001). In contrast, among cities with 170 or more sunny days (F = 342.42, p < 0.001), the association showed an inverted U-shaped pattern. At the city level, sunny days were generally negatively associated with the prevalence of probable mental disorder. This pattern was consistent in the low- (F = 276.36, p < 0.01) and moderate-temperature (F = 10.08, p < 0.01) groups, but reversed in the high-temperature group (F = 213.46, p < 0.01). The structural equation models analysis showed that while temperature (β = 0.0758, p < 0.01) and the sunny days (β=-0.9963, p < 0.01) all have direct effects on mental health, and they also exert indirect effects through mental stress. This research provides critical insights that can inform both academic understanding and practical approaches to addressing the complex relationship between climate and mental health. The findings may inform climate-sensitive mental health policies, university-based health promotion programs, and broader public health strategies aimed at protecting young adults in the context of increasing climate variability. What is already known on this topic Most previous studies focus on the association between climate ranges or extreme weather conditions. There is limited research on how multiple climate factors jointly affect mental health, and no studies have explored the underlying social and behavioral mechanisms. What this study adds More sunny days are generally linked to fewer possibility of mental disorders, with a clear negative linear trend at the city level—consistent in moderate and low-temperature areas, but reversed in high-temperature regions.Moderate temperatures are linked to a lower prevalence of mental disorders, with a U -shaped relationship between temperature and mental health at the city level. However, the opposite trend is observed in regions with 170 or more sunny days.Both temperature and sunny days have direct and indirect effects on mental health through mental stress. More sunny days are generally linked to fewer possibility of mental disorders, with a clear negative linear trend at the city level—consistent in moderate and low-temperature areas, but reversed in high-temperature regions. More sunny days are generally linked to fewer possibility of mental disorders, with a clear negative linear trend at the city level—consistent in moderate and low-temperature areas, but reversed in high-temperature regions. Moderate temperatures are linked to a lower prevalence of mental disorders, with a U -shaped relationship between temperature and mental health at the city level. However, the opposite trend is observed in regions with 170 or more sunny days. Moderate temperatures are linked to a lower prevalence of mental disorders, with a U -shaped relationship between temperature and mental health at the city level. However, the opposite trend is observed in regions with 170 or more sunny days. Both temperature and sunny days have direct and indirect effects on mental health through mental stress. Both temperature and sunny days have direct and indirect effects on mental health through mental stress. How this study might affect research, practice or policy This research provides critical insights that can inform both academic understanding and practical approaches to addressing the complex relationship between climate and mental health. The findings emphasize the urgent need for stronger mental health policies, along with the development of effective strategies and interventions to reduce mental disorders and mitigate the environmental burden on mental well-being. Introduction Mental health problems represent a growing global public health challenge. The global burden of mental disorders has increased substantially over recent decades, affecting individual well-being, educational and occupational functioning, health systems, and broader social development. The Global Burden of Disease Study reported that disability-adjusted life-years attributable to mental disorders increased from 80.8 million in 1990 to 125.3 million in 2019, highlighting the increasing public health importance of mental disorders worldwide [1]. At the same time, climate variability and climate change are increasingly recognized as important environmental determinants of mental health [2–6]. Climatic conditions may affect mental health not only through biological pathways, but also through mental stress, emotional regulation, social interaction, and adaptive coping capacity [7–9]. Therefore, understanding how everyday climatic conditions influence mental health has become increasingly urgent, particularly for young adults and university students, who are at a sensitive developmental stage and may be vulnerable to psychological stress. Existing studies have shown that specific climatic factors are associated with mental health outcomes. Temperature has received substantial attention, with recent systematic reviews and empirical studies suggesting that both high temperatures and extreme cold may increase the risks of depression, psychological distress, and suicide [10–12]. Humidity may further modify the association between heat exposure and mental health, indicating that climatic factors should not be examined in isolation [13–15]. Sunlight exposure is also closely related to mental health. International evidence suggests that greater sunlight exposure is associated with shorter hospitalization among patients with bipolar depression, better cognitive function, and more favorable mental health outcomes [16–18]. In addition, a systematic review and meta-analysis found that both ambient temperature and sunlight duration were associated with suicide risk, further highlighting the need to consider sunlight-related climatic indicators in mental health research [19]. The potential protective role of sunlight may be explained through several mechanisms. Biologically, sunlight exposure may influence circadian rhythm regulation, melatonin secretion, serotonin activity, and vitamin D synthesis, all of which are relevant to mood regulation and mental well-being [9, 18]. Socially and behaviorally, sunny days may increase opportunities for outdoor activity, physical movement, social interaction, and perceived environmental comfort, which may reduce psychological distress and improve mental health [7, 8]. However, the relationship between sunny days and mental health may not always be uniformly beneficial. Under conditions of extreme heat, additional sunny days may increase heat exposure, discomfort, and stress, thereby weakening or reversing the protective effects of sunlight [12, 20]. These findings suggest that the mental health effects of sunny days should be examined together with other climatic factors, especially temperature. Although international evidence on climate and mental health has been growing, several research gaps remain. First, most previous studies have focused on extreme weather events, such as heatwaves and cold spells, or on single climatic indicators [2, 12, 21]. This approach may not fully reflect real-world exposure, as individuals are usually exposed to multiple climatic conditions simultaneously, including temperature, humidity, and sunlight. Second, although sunlight exposure and sunshine duration have been examined in relation to depression, cognitive function, and suicide in some international settings [16, 17, 19], population-based evidence from China remains limited, particularly across cities with diverse climatic conditions. Third, few studies have examined how different climatic factors interact with one another. For example, sunny days may be protective under moderate-temperature conditions but may become less beneficial under high-temperature conditions. Fourth, existing research has mainly emphasized biological mechanisms, while the social and behavioral pathways linking climate exposure to mental health remain insufficiently understood [3, 5]. To conceptualize the pathways linking climatic factors to mental health, this study adopts the Stimulus–Mental Response–Problem (SMP) framework [22], which explains how environmental stimuli may trigger mental responses that subsequently influence behavioral and health outcomes. In the present study, the stimuli are represented by city-level climatic exposures, including temperature, humidity, and the number of sunny days. Mental response is operationalized as perceived stress, measured using the Chinese Perceived Stress Scale (CPSS), which captures dimensions of tension and loss of control [23, 24]. The health outcome is probable mental disorder, assessed using the Chinese Health Questionnaire (CHQ) [25, 26]. This framework enables both direct and indirect pathway testing using structural equation modeling (SEM) [27]. Direct paths estimate the immediate impact of climate stimuli on mental health, while indirect paths evaluate the mediating role of mental stress. By explicitly defining and operationalizing each SMP component in this way, the model moves beyond descriptive illustration and provides a mechanistic explanation of how environmental conditions may influence mental health outcomes. This approach is consistent with broader climate–mental health literature suggesting that mental stress may mediate the relationship between environmental exposure and mental health [3, 6]. This study supposes to examine the simultaneous associations of annual average temperature, humidity, and the number of sunny days with probable mental disorder. It further explores whether perceived stress mediates these associations and whether different climatic factors interact in shaping mental health risks. By integrating structural equation modeling and multilevel analysis within a social and behavioral mechanism framework, this study provides new evidence from China and extends the international literature on climate and mental health. The findings may inform climate-sensitive mental health policies, university-based health promotion programs, and broader public health strategies aimed at protecting young adults in the context of increasing climate variability. Methods Data source This study reports data from the Global Health Professions Student Survey (GHPSS) on Tobacco Control in China GHPSS (Extended version). The GHPSS is part of the Global Tobacco Surveillance System and is a university-based survey. During the survey period, all students enrolled in the selected medical and health-related courses at these universities were invited to participate in the study. In China the GHPSS provided a valuable source of information on health, including mental health. This study used a multistage sampling approach. In Stage 1, this study included 60 universities in GHPSS program, which represented one-third of the 180 universities across China and were differentiated by regional location. We recruited all of these universities to participate in this survey and students at 50 universities completed the survey. These universities are spread across 43 cities, with one university selected from each city, except for two major cities, where two universities were included. Of them, 22 were medical universities and 28 were comprehensive universities. Non-medical/health professional students were also recruited from two-thirds of all comprehensive universities randomly selected as a comparison group. The second stage of the sampling process focused on the selection of classes within each university, and all students in these classes were eligible as the sampling frame. Data collection Once a participant was selected and agreed to join the study, they were given a structured self-administered questionnaire. The questionnaire was handed out during regular lectures and class sessions, taking around 50 min to complete. All responses remained anonymous. A consistent research protocol was followed at all 50 universities to ensure the same process for distributing the questionnaire and collecting data. The study was approved by the Ethics Committee at Zhejiang University ( Approval number: 2014-1-017), and verbal consent was obtained from all participants before data collection started. Measures Dependent variable Mental health: We used the Chinese Health Questionnaire (CHQ), which is based on the General Health Questionnaire (GHQ) to assess mental health. The CHQ is a 12-item self-administered tool designed to screen for probable mental disorders in the community and among primary care patients. It has demonstrated good reliability and suitability for use in Chinese populations. It has been frequently applied in community-based and primary care research in China [25, 26, 28, 29]. It uses a 4-point response scale: “not at all” and “same as usual” (both score 0), and “rather more than usual” and “much more than usual” (both score 1). The total score is the sum of the individual item scores, which indicates the severity of possible mental disorders. A score of 3 or higher on the CHQ suggests a probable mental disorder [25]. In this study, mental disorder refers to a condition affecting an individual’s thinking, feelings, or mood, which may impair the ability to relate to others and function in daily life [30, 31]. However, as the CHQ is a validated screening instrument rather than a diagnostic tool, no formal clinical diagnosis based on established criteria such as the Diagnostic and Statistical Manual of Mental Disorders (DSM) or The International Classification of Diseases (ICD) was made. Individual-level variables Mental stress: In the SMP model, mental stress as an intermediate cognitive-emotional mechanism linking external factors to individual outcomes. In this study mental stress is assessed using the Chinese version of the Perceived Stress Scale (CPSS), which has been validated as both reliable and suitable for the Chinese population [23, 24, 32]. This scale consists of 14 items that evaluate stress perception over the month preceding the survey which has two dimensions including tension and sense of loss of control. The individual item scores are summed to produce a total score, with higher totals reflecting greater perceived stress [23]. Sociodemographic questions were used to gather information on variables such as age, gender, ethnicity, parental occupations, and cost at month. It was necessary to first control for these background factors since there is sufficient evidence that the risk of depression and suicide varies by sociodemographic status [1, 25]. University students’ living expenses reflect both the family’s economic level and the students’ spending attitudes and behaviors, which may be related to their mental health status [33, 34]. Climate and other city-level variables Three city-level climate variables were included in this study: annual average temperature, annual average relative humidity, and annual number of sunny days. These indicators were obtained from the China Meteorological Administration [35] and were used to characterize the long-term climatic context of each university city rather than short-term weather exposure immediately before the survey. Therefore, the climate variables should be interpreted as indicators of broader environmental exposure at the city level. The categorization of continuous variables was based on established principles in health research, including empirical distribution, interpretability of cut-points, and adequate sample size within each group [31, 36]. Sensitivity analyses using alternative categorizations produced similar results, suggesting that the findings were robust. Humidity was categorized as below 60%, 60–69%, and 70% or above, with below 60% as the reference category. Temperature was categorized into three groups: low temperature, defined as annual average temperature below 10 °C; moderate temperature, defined as 10–14.9 °C; and high temperature, defined as 15 °C or above. The low-temperature group was used as the reference category. Sunny days were analyzed both as a city-level climatic indicator and as a stratification variable in the interaction analysis. For the stratified analysis, the annual number of sunny days was categorized into three groups: fewer than 130 days, 130–169 days, and 170 days or more. This categorization enabled us to examine whether the association between temperature and probable mental disorder differed across sunlight environments. Additionally, we included a measure of the city’s economic development level. To examine urban variations in climate status, we used the per capita Gross Domestic Product (GDP) of the city where the university is located. This data was obtained from the Department of Comprehensive Statistics, National Bureau of Statistics (2014) [37]. Data analysis Descriptive statistics were calculated for all study variables, and weighted prevalence estimates were reported. Preliminary unadjusted associations were examined using the SAS SURVEYLOGISTIC procedure, which accounted for sampling weights and clustering at the university level. These analyses were used to describe crude associations between demographic, socioeconomic, climate-related variables, and probable mental disorder. Multilevel logistic regression was then conducted using the SAS GLIMMIX procedure as the primary analysis [38, 39]. This approach was appropriate because individual students were nested within university cities, and the main climate variables were measured at the city level. Probable mental disorder was treated as a binary outcome, and a logit link with a binomial distribution was specified. All adjusted models included individual-level covariates, including age, gender, ethnicity, parental occupation, and monthly living expenses, as well as city-level per capita GDP. The model-building process was organized sequentially. Model 0 was the null model, which included only a random intercept to assess between-city variation. Model 1 included individual-level covariates. Model 2 further added city-level per capita GDP. Separate climate models then examined annual average temperature, humidity, and number of sunny days individually. The comprehensive model included all individual-level covariates, city-level GDP, and the three climate variables simultaneously. Model fit was assessed using changes in the − 2 log-likelihood statistic, and associations were reported as odds ratios with 95% confidence intervals [40]. Furthermore, to illustrate the quantitative relationship between climate variables and mental disorders, this study presents the associations using regression coefficients (β) and scatter plots. To examine potential interactions between different climate factors, gradient relationships were analyzed, specifically, how the association between one climate factor and mental disorders varies across levels of another climate factor. Formal tests of nonlinearity were conducted using quadratic-term models and natural cubic spline models. For the quadratic-term models, temperature was centered before creating the squared term to reduce multicollinearity and improve the interpretability of polynomial regression coefficients [41]. The quadratic model included both the centered temperature term and its squared term, with evidence of nonlinearity assessed based on the statistical significance of the quadratic term. Natural cubic spline models were also fitted to allow more flexible dose–response patterns without imposing a strictly linear or quadratic functional form [42]. In the spline models, the spline terms for city-level annual average temperature were jointly tested. For both approaches, a significant p-value indicates evidence of a nonlinear association. Graphical analyses, including scatter plots with fitted model-based trend lines, were used to visualize the estimated associations; however, figures were not used as the sole basis for determining nonlinear patterns. Structural equation modeling (SEM) was used to examine the potential direct and indirect pathways among city-level climatic indicators, perceived stress, and mental health outcomes, with the aim of exploring the underlying psychosocial mechanisms behind these associations. The path models specified direct paths from climate variables to mental health, direct paths from climate variables to perceived stress, and direct paths from perceived stress to mental health. Model fit for the SEM was assessed using multiple fit indices, including the comparative fit index, normed fit index, Tucker–Lewis index, root mean square error of approximation, and standardized root mean square residual. Model fit was considered acceptable when RMSEA was below 0.06 and when GFI and NFI were above 0.90 [38, 39]. All analyses were weighted to account for unequal selection probabilities across universities arising from the multistage sampling design [38]. Weights comprised (1) sampling weights, as the inverse of the probability of selection, calculated at the university level, and (2) post-stratification weights, calculated relative to sex, based on estimated distributions from a national survey [43]. The final overall weights were computed as the product of the preceding weights [39]. We did not consider using a non-response weight since non-response rates were very low. Results A total of 11,954 valid questionnaires were completed by 12,260 potential university students, representing a 97.5% response rate. These students were from 50 different universities across 43 cities. Among the survey participants, 12.8% were under 20 years old, 77.3% were between 20 and 23 years old, and 9.8% were over 23 years old. The gender distribution was 44.2% male and 55.8% female. The majority of the participants (94.4%) were Han. The details see Table 1. Table 1Demographic characteristics of sample and mental health prevalenceGroup N % of samplePrevalence (%)Unadjusted OR (95% CI)Age (years old) < 20118912.827.41.00 20-239232.321.80.72(0.37,1.40) 21-276230.622.60.77(0.43,1.37) 22-245014.420.30.71(0.45,1.11) 23-24569.826.50.95(0.59,1.45)Gender Male425344.221.31.00 Female770155.824.41.20(0.84,1.71)Ethnicity Han11,14894.422.91.00 Minority8065.624.81.11(0.73,1.60)Father’s occupation Worker, farmer, and business945771.522.71.00 Manager and staff174118.921.40.88(0.60,1.29) Teacher and science and technical worker7569.721.31.00(0.72,1.38)Mother’s occupation Worker, farmer, and business960072.323.01.00 Manager and staff154816.825.91.17(0.86,1.61) Teacher and science and technical worker80610.919.00.63(0.44,0.86)**Monthly living expenses (RMB) < 10,0012997.522.51.00 10,00-1499616549.021.60.95(0.87,1.58) 1500–1999350630.224.61.12(0.70,1.79) 2000 and over98413.325.81.15(0.56,2.34) University variables Universities types High level429558.122.01.00 Middle496139.425.01.18(0.82,1.17) Low level6982.516.90.73(0.52,1.80) Regional variables University city GDP < 50,000405516.127.61.00 50,000-99,999637861.122.90.78(0.57,1.07) 100,000152122.820.00.64(0.40,0.98)*Temperature(0C) < 10289811.625.91.00 10-14.9265629.016.40.53(0.31,0.92)* 15 or more640259.425.50.92(0.65,1.33)Sunny days < 130232425,127.71.00 130–169201517.123.50.80(0.64,1.01) 170 or more761557.920.90.69(0.48,0.94)* Humidity (%) < 60785312.423.41.00 60–69303829.621.90.92(0.53,1.59) 70 or more506358.023.51.01(0.71,1.43)*p < 0.05; **p < 0.01 Table 1Demographic characteristics of sample and mental health prevalenceGroup N % of samplePrevalence (%)Unadjusted OR (95% CI)Age (years old) < 20118912.827.41.00 20-239232.321.80.72(0.37,1.40) 21-276230.622.60.77(0.43,1.37) 22-245014.420.30.71(0.45,1.11) 23-24569.826.50.95(0.59,1.45)Gender Male425344.221.31.00 Female770155.824.41.20(0.84,1.71)Ethnicity Han11,14894.422.91.00 Minority8065.624.81.11(0.73,1.60)Father’s occupation Worker, farmer, and business945771.522.71.00 Manager and staff174118.921.40.88(0.60,1.29) Teacher and science and technical worker7569.721.31.00(0.72,1.38)Mother’s occupation Worker, farmer, and business960072.323.01.00 Manager and staff154816.825.91.17(0.86,1.61) Teacher and science and technical worker80610.919.00.63(0.44,0.86)**Monthly living expenses (RMB) < 10,0012997.522.51.00 10,00-1499616549.021.60.95(0.87,1.58) 1500–1999350630.224.61.12(0.70,1.79) 2000 and over98413.325.81.15(0.56,2.34) University variables Universities types High level429558.122.01.00 Middle496139.425.01.18(0.82,1.17) Low level6982.516.90.73(0.52,1.80) Regional variables University city GDP < 50,000405516.127.61.00 50,000-99,999637861.122.90.78(0.57,1.07) 100,000152122.820.00.64(0.40,0.98)*Temperature(0C) < 10289811.625.91.00 10-14.9265629.016.40.53(0.31,0.92)* 15 or more640259.425.50.92(0.65,1.33)Sunny days < 130232425,127.71.00 130–169201517.123.50.80(0.64,1.01) 170 or more761557.920.90.69(0.48,0.94)* Humidity (%) < 60785312.423.41.00 60–69303829.621.90.92(0.53,1.59) 70 or more506358.023.51.01(0.71,1.43)*p < 0.05; **p < 0.01 Demographic characteristics of sample and mental health prevalence *p < 0.05; **p < 0.01 The weighted prevalence of probable mental disorders among the study population was 23.0% (95% CI: 19.5, 26.5). The unadjusted logistic regression analysis showed that the mother’s occupation, city-level per capita GDP, temperature, and number of sunny days were all associated with mental disorders. The details see Table 1. The multilevel logistic regression models showed that temperature and sunny days were significantly associated with probable mental disorders after adjustment for individual-level characteristics and city-level variables. Compared with students living in cities with low annual average temperature below 10 °C, those living in cities with moderate annual average temperature of 10–14 °C had lower odds of probable mental disorders in the comprehensive model (OR = 0.69, 95% CI: 0.50–0.95). In contrast, students living in cities with annual average temperature of 15 °C or above did not differ significantly from those in the low-temperature group (OR = 1.03, 95% CI: 0.73–1.45). These findings suggest that moderate temperature environments may be associated with lower odds of probable mental disorders compared with colder environments. Compared with students living in cities with fewer than 130 sunny days per year, those living in cities with 170 or more sunny days had lower odds of probable mental disorders in the comprehensive model (OR = 0.69, 95% CI: 0.50–0.95). The association for cities with 130–169 sunny days was not statistically significant (OR = 0.83, 95% CI: 0.60–1.15). These results indicate that higher annual sunshine exposure may be associated with lower odds of probable mental disorders. No statistically significant association was observed between humidity and probable mental disorders after adjustment for individual- and city-level covariates. Among covariates, city-level GDP was also associated with probable mental disorders. Compared with students living in cities with per capita GDP below 50,000 RMB, those living in cities with per capita GDP of 100,000 RMB or above had lower odds of probable mental disorders. Mother’s occupation was also associated with probable mental disorders, with students whose mothers were teachers or science and technical workers showing lower odds compared with those whose mothers were workers, farmers, or business workers. The details see Table 2. Table 2Results of multilevel logistic modelsNull modelIndividual characteristics modelTemperature modelSunny days modelComprehensive model Individual level Mather’s occupationWorker, farmer, and business1.001.001.001.00Manager and staff1.25(0.93,1.66)1.18(0.94,1.47)1.23(0.92,1.64)*1.25(1.07,1.46)**Teacher and science and technical worker0.72(0.46,0.95)*0.73(0.45,0.96)*0.74(0.49,0.98)*0.63(0.45,0.90)*University city GDP< 50,0001.001.001.001.0050,000-99,9990.78(0.56,1.10)0.87(0.68,1.10)0.77(0.54,1.10)0.75(0.53,1.08)100,0000.64(0.42,0.98)*0.74(0.59,0.93)*0.57(0.35,0.93)*0.55(0.37,0.96)*Temperature(0C) < 101.001.0010-14.90.55(0.33,0.94)*0.69(0.50,0.95)*15 or more1.01(0.71,1.43)1.03(0.73,1.45)Sunny days< 1301.001.00130–1691.01(0.65,1.56)0.83(0.60,1.15)170 or more0.72(0.53,0.96)*0.69(0.50,0.95)*Sunny days*Temperature0.0282(0.1105)*t = 0.26, P < 0.05Fixed parameters2.4315**1.3532(1.9499)**0.52700.23020.2578Random parameters between universities cities1.3552**1.3305**1.2948**1.2907**1.2560***p < 0.05; **p < 0.01 Table 2Results of multilevel logistic modelsNull modelIndividual characteristics modelTemperature modelSunny days modelComprehensive model Individual level Mather’s occupationWorker, farmer, and business1.001.001.001.00Manager and staff1.25(0.93,1.66)1.18(0.94,1.47)1.23(0.92,1.64)*1.25(1.07,1.46)**Teacher and science and technical worker0.72(0.46,0.95)*0.73(0.45,0.96)*0.74(0.49,0.98)*0.63(0.45,0.90)*University city GDP< 50,0001.001.001.001.0050,000-99,9990.78(0.56,1.10)0.87(0.68,1.10)0.77(0.54,1.10)0.75(0.53,1.08)100,0000.64(0.42,0.98)*0.74(0.59,0.93)*0.57(0.35,0.93)*0.55(0.37,0.96)*Temperature(0C) < 101.001.0010-14.90.55(0.33,0.94)*0.69(0.50,0.95)*15 or more1.01(0.71,1.43)1.03(0.73,1.45)Sunny days< 1301.001.00130–1691.01(0.65,1.56)0.83(0.60,1.15)170 or more0.72(0.53,0.96)*0.69(0.50,0.95)*Sunny days*Temperature0.0282(0.1105)*t = 0.26, P < 0.05Fixed parameters2.4315**1.3532(1.9499)**0.52700.23020.2578Random parameters between universities cities1.3552**1.3305**1.2948**1.2907**1.2560***p < 0.05; **p < 0.01 Results of multilevel logistic models 0.0282(0.1105)* t = 0.26, P < 0.05 *p < 0.05; **p < 0.01 Formal tests further corroborated the presence of nonlinear associations between city-level annual average temperature and probable mental disorder. In the quadratic-term models, the quadratic temperature term was statistically significant in the full sample (β = 0.0507, p < 0.0001), providing clear evidence of a nonlinear temperature–mental health relationship. Comparable nonlinear patterns emerged across all sunny-day subgroups, including cities with fewer than 130 sunny days (β = 2.18797, p < 0.0001), 130–169 sunny days (β = 0.33614, p < 0.0001), and 170 or more sunny days (β = 0.17688, p < 0.0001). The spline models provided consistent evidence of nonlinearity. The joint tests of spline terms were significant in the full sample (F = 421.30, p < 0.0001) and in all sunny-day subgroups: fewer than 130 sunny days (F = 604.32, p < 0.0001), 130–169 sunny days (F = 183.35, p < 0.0001), and 170 or more sunny days (F = 342.42, p < 0.0001). These findings suggest that the association between temperature and probable mental disorder was not adequately captured by a simple linear model. The details see Table 3. Additionally, quantitative relationship analysis showed that in the overall sample lower and higher temperature were associated with a U-shaped trend between city-level temperature and mental disorders, with the lowest prevalence of mental disorders observed moderate temperatures, and higher prevalence at both low and high temperatures (see Fig.1). This trend was consistent in the groups with fewer than 130 as well as 130 to 169 sunny days (see Figs. 2 and 3). However, it displayed the opposite trend in the groups with 170 or more sunny days, presenting an inverted U-shaped. (see Fig. 4). The results revealed a linear negative relationship between the number of sunny days and the prevalence of mental disorders at the city level in full sample (see Fig. 5). This trend remained consistent in the moderate and low temperature groups, but showed the opposite trend in the high temperature group (see Figs. 6 and 7, and Fig. 8). Fig. 1Scatter plot of the association between city-level temperature (tem) and probable mental disorder prevalence (lment) in full sample model Scatter plot of the association between city-level temperature (tem) and probable mental disorder prevalence (lment) in full sample model Fig. 2Scatter plot with fitted model-based trend line showing the association between city-level temperature (tem) and probable mental disorder prevalence (lment) when sunny days is below 130 sunny days Scatter plot with fitted model-based trend line showing the association between city-level temperature (tem) and probable mental disorder prevalence (lment) when sunny days is below 130 sunny days Fig. 3Scatter plot with fitted model-based trend line showing the association between city-level temperature (tem) and probable mental disorder prevalence (lment) when sunny days is between 130 and 169 sunny days Scatter plot with fitted model-based trend line showing the association between city-level temperature (tem) and probable mental disorder prevalence (lment) when sunny days is between 130 and 169 sunny days Fig. 4Scatter plot with fitted model-based trend line showing the association between city-level temperature (tem) and probable mental disorder prevalence (lment) when sunny days is 170 or more Scatter plot with fitted model-based trend line showing the association between city-level temperature (tem) and probable mental disorder prevalence (lment) when sunny days is 170 or more Fig. 5Scatter plot with fitted model-based trend line showing the association between city-level sunny days (sun) and probable mental disorder prevalence (lment) in full sample model Scatter plot with fitted model-based trend line showing the association between city-level sunny days (sun) and probable mental disorder prevalence (lment) in full sample model Fig. 6Scatter plot with fitted model-based trend line showing the association between city-level sunny days (sun) and probable mental disorder prevalence (lment) when the temperature is below 10°C Scatter plot with fitted model-based trend line showing the association between city-level sunny days (sun) and probable mental disorder prevalence (lment) when the temperature is below 10°C Fig. 7Scatter plot with fitted model-based trend line showing the association between city-level sunny days (sun) and probable mental disorder prevalence (lment) when the temperature is between 10°C and 14.9°C Scatter plot with fitted model-based trend line showing the association between city-level sunny days (sun) and probable mental disorder prevalence (lment) when the temperature is between 10°C and 14.9°C Fig. 8Scatter plot with fitted model-based trend line showing the association between city-level sunny days (sun) and probable mental disorder prevalence (lment) when the temperature is 15°C or higher Scatter plot with fitted model-based trend line showing the association between city-level sunny days (sun) and probable mental disorder prevalence (lment) when the temperature is 15°C or higher Table 3Formal tests of nonlinearity in the association between city-level annual average temperature and probable mental disorderNonlinear testedQuadratic termβ p Full sample0.0507< 0.0001Sunny days < 1302.18797< 0.0001Sunny days 130–1690.33614< 0.0001Sunny days ≥ 1700.17688< 0.0001 Spline terms F p Full sample421.30< 0.0001Sunny days < 130604.32< 0.0001Sunny days 130–169183.35< 0.0001Sunny days ≥ 170342.42< 0.0001The quadratic term test was conducted by adding a squared temperature term to the regression model. The spline model test was conducted by jointly testing the spline terms for city-level annual average temperature. A significant p value indicates evidence of a nonlinear association. Table 3Formal tests of nonlinearity in the association between city-level annual average temperature and probable mental disorderNonlinear testedQuadratic termβ p Full sample0.0507< 0.0001Sunny days < 1302.18797< 0.0001Sunny days 130–1690.33614< 0.0001Sunny days ≥ 1700.17688< 0.0001 Spline terms F p Full sample421.30< 0.0001Sunny days < 130604.32< 0.0001Sunny days 130–169183.35< 0.0001Sunny days ≥ 170342.42< 0.0001The quadratic term test was conducted by adding a squared temperature term to the regression model. The spline model test was conducted by jointly testing the spline terms for city-level annual average temperature. A significant p value indicates evidence of a nonlinear association. Formal tests of nonlinearity in the association between city-level annual average temperature and probable mental disorder The quadratic term test was conducted by adding a squared temperature term to the regression model. The spline model test was conducted by jointly testing the spline terms for city-level annual average temperature. A significant p value indicates evidence of a nonlinear association. Two observed-variable SEM were constructed to examine the direct and indirect pathways linking climate variables, mental stress, and mental health. Table 4 shows the variables’ mean, standard deviation and value range. Of the model fit, the temperature model showed acceptable, with GFI = 0.9808, RMSEA = 0.0221, and NFI = 0.9514. The sunny-days model also showed acceptable model fit, with GFI = 0.9809, RMSEA = 0.0223, and NFI = 0.9752. Table 4Means and standard deviation of variables included in constructing modelsVariablesMeansStandard deviationValue rangesun170.2841.0873–250tem11.7316.295.1–21.7Mhdis1.682.290–10Mstr41.9225.021–44sun annual number of sunny daysr (number), tem annual average temperature (<10 °C = 1, 10-14.9 °C = 2, 15 °C or more = 3), Mstr mental stress (number), Mhdis probable mental disorder (number) Table 4Means and standard deviation of variables included in constructing modelsVariablesMeansStandard deviationValue rangesun170.2841.0873–250tem11.7316.295.1–21.7Mhdis1.682.290–10Mstr41.9225.021–44sun annual number of sunny daysr (number), tem annual average temperature (<10 °C = 1, 10-14.9 °C = 2, 15 °C or more = 3), Mstr mental stress (number), Mhdis probable mental disorder (number) Means and standard deviation of variables included in constructing models sun annual number of sunny daysr (number), tem annual average temperature (<10 °C = 1, 10-14.9 °C = 2, 15 °C or more = 3), Mstr mental stress (number), Mhdis probable mental disorder (number) In the sunny-days model, sunny days had a significant direct effect on mental health, with a standardized path coefficient of β = −0.9963 (p < 0.01). The indirect effect of sunny days on mental health through mental stress was calculated as − 0.0793 × 0.0060 = − 0.00048 (p < 0.01). The total effect of sunny days on mental health was therefore approximately − 0.99678. (See Fig. 9) In the temperature model, temperature had a significant direct effect on mental health, with a standardized path coefficient of β = 0.0785 (p < 0.01). Temperature was also indirectly associated with mental health through mental stress. Specifically, the indirect effect was calculated as the product of the path from temperature to mental stress and the path from mental stress to mental health: 0.0418 × 0.0109 = 0.00046 (p < 0.01). Thus, the total effect of temperature on mental health was approximately 0.07896. (See Fig. 10) Fig. 9Sunny days structure equation model Sunny days structure equation model Additional indirect pathways between temperature and sunny days were also examined. The indirect effect of temperature on probable mental disorder through sunny days was calculated as − 0.0637 × −0.0194 = 0.00124 (p < 0.01). Conversely, the indirect effect of sunny days on probable mental disorder through temperature was calculated as − 0.6371 × 0.0592 = − 0.03772 (p < 0.01). These results suggest that temperature and sunny days may operate through different indirect pathways; however, these pathways should be interpreted as indirect or mediating pathways rather than formal statistical interaction effects. (See Fig. 9, See Fig. 10) Fig. 10Temperature structure equation model Temperature structure equation model Overall, the SEM/path analysis suggested that both temperature and sunny days were directly associated with mental health and also showed small indirect effects through mental stress. However, because the indirect effects were small in magnitude and bootstrap confidence intervals were not available in the current output, these mediation findings should be interpreted cautiously. Discussion The present study provides new evidence on the association between city-level climatic conditions and probable mental disorder among university students in China. Three main findings emerged. First, annual average temperature and the number of sunny days were significantly associated with probable mental disorder, whereas humidity was not significantly associated after adjustment for individual- and city-level covariates. Second, the association between temperature and probable mental disorder was nonlinear. Moderate temperature was associated with lower odds of probable mental disorder, while both lower and higher temperature environments appeared to be related to greater mental health vulnerability. Third, the association between sunny days and probable mental disorder varied by temperature context, suggesting possible effect modification between temperature and sunlight-related climatic conditions. The finding that more sunny days were associated with lower odds of probable mental disorder is broadly consistent with previous evidence linking sunlight exposure to better mental health outcomes, including improved mood regulation, reduced depressive symptoms, better cognitive function, and lower suicide risk [16–19]. Sunny days may increase opportunities for natural light exposure, outdoor activity, physical movement, and social interaction, all of which may contribute to psychological well-being. From a biological perspective, sunlight exposure may also influence circadian rhythm regulation, serotonin activity, melatonin secretion, and vitamin D synthesis, which are relevant to mental health [9, 18]. The temperature findings further suggest that both colder and hotter environments may be unfavorable for mental health. In the multilevel logistic regression models, students living in cities with moderate annual average temperature had lower odds of probable mental disorder than those living in colder cities. The formal nonlinear tests and graphical analyses further supported a U-shaped pattern in the overall sample, indicating that mental health risk may increase at both lower and higher temperature ranges. This pattern is consistent with recent studies showing that both high and low temperatures may be associated with poorer mental health outcomes [10–12]. Several mechanisms may explain this nonlinear temperature pattern. Low and high temperatures may limit outdoor activity, reduce sunlight exposure, disrupt daily routines, and weaken social interaction. High temperatures may additionally increase heat stress, sleep disturbance, irritability, and cognitive burden [7–9, 12]. These biological, psychological, and behavioral processes may jointly increase vulnerability to probable mental disorder. However, because this study did not directly measure biological responses, outdoor activity, sleep, or social interaction, these explanations should be interpreted as plausible mechanisms rather than confirmed causal pathways. The interaction and stratified analyses provide further insight into how climatic factors may operate in combination. In the overall sample and in cities with fewer or moderate sunny days, the association between temperature and probable mental disorder showed a U-shaped pattern. In contrast, among cities with 170 or more sunny days per year, the pattern shifted to an inverted U shape, with the highest prevalence observed at moderate temperatures. This reversed pattern suggests that sunny days may modify the mental health implications of temperature, rather than exerting a uniform protective effect across all climatic contexts. One possible explanation is that abundant sunlight may partially buffer the adverse effects of colder environments by supporting circadian regulation, outdoor activity, social engagement, and vitamin D-related pathways. However, in high-temperature environments, additional sunny days may be accompanied by greater solar radiation, heat discomfort, reduced outdoor activity, and increased physiological or mental stress, which could weaken or offset the potential benefits of sunlight exposure [9, 12, 20]. Therefore, the mental health benefit of sunny days may be more evident in low- and moderate-temperature contexts, but weaker or even reversed under high-temperature conditions. The city-level trend analysis further showed a linear negative relationship between the number of sunny days and the prevalence of probable mental disorder in the overall sample. This finding suggests that, at the population level, cities with more sunny days tended to have a lower prevalence of probable mental disorder. This pattern is consistent with the multilevel logistic regression results, in which students living in cities with 170 or more sunny days had lower odds of probable mental disorder than those living in cities with fewer than 130 sunny days. Previous studies have suggested that sunlight exposure may support mental health through circadian regulation, mood improvement, outdoor activity, and social interaction [16–19]. However, this negative relationship was not uniform across temperature contexts. The trend remained consistent in low- and moderate-temperature areas, but showed the opposite pattern in high-temperature areas. This suggests that the potential protective association of sunny days may be conditional on ambient temperature. In low- and moderate-temperature settings, more sunny days may increase natural light exposure and opportunities for outdoor activity, thereby supporting mental health. In contrast, in high-temperature settings, more sunny days may indicate stronger heat exposure, greater thermal discomfort, reduced outdoor activity, sleep disturbance, and increased physiological or psychological stress. These heat-related burdens may offset, or even reverse, the beneficial effects of sunlight exposure [9, 12, 20]. Therefore, the association between sunny days and probable mental disorder should be interpreted as temperature-dependent rather than as a simple linear protective effect. The structural equation models further suggest that perceived stress may be one pathway linking climate conditions to probable mental disorder. Both temperature and sunny days showed direct associations with mental health and small indirect associations through perceived stress. These results are consistent with the Stimulus–Mental Response–Problem framework, in which climatic conditions may act as environmental stimuli that influence mental responses and subsequently affect mental health outcomes [22]. This interpretation is also consistent with broader climate–mental health literature suggesting that mental stress may mediate or partly explain the relationship between environmental exposures and mental health [3, 5, 6]. However, because the indirect effects were small in magnitude and bootstrap confidence intervals were not available in the current output, the SEM findings should be interpreted as exploratory evidence of a possible psychosocial pathway rather than definitive evidence of mediation. The findings have several practical implications for university health promotion and public health planning. First, universities should consider incorporating climate-sensitive mental health support into student health services. In high-temperature regions, campuses could provide heat-health education, shaded and cooled spaces, flexible schedules for outdoor activities, hydration support, and early psychological support for students reporting heat-related discomfort or stress. In colder regions, universities could pay greater attention to reduced outdoor activity, social withdrawal, and seasonal psychological distress by offering indoor physical activity, social engagement programs, and regular mental health screening. These strategies are consistent with recommendations to integrate mental health into climate and health adaptation planning [44]. Second, the negative association between sunny days and probable mental disorder suggests that natural light exposure and safe outdoor activity may be useful components of campus mental health promotion. Universities could encourage walking groups, outdoor physical education, and the use of campus green spaces. Previous evidence suggests that both active and passive use of green space are associated with better health and well-being among university students [45]. However, such activities should be adapted to local temperature conditions. In high-temperature areas, outdoor activities should be combined with heat protection, avoidance of peak heat hours, shaded spaces, and adequate hydration. Third, because perceived stress may partly explain the association between climate conditions and probable mental disorder, climate-related mental health strategies should include stress screening, resilience training, counseling services, and climate-related mental health education. Recent evidence also emphasizes the importance of mental health and psychosocial interventions in responding to climate-related risks [46]. Universities and local public health agencies could therefore develop climate-sensitive mental health surveillance systems that monitor climatic indicators, perceived stress, and student mental health, allowing interventions to be targeted to vulnerable periods, regions, and student groups. Overall, the present study suggests that climate conditions may influence mental health through multiple pathways, and that the effects of sunlight and temperature should be understood in combination rather than in isolation. Because this study was observational and used city-level annual climate indicators, the findings should be interpreted as evidence of associations and exploratory mechanisms rather than causal effects. Future studies should use finer temporal exposure data, longitudinal designs, and direct measures of biological, behavioral, and social mechanisms to further clarify the complex relationships among climate conditions, psychological responses, and mental health. Limitation This study has several limitations. First, its cross-sectional design does not allow causal inferences about the relationships between temperature, humidity, sunny days, and mental health. Second, climate indicators were measured at the city level using annual averages. Although these indicators are useful for characterizing long-term climatic context across different cities, they may not capture short-term weather variability, seasonal fluctuations, or exposure timing immediately preceding the assessment of mental health. This creates a potential temporal mismatch between climate exposure and recent mental health status. Therefore, the results should be interpreted as associations between broader city-level climatic environments and probable mental disorders, rather than as evidence of acute effects of short-term weather changes. Future studies should use finer temporal exposure data, such as monthly, seasonal, or daily meteorological indicators, and link them to the timing of mental health assessment to better evaluate short-term and cumulative exposure effects. Third, mental health and stress were assessed using self-reported instruments, which may be subject to reporting bias or misclassification. Fourth, although we adjusted for a range of individual- and city-level factors, residual confounding may remain, including unmeasured influences such as urban environment, seasonal change, academic stress and local cultural context. Fifth, the sample consisted of university students enrolled in medical and health-related courses, which may limit the generalizability of the findings to students from other disciplines or to the broader young adult population. Finally, although this study explored potential social and behavioral mechanisms through mental stress, the pathways linking climate factors to mental health are complex and likely involve additional mediators that warrant further investigation [31]. Conclusion This research provides valuable insights that can enhance both academic understanding and practical approaches to addressing the complex relationship between climate and mental health. It offers comprehensive and solid evidence on the impact of climate on mental health issues. By incorporating perspectives from social and behavioral sciences, this study emphasizes the importance of understanding the mechanisms that exist in real-world populations when exploring the relationship between climate and health. Policy makers and public health programs can use these findings to develop interventions aimed at mitigating the negative effects of climate conditions on mental health. Environmental implication Climate variability represents an emerging environmental threat to population mental health. This study reveals that both high and low temperatures increase mental disorder prevalence, while moderate sunlight exposure offers protective benefits that diminish under thermal extremes. By integrating climatic data with the SMP model, the findings demonstrate that climate acts as both a physical and psychological stimulus. The “U” shape temperature–mental health patterns underscore the need to embed mental well-being considerations into climate adaptation strategies, emphasizing that sustainable environmental governance must also address the mental resilience of populations facing increasing climatic instability.