Towards an advanced representation of precipitation over Morocco in a global climate model with resolution enhancement and empirical run‐time bias corrections

Morocco, as a Mediterranean and North African country, is acknowledged as a climate change hotspot, where increased drought and related water resource shortages present a real challenge for human and natural systems. However, its geographic position and regional characteristics make the simulation of the distribution and variability of precipitation particularly challenging in the region. In this study, we propose an approach where the Laboratoire de Météorologie Dynamique Zoom (LMDZ) GCM is run with a stretched grid configuration developed with enhanced resolution (35 km) over the region, and we apply run‐time bias correction to deal with the atmospheric model's systematic errors on large‐scale circulation. The bias‐correction terms for wind and temperature are built using the climatological mean of the adjustment terms on tendency errors in an LMDZ simulation relaxed towards ERA5 reanalyses. The free reference run with the zoomed configuration is compared to two bias‐corrected runs. The free run exhibits noticeable improvements in mean low‐level circulation, high frequency variability and moisture transport and compares favourably to precipitation observations at the local scale. The mean simulated climate is substantially improved after bias correction w.r.t. to the uncorrected runs. At the regional scale, the bias‐correction showed improvements in moisture transport and precipitation distribution, but no noticeable effect was observed in mean precipitation amounts, interannual variability and extreme events. To address the latter, model tuning after grid refinement and developing more “scale‐aware” parameterizations are necessary. The observed improvements on the large‐scale circulation suggest that the run‐time bias correction can be used to drive regional climate models for a better representation of regional and local climate. It can also be combined with “a posteriori” bias correction methods to improve local precipitation simulation, including extreme events.

improvements on the large-scale circulation suggest that the run-time bias correction can be used to drive regional climate models for a better representation of regional and local climate.It can also be combined with "a posteriori" bias correction methods to improve local precipitation simulation, including extreme events.

| INTRODUCTION
Morocco, as part of the Mediterranean and northern Africa, is identified as a hotspot for climate change.This has led to a growing awareness of the urgency and necessity of taking informed adaptation measures at national and local scales, and stresses the pressing need for fine and accurate climate projections.These changes include an increase in mean and extreme temperature events as well as more drought and aridity, among others (Balhane et al., 2022;Driouech et al., 2020;Driouech, Déqué, & S anchez-G omez, 2010;Driouech, Mahe, et al., 2010;Zittis, 2018).Serious climate impacts are expected and will exacerbate the current challenges, including water scarcity (Betts et al., 2018;Marchane et al., 2017;Tramblay et al., 2016), agricultural vulnerability and crop yield reduction (Brouziyne et al., 2018;Niang et al., 2014), fire weather conditions, and several other socio-economic repercussions that would harm the country's development.
Most of the studies that assessed future climate changes in North Africa used the available data issued from international experiments such as CMIP despite the coarse resolution of the global climate models (GCMs) (e.g., CMIP6 database; Durack et al., 2018;Arjdal et al., 2023) or after a downscaling step (e.g., CORDEX database; Giorgi et al., 2008).Few studies used Euro-Cordex or Med-Cordex data (e.g., Balhane et al., 2022;Tramblay et al., 2013) which allow higher resolution (12 km), but these experiments do not cover the entire region.In fact, only northern Morocco is included in both experiments.Cordex-Africa and Cordex-Mena seem better adapted to the region, with a resolution of 50 km for the time being.While these Regional Climate Models (RCMs) help improve the representation of certain processes (e.g., orographic processes, breezes), they also suffer from possible inconsistencies between the regional model and the global models used to force them (e.g., Boé et al., 2020), as well as the impact of systematic biases in the global models on small scales.The Laboratoire de Météorologie Dynamique Zoom (LMDZ) GCM can be used with grid refinement to study regional climate processes as done previously over many regions, such as Antarctica (Krinner & Genthon, 1997), East Asian summer monsoon (Zhou & ZX, 2002), and the Indian monsoon (Sabin et al., 2013).The latter demonstrated that the model succeeded in realistically capturing the interactions among the monsoon large-scale dynamics, the synoptic systems and the meso-scale convective systems.Driouech et al. (2009) used a similar approach with the GCM ARPEGE-Climat to simulate the climate over Morocco with a resolution of the order of 50 km in the refined part of the global grid.
Given that all climate models exhibit biases (Flato et al., 2013;Gleckler et al., 2008) and impact models are commonly very sensitive to the input climatic variables and their own biases (Doblas-Reyes et al., 2021;Dosio, 2016), bias correction is usually applied at some stage in the workflow leading from the climate model to impact assessment (Maraun, 2016)."A posteriori" bias correction of the near-surface variables (mainly nearsurface air temperature and precipitation) cannot correct for atmospheric circulation biases (potentially leading to an implicit pinning of the atmospheric circulation features), yielding unphysical corrections that raise doubt about the credibility of the adjusted output (Maraun, 2016;Maraun et al., 2017).Following an approach first developed in the context of seasonal forecasting (Guldberg et al., 2005;Kharin & Scinocca, 2012), Krinner et al. (2019) proposed an empirical run-time bias correction approach for atmospheric variables, which they applied for Antarctic regional climate projections using the LMDZ Stretched-Grid GCM.The method consists of bias-correcting the systematic errors in atmospheric general circulation using the statistics of a nudged simulation towards climate reanalysis.A substantial bias reduction in the general atmospheric circulation features and even in near-surface temperature and precipitation has been found (Beaumet et al., 2021;Krinner et al., 2019).This approach is attractive because it preserves a high degree of physical consistency across the representation of atmospheric processes, from large-scale circulation to subgrid parameterized processes, which is not possible with "a posteriori" bias correction methods.It also allows for high resolution at a moderate computational cost without compromising the coherence between the global and regional climates.Indeed, preserving this coherence is crucial in the case of Morocco since largescale circulation patterns play a vital role in shaping the precipitation patterns in the region (Born et al., 2010;Knippertz et al., 2003).
The main objective of this work is to assess the effect and the potential added value of both the increase in resolution and run-time bias corrections to represent precipitation over Morocco in global climate simulations.To this purpose, a variable resolution configuration of the LMDZ model with enhanced resolution over Morocco is developed and used for elaborating a set of presentclimate simulations.The developed configuration set-up allows (1) increasing the resolution over the region, (2) maintaining a sufficiently good resolution on the outside to reproduce large-scale patterns, and (3) being numerically stable enough to be used in producing climate change projections.Neither our model configuration nor this kind of bias correction method have been used with a focus on this region.
Section 2 of this manuscript describes the model and our methodology.The results are presented and discussed in Section 3. A summary and conclusion close the paper in Section 4.

