Significant wave height = 0

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
liangliang
Posts: 61
Joined: Mon Jul 20, 2009 2:41 pm
Location: Port And Costal Engineering Laboratory

Significant wave height = 0

#1 Unread post by liangliang »

My case is about roms-swan coupling . The domain is 1200m*1200m, slope=1/8.
The max depth =12m , min depth =0.1m. I plot it with hslope.m, which can be found in attachments.
The boundary in ocean is :
ad_LBC(isFsur) == Cha Per Clo Per ! free-surface
ad_LBC(isUbar) == Fla Per Clo Per ! 2D U-momentum
ad_LBC(isVbar) == Fla Per Clo Per ! 2D U-momentum
ad_LBC(isUvel) == Gra Per Clo Per ! 3D U-momentum
ad_LBC(isVvel) == Gra Per Clo Per ! 3D V-momentum
ad_LBC(isMtke) == Gra Per Clo Per ! mixing TKE

ad_LBC(isTvar) == Gra Clo Gra Gra \ ! temperature
Gra Clo Gra Gra ! salinity

The boundary in swan is :
BOUNDPAR1 SHAPESPEC JONSWAP 3.3 PEAK DSPR DEGREES
BOUNDPAR2 SEGMENT IJ 0 0 0 60 CONSTANT PAR 2. 10. 10. 30


I can run it ,and I get ocean_his.nc.
But I find the significant wave height in the middle domain are all 0.
I have just run this case by swan, the significant wave height is right .
Could someone tell me why this happen ?
Bathymetry.png
Bathymetry.png (6.79 KiB) Viewed 5245 times
Slope.png
Slope.png (7.78 KiB) Viewed 5245 times
Attachments
Hwave.png
Hwave.png (11.61 KiB) Viewed 5245 times

jcwarner
Posts: 1172
Joined: Wed Dec 31, 2003 6:16 pm
Location: USGS, USA

Re: Significant wave height = 0

#2 Unread post by jcwarner »

just a quick guess - but did you run this tiled 1x2?

liangliang
Posts: 61
Joined: Mon Jul 20, 2009 2:41 pm
Location: Port And Costal Engineering Laboratory

Re: Significant wave height = 0

#3 Unread post by liangliang »

jcwarner wrote:just a quick guess - but did you run this tiled 1x2?
Thank you for your reply ,Warner !
My case is changed from inlet_case.
My computer is Inter core i7
So i set that
coupling inputfile :
Nthreads(ocean) = 4
Nthreads(waves) = 4
ocean inputfile :
NtileI == 2 ! I-direction partition
NtileJ == 2 ! J-direction partition
run it by command
mpirun -np 8 ./oceanM coupling_inlet_test.in
my swan input file is generated by roms2swan.m.
I still not resolve it. This is very strange. Could you give me some advice ?


cpp.h
#define UV_VIS2
#define MIX_S_UV
#undef ANA_GRID
#define MASKING
#define UV_ADV
#undef UV_COR
#define TS_MPDATA
#define DJ_GRADPS
#define FSOBC_REDUCED
#define SOLVE3D
#define SPLINES
#define SWAN_COUPLING
#define NEARSHORE_MELLOR08
#define ANA_INITIAL
#define ANA_SMFLUX
#define ANA_FSOBC
#define ANA_M2OBC
#define NS_PERIODIC
#define EASTERN_WALL
#define WEST_FSCHAPMAN
#define WEST_M2FLATHER
#define WEST_M3GRADIENT
#ifdef SWAN_COUPLING
# define MCT_LIB
#endif

/* define only one of the following 5 */
#define UV_LOGDRAG
#undef UV_QDRAG
#undef MB_BBL
#undef SG_BBL
#undef SSW_BBL
#ifdef SSW_BBL
# define SSW_CALC_ZNOT
#endif

#ifdef SOLVE3D
# define GLS_MIXING
# ifdef GLS_MIXING
# define KANTHA_CLAYSON
# define N2S2_HORAVG
# endif
# undef SEDIMENT
# ifdef SEDIMENT
# define SUSPLOAD
# undef BEDLOAD_SOULSBY
# undef BEDLOAD_MPM
# define SED_MORPH
# endif
# if defined SEDIMENT || defined SG_BBL || defined MB_BBL || defined SSW_BBL
# define ANA_SEDIMENT
# endif
# define ANA_STFLUX
# define ANA_SSFLUX
# define ANA_BPFLUX
# define ANA_BTFLUX
# define ANA_BSFLUX
# define ANA_SPFLUX
# define ANA_SRFLUX
#endif

liangliang
Posts: 61
Joined: Mon Jul 20, 2009 2:41 pm
Location: Port And Costal Engineering Laboratory

Re: Significant wave height = 0

#4 Unread post by liangliang »

I find the problem is the boundary condition. If I give Cloesd condition on the south and north. The significant wave height is OK. But if the boundary is periodic , the significant wave height in the middle domain are all 0 . Could someone give me some advice ?
Hsig.png
Hsig.png (9.52 KiB) Viewed 5156 times

liangliang
Posts: 61
Joined: Mon Jul 20, 2009 2:41 pm
Location: Port And Costal Engineering Laboratory

Re: Significant wave height = 0

#5 Unread post by liangliang »

jcwarner wrote:just a quick guess - but did you run this tiled 1x2?
Hi warner,
I find you are right ! I make some test case. The grid is Lm=60 Mm=60, if I set Nthreads(ocean) = 1
Nthreads(waves) = 7 , NtileI == 1 NtileJ == 1 ;the Hsig value in j=1 and j=61 are all 0. PIC-1
60_i1_j1png.png
60_i1_j1png.png (9.89 KiB) Viewed 5110 times
If Nthreads(ocean) = 4 Nthreads(waves) = 4 , NtileI == 1 NtileJ == 4 ;the Hsig in j=16 are 0.PIC-2
60_i1_j4.png
60_i1_j4.png (10.54 KiB) Viewed 5110 times
If Nthreads(ocean) = 4 Nthreads(waves) = 4 , NtileI == 2 NtileJ == 2 ;the Hsig in j=31 are 0.PIC-3
60_i2_j2.png
60_i2_j2.png (11.5 KiB) Viewed 5110 times
I aslo try to compile ROMS by two threads and set Nthreads(ocean) = 1 Nthreads(waves) = 1 , NtileI == 1 NtileJ == 1, the picture of Hisg like PIC-1. Is there something wrong in my case ? Or how should I set Nthreads ,NtileI and NtileJ ? Thank you !

User avatar
arango
Site Admin
Posts: 1347
Joined: Wed Feb 26, 2003 4:41 pm
Location: DMCS, Rutgers University
Contact:

Re: Significant wave height = 0

#6 Unread post by arango »

Well, that looks to me like a parallel bug. Periodic conditions are very tricky in distributed-memory (MPI). It seems that a parallel exchange is missing somewhere during the coupling.

liangliang
Posts: 61
Joined: Mon Jul 20, 2009 2:41 pm
Location: Port And Costal Engineering Laboratory

Re: Significant wave height = 0

#7 Unread post by liangliang »

arango wrote:Well, that looks to me like a parallel bug. Periodic conditions are very tricky in distributed-memory (MPI). It seems that a parallel exchange is missing somewhere during the coupling.
Hi arango,
Thank you for your reply !
My case is roms-swan coupling. The case could be calculated by compiling serial ?
And this way could avoid this problem ?
Chen zhen

User avatar
kate
Posts: 4088
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: Significant wave height = 0

#8 Unread post by kate »

It's certainly worth a try. If you get a different answer, that's the proof you need of a parallel bug.

liangliang
Posts: 61
Joined: Mon Jul 20, 2009 2:41 pm
Location: Port And Costal Engineering Laboratory

Re: Significant wave height = 0

#9 Unread post by liangliang »

kate wrote:It's certainly worth a try. If you get a different answer, that's the proof you need of a parallel bug.
Kate :
Thank you for your reply !
It's hard to compile serial . There are some errors when I compile it .
ocean_coupler.f90:298.32:
ocean_coupler.f90:298.32:
USE distribute_mod, ONLY : mp_reduce
CALL MCTWorld_init (Nmodels, MPI_COMM_WORLD, OCN_COMM_WORLD,
CALL mpi_comm_rank (OCN_COMM_WORLD, MyRank, MyError)
It seems only for MPI compiling . In addition, this case should need two threads : one for ocean; another for swan . In the couple.in file ,there are two parameter Nthreads(ocean) and Nthreads(waves). I must set Nthreads(ocean)=1 and Nthreads(waves)=1 at least.

jcwarner
Posts: 1172
Joined: Wed Dec 31, 2003 6:16 pm
Location: USGS, USA

Re: Significant wave height = 0

#10 Unread post by jcwarner »

i have not been using the Rutgers model for coupling in a while. But if you want to use a more recent version of the coupling, you can try our COAWST modeling system, with a more recent version of swan, and the vortex force method, etc.
send me an email at jcwarner@usgs.gov
if you would like to try that.
-john

liangliang
Posts: 61
Joined: Mon Jul 20, 2009 2:41 pm
Location: Port And Costal Engineering Laboratory

Re: Significant wave height = 0

#11 Unread post by liangliang »

jcwarner wrote:i have not been using the Rutgers model for coupling in a while. But if you want to use a more recent version of the coupling, you can try our COAWST modeling system, with a more recent version of swan, and the vortex force method, etc.
send me an email at jcwarner@usgs.gov
if you would like to try that.
-john
Thank you Warner ,I have sent you an email .

Post Reply