TEMPO Microphysics for NCAR MPAS#1393
TEMPO Microphysics for NCAR MPAS#1393AndersJensen-NOAA wants to merge 26 commits intoMPAS-Dev:developfrom
Conversation
TYPE: new feature KEYWORDS: Microphysics, Operational models SOURCE: Anders Jensen NOAA/GSL DESCRIPTION OF CHANGES: Problem: Microphysics development of a Thompson-Eidhammer based scheme for operational applications has advanced to a submodule, TEMPO. This new development should be made available to WRF users. Solution: Connect TEMPO to WRF. A cleaned and refactored version of TEMPO is being tested in the UFS community's MPAS. Additionally, a PR, MPAS-Dev/MPAS-Model#1393, to add TEMPO to NCAR's MPAS is in progress. This current PR will allow the community to use this same microphysics across the UFS, MPAS, and WRF. LIST OF MODIFIED FILES: M .gitmodules M main/depends.common M Makefile M clean M phys/Makefile M phys/module_physics_init.F M phys/module_microphysics_driver.F M Registry.EM_COMMON M dyn_em/module_initialize_real.F TESTS CONDUCTED: 1. compiled and ran em_quarter_ss 2. restart test with em_quarter_ss 3. bit-for-bit with different number of processes using em_quarter_ss. 4. Passed regression tests. RELEASE NOTE: TEMPO is the Thompson-Eidhammer Microphysics Parameterization for Operations. TEMPO lives here: https://github.com/NCAR/TEMPO and technical documentation lives here: https://ncar.github.io/TEMPO/. TEMPO specific release notes are here: https://github.com/NCAR/TEMPO/releases/tag/tempo_v3.0.0 TEMPO version 3.0.0 is the current release version. TEMPO is being tested in the ufs-community fork of MPAS for next-generation convection-allowing forecast systems (https://github.com/ufs-community/MPAS-Model). Thus, TEMPO is being continually evaluated for improvement. Additionally, there is a PR in progress to connect TEMPO (v3.0.0) to NCAR's MPAS (MPAS-Dev/MPAS-Model#1393). The version of TEMPO currently in the CCPP (https://github.com/ufs-community/ccpp-physics) will be updated to v3.0.0 soonish. TEMPO is connected to WRF, MPAS, and CCPP as a submodule, and the same v3.0.0 code will be connected to WRF (this PR), MPAS, and CCPP. In WRF, supported namelist options include `tempo_aerosolaware==1` to use the aerosol-aware version, and `tempo_hailaware==1` to use the hail-aware version. Both options are on by default. Key improvements include: - TEMPO is in a submodule that allows for flexibility when connecting TEMPO to dynamical cores - Code modularity was been improved and technical documentation has been added - Bux fix for cloud droplet number concentration during evaporation - Surface emissions of water-friendly aerosols have been reduced based on a sensitivity simulation that aimed to better constrain water-friendly aerosol concentrations over 24-36 hour forecast periods and reduce the accumulation of aerosols in the atmosphere - A few modifications were made to graupel number concentration tendencies (when using the hail-aware option) for processes that cause rain to freeze to increase reflectivity in deep convective storms - Added simple sedimentation tests - Added unit tests - Added a program to build lookup tables with MPI capability - Lookup tables have been unified
|
When building with Make using the |
|
When building with Make, after the physics have all been compiled, we symbolically link physics look-up tables into the top-level MPAS-Model directory (see https://github.com/MPAS-Dev/MPAS-Model/blob/v8.4.0/src/core_atmosphere/Makefile#L49-L54). Should we do this for the |
|
@AndersJensen-NOAA From where should users obtain the file Here's the runtime error I'm seeing without this file in my run directory: |
@mgduda you need three tables that are large-ish so they aren't stored on git at the moment. If you need to build the tables, you can compile/run the standalone build_tables program. If you are using gfortran to build the tables you will want to modify the default optimization or use MPI, otherwise the build will take a long time. I'm open to suggestions for better ways to deal the lookup tables. Maybe they can be automatically downoaded/linked? |
Yes. |
Would it be feasible to incorporate your stand-alone program for computing these tables into MPAS-A's existing |
The lookup tables are now the same for WRF/MPAS/CCPP, and I image that 99% of users won't want to change or rebuild the tables. Even though the build code is mostly static at this point, I'd like to keep the executable in the TEMPO repository so I don't have manage the program outside of TEMPO. I think the best path forward is to to either pull the lookup tables from NOAA servers or store them as git artifacts or in git LFS. |
This commit should fix the issue: |
|
The changes in NCAR/TEMPO@8e30fc0 seem to fix the original compilation issues I was seeing (with |
I can help with changes to download the tables. However, I think we might want to consider how to version these. What happens, for example, if the tables on the NOAA server are updated to support a newer version of TEMPO, but a user is still running an older release of MPAS-Atmosphere (with an older version of TEMPO)? |
@mgduda I'm working out final issues with gnu debug, and came upon this issue when opening lookup tables to read: src/module_mp_tempo_driver.F90:624:43: 624 | action='read', iostat=istat, convert='big_endian') It seems like the convert option in the open statement is not supported by f2008 (but otherwise okay). Our computers are down today, but I'll confirm later this week that this is in fact the case. Do you have any thoughts on how to get around this? I think that |
I don't think the Fortran standard provides a way to force I/O to assume a particular byte order, and so this is something that must be handled in a compiler-specific way. There are probably better ways of going about this, but one option might be to add the open(unit=mp_unit, file=filename, form='unformatted', status='old', &
action='read', iostat=istat &
#ifdef TEMPO_USE_CONVERT_ARGUMENT
, convert='big_endian' &
#endif
)For host models whose build systems don't provide compiler-specific flags to assume big-endian I/O, you could define the |
- adds TEMPO registry - adds include flags and module use statements to connect tempo to microphysics driver
- adds substepping to tempo microphysics when dt > 90s - adds tempo and aerosolaware options to interface
- adds initialization routines for tempo with aerosolaware option
- zeros out ice microphysics above mp_top_level when using tempo
0706413 to
5821b29
Compare
I let AI write a block of code for the MPAS TEMPO makefile, which will use the convert= argument unless gnu/f2008 is being use: |
I fixed these issues and a few more: I can now compile on our machines with |
…ysics_aerosols and fix formatting
Since the MPAS build system ensures that big-endian / byteswap flags are used for all supported compilers, it seems like we could just always define |
I don't have a good way to version tables off the top of my head. Currently the tables all have "_v3" at the end of the filenames, and my plan is to ensure that these tables will always work with Tempo v3.x.x. If tables are updated but the user is still running an older release then either the code will crash if the table sizes are different from what the code expects or results will be answer changing. We can keep old tables on servers, but we'll still need a way to version/communicate changes to users. |
This PR connects TEMPO microphysics to MPAS.