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 x1.163842.static.nc
it failed. The detail is displayed below:
Code:
[weather@igplogin MPAS-Limited-Area]$ ./create_region mediterranean.pts x1.163842.static.nc
Creating a regional mesh of  x1.163842.static.nc
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>
    regional_area.gen_region(**kwargs)
  File "/work/users/weather/user/manh/MPAS-Limited-Area/limited_area/limited_area.py", line 151, in gen_region
    **kwargs)
  File "/work/users/weather/user/manh/MPAS-Limited-Area/limited_area/mesh.py", 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/core.py", line 3220, in __getitem__
    dout = self.data[indx]
MemoryError
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 x1.163842.static.nc. However, I'm not seeing the qv field from the x1.163842.static.nc static file that was provided with the tutorial. Just to confirm, are you using the x1.163842.static.nc 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:

Code:
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:
Code:
git checkout master
then, I run create_region again and it works. Two files, including Mediterranean.static.nc and Mediterranean.graph.info, are created.
Code:
./create_region mediterranean.pts x1.163842.static.nc
Thank you very much!
Manh,
 
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.
 
Top