Skip to content
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

Bugfix: cases with different time intervals #190

Merged
merged 4 commits into from
Aug 22, 2024
Merged

Bugfix: cases with different time intervals #190

merged 4 commits into from
Aug 22, 2024

Conversation

sajjadazimi
Copy link
Member

Purpose

fix bug

I have:

In the Content, I have included

  • relevant unit tests, and integration tests,
  • appropriate docstrings on all functions, structs, and modules, and included relevant documentation.
  • I have read and checked the items on the review checklist.

Copy link
Contributor

@crocicc crocicc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks perfect to me Sajjad! Thank you so much!!

@@ -43,7 +43,7 @@ function run_KiD_multiple_cases(u::Array{FT, 1}, u_names::Array{String, 1}, conf
config["model"]["w1"] = case.w1
config["model"]["p0"] = case.p0
config["model"]["Nd"] = case.Nd
if "t_cal" in collect(keys(case))
if :t_cal in collect(keys(case))
config["model"]["filter"] = make_filter_props(
config["model"]["filter"]["nz_unfiltered"],
case.t_cal;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here, I think we need to add

        else
            config["model"]["filter"] = make_filter_props(
                config["model"]["filter"]["nz_unfiltered"],
                config["model"]["t_calib"];
                apply = config["model"]["filter"]["apply"],
                nz_per_filtered_cell = config["model"]["filter"]["nz_per_filtered_cell"],
                nt_per_filtered_cell = config["model"]["filter"]["nt_per_filtered_cell"],
            )  
        end

If we check with an example in which the 1st case has the t_cal flag, while the second case doesn't have the t_cal flag, then for the case without the flag it keeps the last filter (the one created for the case with t_cal), not the original one.

Let me know if you agree and if it makes sense to you!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't it make a new filter for every case in this way (not considering the default one anymore)?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree and it makes total sense. Thank you!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can check with different combinations of cases with and without t_cal, but apart from that I think it looks good!

@sajjadazimi sajjadazimi merged commit a091487 into main Aug 22, 2024
7 checks passed
@sajjadazimi sajjadazimi deleted the cc/time_bug branch August 22, 2024 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants