Skip to content

Commit

Permalink
First commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
messiem committed Feb 17, 2023
1 parent 4a0f600 commit 7abb202
Show file tree
Hide file tree
Showing 24 changed files with 24,277 additions and 0 deletions.
51 changes: 51 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Source code for paper "Coastal upwelling drives ecosystem temporal variability from the surface to the abyssal seafloor" #

This toolbox contains the programs used to reproduce results and figures from Messié et al. (2023).
The programs are written for Matlab.

* * *

### Get started ###

See script:

start_sourcecode_ITS

(ITS stands for Integrated Time Series). Set the `community` variable to either surface, midwater, or benthos to reproduce results for each time series.
The code generates figures, saved in `outputs/`, reproducing results from Fig. 1, 2, 3, and 5 from the paper with 2 main differences. First, the code runs for a given community so figures are broken down by community instead of being combined as in the paper. Second, the figures are simplified versions of the paper figures, with Matlab native colorbars and functions. Please contact me if you want to be able to reproduce the exact same figures as in the paper.

### Description of functions ###

`its_load_taxa`: reads the csv file in `data/` for the requested community, and displays the time series
`its_load_upw`: reads the upwelling time series provided in `data/`
`its_compute_PCA`: computes Principal Component Analysis of the taxonomic time series
`its_compute_integration`: computes wind integration following Di Lorenzo and Ohman (2013, https://doi.org/10.1073/pnas.1218022110 )
`its_compute_adjusted_correlation`: compute Pearson correlations, and adjusted p-values following Pyper and Peterman (1998, https://doi.org/10.1139/f98-104 )
`its_agestructured_model`: returns the modeled density over time of a population characterized by a given natural mortality rate and forced by an input forcing function

### Description of data ###

**Taxonomic time series:**
`surface.csv`, `midwater.csv`, `benthos.csv`
Time series for each community on original time steps, except monthly for benthos (lines = time, columns = taxonomic groups).

**Upwelling time series:**
`upwelling_MontereyBay.csv`, `upwelling_PtConception.csv`
Daily time series of upwelling computed for the Monterey Bay and Point Conception regions, as explained in the paper. Primary sources of data are NDBC buoys [46042](https://www.ndbc.noaa.gov/station_history.php?station=46042) for Monterey Bay and [PTGC1](https://www.ndbc.noaa.gov/station_history.php?station=ptgc1) for Point Conception.


* * *

### Reference ###

Please refer this paper when using these scripts (PDF available upon request):

Messié, M., R.E. Sherlock, C.L. Huffard, J.T. Pennington, C.A. Choy, R.P. Michisaki, K. Gomes, F.P. Chavez, B.H. Robison, and K.L. Smith Jr (2023). **Coastal upwelling drives ecosystem temporal variability from the surface to the abyssal seafloor**. *Proceedings of the National Academy of Sciences*, in press.

* * *

### Contact ###

[email protected]

Do not hesitate to contact me if you cannot run the code in `start_sourcecode_ITS`, if you notice bugs, or if you need help implementing the code for a custom application.
57 changes: 57 additions & 0 deletions data/benthos.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
Counts per m^2,,Holothuroidea,Echinoidea,Holothuroidea,Holothuroidea,Ophiuroidea,Holothuroidea,Holothuroidea,Holothuroidea,Holothuroidea,Holothuroidea
year,month,Abyssocucumis abyssorum,Echinocrepis rostrata,Elpidia sp. A,Oneirophanta mutabilis,Ophiuroidea,Peniagone A complex,Peniagone B complex,Psychropotes longicauda,Scotoplanes globosa,Synallactes sp.
1989, 10,0.014,0.018,0.177,0.001,0.140,0.023,0.014,0.001,0.005,0.005
1990, 2,0.006,0.011,0.122,0.001,0.114,0.012,0.017,0.000,0.004,0.001
1990, 6,0.024,0.025,0.178,0.002,0.447,0.025,0.021,0.001,0.002,0.001
1991, 2,0.033,0.017,0.236,0.001,0.549,0.055,0.029,0.000,0.000,0.001
1991, 6,0.023,0.012,0.234,0.003,0.366,0.017,0.024,0.000,0.002,0.003
1991, 7,0.036,0.026,0.470,0.001,0.358,0.094,0.007,0.002,0.000,0.002
1991, 8,0.024,0.017,0.430,0.001,0.306,0.072,0.015,0.001,0.001,0.001
1991, 10,0.016,0.022,0.238,0.001,0.554,0.081,0.015,0.001,0.001,0.006
1992, 2,0.018,0.017,0.247,0.001,0.270,0.059,0.026,0.000,0.001,0.006
1992, 6,0.022,0.016,0.187,0.001,0.317,0.093,0.007,0.001,0.000,0.002
1992, 7,0.015,0.017,0.287,0.001,0.111,0.046,0.014,0.000,0.004,0.002
1992, 10,0.022,0.019,0.188,0.001,0.143,0.049,0.013,0.000,0.000,0.002
1993, 2,0.027,0.025,0.164,0.001,0.155,0.070,0.016,0.001,0.000,0.003
1993, 7,0.010,0.012,0.086,0.001,0.161,0.019,0.005,0.000,0.000,0.001
1993, 10,0.012,0.028,0.095,0.001,0.223,0.045,0.016,0.002,0.000,0.005
1994, 2,0.015,0.024,0.066,0.001,0.096,0.044,0.012,0.001,0.000,0.002
1994, 6,0.018,0.017,0.328,0.000,0.197,0.095,0.026,0.001,0.001,0.002
1994, 8,0.030,0.057,0.128,0.003,0.359,0.024,0.013,0.003,0.000,0.009
1994, 9,0.006,0.022,0.305,0.001,0.208,0.013,0.022,0.000,0.001,0.005
1994, 10,0.021,0.026,0.281,0.003,0.197,0.027,0.055,0.003,0.003,0.008
1995, 2,0.007,0.025,0.374,0.001,0.089,0.022,0.201,0.001,0.000,0.014
1995, 3,0.026,0.019,0.321,0.001,0.074,0.072,0.090,0.001,0.000,0.004
1995, 6,0.012,0.015,0.598,0.001,0.121,0.013,0.301,0.001,0.003,0.005
1995, 11,0.019,0.018,0.575,0.001,0.083,0.060,0.054,0.001,0.005,0.001
1996, 2,0.004,0.016,0.497,0.002,0.157,0.116,0.012,0.000,0.000,0.004
1996, 6,0.012,0.019,0.540,0.001,0.101,0.038,0.043,0.001,0.002,0.003
1996, 10,0.017,0.021,0.616,0.001,0.125,0.089,0.028,0.001,0.001,0.004
1998, 8,0.009,0.019,0.697,0.001,0.066,0.073,0.009,0.002,0.004,0.003
1998, 12,0.030,0.009,0.402,0.002,0.081,0.036,0.008,0.001,0.000,0.001
2001, 6,0.012,0.016,0.000,0.003,0.285,0.003,0.568,0.001,0.020,0.001
2002, 2,0.022,0.076,0.000,0.001,0.728,0.028,0.088,0.013,0.037,0.004
2002, 6,0.132,0.090,0.000,0.007,0.884,0.005,0.005,0.011,0.031,0.013
2002, 9,0.041,0.080,0.000,0.006,0.337,0.007,0.015,0.009,0.002,0.002
2003, 10,0.042,0.117,0.004,0.013,0.630,0.012,0.005,0.006,0.002,0.004
2004, 2,0.025,0.073,0.000,0.019,0.558,0.009,0.005,0.006,0.000,0.011
2004, 8,0.038,0.097,0.004,0.008,0.881,0.009,0.007,0.005,0.000,0.008
2004, 10,0.065,0.110,0.000,0.013,0.806,0.102,0.015,0.006,0.000,0.002
2006, 12,0.013,0.015,0.000,0.004,0.017,0.011,0.002,0.000,0.000,0.004
2007, 2,0.023,0.032,0.041,0.004,0.018,0.000,0.000,0.000,0.000,0.014
2007, 6,0.037,0.037,0.000,0.000,0.013,0.013,0.000,0.013,0.000,0.000
2007, 9,0.009,0.014,0.000,0.000,0.021,0.005,0.000,0.000,0.000,0.005
2009, 2,0.027,0.030,0.015,0.005,0.108,0.003,0.044,0.001,0.001,0.004
2011, 5,0.008,0.006,0.141,0.002,0.140,0.469,0.086,0.000,0.051,0.003
2011, 11,0.008,0.001,0.445,0.001,0.259,0.405,0.117,0.000,0.063,0.002
2012, 6,0.018,0.005,0.465,0.005,0.247,0.608,0.102,0.003,0.125,0.005
2012, 11,0.018,0.012,1.335,0.002,0.766,0.852,0.976,0.003,0.289,0.013
2013, 6,0.016,0.006,0.429,0.004,0.440,0.665,0.261,0.003,0.270,0.008
2014, 4,0.013,0.020,0.021,0.004,0.532,0.829,0.050,0.001,0.219,0.011
2014, 10,0.010,0.021,0.002,0.003,0.431,0.975,0.373,0.000,0.113,0.015
2015, 6,0.015,0.031,0.000,0.004,0.470,0.616,0.137,0.002,0.109,0.012
2015, 11,0.021,0.034,0.000,0.004,0.481,0.449,0.005,0.003,0.095,0.016
2016, 11,0.020,0.031,0.002,0.005,0.589,0.074,0.020,0.002,0.080,0.018
2017, 3,0.011,0.028,0.001,0.005,0.510,0.166,0.035,0.001,0.112,0.010
2017, 11,0.019,0.039,0.002,0.003,0.417,0.050,0.018,0.002,0.089,0.021
2018, 4,0.018,0.035,0.003,0.002,0.567,0.080,0.008,0.001,0.115,0.006
Loading

0 comments on commit 7abb202

Please sign in to comment.