Coastal and estuarine wetlands are hotspots for sequestering carbon and nitrogen, but Earth system models that simulate global biogeochemical cycles have limited capabilities to represent ecosystem processes at terrestrial aquatic interfaces. A first step in improving representation of coastal and estuarine wetlands is to incorporate plant responses to fluctuating salinity and water levels, two unique drivers in these ecosystems. We developed a salinity response function in the Energy Exascale Earth System Model (E3SM) Land Model (ELM) that can be set for each plant functional type, allowing for representation of varying plant tolerances to salinity. Model simulations were compared to data from a high marsh and a low marsh at the Plum Island Ecosystems Long Term Ecological Research site, Massachusetts. The two marshes differ in inundation and salinity regimes, allowing us to investigate how well our salinity response function controls CO2 uptake and exchange at different vegetative zones in the marsh. We drove the model using site measurements of water level and salinity fluctuations and compared simulated C fluxes with eddy covariance flux measurements from high and low marsh sites. Prior to adding site-specific hydrology and a vegetation salinity response, ELM overestimated gross primary productivity by 2x. By incorporating a salinity response to the plant functional types in the model and defining the site-specific tidal hydrology, we reduced the model’s estimates of gross primary productivity and net ecosystem exchange. Because sea level rise is expected to increase saltwater intrusion in many estuaries and coastal ecosystems, being able to represent wetland vegetation responses to changing salinity will be critical for understanding changes in carbon uptake and storage in coastal wetlands.