You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Script to run regional simulations similar to run_neon script #1533
We want to provide a script to run regional simulations that's similar to the run_neon script. It will be built to use the inputdata files that results from the subset_data script. One important point about the regional case from single point cases is that mesh files are required, so that will change the setup a bit. Also single point cases set PTS_LAT/PTS_LON which won't be done for the regional case.
A separate but related task to this is to have a script to run a single points site after subset_data is run. There's likely a lot of infrastructure that the run_neon, run_tower, and run_regional scripts could have in common. We should try to structure them so they can share as much code as possible, which will make them much easier to maintain.
This is the original start of this issue from Will. We decided this overlaps with #1513 so we are separating it out to just this one issue...
regional simulations with nuopc will need to generate mesh files. @mvertens@ekluzek noted there are .ncl tools available for this, but @danicalombardozzi and @negin513 suggested this be wrapped into a run_regional wrapper script that does this for users.
This functionally isn't really part of the NEON project, but it could leverage some of the python wrapper tools used in run_neon that have already been created by @jedwards4b and @negin513.
@wwieder this is pretty much a duplicate of #1513. The mesh file creation wouldn't go into run_regional it would go into subset_data. The thing I'm not clear on is exactly how we do that. One process would be to create a mesh file from the domain file that subset_data creates. That might be a mid-term solution, because in the end we don't need domain files. I'm just not sure about how to create a mesh file from subset_data.
In principle subset_data can also subset SCRIP grid files, but the problem is that they are in 1D vector format, so the subsetting doesn't look the same as the 2D grid files. I suppose it is the same for unstructured grids though.
@ekluzek I think there are two parts to this process. First is that the mesh files need to be created, and the second is that all the files for the regional simulation need to be updated in the case. It sounds like the first part might be similar to #1513. The second part is what @adrifoster, @negin513, and I have discussed tackling. I think both pieces would be very useful to help people set up regional simulations easily, similar to the super easy workflow in the run_neon script.
Ahh, OK, thanks for the discussion. @danicalombardozzi I think what you are saying is that you want a run_regional script that works similar to the run_neon script. So that's a script that you run after subset_data to run a regional case. subset_data should create all the input datafiles needed to run the regional case, but you could use run_regional to create the case for you.
If that's correct, then I propose that we change this issue into one that's about making the run_regional script, and leave #1513 as it is.
@ekluzek, yes, a 'run_regional' script would set up the case similar to the run_neon script. It would set up all the newly created datm and mesh files (and anything else required) in a case that a user could run. This would majorly simplify the process for running a regional simulation. We've also been discussing a similar script for single point simulations, similar to the run_neon, but for a user specified location rather than the NEON data we already have available.
I thought this would be part of the hackathon we plan. So I started assigning the team to work on this. But, I realized this is about regional cases so I unassigned the team from it.
This still somewhat applies though in that we should be thinking about the python modules being able to work for both single-point and regional cases. There might be a separate tool (or python module like in subset_data), but we do want to have some part of it shared between single-point and regional cases.
At this point I don't suggest we create and maintain a python wrapper to run regional cases. Instead, clearer documentation that walks a user through subsetting data capabilities, mesh creation, and that provides an example of how to create a new case seems more appropriate?
Maybe the other think I'll add here is that using subset_data for point cases creates usermod_dirs that set up cases correctly for users. I'm assuming this is also true for regional applications, but if not, maybe that's where we can invest a bit of time?
Activity
ekluzek commentedon Oct 21, 2021
@wwieder this is pretty much a duplicate of #1513. The mesh file creation wouldn't go into run_regional it would go into subset_data. The thing I'm not clear on is exactly how we do that. One process would be to create a mesh file from the domain file that subset_data creates. That might be a mid-term solution, because in the end we don't need domain files. I'm just not sure about how to create a mesh file from subset_data.
In principle subset_data can also subset SCRIP grid files, but the problem is that they are in 1D vector format, so the subsetting doesn't look the same as the 2D grid files. I suppose it is the same for unstructured grids though.
danicalombardozzi commentedon Oct 21, 2021
@ekluzek I think there are two parts to this process. First is that the mesh files need to be created, and the second is that all the files for the regional simulation need to be updated in the case. It sounds like the first part might be similar to #1513. The second part is what @adrifoster, @negin513, and I have discussed tackling. I think both pieces would be very useful to help people set up regional simulations easily, similar to the super easy workflow in the run_neon script.
wwieder commentedon Oct 21, 2021
I'm happy to migrate this conversation over to #1513 to avoid duplicating issues. Your call @ekluzek and @danicalombardozzi
ekluzek commentedon Oct 22, 2021
Ahh, OK, thanks for the discussion. @danicalombardozzi I think what you are saying is that you want a run_regional script that works similar to the run_neon script. So that's a script that you run after subset_data to run a regional case. subset_data should create all the input datafiles needed to run the regional case, but you could use run_regional to create the case for you.
If that's correct, then I propose that we change this issue into one that's about making the run_regional script, and leave #1513 as it is.
danicalombardozzi commentedon Oct 22, 2021
@ekluzek, yes, a 'run_regional' script would set up the case similar to the run_neon script. It would set up all the newly created datm and mesh files (and anything else required) in a case that a user could run. This would majorly simplify the process for running a regional simulation. We've also been discussing a similar script for single point simulations, similar to the run_neon, but for a user specified location rather than the NEON data we already have available.
[-]regional simulations with nuopc[/-][+]Script to run regional simulations similar to run_neon script[/+]ekluzek commentedon Dec 8, 2021
We have some disscussion in #1565 that overlaps with this.
ekluzek commentedon Feb 2, 2022
Polly B. and Sanjiv K. from the community are willing to be guinea pigs for this work on regional scripts.
12 remaining items
ekluzek commentedon Sep 6, 2023
I thought this would be part of the hackathon we plan. So I started assigning the team to work on this. But, I realized this is about regional cases so I unassigned the team from it.
This still somewhat applies though in that we should be thinking about the python modules being able to work for both single-point and regional cases. There might be a separate tool (or python module like in subset_data), but we do want to have some part of it shared between single-point and regional cases.
wwieder commentedon Mar 11, 2025
At this point I don't suggest we create and maintain a python wrapper to run regional cases. Instead, clearer documentation that walks a user through subsetting data capabilities, mesh creation, and that provides an example of how to create a new case seems more appropriate?
Maybe the other think I'll add here is that using subset_data for point cases creates usermod_dirs that set up cases correctly for users. I'm assuming this is also true for regional applications, but if not, maybe that's where we can invest a bit of time?
negin513 commentedon Mar 12, 2025
@wwieder : This gist walks through the exact steps you outlined here for running regional cases:
https://gist.github.com/negin513/d71268419f808b91a82cde5530d390b1
samsrabin commentedon Mar 13, 2025
Closing as too hard and not useful.