| Model description and grid configuration setup
We use the sixth version of LMDZ, the atmospheric component of the latest version of the IPSL model (IPSL-CM6A-LR) (Boucher et al., 2020;Hourdin et al., 2020) participating in the CMIP6 experiment (6th phase of the Coupled Climate Models Intercomparison Project; CMIP).LMDZ is a global atmospheric general circulation model (GCM) and is commonly used in a coupled configuration with the ORCHIDEE land-surface model (Cheruy et al., 2020).In the following, the coupled configuration (LMDZ6/ORCHIDEE) will be referred to as LMDZ6-OR.All simulations analysed in this paper are conducted using prescribed oceanic boundary conditions (OBCs) and the atmospheric composition (greenhouse gasses, aerosols and ozone) is prescribed following the CMIP6 protocol.By activating the "zoom" function, LMDZ can be run with increased resolution over a specific region.Grid stretching has been widely used combined with a nudging approach where the model trajectory-everywhere or only outside the zoom areais forced to follow the real synoptic evolution by relaxing the large-scale circulation towards meteorological analyses (Coindreau et al., 2007).The nudging further helps numerically stabilize the model, and when it is activated, it is possible to significantly increase the resolution within the zoom while using a very light global grid.For instance, Cheruy et al. (2013) reached a resolution five times greater in the zoomed area with a global grid of 48 points in latitude and 32 in longitude.The nudging can be applied to the whole grid or outside of the zoomed area.This latter configuration, where physics and dynamics are free to feedback each other in the domain with increased resolution, can be assimilated to a regional climate model (RCM) laterally forced with a coarserresolution GCM run.However, the latter technique precludes any interactive exchanges between the RCM and its driving GCM.In addition, at the border of the RCM domain, substantial discontinuities can manifest due to the inevitable conflict between the external forcing from the GCM and the internal dynamics and physics of the RCM (Li et al., 2021).An alternative approach consists of running the GCM with a stretched grid without any nudging, which has the benefit of being able to use the stretched-grid configuration to produce future projections (for which nudging is not possible).For instance, Sabin et al., 2013 used a zoomed configuration of a previous version of the model with a resolution of approximately 40 km over south Asia.The same approach is used here to simulate the climate over Morocco with a resolution of about 35 km.Our objective is to find the optimal tradeoff targeting (i) a fine resolution in the zoom over Morocco, (ii) a sufficiently high resolution outside the zoom to guarantee a reasonable representation of the global climate and large-scale circulation patterns, (iii) an overall moderate numerical cost, (iv) the numerical stability of the model, and (v) a smooth transition at the zoom boundary to avoid disrupting the coherence of the interaction between the refined region and the outer domain.
Various time steps and zoom parameters were tested to both ensure the model's stability and save computer resources.The global grid that has been retained is set up with 384 × 220 grid points (corresponding to a regular horizontal resolution of about 120 km, i.e., roughly corresponding to the standard Low Resolution of IPSL-CM6) and the 79 vertical level discretization used for CMIP6 (Hourdin et al., 2020).The horizontal grid is refined over Morocco, yielding a meridional grid point spacing of 35 km over our focus region.The zoom is centred at [−6.5 W, 24 N] and extends over an area of around 3500 km 2 to cover the entire country, avoid decreasing the resolution near its borders (especially the mountainous north), and ensure locating it far from the edges of the zoomed domain.Figure 1a shows the horizontal grid resolution for the present LMDZ6-OR setup.The grid-size in the region (lon-lat, lon-lat) in Figure 1a is 35 km.The resolution becomes gradually coarser outside the zoom domain, but we made sure not to exceed a maximum of 300 km (comparable to CMIP6 LR) and to have a smooth transition outside of the zoom area (shade intervals in Figure 1a).With this resolution, the model is able to resolve the mountains of the Atlas and Rif ranges, which have a great influence on the Moroccan climate.

| Empirical bias correction
Following the method proposed-and applied over Antarctica-by Krinner et al., 2019, we apply an empirical atmospheric run-time bias correction to the refined grid configuration.The method consists of two main steps: a.The first step consists of calculating climatological mean correction terms from a nudged simulation to build a climatology of the tendency errors of the atmospheric model.Let X be the selected prognostic variable (e.g., wind, temperature) and X R the reference state.For the nudged simulation, the local model solution is modified at each model time step as follows: where F(X) is the original prognostic evolution of variable X and the last term is the relaxation tendency towards the reference time varying state (X R ) with time scale τ.A seasonal climatological cycle accounting for the diurnal cycle, G = − 1 τ X −X R ð Þ AC is then evaluated (AC stands for annual cycle estimator).
b.The second step is adding the calculated terms derived from the climatology of the model drift to the prognostic equations of the model in order to correct at each model time step (thus called run-time bias-correction) the selected atmospheric state variables.This results in a bias-corrected run that can be written as: Here, we run a present-climate LMDZ6-OR simulation, nudged towards atmospheric reanalysis over the socalled AMIP period .We use the ERA5 reanalysis (Hersbach et al., 2020) for nudging the zonal and meridional wind speeds and the atmospheric temperature.A climatological correction is then deduced from the nudging tendencies (Krinner et al., 2019) for each of the variables to which the nudging is applied.We choose a nudging relaxation time constant (τ) of 24 h, which is sufficient to correct the mean climate state.The correction is applied only above the boundary layer, leaving the near surface fields to evolve freely.
Dealing with a stretched-grid configuration, two approaches were possible to achieve the first step (a).The correction terms can either be directly calculated on the stretched grid as in (Krinner et al., 2019) and (Beaumet et al., 2021)-or they can be calculated on a regular global grid and then interpolated to the stretchedgrid for the second step (b).In this work, we test both methods.The second method -to the best of our knowledge-has not been tested before.

| Simulations
We carried out 4 LMDZ6-OR simulations (Table 1) over the period 1979-2014 using the configuration described in Section 2.1.
This set of 4 simulations will be compared to 2 regular grid IPSL-CM6 AMIP-type runs: one carried out with a low horizontal resolution (144 × 143 grid points, referred to as the AMIP simulation hereafter) and one highresolution simulation (512 × 361 grid points, with a globally average resolution of about 50 km, referred to as the HighresMip simulation hereafter), corresponding to the run carried out for the HighResMIP exercise.
For all 4 simulations, 2 years of spin-up were done to reach the equilibrium of the main soil water reservoirs in ORCHIDEE.

| Observational datasets
For the representation of the atmospheric general circulation, we compare our LMDZ6-OR simulations to the ERA5 reanalysis dataset (Hersbach et al., 2020).At the regional scale, we assess the model's ability to simulate precipitation by comparing the simulation results -in addition to ERA5 reanalysis-to three gridded observation datasets (Table S1): TRMM (Tropical Rainfall Measuring Mission; [Huffman et al., 2016]), GPCC (Global Precipitation Climatology Centre [Markus et al., 2022]); and GPCP (Global Precipitation Climatology Project, [Adler et al., 2018]).Gridded data sets are useful tools to overcome the low density of observation stations.They have shown great performance on the global scale, but very large uncertainties can be found at the regional scale (e.g., Angélil et al., 2016;Schumacher et al., 2020).Therefore, it is important to use different data sources for model evaluation to consider these uncertainties.All used products are chosen according to their spatial coverage, resolution and available time period and are summarized in Table S1.We chose precipitation datasets that are available at a daily time-frequency to characterize the mean and extreme events.To compare the model to observational products, ERA5 reanalysis or model simulation outputs are interpolated into the coarser grid.
We also use in-situ data of daily precipitation from 30 meteorological stations (Figure 1b, Table S2) issued from the Moroccan General Meteorological Directorate (DGM).Temperature and precipitation data undergo regular quality control within the DGM before being publicly available.Furthermore, the used data has been checked in terms of quality by Driouech et al. (2020) using RClimDex software to identify and process questionable values for both parameters.
The analysis of precipitation is carried out at the regional scale, focusing on four climatic regions (Figure 1b).These regions are defined based on previous works on climate regionalization in Morocco (El Hamly et al., 1997;Knippertz et al., 2003) and consider each region's climatic characteristics and location with respect to the Atlas Mountains.The northwestern quarter region (North-West) corresponds to the wettest part of the country, and its winter climate is predominantly influenced by the North Atlantic circulation (Knippertz et al., 2003).The Mediterranean region (North-East) is mostly influenced by the Mediterranean, and the Eastern region (East) corresponds to the south of the Atlas, where the moisture supply is reduced or even cut off because of the Atlas Range acting as a barrier, slowing down westerlies.The fourth region (South) is mostly influenced by the Saharan heat-low (Driouech et al., 2021).It is worth noting that although the 30 stations used are spread over the four considered climate regions, 70% of them are in the North-West region.The remaining zones contain up to T A B L E 1 list of analysed simulations.
ZMor.N Globally nudged simulation prepared for calculating the correction terms ZMor.CZ Bias-corrected simulation using corrections calculated directly on the refined stretched grid (relaxation tendencies calculated with ZMor.N).
ZMor.CMR Bias-corrected simulation for which the corrections are calculated over a regular grid (MR-grid)-the medium resolution grid for the IPSL-CM6 model (256 × 256 grid points)-then interpolated onto the refined grid.
four stations, which may not be sufficient for regional analysis and summaries despite their low precipitation amounts and spatial variability (Figure 5a).Thus, the analyses are also carried out at the station scale.
For comparisons of simulated precipitation with insitu data, we select the nearest grid points, taking into account the altitude difference.For coastal stations, the nearest point in the model is selected with a tolerance of 20% ocean fraction in the model grid cell to avoid selecting grid points very far from the ocean and therefore not representative of coastal stations.
We compare the present-day climate by considering recent periods (i.e., 1979-2014, when not mentioned otherwise) of present-day runs.The references (i.e., observations) used to evaluate the model generally cover the same period but may sometimes exclude some years after 1979.In all cases, we compare the model and the reference data over exactly the same period.The Amip run is excluded from comparisons to local stations due to its very coarse resolution.

