Skip to content

Conversation

@LluisFB
Copy link
Contributor

@LluisFB LluisFB commented Sep 5, 2025

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:

  • Additional non-specific CORDEX diagnostics
  • Generic definitions of certain diagnostics that might be scheme dependent
  • Introduction of additional variables in the integration-time p-level vertical interpolation

ISSUE: For use when this PR closes an issue.
Fixes #2243

LIST OF MODIFIED FILES: list of changed files (use git diff --name-status master to get formatted list)

A       README.cordex
M       README.md
M       Registry/Registry.EM_COMMON
M       Registry/Registry.EM_COMMON.var
A       Registry/registry.cordex
M       Registry/registry.diags
M       Registry/registry.em_shared_collection
M       dyn_em/solve_em.F
M       dyn_em/start_em.F
M       frame/module_driver_constants.F
M       main/depend.common
M       phys/Makefile
A       phys/module_diag_cordex.F
M       phys/module_diag_pld.F
M       phys/module_diagnostics_driver.F
A       phys/module_diagvar_cordex.F
M       phys/module_physics_init.F

TESTS CONDUCTED:

  1. Do mods fix problem? How can that be demonstrated, and was that test conducted?
  2. Are the Jenkins tests all passing?
    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.input labelled &cdxwrf with new parameters. Outputs are grouped in 3 files:

  • wrfcdx_d<domain>_<date>: main output file at auxhist19 with most of the variables
  • wrfhfcdx_d<domain>_<date>: high-frequency (e,g, 10 minutes) output file at auxhist18 only for RAIN and COLMAX implemented to assist the tracking convective systems
  • wrfpress_d<domain>_<date>: p-level interpolated variables at auxhist23 with the additional variables

You 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

LluisFB and others added 30 commits June 20, 2025 18:33
…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
 - `var_colmax1D': Subroutine to compute 1D maximum radar reflectivity
It gets a mix of high-frequency variables, new soil variables, debugging also by time and closest point to a given coordinates
@LluisFB LluisFB requested review from a team as code owners September 5, 2025 13:46
@LluisFB
Copy link
Contributor Author

LluisFB commented Sep 5, 2025

Please, to make it work, user needs to define pre-compilation flags and modify Registry files. A new file called README.cordex provide the detalis:

  1. edit the configure.wrf and add the line (after the line -DNETCDF)
                      -DCORDEXDIAG \
  1. Set up (or not) the pre-compilation variable CDXWRF (after the line -DCORDEXDIAG)
                      -DCDXWRF=[value] \
  1. Accordingly to the value given to the pre-compilation variable CDXWRF one obtains:
  • Without adding the variable: all CORDEX 'Core' variables
  • CDXWRF=1 CORDEX 'Tier' variables: clivg, clivh, zmla, [cape/cin/zlfc/plfc/lidx]{min/max/mean}
  • CDXWRF=2 The same as with CDXWRF=1 and additional variables: ua, va, ws, ta, press, zg, hur, hus, tfog, fogvisbltymin, fogvisbltymax, fogvisbltymean, tdsmin, tdsmax, tdsmean
  • CDXWRF=3 The same as with CDXWRF=1,2 and additional residence-time variables
  • CDXWRF=4 The same as with CDXWRF=1,2 and 3 and the Water-Budget relarted ones: wbacdiabh, wbacpw, wbacpw[c/r/s/i/g/h], wbacf, wbacf[c/r/s/i/g/h], wbacz, wbacz[c/r/s/i/g/h], wbacdiabh{l/m/h}, wbacpw{l/m/h}, wbacpw[c/r/s/i/g/h]{l/m/h}, wbacf{l/m/h}, wbacf[c/r/s/i/g/h]{l/m/h}, wbacz{l/m/h}, wbacz[c/r/s/i/g/h]{l/m/h}
  1. make a copy of Registry/registry.cordex
     $ cp Registry/registry.cordex Registry/registry.cordex_comp
  1. modify the Registry/registry.cordex_comp accordingly to the value of CDXWRF:
    • Without adding CDXWRF, nothing needs to be changed
    • Adding CDXWRF=1, one needs to remove the comment ##CDXWRF1## at the beginning of the line of the definition of certain variables
    • Adding CDXWRF=2, one needs to remove the comment ##CDXWRF1## and ##CDXWRF2## at the beginning of the line of the definition of certain variables
    • Adding CDXWRF=3, one needs to remove the comment ##CDXWRF1##, ##CDXWRF2## and ##CDXWRF3## at the beginning of the line of the definition of certain variables
    • Adding CDXWRF=4, one needs to remove the comment ##CDXWRF1##, ##CDXWRF2##, ##CDXWRF3## and ##CDXWRF4## at the beginning of the line of the definition of certain variables
      For example:
sed -i 's/##CDXWRF1##//g' Registry/registry.cordex_comp
sed -i 's/##CDXWRF2##//g' Registry/registry.cordex_comp
sed -i 's/##CDXWRF3##//g' Registry/registry.cordex_comp

@weiwangncar weiwangncar changed the base branch from master to develop September 8, 2025 09:22
@weiwangncar
Copy link
Collaborator

@LluisFB Can you compile the code without making any of the changes in configure file and registry? This would be the first step so that the addition of your proposed code would not change the default compilation and running. As we are not receiving any output from the regression tests, it may be an indication that something is not quite right in your code.

@LluisFB
Copy link
Contributor Author

LluisFB commented Sep 19, 2025

Hi @weiwangncar,

I created a new branch 'direccomp_cdxwrf4' I committed another PR #2247 with that branch.

WRF will be compiled with the full module CDXWRF=4

@weiwangncar
Copy link
Collaborator

The regression test results:

Test Type              | Expected  | Received |  Failed
= = = = = = = = = = = = = = = = = = = = = = = =  = = = =
Number of Tests        : 23           24
Number of Builds       : 60           57
Number of Simulations  : 158           150        0
Number of Comparisons  : 95           86        0

Failed Simulations are: 
None
Which comparisons are not bit-for-bit: 
None

@weiwangncar
Copy link
Collaborator

@LluisFB Sorry for my earlier comments. It appears what you have done do not interfere with other uses of the model, including compilation. I will have some other suggestions for you soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CDXWRF module in WRFv7.1

3 participants