Skip to content

+Add query_wave_properties & fix NUOPC wave queries#1443

Merged
marshallward merged 4 commits into
mom-ocean:dev/gfdlfrom
Hallberg-NOAA:NUOPC_wave_fix
Jul 17, 2021
Merged

+Add query_wave_properties & fix NUOPC wave queries#1443
marshallward merged 4 commits into
mom-ocean:dev/gfdlfrom
Hallberg-NOAA:NUOPC_wave_fix

Conversation

@Hallberg-NOAA
Copy link
Copy Markdown
Collaborator

Added a new routine, query_wave_properties, that can be call to get
information about the wave properties from the waves control structure, and
added a get_param call for SURFBAND_WAVENUMBERS to MOM_wave_interface_init when
it is using the options that are typical with NUOPC coupler. These changes
should allow the NUOPC coupler to compile and work again, while still keeping
the same level of opacity in the wave_parameters_CS. All answers should be
bitwise identical, although the order of some entries in the MOM_parameter_doc
files may change when coupled with waves is WAVE_METHOD=SURFACE_BANDS and
SURFBAND_SOURCE=COUPLER.

  Added a new routine, query_wave_properties, that can be call to get
information about the wave properties from the waves control structure, and
added a get_param call for SURFBAND_WAVENUMBERS to MOM_wave_interface_init when
it is using the options that are typical with NUOPC coupler.  These changes
should allow the NUOPC coupler to compile and work again, while still keeping
the same level of opacity in the wave_parameters_CS.  All answers should be
bitwise identical, although the order of some entries in the MOM_parameter_doc
files may change when coupled with waves is WAVE_METHOD=SURFACE_BANDS and
SURFBAND_SOURCE=COUPLER.
  Moved the recently added call to read SURFBAND_WAVENUMBERS into an array when
SURFBAND_SOURCE=COUPLER down by a line to follow the allocate call for that
array.  This change should avert a memory access problem that would otherwise
arise when exercising this newly added code.  All answers are bitwise identical
in any case that ran with the previous version, and they should reproduce
answers from before this PR as a whole, although obviously this code is not
as well tested as would be ideal, based on the fact that this bug was in the
last commit, which also passed testing.
Comment thread src/user/MOM_wave_interface.F90 Outdated
Hallberg-NOAA and others added 2 commits July 15, 2021 10:23
  Added the new routine query_ocean_state to mom_ocean_model_nuopc to allow
for the wave properties to be obtained by the mom_cap without having to rely on
the elements of an otherwise opaque type being public.  I believe that all
elements of the ocean_state_type could now be declared as private, and that the
version of MOM6 with the NUOPC coupler should now work as intended.
@marshallward
Copy link
Copy Markdown
Collaborator

I have run the Gaea regression suite manually and can confirm that this has passed the regression suite.

We will repeat this test through GitLab when the runners are back online.

@marshallward marshallward merged commit fee595c into mom-ocean:dev/gfdl Jul 17, 2021
@Hallberg-NOAA Hallberg-NOAA deleted the NUOPC_wave_fix branch November 22, 2021 09:08
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.

2 participants