| RESULTS AND DISCUSSION
Considering the importance of large-scale mechanisms on the Moroccan regional climate, we focus our analysis on three main diagnostics going from large to local scales: climatology of the main general circulation fields, interannual variability, and moisture transport.We further analyse the model's behaviour in simulating mean and extreme precipitation characteristics in the main climatic regions of Morocco.Our analysis is focused on the winter season (DJF), the main rainy season in the country.The summer season (JJA) is also briefly analysed when a result is worth mentioning.

| Mean circulation patterns
This section provides an overview of the model's behaviour with the refined-grid configuration for a few key variables that can have a significant impact on the model's ability to simulate regional climate and, in particular, precipitation: sea-level pressure, low-level and upperlevel circulation, air temperature, and relative humidity.We also look at the North Atlantic polar jet stream-a key feature of the upper-level flow determining the position and movement of weather systems-and known to greatly affect precipitation over Northern Africa (Knippertz et al., 2003).We focus on a relatively large domain, including the Atlantic and Mediterranean regions: [-80-45 E; 10-70 N].
The representation of the mean circulation by LMDZ6-OR is first addressed by comparing the mean sea level pressure (MSLP) to ERA5, in both winter and summer (Figure 2).The main structure is well reproduced globally by the model in both seasons.The refined-grid simulation has a similar structure to the regular grid ones, with comparable mean biases (−1.08 hPa for ZMor, −0.82 for HighresMip, and −0.91 for AMIP) and a relatively lower root mean square error (RMSE) over the target domain.The North Atlantic subtropical anticyclone (Azores high) is relatively well captured by all model configurations.However, in the three uncorrected versions (Amip, HighresMip, and ZMor), the Icelandic low extends more eastward, resulting in a more zonal lowlevel circulation over the Atlantic above 40 N and a very low MSLP over Europe.This bias, which is also visible in the 500 hPa geopotential height (not shown), is reduced in both corrected simulations.In summer (Figure 2b), the bias-corrected simulations perform better in capturing the position and intensity of the Icelandic low as well as the North Atlantic subtropical pressure high responsible for the dry conditions over Morocco.However, the overall mean bias and RMSEs are smaller in the ZMor run and nearly vanish in the nudged run.
Biases and RMSEs for each configuration of the model w.r.t.ERA5 for the low-level circulation, temperature, and relative humidity as well as upper-level circulation for both winter (DJF) and summer (JJA) seasons, respectively, are shown in Figures S1-S8.
For low-level circulation, the ZMor simulation performs relatively better than the coarser resolution simulations over the region (reduced mean bias and RMSE) in both seasons.Despite the wind and temperature fields being, by construction, directly impacted by the bias correction procedure in the corrected simulations, they still show some remaining differences w.r.t.ERA5 of comparable magnitude to those of the free reference run ZMor during winter.The fact that nudging and bias correction are applied only above the planetary boundary layer may partially explain the remaining biases at 850 hPa (the level at which the correction intensity starts decreasing).
Similarly to the wind, the winter low-level temperature biases depicted across most of the domain are substantially reduced in the bias-corrected simulations.In fact, the uncorrected runs exhibit a cold temperature bias, which almost vanishes after bias correction in winter.During summer, the bias-corrected runs show remarkably reduced biases over North Africa, but a warm bias appears over Europe.A similar bias was also observed in near-surface air temperature (not shown here) and was again reduced after bias correction, which shows that the effect of the bias correction propagates to the surface where the model evolves freely.Hourdin et al. (2020) suggested that the observed near-surface temperature biases, especially over the Sahara, could be related to a problem in aerosol forcing or the inability to account for the low emissivity of the surface in the current LMDZ model's radiative code; this can also partially explain the lower troposphere cold biases.
In all the considered model configurations, a wet bias is exhibited in 850 hPa relative humidity, especially over the ocean.Neither nudging nor run-time bias correction influence this bias, which remains quite similar in all model configurations.This relative humidity difference was previously discussed in Boucher et al. (2020) and Hourdin et al. (2020) and may be attributed-at least partly-to either an overestimation of the relative humidity in the reanalysis itself or an excessive transport of moisture by the shallow convection scheme of LMDZ.During summer, in addition to the positive bias over the ocean, we note an underestimation of the relative humidity over Eastern Europe, especially in the bias-corrected runs.This is consistent with the observed warm biases in the same areas.An underestimation is also observed over the Sahel in the uncorrected runs, but it is reduced after bias correction.
Figure S7 shows the winter upper-level wind biases w.r.t.ERA5 for each model configuration.The two maxima in the zonal wind field are the North Atlantic (polar) and the subtropical jet streams.The spatial distribution of biases and their means are quite similar in the free simulations.The two corrected simulations exhibit geographically different bias patterns from the uncorrected runs.During summer, the upper-level zonal wind biases are substantially reduced after bias-correction and the mean overall RMSE is reduced from 4.27 m s -1 in the ZMor run to 1.32 m s -1 in the ZMor.CZ and 1.2 m s -1 in the ZMor.CMR.
The persisting biases in winds (as well as in temperature) may be due to other processes whose development is shorter than the 24 h relaxation time used in the nudging process to build the correction terms.Similar results were observed in previous studies.Over Antarctica, Krinner et al. ( 2019) used a relaxation time of 6 h but still had biases in both wind and temperature above the boundary layer.Beaumet et al. (2021), over the same region, used a relaxation time of 72 h and still showed biases in 200 hPa temperature.Thus, this calls for additional sensitivity tests using different relaxation times depending on the study area and the nudging variables.

