MPAS-Dev / MPAS-Limited-Area

Python tool to create a regional subset of a global MPAS Mesh
http://mpas-dev.github.io/
21 stars 10 forks source link

`create_region` can be very slow #45

Open knubez opened 2 years ago

knubez commented 2 years ago

I've been trying to cut an elliptical-shaped region of a 15-km--3-km variable mesh using the create_region tool. Although cutting the region using custom points is faster, for post-processing matters, the elliptical shape is better, however, it takes over 15 hours to complete. This is not ideal as I haven't figured out a way to plot the ellipse I'm defining before creating the region, so I have to wait each time for it to run in order to check if the elliptical-shaped region is of the right size and angle, and over the desired region. I will note that it doesn't take as long with coarser resolutions.

mgduda commented 2 years ago

Can you post the definition of your elliptical region (along with any rotation that you've applied to the 15-3 km elliptical refinement mesh)? I'll try to reproduce the issue and see if I can find a way to optimize the region extraction.

knubez commented 2 years ago

Sure thing!

Ellipse:

Name: Africa
Type: ellipse
Point: 10, -5
Semi-major-axis: 5000000   # Meters
Semi-minor-axis: 2500000     # Meters
Orientation-angle: 90

Rotation of 15-3 km elliptical refinement mesh:

&input
   config_original_latitude_degrees = 0
   config_original_longitude_degrees = 0

   config_new_latitude_degrees = 10.0
   config_new_longitude_degrees = -5.0
   config_birdseye_rotation_counter_clockwise_degrees = -5
/

Thanks!