-
Notifications
You must be signed in to change notification settings - Fork 0
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
Initial condition for jw test #446
Conversation
…sory test for JW initial condition to test_testcase.py. Fixed a few bugs.
…output the grid data for remapping.
) | ||
|
||
if experiment == "mch_ch_r04b09_dsl": | ||
def _Jablownoski_Williamson_config(): |
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.
I would name this in proper snake case to conform to the standard, even though I know these are names.
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.
Thanks. Renamed already.
RD_O_CPD, | ||
) | ||
from icon4py.model.common.decomposition.definitions import DecompositionInfo, ProcessProperties | ||
from icon4py.model.common.decomposition.mpi_decomposition import ParallelLogger |
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.
This import forces the user to have mpi4py
installed. We tried to have the entire code run (of course only for single node) even without mpi4py
in the environment. That is why there are these single_dispatch
functions in mdecomposition/definitions.py
I realize that there might be a single_dispatch
missing for the logger.
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.
I have not really gone far to understand your logging system and decomposition. So, I add a TODO there when the single_dispatch
functionality is ready.
|
||
|
||
# TODO (Chia Rui): Construct a proper test for these diagnostic stencils? | ||
def diagnose_temperature_numpy( |
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.
you could easily make this a gt4py stencil...
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.
Nice idea. I will port the temperature and pressure diagnosis to gt4py. They can be used when users want to output variables in the future.
return p_u_out, p_v_out | ||
|
||
|
||
def interpolation_cells2edges_scalar_numpy( |
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.
can you replace that with a call to horizontal.py::cell_2_edge_interpolation` ? It should do the same thing.
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.
I tend to keep this numpy version here because I want all computations during initialization to be consistent in one format, instead of some parts of the initialization process being gt4py stencil and the rest being numpy/cupy. Moreover, some of the computations in mode initialization are only used once. So, I think writing them all in numpy/cupy is enough. I move cell_2_edge_interpolation stencil to interpolation folder.
from icon4py.model.common.grid.icon import IconGrid | ||
|
||
|
||
def interpolation_rbf_edges2cells_vector_numpy( |
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.
which one is this in icon? Can we port it to gt4py?
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.
Yes. It is bf_vec_interpol_cell in mo_intp_rbf.f90. I will create gt4py version of this stencil in interpolation folder.
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.
I have removed this numpy version and use the gt4py version which I put it interpolation/stencils/edge_2_cell_vector_rbf_interpolation.py.
…stic_calculations
cscs-ci run default |
@@ -58,6 +61,12 @@ | |||
DELTA_TEMPERATURE: Final[wpfloat] = 75.0 | |||
DEL_T_BG: Final[wpfloat] = DELTA_TEMPERATURE | |||
|
|||
#: Earth average radius [m] |
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.
I think I added this in PR 428 Can you check for duplication?
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.
Yes. I confirm that it is duplicated. I deleted my one.
[22, 23, 3, 4, 5, 12, 7, 8, 15], | ||
[25, 26, 6, 7, 8, 15, 1, 2, 9], | ||
[0, 1, 5, 6, 7, 2, 9, 10, 14], | ||
[3, 4, 8, 0, 1, 5, 12, 13, 17], # 5c |
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.
[3, 4, 8, 0, 1, 5, 12, 13, 17], # 5c | |
[3, 4, 8, 0, 1, 5, 12, 13, 17], # 4c |
[1, 2, 9, 10, 11, 18, 13, 14, 21], | ||
[4, 5, 12, 13, 14, 21, 16, 17, 24], | ||
[7, 8, 15, 16, 17, 24, 10, 11, 18], | ||
[9, 10, 14, 15, 16, 11, 18, 19, 23], # 10c |
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.
[9, 10, 14, 15, 16, 11, 18, 19, 23], # 10c | |
[9, 10, 14, 15, 16, 11, 18, 19, 23], # 9c |
model/common/tests/diagnostic_calculations_tests/test_diagnostic_calculations.py
Show resolved
Hide resolved
offset_provider={"Koff": KDim}, | ||
) | ||
|
||
# TODO (Chia Rui): remember to uncomment this computation when the bug in gt4py is removed |
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.
Is this TODO obsolete? Computation is not commented....
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.
Ahh. Yes, it is obsolete. I forgot to delete it.
model/common/tests/diagnostic_calculations_tests/test_diagnostic_calculations.py
Outdated
Show resolved
Hide resolved
…abw data is available for CI
cscs-ci run default |
launch jenkins spack |
Mandatory Tests Please make sure you run these tests via comment before you merge!
Optional Tests To run benchmarks you can use:
To run tests and benchmarks with the DaCe backend you can use:
In case your change might affect downstream icon-exclaim, please consider running
For more detailed information please look at CI in the EXCLAIM universe. |
cscs-ci run default |
launch jenkins spack |
pressure = ( | ||
sqrt(pressure_sfc * pressure_interface) if state[2] else sqrt(state[1] * pressure_interface) | ||
) | ||
return pressure, pressure_interface, False |
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.
there is a is_roundtrip
function for that just in case.
Thanks. I have already used |
initialization_utils.py
. The auxiliary functions that help compute the initial condition is stored intestcase_functions.py
.DiagnosticState
andDiagnosticMetricState
are added.DiagnosticState
contains global diagnostic variables that will be used in physics parameterizations.DiagnosticMetricState
contains metric state for computations of diagnostic variables from prognostic variables.