-
Notifications
You must be signed in to change notification settings - Fork 565
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
Update WW3 cap for 2-way ocean-wave coupling #1348
base: dev/ufs-weather-model
Are you sure you want to change the base?
Update WW3 cap for 2-way ocean-wave coupling #1348
Conversation
model/src/wav_import_export.F90
Outdated
@@ -357,6 +359,11 @@ subroutine import_fields( gcomp, time0, timen, rc ) | |||
if (state_fldchk(importState, 'So_u')) then | |||
call SetGlobalInput(importState, 'So_u', vm, global_data, rc) | |||
if (ChkErr(rc,__LINE__,u_FILE_u)) return | |||
do isea = 1,nsea |
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 needs to be isolated so as to not to affect other users of the WW3 mesh cap.
@binli2337 is there a corresponding ufs-weather-model PR or did I miss it? |
@binli2337 We need a ufs-weather-model PR to correspond with this. I did a quick test and my log is here: I did not get the same results as you - all tests were the same, which honestly I was a little surprised about. I agree with @DeniseWorthen though- it would be best if this was isolated with a flag to turn on/off this feature. |
only when the case_name is ufs.hafs.
@JessicaMeixner-NOAA @DeniseWorthen I have updated the code to isolate the changes to the HAFS applications. I will submit a corresponding ufs-weather-model PR soon. Thanks. |
model/src/wav_import_export.F90
Outdated
@@ -357,6 +360,11 @@ subroutine import_fields( gcomp, time0, timen, rc ) | |||
if (state_fldchk(importState, 'So_u')) then | |||
call SetGlobalInput(importState, 'So_u', vm, global_data, rc) | |||
if (ChkErr(rc,__LINE__,u_FILE_u)) return | |||
do isea = 1,nsea | |||
if(casename == "ufs.hafs" .and. abs(global_data(isea)-fillv).lt.0.01) then |
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.
What about:
if(casename == "ufs.hafs") then
do isea = 1,nsea
if abs(global_data(isea)-fillv).lt.0.01) then
global_data(isea)=0.0
That way for non-hafs applications you are not going through this loop.
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.
@JessicaMeixner-NOAA I will revise the wav_import_export.F90 file.
The changes in WW3 alone will not change any baselines in the UFS regression tests since ocean-current fields are not transferred to WW3 using the emc/develop branch of CMEPS. A related CMEPS PR will transfer the fields.
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.
Thanks for the explanation @binli2337 !
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.
@binli2337 In the global model, we do export So_u
and So_v
to WAV.
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.
Good point @DeniseWorthen
@binli2337 can you share the ufs-waether-model PR ?
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.
@JessicaMeixner-NOAA The ufs-weather-model branch is at
https://github.com/binli2337/ufs-weather-model/tree/202501b/ocean_wave_update. A PR will be submitted soon.
model/src/wav_import_export.F90
Outdated
@@ -371,6 +374,14 @@ subroutine import_fields( gcomp, time0, timen, rc ) | |||
if (state_fldchk(importState, 'So_u')) then | |||
call SetGlobalInput(importState, 'So_u', vm, global_data, rc) | |||
if (ChkErr(rc,__LINE__,u_FILE_u)) return | |||
|
|||
if(casename == "ufs.hafs") then |
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.
I think you need trims on your casename
comparisons?
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.
@DeniseWorthen Updates have been made. Thanks!
model/src/wav_import_export.F90
Outdated
@@ -380,6 +391,13 @@ subroutine import_fields( gcomp, time0, timen, rc ) | |||
if (state_fldchk(importState, 'So_v')) then | |||
call SetGlobalInput(importState, 'So_v', vm, global_data, rc) | |||
if (ChkErr(rc,__LINE__,u_FILE_u)) return | |||
if(casename == "ufs.hafs") then |
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.
Does this need the same update that was done above?
@binli2337 - the dev/ufs-weather-model branch was updated yesterday. Please merge those changes into your branch here when you get a chance. |
@JessicaMeixner-NOAA Updates have been made. Thanks! |
Pull Request Summary
The file wav_import_export.F90 located at model/src will be updated to convert a missing value to zero for the HAFS application.
Description
The HAFS application in the ufs-weather-model will be updated to include 2-way ocean-wave coupling capability. The related CMEPS component will be updated to interpolate ocean-current fields from MOM6 grid to WW3 grid. Since regional MOM6 domain and regional WW3 domain do not completely overlap, a missing value is assigned to the interpolated fields in the non-overlapped regions. In the CMEPS component, the missing value is 9.99e20.
To prevent a model crash, a short-term solution is to convert the missing value to zero in the file model/src/wav_import_export.F90. In the future, the ocean-current fields in the non-overlapped regions can be provided from a global MOM6 output.
Issue(s) addressed
-fixes #1346
Commit Message
Converting a missing value to zero for the imported ocean-current fields.
Check list
Testing