Introduction
This guide uses the code located in /data4/home/syzhang/gud-dev/verification/global_18km (hereafter referred to as the “example path”) as an example. It is based solely on my personal understanding of the model, and any corrections are welcome.
Code Section
- Newly added files:
RIVER.h,river_fields_load.F,river_readparms.F - Modified files:
gud_model.F,gud_forcing.F. Note thatgud_model.Fis called withingud_forcing.F. - RIVER.h: Declares variables representing river inputs and the river input file.
rvr0andrvr1represent the values for the “previous month” and “next month,” respectively, used for interpolation. - river_fields_load.F & river_readparms.F & gud_forcing.F: Replace the substances in these two files from the example path with the substances you need.
- gud_model.F: Make replacements as necessary. However, note that the part adding river nutrient inputs to the calculations should be removed and replaced with the calculations for other substances. This part appears around line 750.
Data Section
- If the river input file is in
.txtformat, you can refer todata/2050/river_input_2050.m. The only part that needs modification is theread filesection. Before reading the river input data file, ensure that the inputs for inland rivers are set to 0. The loopfor iriver=1:nriveradds the river inputs to the grid points. The three final loops account for the variations in river runoff throughout the year. - If the river input file is in
.csvformat, you can refer todata/2000/river_input_2000.m. - The overall runtime of the code is quite long, so it is recommended to save the
.matfile with the variables already run during the debugging phase. This will prevent the need to rerun everything from the beginning.
Run Section
- Newly added file:
data.river, which declares the file path of the river input file.
Recent Comments