Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

sf_ocean_physics = 2 with idealized TC case

This post was from a previous version of the WRF&MPAS-A Support Forum. New replies have been disabled and if you have follow up questions related to this post, then please start a new thread from the forum home page.


New member
I am trying to run 3dPWP with idealized TC cases. I have managed to run the idealized TC cases with the simple 1D OML model, however, when i run the same case with PWP, it has hanged. The model still seems to be running, but i dont think it is. It seems it just hanged within the PWP module.

I have attached the log files and the namelist of the case


  • rsl.out.0000.txt
    476.3 KB · Views: 58
  • rsl.error.0000.txt
    476.4 KB · Views: 65
  • namelist.input_wrf.txt
    5.1 KB · Views: 93
The 3D ocean model is much more complicated, and therefore likely requires more computation. You are using 32 processors, which may be enough, but it's at the very lower end of an appropriate amount to use for the domain size you have (especially with the resolution). Is it possible for you to use more processors to run this to see if it advances any further? If not, another test you could do would be to make the domain much smaller and see if it runs okay with all the same options, with 32 processors.

I doubt that the number of processors was the issue. The log file I attached was after 12 hours of computation with 32 processor so I would have thought that at least it would proceed somewhere. At any rate, I will try to do some test with smaller domain or more processors to see if that is the issue. I have also been exploring whether the issue arises from usage of dm+sm or dm or sm while compiling the model, however, I don't think that is the case.

I am currently exploring whether the code is stuck in some endless loop within the 3DPWP subroutine.
Actually, you're probably right. I apologize for overlooking the fact that the model got stuck so far into the simulation. But I would, however, be interested in whether a dm+sm compilation would effect this. We often get many complaints regarding that type of compile, and we actually recommend users to stay away from it unless they are already using it, and obtaining reasonable results. If that is the type of build you're using, I would first try a test with perhaps just a dmpar build to see if that makes any difference, prior to trying to debug (which would likely be more time consuming). Please let me know the result if you do that test. Thanks!

I have managed to fix the issue when running PWP with idealized tropical cyclone case. I got some advice from another WRF user from University of Miami to fix these bits.

It turns out that the ocean_z, ocean_t, and ocean_s values from the namelist are not used in the dyn_em/module_initialize_tropical_cyclone.F file.

Also, I had to do minor fixes in PWP module, to remove denominator being zero in absorb subroutine and minor fixes in mldepth subroutine. The zero in denominator happens when the radiation is turned off, which would not be the case for real simulations, but happens in ideal cases.

After these fixes, the model started to work rather than hang.
That is fantastic! I'm so glad to hear that you were able to receive help. I know that the scheme was developed at the University of Miami, so they are probably the best source. Can I ask whether your modifications could be universal - i.e., would the changes only help your particular case, or is this something that needs to be corrected in the code for everyone? Would the modifications help (and not hurt) someone running a real case? If so, would you be interested in creating a pull request through our WRF GitHub repository to include the modifications and description of changes? I can provide more information if you are interested. If not, would you be willing to share your modifications so that I could potentially share them with others who may have the same problem as you? Thanks!
The same problom mentioned in this post is occrued when I run an ideal tropical cyclone with sf_ocean_physics = 2. The program was hanged and without any further calculation. It seems like that you have solved this problem by making some changes. I wonder if any changes in dyn_em/module_initialize_tropical_cyclone.F should be conducted? Could you guide me how to make changes in WRF/phys/module_sf_3dpwp.F absorb and mldepth subroutines.
Thank you very much!