DOI: 10.5061/dryad.qrfj6q5vz
title: Long-term reorganization of ocean nutrient distribution

description: Oceans rely on nutrients like nitrate and phosphate to support the growth
 of phytoplankton and marine productivity. Using nearly a century of global
 ocean data, this study shows that nutrients are changing in different ways
 depending on location. This entry contains scripts needed for data
 analysis presented in this manuscript, as well as the nutrient data files.
 The data analysis consists of four parts: (i) preprocessing, (ii)
 estimating long-term surface nutrient trends, (iii) estimating vertical
 trends and their significance, and (iv) analysis of CMIP6 data. The data
 consists of the pre-processed World Ocean Database observations.
description: All analyses are done using Matlab (v2023a). There are four
 groups of scripts. Group 1 consists of scripts to preprocess World Ocean
 Database observations. These are not needed as the shared data files
 (TwodN.csv and TwodP.csv) have all needed information. Group 2 consists of
 scripts required to estimate the long-term surface nutrient trends using
 different approaches. The key script is
 ‘regression_anomaly_wRandom_function.m’ as it describes the various
 regression approaches. Group 3 consists of scripts required to estimate
 the vertical profile trends and associated significance.
 ‘random_longterm_depth_parallel.m’ randomizes the observation along the
 temporal axis and estimates the randomized trends.
 ‘regression_anomaly_depth_top30.m’ estimate the vertical trend profile for
 Figure 3. ‘AutoEnconder_LongTerm.m’ uses an AutoEncoder to ‘learn’ the
 unsupervised profile of the randomized profiles and compared to the
 observed. Group 4 consists of scripts needed for processing CMIP6 model
 outputs. It is assumed that you have already processed the raw data files
 into a standardized grid (lat, lon, depth, time). ‘CMIP_trend_analysis.m’
 calculates and the trends required for Figure 4 and
 ‘plot_trends_combined.m’ is used for plotting.
description: # Long-term reorganization of ocean nutrient distribution Dataset DOI:
 [10.5061/dryad.qrfj6q5vz](10.5061/dryad.qrfj6q5vz) ## Description of the
 data and file structure There are two data files, TwodN.csv and TwodP.csv,
 that contain all pre-processed observations from the World Ocean Database
 ### Files and variables #### File: Scripts_publication_v2.zip
 **Description:**  Collection of scripts for each analysis: 1.
 Preprocessing 2. Estimate long-term surface trend 3. Estimate vertical
 profile trends 4. Estimate nutrient dynamics in CMIP6 models ### File:
 TwodN.csv **Description:**  Fields: * LON (degrees E) * LAT (degrees N) *
 year (integer) * month (integer, 1-12) * Depthm (sampling depth, integer,
 unit:m) * BotDepthm (Bottom depth, integer, unit:m) * Nitratemmolkg
 (Nitrate conc. unit: mmol/kg) * idx (unique 3D ocean grid cell) * N0
 (surface nitrate conc * unit: mmol/kg) * monthly_anomaly (Nitrate anomaly,
 unit: mmol/kg) * region2 (region id, integer) ### File: TwodP.csv
 **Description:**  Fields * LON (degrees E) * LAT (degrees N) * year
 (integer) * month (integer, 1-12) * Depthm (sampling depth, integer,
 unit:m) * BotDepthm (Bottom depth, integer, unit:m) * Phosphatemmolkg
 (Phosphate conc. unit: mmol/kg) * idx (unique 3D ocean grid cell) * N0
 (surface nitrate conc, unit: mmol/kg) * monthly_anomaly (Phosphate
 anomaly, unit: mmol/kg) * region2 (region id, integer). ## Code/software
 You need Matlab (Mathworks) to run the analyses ## Access information
 Other publicly accessible locations of the data: * NA Data was derived
 from the following sources: * World Ocean Database:
 [https://www.ncei.noaa.gov/products/world-ocean-database](https://www.ncei.noaa.gov/products/world-ocean-database)