Comments (6)
OK. I guess I will just close the issue.
from thalassa.
Hello Atieh
I am afraid we haven't really looked into 3D output.
Judging from the screenshots, my guess is that there is some issue with the element connectivity.
ds = xr.open_dataset("~/Downloads/stofs_3d_atl.t12z.n001_024.field2d.nc")
ds.dims
ds.SCHISM_hgrid_face_nodes.min().values
ds.SCHISM_hgrid_face_nodes.max().values
outputs
FrozenMappingWarningOnValuesAccess({'time': 24, 'nSCHISM_hgrid_node': 2654153, 'nSCHISM_hgrid_face': 5039151, 'nMaxSCHISM_hgrid_face_nodes': 3})
array(3, dtype=int32)
array(2653944, dtype=int32)
Do notice that the node connectivity only starts from 3 and only reaches up to 2653944 instead of 2654153.
So, it seems that these files don't contain the full mesh for whatever reason.
related: #61
from thalassa.
You can try to copy the mesh connectivity from the schout_adcirc_*
file and then it should might work. You will probably need to rename a bunch of dimensions though.
from thalassa.
@pmav99 Thank you so much for the great suggestion. I tried to use the format and names inside the shout_adcirc file and rename and replace values and dimensions in field2d.nc files.
Then I renamed and replaced the dimensions and variables in field2d.nc files.
ds2= ds2.rename({'nSCHISM_hgrid_node': 'node', 'nSCHISM_hgrid_face': 'nele', 'nMaxSCHISM_hgrid_face_nodes': 'nvertex'})
ds2 = ds2.drop_dims('nele')
ds2['nele'] = ds['nele']
ds2['nvertex']=ds['nvertex']
ds2['element']= ds['element']
ds2= ds2.rename({'SCHISM_hgrid_node_x': 'x', 'SCHISM_hgrid_node_y': 'y'})
ds2
I normalized and cropped the data using Thalassa.
When I plot the data the depth values look OK, but for the rest of variables, there are a lot of missing data.
The same happens when I copy each variable to shout_adcirc file.
from thalassa.
Hmm... The missing values seem to be on triangles that are over land. So it could be that some kind of mask is applied on the dataset. Have you checked if there are values there? I suspect that there are nan
s for elev
etc.
Check the original netcdf files. Not the normalized datasets. E.g. with
ds_orig = xr.open_dataset(...)
ds_orig.isel(nSCHISM_hgrid_node=0).elev.values
If this is the case, this should also explain why these files contain a subset of the connectivity. The mask must have been applied there, too.
from thalassa.
@pmav99, you're correct. I looked into the nodes in the original dataset near the areas that show as nan
in the plots, and it seems that most of them are nan
. Thanks a lot for your help and time.
from thalassa.
Related Issues (20)
- Add support for ADCIRC HOT 4
- Visualizing Global Meshes HOT 5
- Clean up Seareport references
- Test Schism 5.10 (new IO) 3D meshes HOT 3
- Need example for SCHSIM old I/O HOT 16
- setup binder
- docs: Visualizing maximum elevation from SCHISM HOT 3
- update to bokeh 3.0 HOT 1
- Add TELEMAC support HOT 2
- Add high(er) level API for interactive usage HOT 1
- Add a way to easily create timelapses
- Consider using cf-xarray and CF-standard for the thalassa schema.
- Consider using cmocean for the colormaps
- Consider using xoak for getting the closest node to the specified lon/lat
- default_kwargs not recognised with custom engine HOT 1
- Polygon-Based Data Cropping HOT 6
- Current vector plot
- normalisation for GENERIC formats -- naming conventions HOT 5
- Add screenshots to the docs/README
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from thalassa.