Skip to content
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

Adding variables that are exchanged between WRF and SWAN #344

Open
zhl-ouc opened this issue Dec 28, 2024 · 3 comments
Open

Adding variables that are exchanged between WRF and SWAN #344

zhl-ouc opened this issue Dec 28, 2024 · 3 comments

Comments

@zhl-ouc
Copy link

zhl-ouc commented Dec 28, 2024

Dear Professor Warner,
I am currently working on modifying the surface roughness parameterization scheme in the WRF model by incorporating additional wave parameters such as wave breaking and wave energy into the calculations. I noticed that in the current COAWST coupling system, SWAN only provides significant wave height, wave length, and wave period to WRF. Could you please guide me on which coupling codes I should modify and how to enable the transfer of additional SWAN parameters to the WRF model?

@jcwarner-usgs
Copy link
Collaborator

it would be files such as
SWAN/src/waves_coupler.F
SWAN/src/swanout1.F
WRF/frame/atm_coupler.F
and then a whole lot of other files in WRF.
Suggest you look for a variable such as Hwave and grep for that in WRF
grep -nir Hwave WRF/*
and that will give you an example of how that variable is propagating thru the wrf code.

@zhl-ouc
Copy link
Author

zhl-ouc commented Feb 20, 2025

Thank you for providing the method. I have successfully added the wave energy dissipation from SWAN to WRF. I modified the MYNN surface layer scheme in the WRF model to incorporate the variable wave energy dissipation(named as DISSIP). However, I'm now encountering an error during the compilation process. Could you please help me identify what might be going wrong?
module_surface_driver.f90(5169): error #6420: This array name is invalid in this context. [DISSIP]^M
REAL,DIMENSION(IMS:IME,JMS:JME), INTENT(IN) :: DISSIP^M
-------------------------------------------------------------^^M
compilation aborted for module_surface_driver.f90 (code 1)^

Below are the compilation log file and the modified WRF files:
coawst.log
module_surface_driver.f90.txt
module_surface_driver.txt

@jcwarner-usgs
Copy link
Collaborator

there will be several places in WRF that you will need to modify.
I suggest you look for a variable like Hwave
grep -nir Hwave WRF/
and this will let you see all the places i needed to change to get Hwave to snake through the code.
See if you can make all the changes needed for Dissip.

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

No branches or pull requests

2 participants