Update GEOS Chem matching step to reflect xarray updates #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No major changes were required. Most of the differences are just reformatting from python's "black" formatter. I changed three lines of code between the two python files -- all related to how xarray is passed multiple files or a glob. There have been some minor updates in xarray the way things were written no longer works. I also updated the link to the paper and added a conda environment file.
I was able to run the matching step using
WOMBAT_MAX_WORKERS=8 make -j2 2_matching_targets
for a subset of 5 runs. Here's the output:python3 2_matching/src/subset-geos-chem.py
--meteorology-run 1_transport/intermediates/GEOS_Chem/runs/run.v12.3.2.base
--oco2-observations data/OCO2_b70b_10sec_WL15_GOOD_v10.nc
--tccon-observation-directory data/TCCON/20170706
--runs-directory 1_transport/intermediates/GEOS_Chem/runs
--output-directory 2_matching/intermediates/GEOS_Chem/matched-runs
python3 2_matching/src/aggregate-flux-geos-chem.py
--runs-directory 1_transport/intermediates/GEOS_Chem/runs
--output-directory 2_matching/intermediates/GEOS_Chem/matched-runs
[INFO] [2022-05-12 14:37:22,570] [run.v12.3.2.base] Creating output path
[INFO] [2022-05-12 14:37:22,574] [run.v12.3.2.base] Loading 87 files
[INFO] [2022-05-12 14:37:23,492] [run.v12.3.2.base] Computing monthly fluxes
warning: refname 'HEAD' is ambiguous.
[INFO] [2022-05-12 14:37:24,845] [run.v12.3.2.base] Saving results
[INFO] [2022-05-12 14:37:38,350] Running with 8 workers
[INFO] [2022-05-12 14:37:38,361] [run.v12.3.2.base] Creating output path
warning: refname 'HEAD' is ambiguous.
[INFO] [2022-05-12 14:37:38,380] [run.v12.3.2.base] Subsetting for hourly OCO-2
[INFO] [2022-05-12 14:41:05,788] [run.v12.3.2.base] Done
touch 2_matching/intermediates/GEOS_Chem/matched-runs/LAST_FLUX_AGGREGATED
[INFO] [2022-05-12 14:48:24,372] [run.v12.3.2.base] Subsetting for daily OCO-2
[INFO] [2022-05-12 14:48:42,715] [run.v12.3.2.base] Subsetting for hourly TCCON
[INFO] [2022-05-12 14:57:16,664] [run.v12.3.2.base] Subsetting for daily TCCON
[INFO] [2022-05-12 14:57:23,376] [run.v12.3.2.base] Subsetting for ObsPack
touch 2_matching/intermediates/GEOS_Chem/matched-runs/LAST_SUBSETTED
Rscript 2_matching/src/compute-xco2-geos-chem.R
--oco2-observations data/OCO2_b70b_10sec_WL15_GOOD_v10.nc
--tccon-observation-directory data/TCCON/20170706
--matched-runs-directory 2_matching/intermediates/GEOS_Chem/matched-runs
Warning message:
replacing previous import ‘Matrix::update’ by ‘stats::update’ when loading ‘wombat’
INFO [2022-05-12 14:58:31] Loading OCO-2 observations
INFO [2022-05-12 14:58:33] Loading TCCON observations
INFO [2022-05-12 14:58:48] Processing 1 runs
INFO [2022-05-12 14:58:48] Processing run.v12.3.2.base
warning: refname 'HEAD' is ambiguous.
warning: refname 'HEAD' is ambiguous.
warning: refname 'HEAD' is ambiguous.
warning: refname 'HEAD' is ambiguous.
INFO [2022-05-12 14:59:24] Done
touch 2_matching/intermediates/GEOS_Chem/matched-runs/LAST_COMPUTED_XCO2
Rscript 2_matching/src/combine-geos-chem.R
--matched-runs-directory 2_matching/intermediates/GEOS_Chem/matched-runs
Warning message:
replacing previous import ‘Matrix::update’ by ‘stats::update’ when loading ‘wombat’
INFO [2022-05-12 14:59:27] Processing 1 runs
INFO [2022-05-12 14:59:27] Processing run.v12.3.2.base
warning: refname 'HEAD' is ambiguous.
INFO [2022-05-12 15:00:27] Done
touch 2_matching/intermediates/GEOS_Chem/matched-runs/LAST_COMBINED
I also see the following files have been created in
2_matching/intermediates