-
Notifications
You must be signed in to change notification settings - Fork 570
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
Add mesh cap #641
Add mesh cap #641
Conversation
This displays on GitHub in a nice way
Conflicts: model/bin/make_makefile.sh model/ftn/w3gdatmd.ftn model/ftn/w3gridmd.ftn model/ftn/w3iogrmd.ftn model/ftn/w3srcemd.ftn model/ftn/w3wavemd.ftn
Squashed commit of the following: commit 444212d Author: Denise Worthen <denise.worthen@noaa.gov> Date: Thu Apr 7 09:28:31 2022 -0400 tidy up commit 0343503 Author: Denise Worthen <denise.worthen@noaa.gov> Date: Thu Apr 7 09:05:42 2022 -0400 more doxygen formatting added commit 61c10ac Author: denise.worthen <Denise.Worthen@noaa.gov> Date: Wed Apr 6 22:17:19 2022 +0000 updates more doxy commit c9d10e4 Author: denise.worthen <Denise.Worthen@noaa.gov> Date: Wed Apr 6 22:02:51 2022 +0000 fix doxy errors * still have warning that u_file_u is not documented ? commit d19652f Author: Denise Worthen <denise.worthen@noaa.gov> Date: Wed Apr 6 17:15:34 2022 -0400 more doxy commit f1049d0 Author: Denise Worthen <denise.worthen@noaa.gov> Date: Wed Apr 6 08:22:54 2022 -0400 minor text placement changes commit 24f9945 Author: Denise Worthen <denise.worthen@noaa.gov> Date: Tue Apr 5 15:51:47 2022 -0400 update 2 more files commit fe25b63 Author: Denise Worthen <denise.worthen@noaa.gov> Date: Tue Apr 5 12:58:03 2022 -0400 initial commit of added doxygen
@DeniseWorthen in the wmesmf cap, the inputs are either from "cpl" or you can use the original method of inputs. It looks like if we're using ww3_shel.inp that all inputs must come from the coupler? Or is there another way that is determined? |
@JessicaMeixner-NOAA I'm not clear on your question. Are you asking if the mesh cap can be run standalone or when the forcing fields come from files? |
So let's say we wanted to coupled atm-wav, so that winds are coming from the coupler, but we'd like to have an input field of ice that comes from a file and we are using ww3_shel.inp. How would that get specified? Would that even be possible? |
@JessicaMeixner-NOAA - with CDEPS inline functionality (so that a prognostic component can ingest forcing fields like you want and easily from its cap) - this could be easily done today. I'm happy to show how this can be implemented. I can go over this briefly at our upcoming call next week. |
This is a capability we have with wmesmf when using ww3_multi.inp without using a separate data model. |
@JessicaMeixner-NOAA - you are not using a separate data model - just share code functionality. I'm not suggesting this is the only way - but a powerful way to have different spatial and time interpolations (including 3d mapping) for forcing fields that it would be helpful for everyone to be aware of. |
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.
Issues to address review comments have been made and linked in the appropriate places. In addition items that I believe will be taken care of in this PR were also noted. If these items will not be addressed in this PR please let me know so an issue for that item can be created.
model/src/w3initmd.F90
Outdated
@@ -1236,6 +1246,9 @@ SUBROUTINE W3INIT ( IMOD, IsMulti, FEXT, MDS, MTRACE, ODAT & | |||
! | |||
FLOUT(2) = NPT .GT. 0 | |||
! | |||
#ifdef CESMCOUPLED |
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.
Not creating issue for this, assuming it will be taken care of in this PR.
model/src/w3iogomd.F90
Outdated
@@ -1562,8 +1616,39 @@ SUBROUTINE W3OUTG ( A, FLPART, FLOUTG, FLOUTG2 ) | |||
USSCO=FKD*SIG(IK)*WN(IK,ISEA)*COSH(2.*KD) | |||
BHD(JSEA) = BHD(JSEA) + & | |||
GRAV*WN(IK,ISEA) * EBD(IK,JSEA) / (SINH(2.*KD)) | |||
#ifdef CESMCOUPLED |
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.
The proposed subsequent updates are covered in these issues:
- Add tail to USSX/USSY and do not add extra variable: Add optional high frequency tail to USSX, USSY #669
- Add "depth" input field. Add new depth input field #670
- Move any relevant variable calculations to the cap code that do not need output: Move calculations to cap-code that should not be output #671
- Remove the ifdefs for any other remaining variables so that all users can access new output variables Expand use of variable output #672
@@ -0,0 +1,759 @@ | |||
#include "w3macros.h" |
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.
An issue was created for this: #673 where we can continue this discussion
model/src/w3iorsmd.F90
Outdated
@@ -430,18 +438,32 @@ SUBROUTINE W3IORS ( INXOUT, NDSR, DUMFPI, IMOD, FLRSTRT ) | |||
! | |||
! open file ---------------------------------------------------------- * | |||
! | |||
#ifdef CESMCOUPLED |
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.
Issue to address this is here: #674
@@ -1803,6 +1807,9 @@ SUBROUTINE W3UICE ( VA ) | |||
ICEI(IX,IY), 'ICE (NEW)' | |||
#endif | |||
VA(:,JSEA) = 0. | |||
#if defined(W3_UWM) || defined(CESMCOUPLED) | |||
charn(jsea) = aalpha |
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.
The follow up for this issue is here: #677
model/src/w3wavemd.F90
Outdated
@@ -1540,11 +1545,9 @@ SUBROUTINE W3WAVE ( IMOD, ODAT, TEND, STAMP, NO_OUT & | |||
! | |||
! 3.3.3 Update ice floe diameter | |||
! | |||
#ifdef W3_IS2 | |||
#if defined(W3_IS2) || defined(CESMCOUPLED) |
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.
Assuming this will be updated in this PR and so no issues is made.
|
||
end subroutine set_shel_io | ||
|
||
subroutine set_shel_inp(dtime_sync) |
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.
Follow up issue: #678
end subroutine set_shel_inp | ||
|
||
!=============================================================================== | ||
subroutine read_shel_inp(mpi_comm) |
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.
Issue for this is here: #679
* change cesmcoupled to w3_cesmcoupled * removed commented out line in w3init * mark sections which require fixes and testing for cesm
* remove marked sections for pr review
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.
All issues that were going to be taken care of before the PR was merged have been addressed.
Merge mesh cap changes from (PR NOAA-EMC#641)
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.
The regression tests are as expected:
**********************************************************************
********************* non-identical cases ****************************
**********************************************************************
mww3_test_03/./work_PR2_UNO_MPI_d2 (15 files differ)
mww3_test_03/./work_PR1_MPI_d2 (16 files differ)
mww3_test_03/./work_PR3_UNO_MPI_d2_c (14 files differ)
mww3_test_03/./work_PR3_UQ_MPI_d2_c (15 files differ)
mww3_test_03/./work_PR3_UNO_MPI_d2 (12 files differ)
mww3_test_03/./work_PR2_UQ_MPI_d2 (15 files differ)
mww3_test_03/./work_PR3_UQ_MPI_d2 (16 files differ)
ww3_ta1/./work_UPD0F_U (0 files differ)
ww3_tp2.10/./work_MPI_OMPH (7 files differ)
ww3_tp2.16/./work_MPI_OMPH (4 files differ)
ww3_tp2.17/./work_ma (1 files differ)
ww3_tp2.17/./work_a (1 files differ)
ww3_tp2.17/./work_mb (1 files differ)
ww3_tp2.17/./work_mc (1 files differ)
ww3_tp2.17/./work_c (1 files differ)
ww3_tp2.17/./work_b (1 files differ)
ww3_tp2.6/./work_ST0 (1 files differ)
ww3_tp2.6/./work_ST4 (1 files differ)
ww3_tp2.6/./work_pdlib (1 files differ)
ww3_ufs1.3/./work_a (1 files differ)
There are the known b4b cases + the unstructured mod_def files which have at times been not b4b lately.
Pull Request Summary
Enables an alternate cap for use by UWM apps S2SW and HAFSW
Description
The alternate source code utilizes the switch file
switch_meshcap
. A new switch option (UWM
) is added to control features required by UWM.The cap has a run-time config variable which determines whether the wave model is run in shel vs multi mode in UWM. Only a single grid has been verified when run in multi.
The new source files are:
ww3_shel.inp
file when run as shel.UWMNCOUT
). This feature was originally coded to allow control via configuration variables but the code changes were backed out in order to resolve issues seen on the CESM side. A refactoring of thew3iogoncdmd.F90
to allow all output variables is currently under development.Code specific to CESM is added within
ifdef CESMCOUPLED
. Code specific to UWM is added withinifdef W3_UWM
.Please also include the following information:
-->
Issue(s) addressed
Commit Message
Adds source code to implement a mesh-based NUOPC cap in the dev/ufs-weather-model branch.
co-author: @mvertens
Check list
Testing