Skip to content

Commit 168bf13

Browse files
committed
Update README; add full description and example to prediction script headings
1 parent 94901cd commit 168bf13

File tree

3 files changed

+43
-16
lines changed

3 files changed

+43
-16
lines changed

03_prediction/cokriging.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
1-
# Produce cokriging predictions at all land-based 0.05-degree grid cells in North American
2-
# domain for the specified month
1+
"""
2+
Produce cokriging predictions at all land-based 0.05-degree grid cells in the North American
3+
domain for a specified month.
4+
5+
This script should be run from the command line as in the following example:
6+
```
7+
conda activate cosif
8+
cd 03_prediction
9+
python cokriging.py 202107
10+
```
11+
where the string `202107` indicates that predictions and prediction standard errors
12+
will be produced for July 2021.
13+
14+
NOTE: This is a long-running processes that can take several hours to one day of compute
15+
time on a 64-core server.
16+
"""
317

418
import sys
519

03_prediction/kriging.py

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
1-
# Produce kriging predictions at all land-based 0.05-degree grid cells in North American
2-
# domain for the specified month
1+
"""
2+
Produce kriging predictions at all land-based 0.05-degree grid cells in the North American
3+
domain for a specified month.
4+
5+
This script should be run from the command line as in the following example:
6+
```
7+
conda activate cosif
8+
cd 03_prediction
9+
python kriging.py 202107
10+
```
11+
where the string `202107` indicates that predictions and prediction standard errors
12+
will be produced for July 2021.
13+
14+
NOTE: This is a long-running processes that can take several hours to one day of compute
15+
time on a 64-core server.
16+
"""
17+
318

419
import sys
520

README.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,13 @@
44

55
This repository contains code to reproduce the results in the paper:
66

7-
> Jacobson, J., Cressie, N., Zammit-Mangion, A. (n.d.) Spatial statistical prediction of solar-induced chlorophyll fluorescence (SIF) from multivariate OCO-2 data. Under review in *Remote Sensing*.
7+
> Jacobson, J., Cressie, N., Zammit-Mangion, A. (n.d.) Spatial statistical prediction of solar-induced chlorophyll fluorescence (SIF) from multivariate OCO-2 data. Submitted to *Remote Sensing*.
88
99
Unless stated otherwise, all commands are to be run in the root directory of the repository.
1010

11-
The resulting *coSIF* data product for February, April, July, and October 2021 are available here: https://doi.org/10.5281/zenodo.8078592
11+
The resulting *coSIF* data product for February, April, July, and October 2021 is available at: https://doi.org/10.5281/zenodo.8078592
1212

13-
A supplementary dataset of all fitted model parameters is available here: https://doi.org/10.5281/zenodo.8078560
14-
15-
TODO: Add graphical abstract here.
13+
A supplementary dataset of all fitted model parameters is available at: https://doi.org/10.5281/zenodo.8078560
1614

1715
## Installation and setup
1816

@@ -62,23 +60,23 @@ The Terra and Aqua combined Moderate Resolution Imaging Spectroradiometer (MODIS
6260

6361
In an initial exploratory data analysis (EDA) step, we create a bivariate time series (Figure 1) from monthly, gridded SIF and XCO2 data. This analysis is isolated in the directory `00_eda`. Note that all of the version 10r Lite files are needed for this step (see above).
6462

65-
There are four main steps in our multivariate spatial-statistical-prediction framework, corresponding to four numbered directories. These are:
63+
There are four main steps in our multivariate spatial-statistical-prediction framework, corresponding to four numbered directories. These are:
6664

6765
1. `01_data_preparation`: Numbered files are to be run in order. Notebooks create the land-cover binary mask; collect and format all daily OCO-2 Lite files into a single NetCDF file for daily, spatially irregular SIF and a single NetCDF file for daily, spatially irregular XCO2; group SIF and XCO2 datasets by month and compute an average for each 0.05-degree CMG grid cell; an R script evaluates bisquare basis functions for all CMG grid cells; a final notebook combines gridded SIF, XCO2, and basis-function datasets into a single NetCDF file.
68-
2. `02_modeling`: For each of February, April, July, and October 2021, notebooks compute empirical (cross-) semivariograms from the gridded SIF and XCO2 data (one month later), and fit modeled (cross-) semivariograms.
69-
3. `03_prediction`: Scripts for producing the coSIF data product in a specified month. For example, if using cokriging, run
66+
2. `02_modeling`: For each of February, April, July, and October 2021, notebooks compute empirical (cross-) semivariograms from the gridded SIF and XCO2 data (one month later), and fit modeled (cross-) semivariograms. Each notebook takes around 10 minutes to run, and can be run on a laptop.
67+
3. `03_prediction`: For each of February, April, July, and October 2021, the predictions and prediction standard errors required for the coSIF data product are produced by running either `cokriging.py` or `kriging.py` from the command line and specifying the year-month string as an argument. For example, to use cokriging in July 2021, run
7068
```
7169
conda activate cosif
7270
cd 03_prediction
7371
python cokriging.py 202107
7472
```
75-
or, if using kriging, run
73+
Or, to use kriging in October 2021, run
7674
```
7775
conda activate cosif
7876
cd 03_prediction
79-
python kriging.py 202102
77+
python kriging.py 202110
8078
```
81-
Note that these are long-running processes; it is advised that they be executed in a [screen session](https://linuxize.com/post/how-to-use-linux-screen/) to avoid issues with interruption.
82-
4. `04_validation`: For each of February, April, July, and October 2021, one notebook produces validation predictions for the Corn Belt validation block (b1) and one notebook produces validation predictions for the Cropland validation block (b2). Metrics and scores used to summarize the validation predictions are then collected in `collect_validation_results.ipynb`.
79+
Note that these are long-running processes that can take several hours to one day of compute time on a 64-core server. It is advised that they be executed in a [screen session](https://linuxize.com/post/how-to-use-linux-screen/) to avoid issues with interruption. Once the predictions and prediction standard errors have been produced for each month, the coSIF data product is collected and formatted in `collect_coSIF_datasets.ipynb`.
80+
4. `04_validation`: For each of February, April, July, and October 2021, one notebook produces validation predictions for the Corn Belt validation block (b1) and one notebook produces validation predictions for the Cropland validation block (b2). Each notebook can take around 30 minutes to run on a 64-core server. Metrics used to summarize the validation predictions are then collected in `collect_validation_results.ipynb`.
8381
8482
NOTE: ensure that all notebooks are run using the `cosif` conda environment.

0 commit comments

Comments
 (0)