ua-snap / cmip6-utils

Pipelines and utilites for working with CMIP6 data
0 stars 1 forks source link

Add variable choice #46

Closed Joshdpaul closed 3 months ago

Joshdpaul commented 3 months ago

This PR adds a vars argument to generate_batch_files.py and run_generate_batch_files.py. There is a corresponding PR for the var_choice branch in the prefect repo.

The generate_batch_files.py script now iterates thru a list of variables while searching for *.nc files in the CMIP6 directory. This process is done before the read_grids() function and therefore filters out unwanted variables before touching the files.

TO TEST:

Run the regridding Prefect flow as usual, using the var_choice branch in the prefect repo and specifying the var_choice branch of this repo in the Prefect run. Using the new {vars} parameter input, try:

In both tests, run the flow up until the batch files have been generated. At that point you can cancel the flow and check out a random subset of the batch files to make sure you don't see any other variables in the batches. Be sure to delete batch files between tests!