| High/low-frequency variability
Although the bias correction process has been applied only to atmospheric winds and temperature, we have shown previously that the mean errors of other fields (e.g., MSLP) can be positively impacted.Nevertheless, it is not evident that the bias correction approach has a positive effect on other characteristics, such as the interannual variability of the simulated fields.In this part, we evaluate the High/low frequency variability in the model using the geopotential height at 500 hPa.High Frequency (HF) variability comprises the synoptic travelling waves, characterized by a period of 2-8 days.Isolating the HF variability is also a way to characterize the storm tracks in the mid-latitudes (Harvey et al., 2020;Roehrig et al., 2020).The position of the North Atlantic storm track is a decisive factor for precipitation in Morocco, especially during the winter (Knippertz et al., 2003).Figure 3 shows the standard deviation of the 2-8 days band-pass filtered 500 hPa geopotential height for each simulation compared to ERA5.
All model configurations are able to reproduce the areas of maximum HF variability in the North Atlantic Ocean and weaker variability going southward.The overall errors are reduced in the refined-grid run (RMSE decreased from 4.08 m in Amip and 4.9 m in HighresMip to 3.33 m in ZMor).This is in agreement with previous works suggesting that the simulation of storm tracks generally improves with increasing resolution beyond that used in most current global climate models (Barcikowska et al., 2018;Michaelis et al., 2017).The nudged run shows a very weak bias, which highlights the effect of general circulation fields (winds and temperature, used in the nudging protocol) on modes of mid-latitude variability.ZMor and HighresMip simulations show a positive mean bias, while all the other simulations exhibit a negative one.For HighresMip and ZMor, the storm track's maxima are more extended.While for the coarse resolution run and the bias-corrected runs, the storm track is, in contrast, shifted to the north with weaker intensity over 40 N, which may result in underestimating precipitation (especially the part linked to large-scale circulation).The latest is generally related to enhanced North Atlantic storm track activity with a southward shift (Knippertz et al., 2003).Similar results were found by Krinner et al. (2019) where the Southern Hemisphere high-frequency circulation variability is underestimated after biascorrection impacting the simulated Antarctic precipitation rates.
Low-frequency planetary waves-in addition to baroclinic waves (HF variability)-also provide a relevant contribution to the meridional transport of energy and momentum.Low-Frequency phenomena are mostly due to the dynamics of long stationary waves, interacting with orography (Lee & Black, 2013) and being catalysed by the subtropical jet (Ruti et al., 2006).We also looked at the LF phenomena by isolating the variability from 10 to 45 days.Figure S10  overestimate LF variability in the North Atlantic.In contrast, both corrected runs show improvements in the representation of low-frequency variability, especially in the ZMor.CZ simulation.The nudged run again presents a very weak bias.Knippertz et al. (2003) has shown a strong link between Moroccan precipitation and moisture transport from the Atlantic, especially west and south of the Atlas.Northwesterly moisture transport associated with cyclones over the Western Mediterranean is highly involved in the case of the North-East region.Considering this close link between moisture transport and precipitation in the region, we assess in this section how well the transported moisture is simulated by the model and the effect of bias correction over such a field that is highly dependent on large-scale circulation.

| Moisture transport
In order to analyse moisture fluxes' pathways across the country and their behaviour before and after crossing the mountains, we defined two diagonal moving crosssections: (A) parallel to the Atlas Mountains and moving from North-West to South-East, and (B) parallel to the northern mountain range (Rif) (perpendicular to the Atlas) and moving from North-East to South-West. Figure 4 shows the mean moisture transport averaged over the two sections for winter.Considering Section A (Figure 4a), we note that the coarse resolution simulation overestimates the input of moisture at the coast during winter.This overestimation is reduced with enhanced resolution (HighresMip) and nearly vanishes in the refined-grid for both the free and nudged runs.Moving forward, all simulations seem to detect the peak related to the Atlas range, showing a drop in the mean moisture flux except for the coarse resolution runs.Approaching the mountains, a negative bias appears in the ZMor run and keeps increasing moving forward.The same bias is detected in the HighresMip simulation just after the mountain peak, which can be related to a stronger moisture discharge over the mountains in the model w.r.t.ERA5.This difference is not seen in the Amip configuration since the resolution is too coarse to resolve the topography of the area.
Regarding Section B (Figure 4b), all model configurations seem to detect the two elevation peaks (the Rif and the Atlas ranges) except Amip.The northern moisture flux is well simulated by the HighresMip and ZMor runs, while it is overestimated by Amip.The three runs, however, exhibit a negative bias just after crossing the Atlas peak.
For both sections, the two bias-corrected simulations show very different behaviours.The ZMor.CMR seems the closest to ERA5, while the ZMor.CZ exhibits a larger moisture flux along both cross sections.In a sense, the run-time bias correction can be interpreted as spectral nudging since it aims to constrain the model in terms of large-scale atmospheric state while permitting the formation of regional-scale details (Von Storch et al., 2000).It is thus possible that the calculation of the correction on the zoomed grid distorts the correction of large-scale circulation biases by taking into account small-scale biases.
During summer (Figure S9), all model configurations reproduce quite well the drop in moisture flux coinciding with the orographic uplift.However, the three uncorrected runs tend to underestimate the average moisture transport along both sections.This dry bias is substantially reduced after bias-correction in both corrected runs.

