Data product and code for: Spatiotemporal Distribution of Dissolved Inorganic Carbon in the Global Ocean Interior - Reconstructed through Machine Learning
收藏资源简介:
Data product and code for: Ehmen et al.: Spatiotemporal Distribution of Dissolved Inorganic Carbon in the Global Ocean Interior - Reconstructed through Machine Learning DIC_paper_code_Ehmen_et_al.zip contains a 15-fold ensemble of the predicted DIC fields, including the ensemble mean file. EN4_thickness_GEBCO.nc contains the scaling factors used in "plot_carbon_inventory_for_ensemble_2024-01-27.py" (see description below). DIC_paper_code_Ehmen_et_al.zip contains the python code used to generate products and figures. Prerequisites: Python running the modules tensorflow, shap, xarray, pandas and scipy. Plots additionally use matplotlib, cartopy, seaborn, statsmodels, gsw and cmocean. The main script used to generate reconstructions is “ResNet_DIC_2024-12-28.py” (for new training runs). Usage: Assign the correct directories in the function “create_directories” according to your own system. You won’t need the same if-statements for individual platforms and computers Download the most recent version of GLODAP and store it in the directory chosen in “create_directories”. Check if the filename is the same as used in “import_GLODAP_dataset”. Unless the GLODAP creators change their naming system of the columns, newer versions can be used instead of GLODAPv2.2023 Download the HOT, BATS and Drake Passage time series and ensure the filenames are the same as in “import_time_series_data”. Store them in the time series directory chosen in “create_directories”. This is optional and the time series prediction can be commented out. Download EN4 analysis files for the years you want and store them in the EN4 analysis directory chosen in “create_directories”. For the reconstruction to be created from all available EN4 analysis files, the variable prediction_to_file needs to be True, otherwise only a single time slice will be predicted (but not saved) for testing and plotting. For model-validation (optional): Store the synthetic dataset of NorESM/ECCO-Darwin values at GLODAP locations in the directory chosen in “create_directories”. For predicting the full model fields NorESM/ECCO-Darwin needs to be in a csv-style format (for use in pandas dataframes), i.e. the multi-dimensional data needs to be flattened. Store these altered csv-style files in the directory chosen in “create_directories” Once a reconstruction has been generated the following scripts found in the subdirectory “working_with_finished_reconstructions” can be used: ensemble_create_mean_and_std_2023-11-27.py: this creates an ensemble mean from ideally 15 ensemble members (number can be adjusted, if less reconstruction files are found than this number it is adjusted automatically). For DIC it also calculates the uncertainty following the method by Keppler et al. 2023. plot_carbon_inventory_for_ensemble_2024-01-27.py: plots the carbon inventory change for DIC from both ensemble mean and the individual ensemble members. The most important settings are the default. Other options include plotting the seasonal change, others are not supported in this version as they require additional files not supplied here. depth_slices_and_zonal_means_full_prediction_2024-07-05.py: creates several world maps for individual depths and zonal means for the Indian, Atlantic and Pacific Ocean. Hovmoeller_plots_from_predictions_2024-05-02.py: generates simplified Hovmöller plots from individual reconstructions. DIC_comparison_with_other_products_2024-06-27: interpolates and compares this product with climatologies and products from other studies. These need to be downloaded first. Products can be excluded if they are removed from the list “files_to_compare”.



