Finite-amplitude Rossby Wave Diagnostics#566
Finite-amplitude Rossby Wave Diagnostics#566csyhuang wants to merge 192 commits intoNOAA-GFDL:mainfrom
Conversation
| dz = 1000 # TODO Variable to set earlier? | ||
| hmax = -SCALE_HEIGHT * np.log(gridfilled_dataset[plev_name].min() / P_GROUND) | ||
| kmax = int(hmax // dz) + 1 | ||
| original_pseudoheight = convert_hPa_to_pseudoheight(original_grid[plev_name]).rename("height") |
Check notice
Code scanning / CodeQL
Unused local variable
| def plot_and_save_figure(seasonal_average_data, analysis_height_array, plot_dir, title_str, season, | ||
| xy_mask=None, yz_mask=None): | ||
| if xy_mask is None: | ||
| xy_mask = np.zeros_like(seasonal_average_data.u_baro) |
Check notice
Code scanning / CodeQL
Unused local variable
| else: | ||
| yland, xland = np.where(xy_mask) | ||
| if yz_mask is None: | ||
| yz_mask = np.zeros_like(seasonal_average_data.zonal_mean_u) |
Check notice
Code scanning / CodeQL
Unused local variable
wrongkindofdoctor
left a comment
There was a problem hiding this comment.
@csyhuang. Thanks for the preliminary PR. The POD code looks okay from a technical standpoint. I just have a couple of change requests for your custom environment file and runtime configuration file that you can include with your final submission.
| @@ -0,0 +1,128 @@ | |||
| // Configuration for MDTF-diagnostics driver script self-test. | |||
There was a problem hiding this comment.
please move this file to the diagnostics/finite_amplitude_wave_diag directory before the final submission.
There was a problem hiding this comment.
@wrongkindofdoctor Hi Jess, thank you for reviewing the pull request and make changes to main accordingly! With the merged commits, ./mdtf -f src/default_finite_amplitude_wave_diag.jsonc -v no longer works. How shall I run my POD from this branch end-to-end on my machine?
(I created a new branch finite_amplitude_wave_diag_fcca20a_prelimPR from the current one, merged the new commits from main, and did the 2 changes you mentioned here. After testing them end-to-end I'll merge them to this branch.)
Thanks for your kind help!
There was a problem hiding this comment.
@csyhuang Your runtime configuration file needs to be updated to match the new template format here: https://github.com/NOAA-GFDL/MDTF-diagnostics/blob/main/templates/runtime_config.jsonc.
Note that the POD_LIST is now a separate entry, WORKING_DIR is now WORK_DIR, and several of the previous settings have been removed.
Also, given that the main branch is under active development as we resolve outstanding issues with the preprocessor, your POD is not required to run with the current state of the framework. Just make sure that you have the required documentation in your RST file along with requested the changes to your test files, and the framework team will finalize testing at GFDL. We will reach out if we encounter technical issues in your POD.
There was a problem hiding this comment.
@wrongkindofdoctor Hi Jess, thank you for the instructions. I have a few follow-up questions:
In runtime_config.jsonc, there are two items not present in previous commits which I don't know how to configure:
case_listDATA_CATALOG
I looked at the instructions in README.md and tried running tools/catalog_builder/catalog_builder.py but encounter some errors (e.g. failed to import src due to missing path - shall I submit an issue ticket about these?). Is the script specific to GFDL environment?
Also, given that the main branch is under active development as we resolve outstanding issues with the preprocessor, your POD is not required to run with the current state of the framework. Just make sure that you have the required documentation in your RST file along with requested the changes to your test files, and the framework team will finalize testing at GFDL. We will reach out if we encounter technical issues in your POD.
In that case, shall I keep the script files on this branch untouched, and notify you again when I have all documentation finished (+ made the changes you mentioned)? Please let me know how to proceed. Thanks! 😄
There was a problem hiding this comment.
No need. Those modules are needed for building GFDL datasets, and I haven't solved the import issue yet. I have commented out the problem lines and pushed the workaround to the main branch. Once you pull in the changes, you can use the catalog builder to generate intake catalogs for CMIP or CESM data.
| @@ -0,0 +1,19 @@ | |||
| name: _MDTF_finite_amplitude_wave_diag | |||
There was a problem hiding this comment.
please remove this file from the PR. The gridfill, bottleneck, and falwa packages are now included in the enve_python3_base.yml file.
This reverts commit 6985ff7.
| - bottleneck | ||
| - pip=23.3.1 | ||
| - pip: | ||
| - git+https://github.com/csyhuang/hn2016_falwa.git |
There was a problem hiding this comment.
@wrongkindofdoctor Hi Jess, we figured out a solution to upgrade falwa to python 3.12 by migrating the F2PY build to meson. We tested on both Mac and Linux machine that the new installation procedures work. Do you have a chance to test if you can get our package installed via
- pip:
- git+https://github.com/csyhuang/hn2016_falwa.git
We can do deployment on PyPI if cloning from GitHub is not preferred.
Thanks and we look forward to your update!
Clare
There was a problem hiding this comment.
@csyhuang Excellent! I'm glad you were able to find a replacement for F2PY. Yes, please push the update to PyPI and reference the package instead of the git repo in the environment file.
There was a problem hiding this comment.
@wrongkindofdoctor I've just pushed an update to the PR branch and changed the line to - falwa==2.0.0. Thanks Jess!
There was a problem hiding this comment.
@csyhuang Thanks! Please move your environment file and runtime config file from /src to your POD directory; I will add falwa and the dependencies back to the python3 base env files and verify that they build in the in the CI.
There was a problem hiding this comment.
@wrongkindofdoctor Sure! I've moved the files to diagnostics/finite_amplitude_wave_diag. Please keep us updated after you tested it! Thanks Jess!
There was a problem hiding this comment.
@csyhuang The environments have been tested with the falwa package updates and merged into the python3_base env files.
There was a problem hiding this comment.
@wrongkindofdoctor Glad that it works! Thanks Jess! We'll update you after finishing the rest of our POD!
|
Is the only conflict in the README.md? It looks like you put in your new lines and meanwhile someone else has done theirs. If you could get the new version and add your lines so they don't conflict with the changes, it might work. |
|
@bitterbark Hi Dani, sorry for the late reply as I have been doing long-distance travel in the past few weeks!
I will try to resolve all conflicts with |
|
Thanks for the update, Clare. Do you have the written requirements for the
vertical resolution requirement? And I'm assuming you have some data that
the POD does work with? If so, we can include that in the release.
…On Fri, May 30, 2025 at 9:49 AM Clare S. Y. Huang ***@***.***> wrote:
*csyhuang* left a comment (NOAA-GFDL/MDTF-diagnostics#566)
<#566 (comment)>
@bitterbark <https://github.com/bitterbark> Hi Dani, sorry for the late
reply as I have been doing long-distance travel in the past few weeks!
--
My working day may not be the same as your working day. Please do not feel
obliged to reply to this email outside of your normal hours.
|
|
@aradhakrishnanGFDL Hi Aparna, here's the PR in question. Thanks. |
|
@bitterbark Dani, sorry for missing your previous message! Vertical resolution similar to ERA-5, which can resolve stratosphere up to 1hPa shall work. @aradhakrishnanGFDL For the purpose of building the POD, may I get access to some GFDL-CM4 data that has has correct postprocessing done? Thanks! |
Description
This is preliminary PR for an additional POD, "Finite-amplitude Rossby Wave Diagnostics". The code could run through and produce the plots on HTML properly when lastly touched base with Jess #514 (latest commit from main in this PR: f69e745 ) , but it breaks after merging the recent commits. After discussing with my liason @yihungkuo , it seems easier on both sides for me to submit a preliminary PR to iterate (rather than fixing the issues on my own). I am therefore submitting this PR to kickstart the fix, with the understanding that the MDTF team is busy and will get back only when time allows.
Please let me know if I shall provide more information to fix this. On my side, the missing items include the (1) Detailed documentation and (2) predigest data, which do not affect the test of the code. I am still working with my collaborators to finalize them, hoping to get them ready by the end of this month.
Thanks in advance! 😄
How Has This Been Tested?
In my
inputdata/directory, I have the following files downloaded from GFDL portal:model/GFDL-CM3_historical_r1i1p1/day/GFDL-CM3_historical_r1i1p1.ua.day.ncmodel/GFDL-CM3_historical_r1i1p1/day/GFDL-CM3_historical_r1i1p1.va.day.ncmodel/GFDL-CM3_historical_r1i1p1/day/GFDL-CM3_historical_r1i1p1.ta.day.ncI run MDTF with the following command and get all the plots successfully:
Checklist:
conda_env_setup.shGenerated plot generated from sample data
GFDL-CM3_historical_r1i1p1.*.day.ncThe plots look like this (if changing the hyperlink "plot" to actual PNG images) - these are generated out of a small sample so the patterns are not representative: