-
Notifications
You must be signed in to change notification settings - Fork 269
Add two-way ocean-wave coupling feature to the HAFS applications #2584
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
base: develop
Are you sure you want to change the base?
Add two-way ocean-wave coupling feature to the HAFS applications #2584
Conversation
@binli2337 Don't you know the value which will be sent from non-overlapped regions (ie, the fillvalue). Why is it necessary to check for the difference between the field and the fillvalue ... for example in MOM6 : |
@DeniseWorthen When comparing floating point numbers, it is generally recommended to check if the absolute difference between the two numbers is less than a tiny value. In this specific case, since stkx and fillvalue are constant, it is probably not necessary to check the absolute difference. Thanks for reviewing the code. |
@binli2337 If your argument about 'checking small differences' pertains, then shouldn't you make sure both components are tested?
|
@DeniseWorthen In the related CMEPS PR, the Stokes drift components for the x direction and the y direction are filled with the fill value in the same non-overlapped areas (from line 603 to line 610 in the esmFldsExchange_hafs_mod.F90 file). So in the MOM6 PR, when stkx has the fill value, the stky will always has the same fill value. Checking whether abs(stky(i,j,ib)-fillValue) is less than a small number is not needed. |
@binli2337 I'm confused how you are using waves in MOM6 w/o updating your |
See this code from the MOM cap
How is MOM6 importing and using waves when the use_waves parameter is not present in the |
tests/parm/MOM_input_hafs
Outdated
@@ -972,5 +997,3 @@ USE_NET_FW_ADJUSTMENT_SIGN_BUG = False ! [Boolean] default = True | |||
! === module MOM_restart === | |||
|
|||
! === module MOM_file_parser === | |||
|
|||
USE_HUYNH_STENCIL_BUG = True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this parameter needs to be here (false is its default), other wise it will break mpi test (answer change with different PE #) on wcoss2. There is a FMA bug in the code but GFDL haven't figured it out yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jiandewang The file "MOM_input_hafs" has been updated. Thanks!
@DeniseWorthen The file "MOM_input_hafs" has been updated for the 2-way ocean wave coupling test. The test name is hafs_regional_storm_following_1nest_atm_ocn_wav_mom6. Thanks! |
@binli2337 Are you using a new or updated WW3 mod_def for this test? If not, I believe you are exporting all 0s from WW3 for the stokes components. See this line You need to have the following line in your inp file for WW3 in order to calculate the stokes for export:
How are you testing this? Have you verified non-zero stokes fields sent to OCN? |
@DeniseWorthen Yes, the model definition file has been updated with the stokes drift components. The updated file is from my input directory on Hera. You can verify the stokes drift fields from the mediator history file. |
@binli2337 Thanks, I found the mod_def (we need to be careful and commit the updated inp file too). But I still don't understand why the changes are necessary in WW3 or MOM6. I ran the mom6 RT w/ only your changes to CMEPS (to add the field exchanges). All the stokes drifts components are already 0.0 in the areas where there is no overlap. |
@DeniseWorthen Thank you for identifying some interpolation issues. The issues have been fixed. |
@binli2337 It's not clear what you mean. Do your latest changes mean that you now see non-zero stokes components where there is no overlap? |
@DeniseWorthen @JessicaMeixner-NOAA , The most recent HAFS-MOM6-WW3 test is located at /scratch1/NCEPDEV/stmp2/Bin.Li/FV3_RT/rt_3666111/hafs_regional_storm_following_1nest_atm_ocn_wav_mom6_intel. From the mediator history file "ufs.hafs.cpl.hi.2020-08-25-54000.nc" you can see that the Stokes drift fields (OCNEXP_SW_PSTOKES_X1) and ocean current fields (WAVEXP_SO_U) are all missing values in the non-overlapped regions. So the updates in MOM6 cap and WW3 cap are necessary to set the missing values to 0. Thanks! |
@binli2337 This is fundamentally an issue of non-matching land masks for the OCN and WAV models. We have the exact same issue in the global model, when we don't run the OCN and WAV on the same grids. Using your run-directory, I added the config attribute to write the dststatus information (write_dststatus = true). In the figures below, pink=unmapped. They're unmapped because the destination is w/in a masked part of the source grid. This is ocn->wav ![]() If instead you switch your wav<-->ocn mapping to be See my run directory /scratch1/NCEPDEV/stmp2/Denise.Worthen/FV3_RT/hafs/test.nstod which is the current develop branch of ufs using only your change to the hafs fieldExchange (no changes to WAV or OCN), with this modifcation
|
@DeniseWorthen We tried the mapbilnr_nstod method a few months ago. When the ocean domain and the wave domain are almost completely overlapped, the results from the interpolation look good when the mapbilnr_nstod method is used. But in one of our configurations used for operation, the wave domain (see fig. 1) is much smaller than the ocean domain (fig. 2). When the mapbilnr_nstod method is used to interpolate the Stokes drift field from the wave grid (fig. 1) to the ocean grid (fig. 2), some features appear in the non-overlapped regions. When the mapfillv_bilnr method is used and when the missing value is set to zero, the interpolated results look better (see fig. 3 and fig. 4). fig.1 One of the Stokes drift components in WW3 domain fig.2 Stokes drift field fter regridding using mapbilnr_nstod method from WW3 grid to MOM6 grid fig.3 One of the Stokes drift components in WW3 domain fig.4 Stokes drift field after regridding using mapfillv_bilnr method from WW3 grid to MOM6 grid |
@binli2337 I apologize for the long delay in having a chance to look at this PR again. Thanks for posting the figures above. Looking at your test change list, why does any test other than the Secondly, I was looking a different issue (#2676). I realized that no HAFS test is actually using the SSC to modify the surface stresses. Why is that? The feature was specifically added for HAFS but it is not being used in any of the RTs. This can be verified by running the HAFS RTs and checking that Finally, we need the new |
@binli2337 I've created Issue #2742. Please take a look. |
@DeniseWorthen Thanks for the suggestions. I will revise the PR to use icplocn2atm=1 for the hafs_regional_storm_following_1nest_atm_ocn_wav_mom6 test so that the ocean currents are used in the air-sea flux calculation. |
@binli2337 Thanks for the updates. I checked which files failed comparison in your test_changes.list. I see that for everything but the MOM6 test, the change was only in the binary WW3 gridded output (due to the mod_def change), except for the |
to include ocean currents in the air-sea flux calculations.
Commit Queue Requirements:
Description:
The ufs-weather-model will be updated to include two-way ocean-wave coupling capability for HAFS applications.
Commit Message:
Priority:
Git Tracking
UFSWM:
Sub component Pull Requests:
UFSWM Blocking Dependencies:
Changes
Regression Test Changes (Please commit test_changes.list):
Input data Changes:
/scratch1/NCEPDEV/hwrf/save/Bin.Li/UFS-WM_RT/NEMSfv3gfs/input-data-20250507/WW3_input_data_20250225/createmoddefs/ww3_grid.inp.natl_6m
/scratch1/NCEPDEV/hwrf/save/Bin.Li/UFS-WM_RT/NEMSfv3gfs/input-data-20250507/WW3_input_data_20250225/mod_def.natl_6m
Library Changes/Upgrades:
Testing Log: