Hydrodynamic Modeling and Salinity Gradient, San Francisco Bay.

: San Francisco Bay is roughly 60 miles (97 kilometers) long and 3-12 miles (5-19 kilometers) wide. It connects to the Pacific Ocean through the Golden Gate Strait, which is spanned by the iconic Golden Gate Bridge. The bay covers an area of approximately 400 square miles. The primary aim could be to characterize the salinity variation along the length of the San Francisco Bay, Investigate the role of surface water elevation and hydrodynamic processes in shaping the salinity gradient of the San Francisco Bay by analyzing tidal data, water velocity, and flow patterns. Two-dimensional averaged depth was used to build the San Francisco Bay water quality model. With measured field data collected between December 1, 2000, and December 2, 2000, this generated model was calibrated. The lake's four water quality metrics were selected to display the study's findings. Water levels, water temperature, salinity, and wind are these variables. The model has been checked and calibrated using data from a few chosen stations in San Francisco Bay. After then, over the period of December 1 to December 2, 2000, the model was calibrated. Calculations were made to determine the absolute mean error AME, normalized objective function NOF, and root mean square error RMSE of water depths . The lowest permissible error rate was reached when using the Manning number with a value of 40 𝒎 𝟏 𝟑⁄ /𝒔 where the value for stations number 13,19,21 of RMSE respectively equal (0.85, 0.92, 0.86), NOF respectively equal (0.09,0.09,0.09), and AME respectively equal (0.74, 0.69, 0.75) . After that, a verification was done for the period December 16, 2015 to December 17, 2015 using data related to the water level and salinity. Encourage the use of remote sensing techniques, such as satellite imagery and airborne sensors, to obtain high– resolution data for model calibration and validation. This will enhance the accuracy of hydrodynamic models and salinity gradient analysis.


INTRODUCTION
San Francisco Bay is a large, shallow estuary located on the western coast of the United States, specifically in northern California. It is surrounded by several cities and counties, including San Francisco, Oakland, and San Jose. The model has been calibrated and verified against measured data at some selected stations in the San Francisco Bay (Figure 1). In San Francisco Bay, a salt gradient occurs due to a combination of factors, including freshwater input from rivers, tidal mixing, and evaporation. Several rivers, including the Sacramento and San Joaquin Rivers, flow into San Francisco Bay, delivering freshwater from the surrounding watershed. These rivers carry sediments and dissolved minerals, including salts, into the bay. The freshwater input helps dilute the saltwater and creates a less saline environment near the river mouths.
Tides play a significant role in San Francisco Bay's salt gradient. The bay experiences regular tidal fluctuations, with water levels rising and falling throughout the day. The mixing action of the tides helps distribute and blend the freshwater and saltwater in the bay, creating a dynamic environment. During high tide, saltwater from the Pacific Ocean enters the bay through the Golden Gate Strait, while during low tide, some of the bay water flows back out to the ocean. Stratification in estuaries is stronger than the thermal stratification of lakes and oceans due to the density difference between freshwater and seawater. The salinity gradient's center and times of high river discharge are when stratification is highest. Shrimp's speciesspecific adaptations to various salinity ranges and the northern anchovy's behavioral responses to environmental variability both influence the spatial distribution of motile creatures.
As land runoff interacts with and mixes with seawater, a gradient of salinity forms in the area between rivers and oceans (Cloern, et al. 2017). The Golden Gate Bridge is located X2 miles away from the location where the bottom salinity is 2 psu. The mean salinity distribution of the estuary is almost selfsimilar for the majority of flow circumstances, with a salinity gradient in the middle 70% of the region between the Golden Gate and X2 that is proportional to. The salinity field 2 adjusted during a typical period of within 2 weeks, according to an analysis of coverability of Q and X2 (Monismith et al. 2002). The salt field is not a good indicator of depth-averaged salinity because it is 1 m below mean sea level. It is obvious that the density-driven flow causes the horizontal salinity gradients to decrease. Vertical mixing and baroclinic exchange flows work together to cause this. Fresh water first flows over salt water due to baroclinic exchange fluxes.
The water column, therefore, becomes thoroughly mixed vertically during moments of high vertical mixing. The stratification's effects. The baroclinic pressure gradients are included to create a density-driven flow in order to study the impacts of stratification; nevertheless, the stratification has no impact on the vertical mixing coefficients (Gross et al. 1999).
Larger longitudinal dispersion and stronger gravitational circulation are caused by increased inflows because they compress the salinity gradient and create a stronger longitudinal salinity gradient. Increasing bottom-generated turbulence and a stronger longitudinal salinity gradient are both indicators of stronger gravity circulation and bigger longitudinal dispersion, which are both correlated with rising sea levels (Chua et al. 2014). In the analyzed estuary mouth, it clearly appears that the increase in sea level rise causes a salinity gradient energy increase with residency time and a corresponding drop with flushing time.
For Residence Time, sea level rise of 0.3 m, 0.6 m, and 0.9 m, respectively, enhanced the extractable salinity energy by 5-17%. In the opposite direction, the flushing period reduces the energy of the salinity gradient for values of sea level rise by 3.4-11% (Haddout et al. 2021). For regional and state urban and agricultural water users who depend on water supplies that can be influenced by upstream salt intrusion, upstream salinity extent and delta salinity concentrations are important. For the calibration period from December 1 to December 2, 2000, the hydrodynamic model was run. Water levels, wind, and salinity at the water surface level were used as calibration parameters from December 1, 2000 to December 2, 2000, with a model spin-up duration of one day. Due of the significant regional hydrologic variability and the widespread availability of hydrodynamics and water-quality observations throughout the Bay-Delta, the current time period was selected.  The study provides an overview of the importance of San Francisco Bay Estuary. It introduces the need for hydrodynamic modeling and salinity gradient analysis to understand the estuarine dynamics. The paper covers a review of hydrodynamic modeling approaches used in the estuary, including numerical model. It also examines the various techniques and measurements employed to analyze salinity gradients and their implications for the estuarine ecosystem. By presenting the state of knowledge and recommending future research directions.

