-
Notifications
You must be signed in to change notification settings - Fork 10
Cleanup _dsl fields #1052
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Cleanup _dsl fields #1052
Changes from all commits
Commits
Show all changes
119 commits
Select commit
Hold shift + click to select a range
cb8ebd2
wip.1 edgeidx, vertidx, exdist
jcanton cce95e9
update types
jcanton c98de73
shapes
jcanton 65a1980
wip update test_dycore_wrapper and serialbox
jcanton 2f6ed74
reshuffle
jcanton 1f621c3
Remove pg_edgeidx_dsl
havogt da31705
cleanup unused program
havogt 0a79e97
add description
havogt 9d91afb
fix return type annotation
havogt e14a063
remove some more...
havogt 97b5262
add missing file
havogt 16edab7
Merge branch 'main' into cleanup_dsl_fields
jcanton d2e5192
Merge branch 'main' into cleanup_pg_edgeidx_dsl
havogt ba7c252
fix xp
jcanton ca49be9
Merge branch 'cleanup_pg_edgeidx_dsl' into cleanup_dsl_fields
jcanton d81eb59
finish merge and one review comment
jcanton da2408e
list2field @havogt
jcanton c224614
update call
jcanton 2515d9c
one more review
jcanton 3d20731
move here
jcanton 77e2604
partial cleanup
jcanton 3643a0e
move here and make nice
jcanton 9956a3b
unify names
jcanton 8922a9f
move these to common
jcanton 0aa5d36
cleanup
jcanton fdeaab9
pre-commit
jcanton f805327
even fortran can do this..
jcanton a6f88c0
Merge branch 'cleanup_mask_hdiff' into cleanup_dsl_fields
jcanton ed1d32b
wip on more fields
jcanton 216428b
fix unit test
jcanton 33058f9
fix this
jcanton 8f372bc
remove this
jcanton 21829df
Merge branch 'cleanup_mask_hdiff' into cleanup_dsl_fields
jcanton fca66e3
cleanup zd_diffcoef_dsl name
jcanton 4ea7c24
will this work?
jcanton 24007f7
remove more _dsl names
jcanton 700b13b
precommit
jcanton 7935f41
fix domains and maybe finish zd_ fields
jcanton 5b6cd8e
possibly large cleanup
jcanton a80f357
Update model/common/src/icon4py/model/common/metrics/metric_fields.py
jcanton 1f7596c
Update model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/so…
jcanton 0f4c50c
cleanup input arg
jcanton 51bf63f
fix tools tests
jcanton 42499a7
better this way
jcanton 3c17625
pre-commit
jcanton f7f4493
this is used in the halo only
jcanton b4ecc4a
remove import
jcanton 0ad66f7
forgot to update this test
jcanton fd646f8
Merge branch 'cleanup_bdy_halo_c' into cleanup_dsl_fields
jcanton 153addb
optional arrays
jcanton fcd5f65
and update wrapper references
jcanton 1a8e2e7
update code comment
jcanton 0bba4b4
Merge branch 'main' into cleanup_bdy_halo_c
jcanton e50821e
this might work
jcanton 2fc6be8
fix serialbox calls
jcanton c7f77ec
was missing reduce_to_dim_size
jcanton b856946
maybe fix factories and compute_weights
jcanton 7525d2c
new indexing here too
jcanton 940a615
Merge branch 'cleanup_bdy_halo_c' into cleanup_dsl_fields
jcanton 1277493
this is probably what I meant?
jcanton 8d83a1f
Merge branch 'main' into merge_bdy_halo_stencils
jcanton 87f5ca8
fix these
jcanton 63d7f69
optionally register pg_ fields
jcanton ef3d935
now it runs, time to fix the assetions
jcanton 03ccca4
something like this
jcanton 7789508
pre-commit
jcanton 3a72213
Merge branch 'main' into merge_bdy_halo_stencils
jcanton 4384f97
update tests
jcanton 0cc5ac7
forgot to overwrite with these funny names, now get some complaints b…
jcanton e75e23f
forgot to delete these
jcanton fe26b19
Merge branch 'main' into merge_bdy_halo_stencils
jcanton fe84feb
forgot dict -> domain
jcanton 8a4bd94
fix wrong name
jcanton 032710a
fix name here too
jcanton fecc9e6
review updates
jcanton 9178da7
messed up
jcanton 1d56c1f
just some renaming
jcanton 6a2ded7
these were defined on the wrong Krange
jcanton 4fe60fd
fix test
jcanton 3b331d5
Merge branch 'cleanup_mask_hdiff' into cleanup_dsl_fields
jcanton cb97d9a
Merge branch 'merge_bdy_halo_stencils' into cleanup_dsl_fields
jcanton 4cdbcc4
add more experiments here
jcanton d60e320
update experiment version
jcanton 44a89aa
oh no... I had messed up the test...
jcanton 99dbfff
restore this
jcanton 706562f
these can be null
jcanton 4400c2d
this is needed in the interface too
jcanton 98d58a5
add reminder
jcanton 122399a
fix cell ids
jcanton 818fb00
Merge branch 'main' into cleanup_dsl_fields
jcanton 299bcff
formatting
jcanton 16903f0
type ignore
jcanton 91524d9
update codegen_references
jcanton 4c3d0ea
turn on data download
jcanton f01d5c0
slicing
jcanton d2ec843
Merge branch 'main' into cleanup_dsl_fields
jcanton 3ec5765
forgot to clean this up
jcanton 37bd0a1
more cleanup
jcanton 9f1a249
pre-commit
jcanton 0361891
turn off data download
jcanton a561e27
fix test_dycore_wrapper test which needs the same inputs as the bindings
jcanton 175866f
Merge branch 'main' into cleanup_dsl_fields
jcanton 6a9b434
forgot to update here too
jcanton 9aeaefb
delete this
jcanton 034ef88
Merge branch 'main' into cleanup_dsl_fields
jcanton 2de615e
this was missing, thanks @edopao (ok here?)
jcanton c091f20
Merge branch 'main' into cleanup_dsl_fields
jcanton f9490ea
enable distributed data download
jcanton 51c445a
and turn it off again
jcanton 34beb12
Merge branch 'main' into cleanup_dsl_fields
jcanton 6df0e9a
forgot these
jcanton de4c66e
update references again
jcanton aef42e3
add two external dependencies
jcanton 74bedfa
enable distributed downloads
jcanton d908ed8
refactor: move from wrappers.common to model.common
jcanton 862634e
Merge branch 'main' into cleanup_dsl_fields
jcanton 4d83eec
fix this, move that
jcanton 8ae03ec
move this to data_alloc too
jcanton b546003
fix circular import
jcanton File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -115,7 +115,7 @@ def compute_wgtfacq_c_dsl( | |
| wgtfacq_c_dsl[:, nlev - 2] = wgtfacq_c[:, 1] | ||
| wgtfacq_c_dsl[:, nlev - 3] = wgtfacq_c[:, 2] | ||
|
|
||
| return wgtfacq_c_dsl | ||
| return wgtfacq_c_dsl[:, -3:] | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could this be ? |
||
|
|
||
|
|
||
| def compute_wgtfacq_e_dsl( | ||
|
|
@@ -127,7 +127,7 @@ def compute_wgtfacq_e_dsl( | |
| nlev: int, | ||
| exchange: Callable[[data_alloc.NDArray], None], | ||
| array_ns: ModuleType = np, | ||
| ): | ||
| ) -> data_alloc.NDArray: | ||
| """ | ||
| Compute weighting factor for quadratic interpolation to surface. | ||
|
|
||
|
|
@@ -145,8 +145,8 @@ def compute_wgtfacq_e_dsl( | |
| z_aux_c = array_ns.zeros((z_ifc.shape[0], 6)) | ||
| z1, z2, z3 = _compute_z1_z2_z3(z_ifc, nlev, nlev - 1, nlev - 2, nlev - 3) | ||
| z_aux_c[:, 2] = z1 * z2 / (z2 - z3) / (z1 - z3) | ||
| z_aux_c[:, 1] = (z1 - wgtfacq_c_dsl[:, nlev - 3] * (z1 - z3)) / (z1 - z2) | ||
| z_aux_c[:, 0] = 1.0 - (wgtfacq_c_dsl[:, nlev - 2] + wgtfacq_c_dsl[:, nlev - 3]) | ||
| z_aux_c[:, 1] = (z1 - wgtfacq_c_dsl[:, 0] * (z1 - z3)) / (z1 - z2) | ||
| z_aux_c[:, 0] = 1.0 - (wgtfacq_c_dsl[:, 1] + wgtfacq_c_dsl[:, 0]) | ||
|
|
||
| z1, z2, z3 = _compute_z1_z2_z3(z_ifc, 0, 1, 2, 3) | ||
| z_aux_c[:, 5] = z1 * z2 / (z2 - z3) / (z1 - z3) | ||
|
|
@@ -161,4 +161,4 @@ def compute_wgtfacq_e_dsl( | |
| wgtfacq_e_dsl[:, nlev - 1] = z_aux_e[:, 1] | ||
| wgtfacq_e_dsl[:, nlev - 2] = z_aux_e[:, 2] | ||
|
|
||
| return wgtfacq_e_dsl | ||
| return wgtfacq_e_dsl[:, -3:] | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed mask; change to non-
_DSLvariables.