-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add examples for subsetting STOFS outputs #16
Comments
STOFS 2D example is now available here: https://github.com/asascience-open/xarray-subset-grid/blob/main/examples/stofs_2d.ipynb |
@mpiannucci Thanks for the update. I will run the example code. Can we use the same code for fields.cwl.nc, fields.swl.nc, and fileds.htp.nc? Thanks! |
Yes the code would be the same for all of them assuming that they all have the same metadata. The 3D cases will require #20 tho so will revisit when that is done |
@mpiannucci and @omkar-334 @ChrisBarker-NOAA Thank you again for providing these amazing example codes for STOFS data. I was able to install the xarray-subset-grid package and use the STOFS-2D code to run a few examples. I have a few observations and suggestions:
|
@omkar-334, I was trying to test the STOFS-2D code and want to reuse the selector for an SWL file. Shouldn't this be ds_swl instead? If so, when I change it to ds_swl, I get this error: |
@omkar-334, thanks for putting the STOFS example code together. I tried to run the STOFS-3D example with the operational data, but it doesn’t seem to be working as expected. |
For CWL -> SWL subsetting, the same issues occur.
the CWL dataset is recognized as UGrid while the SWL is recognized as a RegularGrid. Both classes have different parameters and logic for the selector.
The SWL dataset doesn't have both |
@omkar-334, thanks for looking into this. The spatial grids for CWL and SWL are the same, similar to the temperature and out2d files. Since node connectivity is missing in some of the files, the idea was to read this information from files that include it, such as CWL for STOFS-2D and out2d for STOFS-3D. My understanding was that this was an automatic process: when we first read CWL and out2d files, the selector would collect this information, use the node information, and subset the data accordingly. |
By Grid type , I meant the Grids we have implemented in our code. There are 4 sub classes for the Selector - UGrid, SGrid, RegularGrid, RegularGrid2d. Each subclass has different logic and parameters. |
@omkar-334, thanks for the clarification. Both CWL and SWL have ugrid type. |
@AtiehAlipour-NOAA Yes , you are right. I meant that even though both are UGrid, our code recognizes one as RegularGrid because of the missing connectivity |
Would it be possible to refine the selector so that when we use it on CWL, it considers the node connectivity of CWL for the next file (SWL)? Alternatively, could we use assign_ugid_topology to provide those information? @ChrisBarker-NOAA @mpiannucci do you have any suggestions? |
Description
Add notebooks or example scripts for subsetting different STOFS outputs.
Below are example notebooks demonstrating how to subset the STOFS-3D-Atl data and visualize the resulting outputs:
https://github.com/AtiehAlipour-NOAA/Subsetting/blob/main/notebooks/KeyBridge_Visualization.ipynb
https://github.com/AtiehAlipour-NOAA/Subsetting/blob/main/notebooks/KeyBridge_multiple_files.ipynb
The goal is to provide examples that users can easily follow to subset data for their specific STOFS datasets of interest.
The text was updated successfully, but these errors were encountered: