Skip to content
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

Reproducibility issue for ROMS-Tools Grid when RiverForcing or Nesting is used #201

Open
NoraLoose opened this issue Dec 18, 2024 · 0 comments

Comments

@NoraLoose
Copy link
Contributor

I want to surface a potential reproducibility issue in C-Star due to the way ROMS / ROMS-Tools handles river forcing and nesting.

A grid is created and saved via step 0:

grid = roms_tools.Grid(**kwargs)
grid.save(path)  # saves grid variables to NetCDF
grid.to_yaml(yaml_path)  # saves kwargs to YAML

In two instances (both of which are optional), ROMS-Tools modifies the grid file after the fact (because a modified grid file is what ROMS expects):

  1. When a RiverForcing class is created, a new variable river_flux gets added to the grid file, see here.
  2. When a Nesting class is created via
nesting = roms_tools.Nesting(parent_grid=parent_grid, child_grid=child_grid)
nesting.save(path, child_grid_path)  # saves nesting information and updated child grid to NetCDF

the child grid topography and mask get modified along the boundaries so that they are compatible with the parent grid, see here.

In other words, there is a difference in the grid files depending on whether (optional) steps 1 and 2 are executed or not. Step 1 does not modify the existing grid variables (so it's not too bad), but step 2 modifies the existing grid variables.

Just reporting this here because this needs further discussion.

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

No branches or pull requests

1 participant