Introduction

This document is based on the code located in /data4/home/syzhang/gud-dev/verification/global_18km (hereafter referred to as the “example path”) and provides an explanation and usage guidance for the model. The content is based solely on my personal understanding of the model, and if there are any inaccuracies, corrections are welcome.

Model introduction

Since the river nutrient discharge data is only available for the years 1970, 2000, and 2050, this study simulates the impacts of these three discharge scenarios. The nutrients used in this study include: DIN, DIP, DON, DOP, DOC, DSI, POC, PON, and POP. The 2000 data includes all nine nutrients, whereas the 1970 and 2050 data only include the first six. So far, the microbial parameters that show a more significant response to changes in nutrient levels are diatoms, flagellates, and chlorophyll. Due to model limitations, it is currently only possible to simulate one year of results. For a detailed introduction to the GUD model, please refer to:

https://dataverse.harvard.edu/dataverse/gud-diversity

Code introduction

In the working directory, the commonly used folders are build, run (e.g., run_2000), code, data, and pic. A brief introduction to each of these folders is provided below.

build

The build folder contains the compiled code. The files related to river discharge are river_fields_load.F and river_readparms.F. If errors occur after modifying the code, you can try adjusting these two files to troubleshoot.

run

  • The run folder contains the files for running the model. In the example path, the three emission scenarios are run in three separate folders (run_1970, run_2000, run_2050, and run_ori). The run_ori folder contains the results without any river discharge. If you want to examine the impact of emissions for a specific year, you need to subtract the results in run_orifrom the results for that year. The run_basic folder contains the essential files needed to run the model, without the actual simulation results.The data folder contains the basic parameters required for running the model. The parameters that usually need adjustment are the Time Stepping Parameters. nTimeSteps represents the total simulation time, while taveFreq is the output frequency. For more detailed explanations, please refer to:http://47.110.237.248/wiki/index.php/MITgcm_%E9%AB%98%E5%88%86%E8%BE%A8%E7%8E%87%E6%A8%A1%E5%9E%8B_%E8%BF%90%E8%A1%8C%E6%95%99%E7%A8%8B

In data.ptracers, you can find the actual meaning of each tracer by its corresponding number. Microbial tracers numbered 21-71 can be found in lines 143-146 of data.gud, where grp_nplank specifies the number of subdivisions for different types of microorganisms. For example, if the value for zoo is 16, then tracers 56-71 correspond to zooplankton.

In data.river, the file path for reading river discharge data is specified.

  • Since running high-resolution models can be very slow, sometimes it’s necessary to continue from existing results. For example, to continue running from timestep 87660, set the following in the data file: pickupStrictlyMatch=.true. and pickupSuff='0000087660'. In the run folder, rename the files starting with “pickup”. Using pickup_ptracers as an example, first check the pickup_ptracers.ckptB.meta file to verify if timeStepNumber is 87660. If it is, rename the files to pickup_ptracers.0000087660.data and pickup_ptracers.0000087660.meta. Finally, in the data file, set nIter0=87660, and in data.ptracers, set PTRACERS_Iter0=87660. The same applies to pickup_gud and pickup.

code

  • The gud* files are newly added files, while the river* files are related to river discharge. These files generally do not need to be modified during regular model runs.

data

  • In the 1970, 2000, and 2050 folders, the river discharge data for the three emission scenarios is processed and stored separately. For example, river_input_1970.m is used to convert the data from the text files into binary (.bin) format.

pic

The pic folder is used for plotting figures. The files and directories necessary for plotting include core*, cs510...map, hFacC.meta, MITgcmutils, _pycache_, and sparsemap*.

mapcs510_f.py: This Python file converts the model results into a format that can be read by MATLAB. When using it for plotting, you only need to modify the code after line 60.

ori, 1970, 2000, 2050: These folders store the .mat files generated by mapcs510_f.py.

draw_tracer_log.m: This is the final plotting script, which displays the results in logarithmic form. When using it, you need to modify the tracer in line 7 and the years in lines 121-130. You may also need to adjust the axis limits in lines 74 and 93. Since plotting is slow, it is recommended not to generate more than five plots at a time.