Skip to content

Commit

Permalink
fix code styling with pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Min-Seop Ahn committed Jul 18, 2022
1 parent 890f34d commit 5b823f4
Show file tree
Hide file tree
Showing 8 changed files with 154 additions and 153 deletions.
2 changes: 1 addition & 1 deletion pcmdi_metrics/precip_distribution/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ Reference: Ahn, M.-S., P. A. Ullrich, P. J. Gleckler, J. Lee, A. C. Ordonez, A.
- `scripts_pcmdi/`
- `run_obs.bash`
- `run_parallel.wait.bash`

14 changes: 7 additions & 7 deletions pcmdi_metrics/precip_distribution/lib/__init__.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
from .argparse_functions import AddParserArgument # noqa
from .lib_precip_distribution import ( # noqa
precip_distribution_frq_amt,
precip_distribution_cum,
Regrid,
getDailyCalendarMonth,
CalcBinStructure,
MakeDists,
CalcRainMetrics,
precip_distribution_frq_amt,
precip_distribution_cum,
Regrid,
getDailyCalendarMonth,
CalcBinStructure,
MakeDists,
CalcRainMetrics,
CalcMetricsDomain,
CalcMetricsDomain3Clust,
CalcMetricsDomainAR6,
Expand Down
268 changes: 134 additions & 134 deletions pcmdi_metrics/precip_distribution/lib/lib_precip_distribution.py

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
dat = "IMERG"
var = "pr"
frq = "day"
ver = "v20220709"
ver = "v20220702"
# ver = "v20220709"

# prd = [2001, 2019] # analysis period
prd = [2001, 2020] # analysis period
Expand Down Expand Up @@ -40,5 +41,5 @@


ref = "IMERG" # For Perkins socre, P10, and P90
ref_dir = os.path.join(
ref_dir = os.path.join(
pmpdir, '%(output_type)', "obs", '%(case_id)')
10 changes: 5 additions & 5 deletions pcmdi_metrics/precip_distribution/precip_distribution_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@
except FileExistsError:
pass
print(outdir(output_type=output_type))
# Create input file list

# Create input file list
file_list = sorted(glob.glob(os.path.join(modpath, "*" + mod + "*")))
data = []
for file in file_list:
Expand Down Expand Up @@ -89,10 +89,10 @@
else:
drg = MV.concatenate((drg, rgtmp))
print(iyr, drg.shape)
# Calculate metrics from precipitation frequency and amount distributions

# Calculate metrics from precipitation frequency and amount distributions
precip_distribution_frq_amt(dat, drg, syr, eyr, res, outdir, ref, refdir, cmec)

# Calculate metrics from precipitation cumulative distributions
precip_distribution_cum(dat, drg, cal, syr, eyr, res, outdir, cmec)

Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
log_list.append('log_'+file+'_'+str(round(360/res[0]))+'x'+str(round(180/res[1])))
print(cmd_list[ifl])
print('Number of data: '+str(len(cmd_list)))

parallel_submitter(
cmd_list,
log_dir='./log',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
log_list.append('log_'+file+'_'+str(round(360/res[0]))+'x'+str(round(180/res[1])))
print(cmd_list[ifl])
print('Number of data: '+str(len(cmd_list)))

parallel_submitter(
cmd_list,
log_dir='./log',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
mkdir ./log
nohup python -u parallel_driver_cmip5.py > ./log/log_parallel.wait_cmip5 &
wait
nohup python -u parallel_driver_cmip6.py > ./log/log_parallel.wait_cmip6 &
#wait
#nohup python -u parallel_driver_cmip6.py > ./log/log_parallel.wait_cmip6 &

0 comments on commit 5b823f4

Please sign in to comment.