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

Error running create_region

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.

weathertom

New member
When running create_region to make a limited area domain I'm running into an error. It ran fine (with the same points file defining the area) when I used the 15 km or 30 km meshes. But, when I tried the same thing using the 24 km mesh I'm getting the error below.

---------------------------------

Creating a regional mesh of ./x1.1024002.grid.nc
Marking /usr/lib/python3/dist-packages/numpy/core/numeric.py:301: FutureWarning: in the future, full(1024002, 0) will return an array of dtype('int64')
format(shape, fill_value, array(fill_value).dtype), FutureWarning)
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 latCell...
Copying variable lonCell...
Copying variable meshDensity...
Copying variable xCell...
Copying variable yCell...
Copying variable zCell...
Copying variable indexToCellID... reindexing field ... Done!
Copying variable latEdge...
Copying variable lonEdge...
Copying variable xEdge...
Copying variable yEdge...
Copying variable zEdge...
Copying variable indexToEdgeID... reindexing field ... Done!
Copying variable latVertex...
Copying variable lonVertex...
Copying variable xVertex...
Copying variable yVertex...
Copying variable zVertex...
Copying variable indexToVertexID... reindexing field ... Done!
Copying variable cellsOnEdge... reindexing field ... Done!
Copying variable nEdgesOnCell...
Copying variable nEdgesOnEdge...
Copying variable edgesOnCell... reindexing field ... Done!
Copying variable edgesOnEdge... reindexing field ... Done!
Copying variable weightsOnEdge...
Copying variable dvEdge...
Copying variable dv1Edge...
Copying variable dv2Edge...
Copying variable dcEdge...
Copying variable angleEdge...
Copying variable areaCell...
Copying variable areaTriangle...
Copying variable cellsOnCell... reindexing field ... Done!
Copying variable verticesOnCell... reindexing field ... Done!
Copying variable verticesOnEdge... reindexing field ... Done!
Copying variable edgesOnVertex... reindexing field ... Done!
Copying variable cellsOnVertex... reindexing field ... Done!
Copying variable kiteAreasOnVertex...
Copying variable fEdge...
Copying variable fVertex...
Copying variable h_s...
Copying variable u...
Traceback (most recent call last):
File "/home/mdladmin/mpas/MPAS-Limited-Area/create_region", line 59, in <module>
regional_area.gen_region(**kwargs)
File "/home/mdladmin/mpas/MPAS-Limited-Area/limited_area/limited_area.py", line 151, in gen_region
**kwargs)
File "/home/mdladmin/mpas/MPAS-Limited-Area/limited_area/mesh.py", line 333, in subset_fields
region.mesh.variables[var][:] = arrTemp[glbBdyEdgeIDs]
MemoryError
 
See github issue #28.

The problem is happening because a number of meshes were generated with an older mesh generation software. If you compare variables within the 24 km to the 15 km and the 30 km, you'll notice that the 24 km has several additional variables that the 15 and 30 do not. We are working on updating these meshes to not have these variables.

Code:
fEdge
fvertex
h_s
u
v
h
vh
circulation
vorticity
ke
tracers

A work around for the time being is to remove the unneeded variables using NCO's kitchen sink command:

Code:
ncks -x -v fEdge,fvertex,h_s,u,v,h,vh,circulation,vorticity,ke,tracers x1.1024002.grid.nc x1.1024002.grid.fix.nc

and then run create_region.

OR, and I highly recommend, interpolating the static fields for the entire global grid and then running create_region upon the static file. If its possible for your use case. The interpolating static fields currently takes a long time, so running it once and cutting out regions from the static file will save you time if you need a few tries at creating your region. Running the static interp will also remove the extra variables.

I just tested both of these methods today and they worked without a problem! But let us know if you have any more problems.
 
Top