mpas2wrf question.

Questions, issues, or suggestions related to post-processing of model output.
Post Reply
Posts: 11
Joined: Fri Sep 04, 2020 4:12 am

mpas2wrf question.

Post by zemega » Mon Mar 01, 2021 2:26 pm

I thought of using RIP4.7 to make plots for the output of regional MPAS-A 7.0. Which calls for the usage of to convert MPAS-A output to WRF grids. But I couldn't get it to work. I tried using netcdf-fortran package inside conda-forge ( to streamline the libraries used for ncl and RIP4.7). I can compile it, but running it would create output similar to below. Considering the code is old, I also tried with netcdf-4.1.3 and hdf5-1.8.22. Which gives the output below.

Code: Select all

 Reading MPAS mesh information from file ''

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:
#0  0x7f0949d592ed in ???
#1  0x7f0949d58503 in ???
#2  0x7f09491cd03f in ???
#3  0x7f094922326d in ???
#4  0x7f09492251cb in ???
#5  0x563a14b3b9c8 in __netcdf_MOD_nf90_get_var_2d_fourbyteint
        at /home/yunus/mpas2wrf-master/netcdf-4.1.3/f90/netcdf_expanded.f90:1942
#6  0x563a14b01b04 in __scan_input_MOD_scan_input_read_field
        at /home/yunus/mpas2wrf-master/src/scan_input.F:512
#7  0x563a14b041be in __mpas_mesh_MOD_mpas_mesh_setup
        at /home/yunus/mpas2wrf-master/src/mpas_mesh.F:112
#8  0x563a14b1bd16 in convert_mpas
        at /home/yunus/mpas2wrf-master/src/mpas2wrf_grid.F:248
#9  0x563a14aff63e in main
        at /home/yunus/mpas2wrf-master/src/mpas2wrf_grid.F:3
Segmentation fault
The discussion about it is in ... /issues/59. What I think is that the mpas2wrf code was written for older version of MPAS-A and things have changed since then? Would it be possible to request an update to this program?

What I really want to do is to create vertical cross-section of winds, temperature and potential vorticity from any latlon point to another latlon point. Is there any suggestion on post-processing MPAS-A output and be able to create vertical cross section from point A to point B? Terrain included if possible.

Posts: 466
Joined: Mon Feb 26, 2018 7:35 pm

Re: mpas2wrf question.

Post by mgduda » Mon Mar 08, 2021 11:14 pm

Although I've not actually tried the mpas2wrf program, it looks like the code is based heavily on the convert_mpas tool. Since we did need to modify the convert_mpas code to handle regional MPAS domains, it might be a reasonable assumption that, without modification, the mpas2wrf program wouldn't work for regional MPAS domains. Out of curiosity, does mpas2wrf run successfully if you provide global MPAS files?

We do have an example NCL script for plotting vertical cross sections, with terrain. You can find this script from the main MPAS web page ( > "MPAS-Atmosphere download" > "Visualization and analysis tools"; then, look for the cross-section script all the way at the bottom of the page. You can also access the script directly as: ... a_xsec.ncl .
The script hasn't been updated in quite a while so if you do encounter any issues in its use, please don't hesitate to follow-up here.

Post Reply

Return to “Post-processing”