Skip to content

Boorhin/Telemac3D_to_xarray

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 

Repository files navigation

Telemac3D_to_xarray

A script to convert a Selafin file from Telemac 3D into a Xarray file tentatively compliant with CF convention and U-Grid.

Disclaimer

  • This has only be tested on a very limited case of Selafin files we use in our studies.
  • The reading of Selafin file is possible only if you have properly installed Telemac 3D on your computer. We do not provide the scripts as they are not maintained on git but SVN.
  • It is uncertain that the Dask implementation is made in the most optimal way.

To do

  • The remapping variable function should be implemented for all the potential variables generated by Telemac into a standard name. Support from Telemac to provide the list of Selafin variables [has been asked but not yet answered yet] (http://www.opentelemac.org/index.php/kunena/scripts/13550-mapping-telemac3d-variables-into-cf-compliant-variables).
  • Check that the files are actually close to be compliant with the standards. At the moment it seems functional but proper testing is needed.
  • add options to optimise the zarr and the xarray datasets (chunks and compression)
  • Make the logger to display the informations of progress
  • Make the crs / projection handling as a dictionary parameter to send to the class T3D_Xr

Usage

from datetime import datetime
from Telemac3D_to_Xarray import T3D_Xr
slf_file= 'somefile.slf'
name = 'overwriting the name of the selafin file'
# overwrite selafin starting date if absent
start_time=datetime(year=1997,month=8,day=29)
#overwrite the default zarr store name somefile.slf.zarr
store='my_store.zarr'
# Build the X_array
a = T3D_Xr(filename=slf_file, store=store, name=name, start_time=start_time)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages