Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@sbrus89
Copy link
Collaborator

@sbrus89 sbrus89 commented May 13, 2022

No description provided.

@sbrus89 sbrus89 added ocean in progress This PR is not ready for review or merging labels May 13, 2022
@sbrus89 sbrus89 requested a review from xylar May 13, 2022 21:59
@pep8speaks
Copy link

pep8speaks commented May 13, 2022

Hello @sbrus89! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2022-07-05 05:53:11 UTC

@sbrus89
Copy link
Collaborator Author

sbrus89 commented May 13, 2022

@xylar - This is still a work in progress, but I started the PR in case you want to keep tabs and point out any issues along the way.

@sbrus89 sbrus89 force-pushed the hurricane branch 2 times, most recently from fb1cba7 to b8d9709 Compare May 19, 2022 15:20
@sbrus89 sbrus89 force-pushed the hurricane branch 6 times, most recently from 306b33d to 199e954 Compare May 26, 2022 20:21
@sbrus89
Copy link
Collaborator Author

sbrus89 commented May 26, 2022

@xylar, I still need to do the documentation on this, but I think it's ready for you to look at when you have time.

@sbrus89 sbrus89 force-pushed the hurricane branch 3 times, most recently from 3e6e394 to cdb5ebf Compare June 1, 2022 14:07
Copy link
Collaborator

@xylar xylar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is superb work! Very exciting to see this come together so nicely.

When I try to set up the 3 tests on Anvil, I'm seeing:

$ compass setup -n 211 212 213 -p E3SM-Project/components/mpas-ocean -w /lcrc/group/e3sm/ac.xylar/compass_1.1/anvil/test_20220607/hurricane
Setting up test cases:
  ocean/hurricane/DEQU120at30cr10rr2/mesh
  ocean/hurricane/DEQU120at30cr10rr2/init
  ocean/hurricane/DEQU120at30cr10rr2/sandy
Traceback (most recent call last):
  File "/home/ac.xylar/anvil/miniconda3/envs/compass_hurricane/bin/compass", line 33, in <module>
    sys.exit(load_entry_point('compass', 'console_scripts', 'compass')())
  File "/gpfs/fs1/home/ac.xylar/mpas-work/compass/hurricane/compass/__main__.py", line 63, in main
    commands[args.command]()
  File "/gpfs/fs1/home/ac.xylar/mpas-work/compass/hurricane/compass/setup.py", line 372, in main
    setup_cases(tests=tests, numbers=args.case_num,
  File "/gpfs/fs1/home/ac.xylar/mpas-work/compass/hurricane/compass/setup.py", line 146, in setup_cases
    setup_case(path, test_case, config_file, machine, work_dir,
  File "/gpfs/fs1/home/ac.xylar/mpas-work/compass/hurricane/compass/setup.py", line 289, in setup_case
    step.setup()
  File "/gpfs/fs1/home/ac.xylar/mpas-work/compass/hurricane/compass/ocean/tests/hurricane/analysis/__init__.py", line 72, in setup
    with open(path) as stations_file:
TypeError: expected str, bytes or os.PathLike object, not _GeneratorContextManager

I'll see if I can understand what might be going wrong there.

I'm running some checks to make sure the nightly suite still works as expected as well.

compass/ocean/__init__.py Outdated Show resolved Hide resolved
compass/ocean/tests/global_ocean/mesh/mesh.py Outdated Show resolved Hide resolved
compass/ocean/tests/hurricane/mesh/__init__.py Outdated Show resolved Hide resolved
compass/ocean/tests/hurricane/forward/__init__.py Outdated Show resolved Hide resolved
compass/ocean/tests/hurricane/forward/forward.py Outdated Show resolved Hide resolved
compass/ocean/tests/hurricane/forward/forward.py Outdated Show resolved Hide resolved
compass/ocean/tests/hurricane/analysis/__init__.py Outdated Show resolved Hide resolved
compass/ocean/tests/hurricane/analysis/__init__.py Outdated Show resolved Hide resolved
@xylar
Copy link
Collaborator

xylar commented Jun 8, 2022

Nightly test suite looks good. I didn't try a BFB comparison yet.

@xylar
Copy link
Collaborator

xylar commented Jun 8, 2022

@sbrus89, I'll note that there will be some pretty significant conflicts between this branch and #402. If #402 gets merged first, I'll be happy to help you refactor this. But I may hold off on #402 until this can go in as long as you think you might get to it soonish.

Copy link
Collaborator

@xylar xylar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coming along! But i'm still running into an issue, see below.

@xylar
Copy link
Collaborator

xylar commented Jun 17, 2022

@sbrus89, it doesn't look like you pushed the changes that address my comments yet. Happy to re-re-review when that happens.

Copy link
Collaborator

@xylar xylar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got a bit further in my testing but it seems like we'll need to work on this still because of memory constraints.

When running on Anvil, I'm seeing:

  File "/gpfs/fs1/home/ac.xylar/mpas-work/compass/hurricane/compass/run/serial.py", line 130, in run_tests
    test_case.run()
  File "/gpfs/fs1/home/ac.xylar/mpas-work/compass/hurricane/compass/ocean/tests/hurricane/init/__init__.py", line 61, in run
    super().run()
  File "/gpfs/fs1/home/ac.xylar/mpas-work/compass/hurricane/compass/testcase.py", line 166, in run
    self._run_step(step, self.new_step_log_file)
  File "/gpfs/fs1/home/ac.xylar/mpas-work/compass/hurricane/compass/testcase.py", line 282, in _run_step
    step.run()
  File "/gpfs/fs1/home/ac.xylar/mpas-work/compass/hurricane/compass/ocean/tests/hurricane/init/interpolate_atm_forcing.py", line 251, in run
    np.square(v_data[2][:]))
numpy.core._exceptions._ArrayMemoryError: Unable to allocate 16.9 GiB for an array with shape (1465, 881, 1761) and data type float64

# number of threads
forward_threads = 1
.. _global_ocean_mesh:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.. _global_ocean_mesh:
.. _hurricane_mesh:

docs/users_guide/ocean/test_groups/hurricane.rst Outdated Show resolved Hide resolved
docs/users_guide/ocean/test_groups/hurricane.rst Outdated Show resolved Hide resolved
Comment on lines 246 to 253
vel_interp = u_interp
vel_interp[2][:] = np.sqrt(np.square(u_interp[2][:]) +
np.square(v_interp[2][:]))
vel_data = u_data
vel_data[2][:] = np.sqrt(np.square(u_data[2][:]) +
np.square(v_data[2][:]))
self.plot_interp_data(vel_data, vel_interp,
'velocity magnitude', 'vel', xtime)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be necessary to iterate over one of the 3 dimensions here (probably time) and compute the velocity magnitude separately for each time index. Slower but much less memory intensive.

If you were to do this with xarray instead, you could use its chunking in time to handle this.

@xylar xylar self-assigned this Jun 24, 2022
@xylar
Copy link
Collaborator

xylar commented Jun 24, 2022

@sbrus89, this is the only other PR currently slated for inclusion in v1.1.0. But, as we discussed on Wednesday, that's up to you. If you want to fix the memory issue sometime between now and July 4th, I'll include it. If you don't have time, I'll move it to v1.2.0.

@sbrus89
Copy link
Collaborator Author

sbrus89 commented Jun 24, 2022

@xylar, sounds good. I'm working on testing to see if I was able to fix the memory issues on Anvil right now.

@sbrus89
Copy link
Collaborator Author

sbrus89 commented Jun 24, 2022

@xylar, it looks like this is working for me on Anvil now.

@xylar xylar removed the in progress This PR is not ready for review or merging label Jul 5, 2022
Copy link
Collaborator

@xylar xylar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sbrus89, I ran this on Anvil and it worked great for me this time! I'll take your word that the plots it produces make sense but they look reasonable to me.

@xylar xylar added the enhancement New feature or request label Jul 5, 2022
@xylar xylar merged commit 569e336 into MPAS-Dev:master Jul 5, 2022
@sbrus89
Copy link
Collaborator Author

sbrus89 commented Jul 5, 2022

Thanks @xylar !

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

Labels

enhancement New feature or request ocean

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.