Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pyicon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nils Brüggemann
pyicon
Commits
cc89806f
Commit
cc89806f
authored
3 weeks ago
by
Nils Brüggemann
Browse files
Options
Downloads
Patches
Plain Diff
config_ckdtree_r2b9_oce_r0004.py: Also deriving npz files for section ckdtree files.
parent
ccec512b
Branches
feature-ccrs
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
config_ckdtree/config_ckdtree_r2b9_oce_r0004.py
+56
-11
56 additions, 11 deletions
config_ckdtree/config_ckdtree_r2b9_oce_r0004.py
with
56 additions
and
11 deletions
config_ckdtree/config_ckdtree_r2b9_oce_r0004.py
+
56
−
11
View file @
cc89806f
import
numpy
as
np
from
netCDF4
import
Dataset
import
sys
,
os
from
importlib
import
reload
import
pyicon
as
pyic
reload
(
pyic
)
ts
=
pyic
.
timing
([
0
],
'
start
'
)
...
...
@@ -13,14 +10,14 @@ tgname = f'r2b9_oce_{rev}'
gname
=
f
'
OceanOnly_IcosSymmetric_4932m_rotatedZ37d_modified_srtm30_1min
'
path_tgrid
=
f
'
/pool/data/ICON/oes/input/
{
rev
}
/
{
gname
}
/
'
fname_tgrid
=
f
'
{
gname
}
.nc
'
path_ckdtree
=
f
'
/
mnt/lustre01/
work/mh0033/m300602/icon/grids/
{
tgname
}
/ckdtree/
'
path_ckdtree
=
f
'
/work/mh0033/m300602/icon/grids/
{
tgname
}
/ckdtree/
'
path_rgrid
=
path_ckdtree
+
'
rectgrids/
'
path_sections
=
path_ckdtree
+
'
sections/
'
all_grids
=
[
#
'global_1.0',
#
'global_0.3',
#
'global_0.1',
'
global_1.0
'
,
'
global_0.3
'
,
'
global_0.1
'
,
'
global_0.02
'
,
]
...
...
@@ -31,10 +28,9 @@ all_secs = [
'
170W_300pts
'
,
]
#all_grids = []
all_secs
=
[]
gnames
=
[
gname
]
load_cgrid
=
True
,
load_egrid
=
True
,
load_vgrid
=
True
,
if
not
os
.
path
.
exists
(
path_rgrid
):
os
.
makedirs
(
path_rgrid
)
...
...
@@ -44,6 +40,8 @@ fpath = f'{path_ckdtree}/../{tgname}_tgrid.nc'
if
not
os
.
path
.
exists
(
fpath
):
os
.
symlink
(
path_tgrid
+
fname_tgrid
,
fpath
)
gnames
=
[
gname
]
print
(
gnames
)
for
gname
in
gnames
:
ts
=
pyic
.
timing
(
ts
,
gname
)
print
(
gname
)
...
...
@@ -58,6 +56,10 @@ for gname in gnames:
sname
=
sname
,
gname
=
gname
,
tgname
=
tgname
,
load_cgrid
=
load_cgrid
,
load_egrid
=
load_egrid
,
load_vgrid
=
load_vgrid
,
save_as
=
'
both
'
,
)
sname
=
'
global_0.3
'
...
...
@@ -69,6 +71,10 @@ for gname in gnames:
sname
=
sname
,
gname
=
gname
,
tgname
=
tgname
,
load_cgrid
=
load_cgrid
,
load_egrid
=
load_egrid
,
load_vgrid
=
load_vgrid
,
save_as
=
'
both
'
,
)
sname
=
'
global_0.1
'
...
...
@@ -80,6 +86,10 @@ for gname in gnames:
sname
=
sname
,
gname
=
gname
,
tgname
=
tgname
,
load_cgrid
=
load_cgrid
,
load_egrid
=
load_egrid
,
load_vgrid
=
load_vgrid
,
save_as
=
'
both
'
,
)
sname
=
'
global_0.02
'
...
...
@@ -91,6 +101,25 @@ for gname in gnames:
sname
=
sname
,
gname
=
gname
,
tgname
=
tgname
,
load_cgrid
=
load_cgrid
,
load_egrid
=
load_egrid
,
load_vgrid
=
load_vgrid
,
save_as
=
'
both
'
,
)
sname
=
'
global_0.01
'
if
sname
in
all_grids
:
pyic
.
ckdtree_hgrid
(
lon_reg
=
[
-
180.
,
180.
],
lat_reg
=
[
-
90.
,
90.
],
res
=
0.01
,
fname_tgrid
=
fname_tgrid
,
path_tgrid
=
path_tgrid
,
path_ckdtree
=
path_rgrid
,
sname
=
sname
,
gname
=
gname
,
tgname
=
tgname
,
load_cgrid
=
load_cgrid
,
load_egrid
=
load_egrid
,
load_vgrid
=
load_vgrid
,
save_as
=
'
both
'
,
)
...
...
@@ -104,6 +133,10 @@ for gname in gnames:
sname
=
sname
,
gname
=
gname
,
tgname
=
tgname
,
load_cgrid
=
load_cgrid
,
load_egrid
=
load_egrid
,
load_vgrid
=
load_vgrid
,
save_as
=
'
both
'
,
)
sname
=
'
170W_200pts
'
...
...
@@ -115,6 +148,10 @@ for gname in gnames:
sname
=
sname
,
gname
=
gname
,
tgname
=
tgname
,
load_cgrid
=
load_cgrid
,
load_egrid
=
load_egrid
,
load_vgrid
=
load_vgrid
,
save_as
=
'
both
'
,
)
sname
=
'
30W_300pts
'
...
...
@@ -126,6 +163,10 @@ for gname in gnames:
sname
=
sname
,
gname
=
gname
,
tgname
=
tgname
,
load_cgrid
=
load_cgrid
,
load_egrid
=
load_egrid
,
load_vgrid
=
load_vgrid
,
save_as
=
'
both
'
,
)
sname
=
'
170W_300pts
'
...
...
@@ -137,6 +178,10 @@ for gname in gnames:
sname
=
sname
,
gname
=
gname
,
tgname
=
tgname
,
load_cgrid
=
load_cgrid
,
load_egrid
=
load_egrid
,
load_vgrid
=
load_vgrid
,
save_as
=
'
both
'
,
)
print
(
'
make_ckdtree.py: All done!
'
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment