Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

Define a regional domain

This post was from a previous version of the WRF&MPAS-A Support Forum. New replies have been disabled and if you have follow up questions related to this post, then please start a new thread from the forum home page.

Hi all,
I want to create a regional domain followed by the online tutorial, however when I ran with command:
./create_region mediterranean.pts
it failed. The detail is displayed below:
[weather@igplogin MPAS-Limited-Area]$ ./create_region mediterranean.pts
Creating a regional mesh of
Marking boundary  1 ... 
Filling region ...
Creating boundary layer: 1  ... 2  ... 3  ... 4  ... 5  ... 6  ... 7  ... 8  ... DONE!
Marking region edges ...
Marking region vertices...
Subsetting mesh fields into the specified region mesh...
Copying variable qv... 
Traceback (most recent call last):
  File "./create_region", line 59, in <module>
  File "/work/users/weather/user/manh/MPAS-Limited-Area/limited_area/", line 151, in gen_region
  File "/work/users/weather/user/manh/MPAS-Limited-Area/limited_area/", line 325, in subset_fields
    region.mesh.variables[var][:] = arrTemp[glbBdyCellIDs]
  File "/work/apps/gnu_4.8.5/python/3.6.2/lib/python3.6/site-packages/numpy/ma/", line 3220, in __getitem__
    dout =[indx]
In additional, I using a python/3.6.2_gnu_64 to run it. Please help me address this problem.
Many thank!
It looks like create_region is failing while subsetting the qv field from However, I'm not seeing the qv field from the static file that was provided with the tutorial. Just to confirm, are you using the file from the tar file located just after the slides on the MPAS Tutorial web page (mpas_tutorial.tar.gz)?

Regardless of the above, if you are trying to subset a time variant field (like qv), you'll need to use the master branch of the MPAS-Limited-Area tool, as it has been updated to subset these fields. The tutorial branch of the MPAS-Limited-Area tool unfortunately hasn't been updated with these changes yet. You can checkout the master branch by running:

git checkout master

Give the same command a try on the master branch and see how that goes and please let us know if you still continue to have issues.
Hi mcurry,
I follow your suggestion and checkout the master branch by running:
git checkout master
then, I run create_region again and it works. Two files, including and, are created.
./create_region mediterranean.pts
Thank you very much!
Yes, it does work; man, was it difficult to find my way out of this when I was following the online tutorial... I didn't think immediately of running the process again, and was trying to circumvent it to no avail.
Sorry, everyone, for what was essentially bad guidance in the online tutorial. The in-person tutorial in 2019 made use of a computer lab with Python installed in a particular way, which necessitated a special branch of the MPAS-Limited-Area tool. The 'master' branch of MPAS-Limited-Area has since evolved to support the subsetting of time-varying fields, while the 'tutorial' branch has not changed.

I've just updated section 4.1 of the online tutorial to remove the text about switching to the 'tutorial' branch of the MPAS-Limited-Area tool.
As well I've updated the tutorial branch of the MPAS-Limited-Area tool to be up-to-date with master, so it now can subset Time variant fields.