-
Notifications
You must be signed in to change notification settings - Fork 814
Inclusion of CDXWRF module #2245
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
base: develop
Are you sure you want to change the base?
Conversation
…X-WRF module L. Fita, J. Polcher, T. M. Giannaros, T. Lorenz, J. Milovac, G. Sofiadis, E. Katragkou, and S. Bastin (2019): CORDEX-WRF v1.3: development of a module for the Weather Research and Forecasting (WRF) model to support the CORDEX community, Geosci. Model Dev., 12, 1029-1066, doi: 10.5194/gmd-12-1029-2019
…rvative vertical interpolation
It gets a mix of high-frequency variables, new soil variables, debugging also by time and closest point to a given coordinates
|
I think PR #2247 was temporary during some compile problems, so now we can discard it. |
|
Aside of the pre-compilation flags, it has namelist parameters. I included default values in order to simplify its use. I would recommend to use CXWRF=3 and activate the diagnose of the convective extremes. So in the namelist: |
|
We have tried all the CDXWRF levels. 2 and 3 worked. #if CDXWRF>=1 #elif CDXWRF>=4 |
|
my apologies, I revised the compilation for CDXWRF=4, there were some mistakes. I fixed them and pushed into my fork Lluís |
|
@LluisFB |
|
HI @smileMchen, These are only changes to compile when CXWRF=4, there where some mistakes in the configuration of the pre-compilation ifs. These are the changes regarding the code I just modified the following:
Lluís |
|
@ LluisFB module_diag_cordex.f90:811:59: 811 | CALL var_press(p(i,:,j), pb(i,:,j), dimz, press(i,:,j)) Error: Syntax error in argument list at (1) module_diag_cordex.f90:814:75: Error: Syntax error in argument list at (1) module_diag_cordex.f90:816:31: 816 | geopoth(i,:,j) = zg(i,:,j)*g There are more errors similar to above shown during compiling ..... |
|
Dear @smileMchen, My apologies. There was an issue in the pre-compilation flags. I just committed the fix. I should checked all the combinations. Sorry, Lluís |
|
@LluisFB Have you tried to compile the modified code on your system? The regression tests returned some syntax errors in module_diag_cordex.F. See one of the test output files here. |
|
Dear @weiwangncar, In my system (personal computer with Debian 12and gcc compilers) I just finished to successfully re-compile with CDXWRF=2, CDXWRF=3, CDXWRF=4. CDXWRF=1 test was successfully performed yesterday (Jan 13th) and any further changes were made in the code. |
|
@LluisFB The regression tests do not test your particular option but for standard compilation and runs. So can you take a look at the attached file from above (output_3.txt), see if there is anything you can change. I tested your code with standard compilation on our computer with gfortran, it failed and pointed to the same syntax errors as shown in output_3.txt file. Thanks. |
|
@weiwangncar I understand. So, in your compilation / execution tests, which branch are you using? Do you activate any of the pre-compilation flags? I will reproduce the compilation in my system and come back with the solution. Thanks |
|
@LluisFB I cloned your code and checked out cdxwrf branch. I'm not using any of your options. I am only trying to compile default WRF code, without using any of your pre-compilation flags. This is to make sure your modification would not affect default use of the model. |
|
HI @weiwangncar I see what happens. The module is compiled even if the pre-compilation flags are not activated. I do not know if it is an 'elegant' solution, but in my last commit, I emptied the module when the main flag is not activated My apologies, for all the troubles I am making.I should have made all these tests before submitting the Pull Request. Sorry for making waste your time. I am re-compiling again with CDXWRF=4 to see if it does crashes the compilation Lluís |
|
Re-compilation for CDXWRF=4 worked. I assume it will work for the rest. Lluís |
|
@LluisFB Will compilation work if you do not use any CDXWRF pre-compilation flags? |
Yes I can confirm that this option works. But the option CDXWRF=1 still failed. I will try the newly committed codes after the MPAS tutorial and keep you updated. |
|
Yes @weiwangncar, I compiled as it is without using any flag |
|
Hi @smileMchen, Did you tried the last version? With all the new commits? I will re-check for CDXWRF=1 |
|
It looks like the last commit worked for regression tests: |
|
Well, good news! Again apologies for all the foreseeable issues. Lluís |
I used the 2nd latest commit. I haven't tried the latest one. |
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.
The two README.* files added should be moved to the doc/ folder, and ideally reworded to the instructions that would be used with https://github.com/wrf-model/WRF instead of still pointing to the fork branch. Could the two be combined into one README?
| Information regarding WRF Model citations (including a DOI) can be found here: [https://www2.mmm.ucar.edu/wrf/users/citing_wrf.html](https://www2.mmm.ucar.edu/wrf/users/citing_wrf.html). | ||
|
|
||
| The WRF Model is open-source code in the public domain, and its use is unrestricted. The name "WRF", however, is a registered trademark of the University Corporation for Atmospheric Research. The WRF public domain notice and related information may be found here: [https://www2.mmm.ucar.edu/wrf/users/public.html](https://www2.mmm.ucar.edu/wrf/users/public.html). | ||
|
|
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.
Please revert this change. It will help with tracking file history to have only changes that meaningfully change the file, unless the whitespace edits are deliberate.
| cp configure.cordex.wrf configure.wrf | ||
| ``` | ||
|
|
||
| 3. edit the `configure.wrf` and add the line (after the line `-DNETCDF` and/or `-DCLWRFGHG`) |
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'd like to explore other configuration methods other than needing to directly modify the configure.wrf file. Perhaps doing something similar to kpp/titan/venus in ./configure would be more appealing?
| ``` | ||
| cp Registry/registry.cordex Registry/registry.cordex_comp | ||
| ``` | ||
| 2. modify the `Registry/registry.cordex_comp` accordingly to the value of `CDXWRF`: |
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.
The registry supports ifdef, ifndef, endif constructs. This doesn't immediately work for the exact logic laid out here since the define is hierarchical but this were broken out into 4 individual defines automatically during ./configure then users would not need to modify the registry each time.
| state real s_pl i{np}j misc 1 Z h{23} "S_PL" "Pressure level data, Speed" "m s-1" | ||
| state real td_pl i{np}j misc 1 Z h{23} "TD_PL" "Pressure level data, Dew point temperature" "K" | ||
| state real q_pl i{np}j misc 1 Z h{23} "Q_PL" "Pressure level data, Mixing ratio" "kg/kg" | ||
| state real q_pl i{np}j misc 1 Z h{23} "Q_PL" "Pressure level data, water vapour Mixing ratio" "kg/kg" |
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.
Was changing the description intentional?
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 file could instead be conditionally be compiled (see frame/Makefile RSL_OBJS for an example on control of this via a variable). Likewise, the compile logic and file additions should be equally done in the CMake build as well.
Enhance model output to include CORDEX output demands and new potential useful diagnostics
TYPE: new feature
KEYWORDS: CORDEX, diagnostics, post-process, impact studies, scheme free diagnostics
SOURCE: Lluís Fita Centro de Investigaciones del Mar y la Atmósfera (CIMA), IRL IFAECI UBA-CONICET-CNRS-IRD, Argentina
DESCRIPTION OF CHANGES:
Problem:
The CORDEX-WRF module was initially dedicated to provide the outputs requested in any CORDEX exercise. This tends to be a tedious post-processing work, in sometimes is as long as the simulation by it self. the goal is to provide the diagnostics whilst the integration of the simulation. Enormously reducing the need for post-processing by increasing a little the integration time of the model.
Solution:
A new module has been created which adds about 150 new diagnostics to the model output.
Aside to provide an answer to an specific climate related demand from the CORDEX WRF community, it grew fast to provide:
ISSUE: For use when this PR closes an issue.
Fixes #2243
LIST OF MODIFIED FILES: list of changed files (use
git diff --name-status masterto get formatted list)TESTS CONDUCTED:
Independent tests have been performed aimed to show the correct performance of the module
RELEASE NOTE:
First version (v1.3) of the module was accompanied by an article in GMD:
Lluís Fita, Jan Polcher, Theodore M. Giannaros, Torge Lorenz, Josipa Milovac, Giannis Sofiadis, Eleni Katragkou and Sophie Bastin, 2019: CORDEX-WRF v1.3: development of a module for the Weather Research and Forecasting (WRF) model to support the CORDEX community, Geosci. Model Dev., 12, 1029-1066, 2019, doi 10.5194/gmd-12-1029-2019
Current version of the module is v.3 and it provides about 150 new diagnostics a new section in the
namelist.inputlabelled&cdxwrfwith new parameters. Outputs are grouped in 3 files:wrfcdx_d<domain>_<date>: main output file atauxhist19with most of the variableswrfhfcdx_d<domain>_<date>: high-frequency (e,g, 10 minutes) output file atauxhist18only forRAINandCOLMAXimplemented to assist the tracking convective systemswrfpress_d<domain>_<date>: p-level interpolated variables atauxhist23with the additional variablesYou can find more details in the CDXWRF WIKI
This work was made possible by the participation of the co-authors of the article, talks with a lot of different researchers from a lot of different countries and even other sciences. Thanks to all of them