DOI-USGS / COAWST

COAWST modeling system git repository
Other
100 stars 48 forks source link

Blow up in ROMS #235

Closed qwdy closed 3 months ago

qwdy commented 3 months ago

Hi John,

I'm trying to simulate the South China Sea using ROMS first. But I encountered a blow up. Here is my log file. I also check my rst file, the variable u v ubar vbar salt temp are all NaN.

One thing is suspicious that I found some NaN in my input tidal forcing file. Is it related to the blow up? nanhai_out.txt

jcwarner-usgs commented 3 months ago

you should remove any nans in your tidal forc file. i am not sure what is happening in your simulation. you will need to look in the rst file to see where the problem is at.

ocean0510 commented 3 months ago

hello, I was wondering the reason why obsfac is set to zero even though you set RadNud as a boundary condition. Also, I see Gradient condition only on North for temperature and salinity. Western edge, I see all closed boundary condition except temperature and salinity. I can't see the 2d Ubar and Vbar value for the boundary condition. Normally we use ADD_M2OBC and ADD_FSOBC when we use tide.

qwdy commented 3 months ago

hello, I was wondering the reason why obsfac is set to zero even though you set RadNud as a boundary condition. Also, I see Gradient condition only on North for temperature and salinity. Western edge, I see all closed boundary condition except temperature and salinity. I can't see the 2d Ubar and Vbar value for the boundary condition. Normally we use ADD_M2OBC and ADD_FSOBC when we use tide.

Hello Ocean0510

Thank you for your advice. To be honest, I’m still lack of much knowledge of oceanography and ROMS, so I’m struggling with many parameters including cpp options and lateral boundary conditions.The.in file I’m using is copy from Sandy case which I ran successfully before and the two domains are similar(closed in west).

I didn't notice the relation between obcfac and RadNud until you point it out. But how to set an appropriate obcfac or should I just not use RadNud?

The Gradient condition is on West and North for temperature and salinity, while RadNud on South and East. Is it better to use Gradient than RadNud? One more thing I'm confusing is Gradient on West rather than Clo, it is a closed boundary.

Could I ask what do you mean that you can't see the 2d Ubar and Vbar value for the boundary condition. I think they are on my output file: ubar 1 Closed Flather Flather Flather

vbar 1 Closed Flather Flather Flather

My header file is also copied from sandy.h. There are already ANA_FSOBC and ANA_M2OBC defined. Are these two contradictory to the two you mentioned?

I know it’s not polite for me to ask too much, but I still wonder if you could share your more experience with me.

ocean0510 commented 3 months ago

For obcfactor, the general information for obcfac is in the roms.in or ocean.in at the glossary part.

https://www.researchgate.net/publication/335388839_Nudging_Time-Scale_Sensitivity_of_a_Simplified_Black_Sea_CIL_Forcing_with_a_Three-Dimensional_Idealized_Bosphorus_Hydrodynamic_Model

For boundary conditions, https://www.myroms.org/wiki/Boundary_Conditions

If you have a value for the depth integrated velocity(Like Ubar, Vbar), then undefine ANA_M2OBC. Same thing to zeta, if you do have zeta from ncfile, undefine ANA_FSOBC

I think you need to understand the role of cpp and study more about the ocean.in. I know that is a lot of information for beginners, but you will be familiar after spending certain amount of time.

Good luck.

-Joonho

qwdy commented 3 months ago

Thank you Joonho, your advice help me a lot.(I'm studying hard these days)

qwdy commented 3 months ago

Now I think I figure out what the problem is. I checked (33,22,1) which located in my western boundary(CLOSED), The v and vbar are both 1e+37. Also in (33,21,1), the v and vbar are 1433 and 102.42. However, for u and ubar, they seemed to be normal in these two grid points. My boundary files were created by roms_master_climatology_coawst_mw.m and the u/v values are normal. What should I do fix the error?

ocean0510 commented 3 months ago

Do you have a value for the western boundary or is it closed wall ?

qwdy commented 3 months ago

Hi, Joonho

Yes, I set my western boundary CLOSED . I aslo made a new run with dt decreasing from 30 to 10s, which encountered 'kechar=nan, pechar=nan' image nanhai_dt10.txt.

ocean0510 commented 3 months ago

If you have a boundary value for the western boundary, then you have to open it and give appropriate condition, just like other boundary condition(say, Eastern boundary). Right now your western boundary condition is opened partly(zeta, u,v closed; temperature, salinity open;) I don't think reducing dt will effect for current case since proper boundary condition is not set.

qwdy commented 3 months ago

I just figured out and fixed the error which turned out one of my boundary file and climatology file had bad values I didn't notice before. Thank you Joonho, for your generous guidance.