| Mean climatology and variability
We first assess the performance of the model by comparing the simulated mean precipitation to in-situ data, to the ERA5 reanalysis, as well as to different observational datasets (TRMM, GPCP, GPCC) focusing on Morocco [21:37 N; -17:-1 W] for the winter and summer seasons.Figure 5a shows the spatial distribution of DJF mean precipitation.Compared to ERA5, all model configurations broadly capture the overall winter precipitation gradient between the wetter region in the north and the dry zones in the south and east of the Atlas Mountains.Furthermore, the refined-grid runs give a finer description of local rainfall patterns shaped by orography.The location of the northern maximum is well reproduced except in the case of the AMIP and HighresMip simulations.This is an expected result for the coarser resolution run since high-altitude regions that receive the most precipitation in this region are not well resolved.This may also be connected to the observed "anticyclonic" bias in both runs (Figure 2a), with a relatively strong Azores high that may block cyclonic activity and lead to dry biases.In comparison to ERA5 (as well as to gridded observation, not shown), finer resolution simulations (including Highres-Mip) seem to overestimate winter precipitation all over the relief belt, especially over the high Atlas range.The wet biases over mountainous regions can be related to the increase in horizontal resolution and indeed present a frequent deficiency in regional simulations, as shown by previous studies (Gianotti & Rebecca, 2012;Nuñez et al., 2009;Tuel et al., 2021) especially when compared to reanalysis or gridded observations.Indeed, modelling the impact of orography on the atmospheric flow and precipitation is particularly challenging.Comparisons to in-situ stations (Figure 5b) show a spatial variability of biases ranging from −3 to 3.5 mm/day (representing −100% to 200% of precipitation amounts).The refinedgrid simulations generally perform better, except for some stations at high altitudes.It is worth mentioning that ERA5 also shows some differences compared to station observations (Figure 5b), especially over the Atlas.In particular, a negative bias is observed in Ifrane (at 1663.8 m altitude), whereas Midelt (at 1508 m altitude) exhibits a positive bias.Differences of similar magnitude are also found in the other observational datasets.Important differences between local stations and gridded observations were documented in previous works (Favre et al., 2016;Herrera et al., 2019;Kotlarski et al., 2019).Furthermore, despite carefully selecting the nearest point, it is always challenging to compare gridded data (area-average value) to local (in-situ) observations.A more appropriate way would consist of applying a spatial averaging of stations inside a region (Déqué, 2007) or using an equivalent area for grid cells (Durman et al., 2001;Huntingford et al., 2003).But these averaging methods require a very dense observation network.The average RMSE and mean bias calculated over the stations within the North-West region for the period 1998-2014 is shown in Figure 6.GPCC and ERA5 are the closest to the in-situ observations, though some remaining biases result in an average RMSE of 0.4 and 0.5 mm/day respectively.For the other less rainy regions (North-east, South-east and South), the average winter mean bias and RMSE for both gridded observations and the nudged simulation do not exceed 0.5 mm/day (not shown) but are still of a comparable magnitude to the North-Western region's errors if we consider the mean regional precipitation amounts in these regions (less than 1 mm/day).The bias-corrected simulations produce similar results, showing that bias correction has no noticeable effect on local mean precipitation amounts despite the improvement depicted in large scale circulation.It is worth noting that we used the same physical parameterizations used at lower resolution (i.e., Amip).To take better advantage of the improvement in the large-scale circulations, further efforts are required to develop scale-aware/adaptive parameterizations.For instance, meso-scale circulations due to topography, land-sea contrasts or surface heterogeneities can play an important role in the triggering of convection or in the diurnal cycle of near surface temperature.However, the current resolution achieved over Morocco is not sufficient to accurately represent these circulations, and they're not parameterized in the LMDZ GCM yet.
In summer (Figure S12), similarly to ERA5, all model configurations are able to capture the overall precipitation gradient between high altitudes where convective precipitation generally occurs and the rest of the country with mostly no rain.Nonetheless, both the coarse resolution and HighresMip simulations exhibit an overestimation over the Atlas range, possibly as a result of an inaccurate representation of summertime convective systems, especially since the summer precipitation in the model is mainly convective.In fact, although the triggering of the convection is an aspect that has received much attention in LMDZ (Rio et al., 2013;Rochetin et al., 2014), open questions remain in particular regarding the triggering of convection over relief (Yu & Lee, 2010), the propagation of convective systems, as well as a possible grid-size dependence of the free-parameters of the gravity-wave drag, whose tuning can be challenging for a zoomed grid.However, the refined grid configuration shows a noticeable summer precipitation downscaling skill over the relief.This is also demonstrated by the reduced amount of convective precipitation (not shown) over mountainous areas in the model after grid refinement.The bias-corrected simulations show even weaker biases, which may be partially explained by a more stable air linked to a warmer troposphere in the bias-corrected simulations (Figure S4), which may reduce the triggering of the convection.Another explanation may be the good representation of tropical moisture transport (Figure S9), responsible for much of the summer precipitation south-east of the Atlas (Born et al., 2008).
Figure S12 shows the winter precipitation variation coefficient (the standard deviation divided by the mean) for the model compared to ERA5 and to stations' observations.All model configurations capture the gradient of interannual variability increasing from north to south.However, the model tends to underestimate variability in the northern region while overestimating it in the southern and eastern regions.Similar results are found in comparison to the other observation datasets (not shown).The nudged run is the closest to observations, followed by the corrected runs, where the mean absolute bias is less than 15% in nearly two thirds of the stations.ERA5 also shows differences compared to in-situ observations, especially at stations close to relief.During summer (Figure S12b), the precipitation variability is, as expected, much higher than in winter.The ZMor run is the closest to observations, with a mean absolute bias of less than 20% at 20 stations out of 30.The effect of the enhanced resolution is apparent going from HighresMip to the refined-grid simulation.No systematic effect of the bias correction on the summer high precipitation variability is observed, implying that correcting the model's intrinsic atmospheric biases is not sufficient to improve all precipitation characteristics in such a dry season where local processes play an important role in precipitation occurrence.

| Precipitation distribution and extremes
Figure 7 shows percentile distributions plotted using winter daily precipitation.For each climate region, in-situ stations are compared to their nearest grid points in the model (Figure 7a-d), while for gridded observations, all grid points within a region are included (Figure 7e-t).Table S3 shows the number of stations and grid points included in each region for all the model configurations, ERA5, and the gridded observational datasets.No spatial averaging nor interpolation is performed to avoid smoothing extreme phenomena.A curve aligned on the diagonal means that the model captures the overall distribution well (including low, moderate, and high events).
For the North-Western region (Figure 7, first column), the main biases are mainly associated with high precipitation events independently of the reference dataset.Compared to in-situ stations, the ZMor.CZ related curve is nearly aligned along the diagonal, indicating a noticeable effect of the correction in reproducing precipitation events' occurrence at the local scale.The nudged run also shows good skill, especially when compared to local stations.The ZMor.CMR shows better performance than the ZMor.CZ when considering gridded datasets for all precipitation ranges.The correction effect is even more obvious when considering lower precipitation events (ranging from 0 to 10 mm/day [Figure S13]).We note that the uncorrected run (ZMor) shows generally good skill compared to HighresMip emphasizing once again the effect of the resolution increase (Figure 7).
We also looked at the distributions at each individual station (Figure S14).The effect of the run-time bias correction is clearly visible here as well.ZMor.CZ shows an overall good performance skill, and ZMor.CMR performs better, this time, for low precipitation events.Overall, at least one of the corrected runs performs better than the uncorrected one and even than the ERA5 reanalysis in 72% of the stations.
Over the North-Eastern region (Figure 7, second column), represented by only one in-situ meteorological station (Oujda), all model configurations seem to overestimate the precipitation distribution when compared to in-situ stations.The model's behaviour depends, however, on the considered reference dataset.The bias correction seems to have a positive effect on the model's ability to simulate moderate and high precipitation events, except when compared to the GPCP dataset.ZMor.CMR, in particular, shows the best skill in reproducing both the precipitation events' location and distribution.The East and South regions also confirm the overall positive effect of the bias correction, especially when looking at individual stations (Figure S14).The observed improvement may be due to the correction of some largescale fields affecting precipitation in these regions, such as moisture transport.
The above analysis has shown that the precipitation distribution is well improved with enhanced resolution and even more with bias correction.Nevertheless, the refined-grid simulations still overestimate extreme events.This is the case for many other regional climate models.To further analyse the model's capabilities in simulating extreme events, we are using two climate indices describing extreme wet and dry conditions.We examine the maximum amount of rain that falls in a sequence of five consecutive wet days (rx5day) and the maximum number of consecutive dry days (CDD) (Alexander, 2016;Peterson et al., 2002;Zhang et al., 2011).A wet (dry) day corresponds to a day with a total precipitation amount above (below) 1 mm/day.Both indices are computed on a monthly basis, then averaged over the winter (Figure 8) and summer (Figure S15) seasons.
During winter, all model configurations tend to overestimate the rx5day index, especially in the North-Western region.This wet bias is, however, reduced after applying the run-time bias correction, especially in the ZMor.CMR simulation.This is consistent with this configuration being the closest to observations in terms of precipitation events' distribution.In contrast, CDD is overestimated by the zoomed configuration, and the extreme dry periods are even more persistent in the corrected runs.
In summer (Figure S15), the model tends to overestimate rx5day over mountainous areas.This overestimation is reduced after grid refinement and almost vanishes after bias correction.CDD is underestimated in all configurations, particularly over the Atlas, but this negative bias is reduced in both corrected simulations.This is in agreement with the observed overestimation of summer precipitation in the model, which was reduced after grid refinement and bias correction.

