There are three R scripts accompanying the paper. The larval_size_animal_model.R script uses a mixed effects model to analyze phenotypic variation and attribute shared variation to various sources, including additive genetic variance, maternal effects, block-to-block variation, and residual (within-block) variance. Additive genetic variance is quantified by examining the phenotypic covariance among close relatives (e.g., full sibs vs. maternal half sibs vs. paternal half sibs). Relationships are tracked in the pedigree file. The selection_via_ocean_acidification.R file is the code used to run the stastical analyses of fecundity selection (relationship between offspring size and number), viability selection (relationship between offspring size and survival under both ambient and OA conditions), and their combined effects on maternal fitness. The Evolution_of_larval_size_under_OA.R is a simulation model projecting the effects of ocean acidifcation (i.e., the incremental change in pCO2 and temperature) on populations of California Grunion. Effects on reproductive success are explored under two scenarios: one with an evolutionary response, and one without. Projections are made over a period of 81 years / 27 generations of California Grunion) and are based on data collected in this study.