Skip to content

feat(converters,utils): add support for vector quantities in TIM file conversion - #1209

Open
riordache12 wants to merge 2 commits into
mainfrom
bug/761-uxuyadvectionvelocitybnd-boundary-condition-with-two-columns-in-the-tim-file-gives-an-error
Open

riordache12 wants to merge 2 commits into
mainfrom
bug/761-uxuyadvectionvelocitybnd-boundary-condition-with-two-columns-in-the-tim-file-gives-an-error

Conversation

@riordache12

@riordache12 riordache12 commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Description

The following description of the expected result comes from Julien.

There are some quantities that can have similarly have multiple columns in the *.tim file, some examples:

  • windxy
  • airpressure_windx_windy
  • humidity_airtemperature_cloudiness
  • discharge_salinity_temperature_sorsin
  • uxuyadvectionvelocitybnd

For some it is known that it is always 2 or 3 columns (time, windx, windy) for other it depends on the number of constituents (discharge_salinity_temperature_sorsin)

For uxuyadvectionvelocitybnd, I suggest converting to:

[Forcing]
name              = L1_0001
function          = timeseries
timeInterpolation = linear
quantity          = time
unit              = minutes since 2000-01-01 00:00:00 +00:00
vector            = uxuyadvectionvelocitybnd:ux,uy
quantity          = ux
unit              = m s-1
quantity          = uy
unit              = m s-1
0       1 2 
123456  3 4

I've used model: c011_san_francisco_bay_3d in order to test and debug. I've noticed that the quantity names and units were not displayed so I've introduced them inside data.yaml, in a similar fashion with how you have introduced old_to_new_quantity_names in the past. I'm validating if that format is respected. Then I use that definition to create a ForcingBlock that would comprise everything, but I only do it if those vectors are specified, otherwise the functionality remains unchanged.

Tests still need to be generated.

Check relevant points.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • Limited tests, mostly checking the new utils validators

Checklist:

Prepare items below using:
[ ❌ ] (markdown: [ :x: ]) for TODO items
[ ✅ ] (markdown: [ :white_check_mark: ]) for DONE items
[ N/A ] for items that are not applicable for this PR.

  • updated version number in setup.py/pyproject.toml/environment.yml.
  • updated the lock file.
  • added changes to History.rst.
  • updated the latest version in README file.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • documentation are updated.

@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

uxuyadvectionvelocitybnd boundary condition with two columns in the tim file gives an error

1 participant