STUDY AREA AND DATA COLLECTION
San Francisco Bay is a large estuary located on the west coast of the United States, in the state of California (Figure 2). It is surrounded by several major cities, including San Francisco, Oakland, and San Jose, and is connected to the Pacific Ocean through the Golden Gate strait. The bay covers an area of around 400 square miles (1,040 square kilometers) and is known for its iconic landmarks, such as the Golden Gate Bridge and Alcatraz Island. It is also a major hub for shipping, with numerous ports and terminals located along its shores. The region is also surrounded by natural beauty, including the redwood forests to the north and the scenic coastline to the west.
Hourly wind force from the website weather underground drives the model. At the Pacific Ocean boundary, a salinity condition with daily variations had taken effect. The model creates a spatially interpolated representation of the surface with initially salinity conditions that are regionally variable and based on historical observations taken across the Bay-Delta. a temperature measurement along a border that changes over time. Data of surface water elevation were recorded by NOAA PORTS program.

Numerical Model
MIKE 21 is a numerical modeling software developed by DHI for simulating hydrodynamic and water quality processes in surface waters. The governing equations used in MIKE 21 are based on the Navier-Stokes equations, which describe the motion of fluids in terms of velocity, pressure, and density. The Navier-Stokes equations are a set of partial differential equations that are difficult to solve analytically. Therefore, numerical methods are used to solve these equations in MIKE 21. MIKE 21 uses a finite difference method to discretize the equations in time and space. In addition to the Navier-Stokes equations, MIKE 21 also includes other equations that describe specific processes such as advection, diffusion, and surface waves.

Governing Equations
Continuity equation: where: p, q stands for unit-width discharge in the x and y directions (m/s); d is for still water depth; h = + d is surface height; Chezy's coefficient (C), wind resistance coefficient (f), wind speed (V), current velocity ( , ) in the x and y directions (m/s), Coriolis parameter ( ), atmospheric pressure ( ), and effective shear stress ( , , ) in the various directions are all included.
MIKE 21 AD (advection -dispersion module), which solves the so-called advection-dispersion equation for dissolved or suspended substances in two dimensions (this is actually the mass-conservation equations), was used to simulate salinity variation:

Boundary Conditions
Setting up an unstructured Bay Delta model grid including the San Francisco Bay and Delta from Point Reyes at the ocean's edge to Sacramento in the north and close to Mossdale in the southeast. We have done the study in 2D, so the average depth was taken over all borders, and the value was equal to 10 m (Figure 3). The model is driven by hourly water levels recorded by NOAA PORTS program (Figure 4), as well as by the hourly inflows of freshwater on the northern and eastern boundaries. Freshwater exports have been established as hourly flows throughout the Delta.

RESULTS
Root Mean Square Error RMSE, Standard Objective Function NOF and Absolute Mean Error AME were calculated for the water depths with a change of Manning coefficient ( Table 1). The validation was performed using the data related to water level and salinity. Then, a comparison was made between the input data and the output results from the program. When comparing the data entered into a program with the data output for water depth, tables containing error rates can provide valuable insights into the accuracy of the program's predictions. These tables allow for a systematic assessment of the model's performance by quantifying the error between the entered and outputted water depth values. The error rates for water depth fall within the permissible range when using the Manning number with a value of 40 1 3 ⁄ / , it indicates that the program or model is producing accurate results as in (Table  2). When comparing the data entered into a program with the data output for both water depth and salinity through verification, tables containing error rates can provide valuable insights into the accuracy of the program's predictions. These tables allow for a systematic assessment of the model's performance by quantifying the error between the entered and outputted values as in (Table 3).   Observed Simulated differences or similarities between the two datasets for salinity. This allows for a quick and intuitive understanding of the program's performance in reproducing salinity values ( Figure  5). This figure can also be used to identify trends, spatial patterns, or temporal variations in salinity. It allows for a comprehensive visual analysis, enabling researchers, modelers, and stakeholders to evaluate the model's capability to capture salinity dynamics accurately.

CONCLUSIONS
A calibration was made for the Mike 21 program, using data for the San Francisco Bay area, using data related to the water level, where the Manning number was changed, compared to the measured data and the data output from the program. The root mean square error RMSE, normalized objective function NOF, and absolute mean error AME of water depths were calculated with the change of the coefficient until the lowest permissible error rate was reached when using the Manning number with a value of 40 1 3 ⁄ / . After that, a verification was done using data related to the water level and salinity. After that, a comparison was made between the input data and the output results from the program, calculating the error percentage, and it was within the permissible limits. Thus, the process of calibration and verification of the Mike 21 program was completed. Provide recommendations for future studies aimed at improving our understanding of hydrodynamics and salinity gradients in San Francisco Bay Estuary.
These may include: Assess the potential impacts of climate change on the hydrodynamics and salinity gradients in the estuary. Incorporate future climate change scenarios into modeling efforts to predict the long-term effects on the estuarine ecosystem and inform adaptive management strategies. Encourage interdisciplinary collaborations among researchers, agencies, and stakeholders to facilitate data sharing and integration of expertise. This will enhance the quality and applicability of hydrodynamic models and salinity gradient analysis. Establish long-term monitoring programs to collect continuous data on hydrodynamics, salinity, and other relevant parameters. This will provide a robust dataset for model validation and improve our understanding of the estuary.

Funding:
The authors state that this research has not received any type of funding.

Conflicts of Interest:
The authors should explicitly declare if there is no conflict of interest.