Skip to content

Commit

Permalink
coarse grain cells below 85 degrees south by five additional times
Browse files Browse the repository at this point in the history
this is because the resolution at the South Pole is high.
  • Loading branch information
ray-chew committed Jun 18, 2024
1 parent 53b4831 commit 46fcc26
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 3 additions & 3 deletions runs/icon_merit_global.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,6 @@ def parallel_wrapper(grid, params, reader, writer):
from pycsam.inputs.icon_global_run import params

from dask.distributed import Client
# from dask.diagnostics import ProgressBar
# import dask.bag as db
import dask

Expand Down Expand Up @@ -242,8 +241,9 @@ def parallel_wrapper(grid, params, reader, writer):

print(n_cells)

chunk_sz = 50
for chunk in range(0, n_cells, chunk_sz):
chunk_sz = 100
chunk_start = 0
for chunk in range(chunk_start, n_cells, chunk_sz):
# writer object
sfx = "_" + str(chunk+chunk_sz)
writer = io.nc_writer(params, sfx)
Expand Down
4 changes: 4 additions & 0 deletions src/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,9 @@ def __load_topo(self, cell, fns, dirs, lon_cnt, lat_cnt, lat_idx_rng, lon_idx_r

iint = self.merit_cg

if max(cell.lat) < -85.0:
iint *= 5

cell.lat = utils.sliding_window_view(
np.sort(cell.lat), (iint,), (iint,)
).mean(axis=-1)
Expand Down Expand Up @@ -777,6 +780,7 @@ def __init__(self, params, sfx=""):
if self.fn[-3:] != ".nc":
self.fn += '.nc'

self.fn = 'datasets/' + self.fn
self.path = params.path_output
self.rect_set = params.rect_set
self.debug = params.debug_writer
Expand Down

0 comments on commit 46fcc26

Please sign in to comment.