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

Remove climo_diurnal_input_files internal parameter #612

Merged
merged 1 commit into from
Jul 22, 2024

Conversation

forsyth2
Copy link
Collaborator

@forsyth2 forsyth2 commented Jul 15, 2024

Remove climo_diurnal_input_files internal parameter. Resolves #607

@forsyth2 forsyth2 self-assigned this Jul 15, 2024
@forsyth2 forsyth2 force-pushed the discussion-607-ref branch 2 times, most recently from 46669a4 to 60bd208 Compare July 15, 2024 23:54
@forsyth2 forsyth2 force-pushed the discussion-607-ref branch 2 times, most recently from 0257e03 to 1a39add Compare July 19, 2024 21:48
@forsyth2
Copy link
Collaborator Author

forsyth2 commented Jul 19, 2024

Ran the following minimal cases (see #608):

e3sm_diags_diurnal_cycle
e3sm_diags_diurnal_cycle_mvm_1
e3sm_diags_diurnal_cycle_mvm_2

These produce results both with and without explicitly setting {{ climo_diurnal_input_files }} or {{ climo_diurnal_input_files_ref }}.

@chengzhuzhang Is it better 1) to be explicit about the input files we're looking for (and thus require an extra parameter) or 2) to have zppy automatically determine the h number? (2) appears to work, but I'm concerned I just found a simple case where that happens to work.

@chengzhuzhang
Copy link
Collaborator

@forsyth2 thank you for working on this. To be explicit about the input files would be fine, I'm curious about the mechanism for zppy to automatically infer the h number?

@forsyth2
Copy link
Collaborator Author

I'm curious about the mechanism for zppy to automatically infer the h number?

The second commit currently in this PR: b116dcf

cp -s ${climo_diurnal_dir_source}/${nc_prefix}.{{ climo_diurnal_input_files_ref }}_*_${begin_year}??_${end_year}??_climo.nc .
cp -s ${climo_diurnal_dir_source}/${nc_prefix}.{{ climo_diurnal_input_files }}_*_${begin_year}??_${end_year}??_climo.nc .

could simply be replaced with

cp -s ${climo_diurnal_dir_source}/${nc_prefix}.*_*_${begin_year}??_${end_year}??_climo.nc .

But my concern is that the directories I'm working with just happen to have only the correct h number in them.

@chengzhuzhang
Copy link
Collaborator

@forsyth2 I looked it up e3sm_diags code, I think as long as the the ref directory includes those seasonal mean diurnal cycle files, the h number doesn't matter. The file name just needs to start with the case name. We need to make sure the ref directory should include the correct symlinks.

@forsyth2 forsyth2 force-pushed the discussion-607-ref branch 2 times, most recently from 1fba9aa to dcb9eb1 Compare July 22, 2024 18:43
@forsyth2
Copy link
Collaborator Author

@chengzhuzhang I've updated the second commit (dcb9eb1) and it looks like everything still works if we remove the input file specification in all cases for diurnal cycle. It looks like it was originally introduced in aaaa61d#diff-ed02c5b26bf8ed8e97148b4f81cfdca9afc1706855f5a7aba9e0b7f3c47cee52. It seems the cleaner solution would have been to just use * in the first place rather than introducing a parameter.

@forsyth2
Copy link
Collaborator Author

forsyth2 commented Jul 22, 2024

I've tested with:

  • zppy -c tests/integration/generated/test_min_case_e3sm_diags_diurnal_cycle_mvm_1_chrysalis.cfg & zppy -c tests/integration/generated/test_min_case_e3sm_diags_diurnal_cycle_mvm_2_chrysalis.cfg
  • zppy -c tests/integration/generated/test_min_case_e3sm_diags_diurnal_cycle_chrysalis.cfg (model-vs-obs)

@chengzhuzhang
Copy link
Collaborator

It seems the cleaner solution would have been to just use * in the first place rather than introducing a parameter.

Yes, I think it is a better solution.

@forsyth2 forsyth2 changed the title Add input_files_ref parameter Remove climo_diurnal_input_files internal parameter Jul 22, 2024
@forsyth2 forsyth2 merged commit 602698c into main Jul 22, 2024
4 checks passed
@forsyth2 forsyth2 deleted the discussion-607-ref branch July 22, 2024 19:12
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