| SUMMARY AND CONCLUSION
We have set up a refined grid configuration of the LMDZ6-OR climate model to simulate the Moroccan climate and used empirical run-time bias correction following the method described in Krinner et al. (2019).Correction terms on the temperature and wind fields were built using the climatology of the adjustment term on tendency errors coming from ERA5 reanalysis over the 1979-2014 period.The run-time bias correction was applied in two different ways: (1) the computation of the correction terms is done directly on the refined grid for the first case, and (2) the correction terms are first calculated over a regular grid, then interpolated onto the refined grid.The second method may be applied to different grids and regions.
A set of present-day climate simulations was used to assess the model's ability to reproduce precipitation characteristics over Morocco and to evaluate the effect of runtime bias correction as well as the increased resolution, while disentangling between the two whenever possible.The model outputs were compared to local observations from 30 meteorological stations, to the ERA5 reanalysis as well as to a range of gridded observational datasets of varying nature and resolution (satellite-based: TRMM/ GPCP, and station-based: GPCC).
We first analysed the main large-scale fields that influence the Moroccan climate, especially precipitation, and checked if the model behaves fairly well outside of the refined area since the telescopic zooming is obtained at the expense of a coarser and distorted grid outside of the zoom.
Our results show that all refined grid simulations reasonably reproduce the general circulation patterns.In addition, the ZMor run exhibits noticeable improvements over the domain, influencing the Moroccan climate in many aspects.In particular, the low-level circulation as well as high frequency variability (hence the position and intensity of the storm track) biases were reduced.Depending on frequency, a slight improvement or degradation is found in the simulated variability, although the mean atmospheric state is substantially improved.This encourages more sensitivity tests with different corrected variables and relaxation times to improve the correction method for future similar experiments.Winter moisture transport was noticeably improved after bias correction in the ZMor.CMR run, while it was degraded in the ZMor.CZ one.This implies that considering small-scale biases (taken into account when computing the correction terms directly on the stretched grid) may not always have a positive effect.
The added value of the enhanced resolution was also observed at the regional scale.In fact, during winter, both mean precipitation amounts and interannual variability are better reproduced in the refined-grid run ZMor, especially over the rainiest part of the country (North-West).The zoomed configuration also exhibits a fair capability in localizing events' occurrences in all four considered regions.Both corrected runs perform generally better than the uncorrected simulation in terms of regional distribution as well as interannual variability of precipitation.The overall positive effect of the run-time bias correction on the model's ability to reproduce precipitation distribution at the regional scale points out the importance of the link between large-scale circulation and the main precipitation characteristics, including extremes in the North-West region.This improvement, however, does not necessarily propagate to the mean precipitation quantities.Indeed, reproducing the exact total mean precipitation amounts is always a challenge for climate models.During summer, when convective rainfall dominates, the precipitation wet bias over the Atlas was substantially reduced after grid refinement and even more after bias correction.
Overall, our results show that the run-time bias correction has many positive effects on the model's capabilities in simulating large-scale circulation features that drive the near-surface climate.Interestingly, the improvement propagates to the sub-national scale through precipitation distribution and variability.However, the correction was not sufficient to improve the simulated mean precipitation amounts.Dealing with such kinds of biases may involve model tuning after grid refinement (which was not performed in our case) and developing more "scale-aware" parametrizations, especially for such a region where precipitation is also dependent on local processes.Soil-atmosphere interactions are also of great importance.They have been recently investigated by Arjdal et al. (2024).Balhane et al. (2022) have shown that "a posteriori" bias-corrected models still show biases at local precipitation in Morocco.Combining the run-time bias correction with this classical correction method would be a relevant focus for future work to assess their added value in simulating local precipitations, especially extreme events.Furthermore, the observed improvements on the large-scale encourage using the biascorrection approach for driving LAMs or zoomed grid GCMs with more refined physics and a better description of local processes.It also highlights the method's potential for producing reliable future climate change scenarios.

F
I G U R E 1 Resolution (km) over the zoom area (a) and the topography and location of the meteorological stations along with the four climatic regions (b).The dark blue shading in (a) indicates grid size <=35 km.

F
I G U R E 2 Winter (a) and summer (b) mean sea level pressure, average for ERA5 reanalysis (left panel), and LMDZ6-OR biases w.r.t.ERA5 for the period 1979-2014.Bias and RMSE are shown for a "sub-domain" area [-80-45 E; 10-70 N] and over the globe.
shows the standard deviation of the 10-45 days band-pass-filtered 500 hPa geopotential height.All uncorrected configurations of the model F I G U R E 3 Winter standard deviation bias of the 2-8 days band-pass-filtered 500 hPa geopotential height for ERA5 (right panel) compared to the model simulations over the period 1979-2014.Bias and RMSE over the domain [-80-45 E; 10-70 N] are shown for each model configuration.

F
I G U R E 4 Winter moisture transport averaged over different moving cross-sections.Moisture transport average values (Kg m -1 s -1 ) are shown along with elevation (m) averages at each section.The bottom maps show the moving cross-section (moving from dark to light blue).The x-axis shows the longitude of the bottom of each section.

F
I G U R E 5 Spatial distribution (a) of the 1979-2014 climatology of average DJF mean precipitation (mm/day) and mean bias (mm) in comparison to in-situ stations (b) for the same period.

F
I G U R E 6 Mean precipitation biases and RMSE (mm/day) by station for the North-Western region for winter (a) and summer (b).Individual stations' metrics are shown in circles.Averages over the region are shown in squares.

F
I G U R E 7 Winter daily precipitation distribution by region, considering all model grid points within each region for the period 1998-2014.

F
I G U R E 8 Winter mean r5xday indice (upper panel), and CDD (lower panel) over the period 1979-2014.Indices' spatial distributions are shown for all model configurations, ERA5 as well as in-situ stations.