ROMS Swan coupling

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
yang
Posts: 56
Joined: Mon Sep 25, 2006 2:37 pm
Location: Institue of oceanology ,Chinese acedemy of scinece

ROMS Swan coupling

#1 Unread post by yang »

I have run ROMS successfully in two way couplping with SWAN in my realistic case.
I have a question : if i give 144 processers to SWAN , it works well , and it does not work if i give more than 144 processers .
are there a limit number of processeres with SWAN??

yang
Posts: 56
Joined: Mon Sep 25, 2006 2:37 pm
Location: Institue of oceanology ,Chinese acedemy of scinece

Re: ROMS Swan coupling

#2 Unread post by yang »

When i run ROMS-SWAN coupling model,i get a error at 16th model day? is that a bug ?
Should there be 'close(UNIT)' in swanparll.f90.
781390 3255 19:00:00 1.011380E-02 2.056170E+04 2.056171E+04 1.379430E+16
781400 3255 20:00:00 1.002353E-02 2.056333E+04 2.056334E+04 1.379487E+16
781410 3255 21:00:00 9.824424E-03 2.056499E+04 2.056500E+04 1.379570E+16
781420 3255 22:00:00 9.604689E-03 2.056641E+04 2.056642E+04 1.379663E+16
781430 3255 23:00:00 9.497948E-03 2.056723E+04 2.056724E+04 1.379741E+16
781440 3256 00:00:00 9.600580E-03 2.056727E+04 2.056728E+04 1.379789E+16
PGFIO/stdio: Too many open files
PGFIO-F-/OPEN/unit=1107/error code returned by host stdio - 24.
File name = ./WPO_wave_output/ubot.mat-096
In source file swanparll.f90, at line number 3764
The following line(red) is line number 3764 in swanparll.f90

DO IPROC = 1, NPROC
WRITE(FILENM(ILPOS-3:ILPOS),100) IPROC
100 FORMAT('-',I3.3)
IUNIT = HIOPEN+NREOQ+(NREF-HIOPEN-1)*NPROC+IPROC
INQUIRE ( FILE=FILENM, EXIST=EXIST, OPENED=OPENED )
IF ( .NOT.OPENED ) THEN
IF (EXIST) THEN
OPEN ( UNIT=IUNIT, FILE=FILENM )
ELSE
MSGSTR= 'file '//FILENM(1:ILPOS)//' does not exist'
CALL MSGERR( 4, MSGSTR )
RETURN
END IF
END IF
END DO
Last edited by yang on Tue Jan 05, 2010 12:55 am, edited 1 time in total.

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

Re: ROMS Swan coupling

#3 Unread post by jcwarner »

PGFIO/stdio: Too many open files

That is your problem.
Operating systems generally have a limit on the number of open files.

yang
Posts: 56
Joined: Mon Sep 25, 2006 2:37 pm
Location: Institue of oceanology ,Chinese acedemy of scinece

Re: ROMS Swan coupling

#4 Unread post by yang »

In addition, i have test ROMS and SWAN alone.
ROMS can run ten years,and SWAN one year alone.
When they are coupled , they are ok in 16 model days.
An error apears in the 16th model day.
OCN2WAV - (06) imported and (05) exported fields, t = 3255 18:00:00
- ROMS coupling exchanges wait clock (s):
(Recv= 2.98433304E-02 Send= 2.30853558E-02)
- ROMS Import: wave direction
(Min= 0.00000000E+00 Max= 6.28315868E+00)
- ROMS Import: significant wave height
(Min= 0.00000000E+00 Max= 4.17315453E-01)
- ROMS Import: average wave length
(Min= 0.00000000E+00 Max= 3.40339203E+01)
- ROMS Import: surface wave relative peak period
(Min= 0.00000000E+00 Max= 8.54987717E+00)
- ROMS Import: bottom wave period
(Min= 0.00000000E+00 Max= 2.49966049E+01)
- ROMS Import: wave bottom orbital velocity
(Min= 0.00000000E+00 Max= 2.19039530E-01)
- ROMS Export: bathymetry
(Min= 5.00000000E+00 Max= 5.00000000E+03)
- ROMS Export: free-surface
(Min= -2.99000000E+02 Max= 6.55732638E+00)
- ROMS Export: vertically integrated u-momentum component
(Min= -5.17058045E+00 Max= 2.83312582E+00)
- ROMS Export: vertically integrated v-momentum component
(Min= -5.87536435E+00 Max= 3.69466329E+00)
- ROMS Export: bottom roughness
(Min= 3.00000000E-03 Max= 3.00000000E-03)
WAV2OCN - (05) imported and (06) exported fields, t = 20040116.180000
- SWAN coupling exchanges wait clock (s):
(Recv= 4.39657607E+02 Send= 3.40962410E-02)
781390 3255 19:00:00 6.630678E-03 2.056126E+04 2.056126E+04 1.379369E+16
781400 3255 20:00:00 6.544279E-03 2.056289E+04 2.056290E+04 1.379425E+16
781410 3255 21:00:00 6.329846E-03 2.056454E+04 2.056455E+04 1.379508E+16
781420 3255 22:00:00 6.080316E-03 2.056596E+04 2.056597E+04 1.379600E+16
781430 3255 23:00:00 5.930487E-03 2.056677E+04 2.056678E+04 1.379678E+16
781440 3256 00:00:00 5.976898E-03 2.056681E+04 2.056682E+04 1.379726E+16
PGFIO/stdio: Too many open files
PGFIO-F-/OPEN/unit=1107/error code returned by host stdio - 24.
File name = ./WPO_wave_output/ubot.mat-096
In source file swanparll.f90, at line number 3764
--------------------------------------------------------------------------
mpirun has exited due to process rank 384 with PID 13522 on
node node32 exiting without calling "finalize". This may
have caused other processes in the application to be
terminated by signals sent by mpirun (as reported here).
-

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

Re: ROMS Swan coupling

#5 Unread post by jcwarner »

well again i see
"PGFIO/stdio: Too many open files"
i am not sure why this would happen later in the simulation, and not at the beginning. How many processors are being allocated to swan? try it with less procs and see if it runs longer.

yang
Posts: 56
Joined: Mon Sep 25, 2006 2:37 pm
Location: Institue of oceanology ,Chinese acedemy of scinece

Re: ROMS Swan coupling

#6 Unread post by yang »

Thanks
128 processors for swan.
Now i change it to 1.

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

Re: ROMS Swan coupling

#7 Unread post by jcwarner »

well, i wasn't saying that you had to go to one.
What is the size of the domain that it requires 128 processors?

yang
Posts: 56
Joined: Mon Sep 25, 2006 2:37 pm
Location: Institue of oceanology ,Chinese acedemy of scinece

Re: ROMS Swan coupling

#8 Unread post by yang »

105E-141E;17N-42N;
433x335x21

yang
Posts: 56
Joined: Mon Sep 25, 2006 2:37 pm
Location: Institue of oceanology ,Chinese acedemy of scinece

Re: ROMS Swan coupling

#9 Unread post by yang »

Now i use 16 processor for SWAN,and the same error appears again at the same time(16th model day.)
the following give the content of the Errfile from SWAN.
Errfile-001
Severe error : All free units used

the error from SWAN-ROMS:

- ROMS Export: vertically integrated v-momentum component
(Min= -5.94701488E+00 Max= 3.66937328E+00)
- ROMS Export: bottom roughness
(Min= 3.00000000E-03 Max= 3.00000000E-03)
781390 3255 19:00:00 6.617797E-03 2.056125E+04 2.056125E+04 1.379369E+16
781400 3255 20:00:00 6.532190E-03 2.056288E+04 2.056289E+04 1.379426E+16
781410 3255 21:00:00 6.318763E-03 2.056453E+04 2.056454E+04 1.379509E+16
781420 3255 22:00:00 6.069352E-03 2.056595E+04 2.056595E+04 1.379601E+16
781430 3255 23:00:00 5.920308E-03 2.056676E+04 2.056677E+04 1.379678E+16
781440 3256 00:00:00 5.967826E-03 2.056680E+04 2.056680E+04 1.379726E+16
PGFIO-F-217/formatted read/unit=116/attempt to read past end of file.
File name = ./WPO_wave_output/depth.mat-001 formatted, sequential access record = 600321
In source file swanparll.f90, at line number 3791
--------------------------------------------------------------------------
mpirun has exited due to process rank 384 with PID 15409 on
node node63 exiting without calling "finalize". This may
have caused other processes in the application to be
terminated by signals sent by mpirun (as reported here).
--------------------------------------------------------------------------
Job /public/lsf/7.0/linux2.6-glibc2.3-x86_64/bin/openmpi_wrapper ./oceanM ./coupling_wpo_ocean_wave.in

yang
Posts: 56
Joined: Mon Sep 25, 2006 2:37 pm
Location: Institue of oceanology ,Chinese acedemy of scinece

Re: ROMS Swan coupling

#10 Unread post by yang »

I run ROMS+SWAN from time 0(that is to say, i does not run it from restart file).
64 processors for SWAN.
The same error apears again:
PGFIO-F-217/formatted read/unit=116/attempt to read past end of file.
File name = ./WPO_wave_output/depth.mat-001 formatted, sequential access record = 150081
In source file swanparll.f90, at line number 3791
--------------------------------------------------------------------------
mpirun has exited due to process rank 384 with PID 22115 on
node node9 exiting without calling "finalize". This may
have caused other processes in the application to be
terminated by signals sent by mpirun (as reported here).
--------------------------------------------------------------------------
Job /public/lsf/7.0/linux2.6-glibc2.3-x86_64/bin/openmpi_wrapper ./oceanM ./coupling_wpo_ocean_wave.in

yang
Posts: 56
Joined: Mon Sep 25, 2006 2:37 pm
Location: Institue of oceanology ,Chinese acedemy of scinece

Re: ROMS Swan coupling

#11 Unread post by yang »

When i give 1 processor to SWAN, it will be stuck at 16th model day. It have been stuck at 16th day for 4hours.

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

Re: ROMS Swan coupling

#12 Unread post by jcwarner »

it almost seems like swan thinks the job is done, and it is trying to pull together the output files. What does your swan INPUT file look like. Was it set to only run for 16 days?

yang
Posts: 56
Joined: Mon Sep 25, 2006 2:37 pm
Location: Institue of oceanology ,Chinese acedemy of scinece

Re: ROMS Swan coupling

#13 Unread post by yang »

Thanks.
The following is my configuration for SWAN.
SET DEPMIN 5.00 INRHOG 1 NAUTICAL
COORDINATES SPHERICAL

CGRID CURVILINEAR 432 334 CIRCLE 30 0.04 1.0 30
READGRID COORDINATES 1. './WPO_wave_input/WPO_SWAN_coord.grd' 3 1 1 FREE

INPGRID BOTTOM CURVILINEAR 0 0 432 334
READINP BOTTOM 1 './WPO_wave_input/WPO_SWAN_bottom.dat' 3 1 FREE

INPGRID WIND CURVILINEAR 0 0 432 334 &
NONSTATIONARY 20040101.000000 30 DAY 20041125.000000
READINP WIND 0 './WPO_wave_input/WPO_SWAN_wind.dat' 3 1 0 1 FREE

&& KEYWORD TO CREATE CURRENT GRID &&
&&INPGRID CURRENT CURVILINEAR 0 0 432 334 EXC 9.999000e+003 &
&&NONSTAT 20040101.000000 30 DAY 20041210.000000

&& KEYWORD TO CREATE WATER LEVEL GRID &&
&&INPGRID WLEV CURVILINEAR 0 0 432 334 EXC 9.999000e+003 &
&& NONSTAT 20040101.000000 30 DAY 20041210.000000

&& KEYWORD TO CREATE BOTTOM FRICTION GRID &&
&&INPGRID FRIC CURVILINEAR 0 0 432 334 EXC 9.999000e+003 &
& & NONSTAT 20040101.000000 30 DAY 20041210.000000

&& BOUNDARY FORCING &&
&&BOUNDPAR1 SHAPESPEC JONSWAP 3.3 PEAK DSPR DEGREES
&&BOUNDPAR2 SEGMENT IJ 0 334 432 334 CONSTANT PAR 1.0 10.0 0. 20.

& Restart name **********************************
&INIT HOTSTART './WPO_wave_output/swan_restart.dat'

& PHYSICS **************************************

GEN3 KOMEN cds2=2.36e-5 stpm=3.02e-3

WCAPPING CSM cst=4.0 pow=2.0

$************************************************

BREAKING CONSTANT 1.0 0.73
BLOCK 'COMPGRID' NOHEADER './WPO_wave_output/depth.mat' &
LAY 4 DEPTH 1. OUTPUT 20040101.000000 6 HR
BLOCK 'COMPGRID' NOHEADER './WPO_wave_output/dissip.mat' &
LAY 4 DISSIP 1. OUTPUT 20040101.000000 6 HR
BLOCK 'COMPGRID' NOHEADER './WPO_wave_output/force.mat' &
LAY 4 FORCE 1. OUTPUT 20040101.000000 6 HR
BLOCK 'COMPGRID' NOHEADER './WPO_wave_output/fric.mat' &
LAY 4 FRCOEF 1. OUTPUT 20040101.000000 6 HR
BLOCK 'COMPGRID' NOHEADER './WPO_wave_output/hsig.mat' &
LAY 4 HSIGN 1. OUTPUT 20040101.000000 6 HR
BLOCK 'COMPGRID' NOHEADER './WPO_wave_output/rtp.mat' &
LAY 4 RTP 1. OUTPUT 20040101.000000 6 HR
BLOCK 'COMPGRID' NOHEADER './WPO_wave_output/tmbot.mat' &
LAY 4 TMBOT 1. OUTPUT 20040101.000000 6 HR
BLOCK 'COMPGRID' NOHEADER './WPO_wave_output/ubot.mat' &
LAY 4 UBOT 1. OUTPUT 20040101.000000 6 HR
BLOCK 'COMPGRID' NOHEADER './WPO_wave_output/vel.mat' &
LAY 4 VEL 1. OUTPUT 20040101.000000 6 HR
BLOCK 'COMPGRID' NOHEADER './WPO_wave_output/wdir.mat' &
LAY 4 DIR 1. OUTPUT 20040101.000000 6 HR
BLOCK 'COMPGRID' NOHEADER './WPO_wave_output/wlen.mat' &
LAY 4 WLEN 1. OUTPUT 20040101.000000 6 HR
BLOCK 'COMPGRID' NOHEADER './WPO_wave_output/xp.mat' LAY 4 XP 1.
BLOCK 'COMPGRID' NOHEADER './WPO_wave_output/yp.mat' LAY 4 YP 1.

POINTS 'point1' 119.0 39.0
SPECOUT 'point1' SPEC2D './WPO_wave_output/point1.spc2d' &
OUTPUT 20040101.000000 6 HR
TABLE 'point1' HEADER './WPO_wave_output/point1.table' &
HSIGN DIR WLEN OUTPUT 20040101.000000 6 HR

PROP BSBT

COMPUTE NONSTATIONARY 20040101.000000 1 hr 20041210.000000

STOP

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

Re: ROMS Swan coupling

#14 Unread post by jcwarner »

try this:

&& KEYWORD TO CREATE CURRENT GRID &&
INPGRID CURRENT CURVILINEAR 0 0 432 334 EXC 9.999000e+003 &
NONSTAT 20040101.000000 30 DAY 20041210.000000

&& KEYWORD TO CREATE WATER LEVEL GRID &&
INPGRID WLEV CURVILINEAR 0 0 432 334 EXC 9.999000e+003 &
NONSTAT 20040101.000000 30 DAY 20041210.000000

&& KEYWORD TO CREATE BOTTOM FRICTION GRID &&
INPGRID FRIC CURVILINEAR 0 0 432 334 EXC 9.999000e+003 &
NONSTAT 20040101.000000 30 DAY 20041210.000000

yang
Posts: 56
Joined: Mon Sep 25, 2006 2:37 pm
Location: Institue of oceanology ,Chinese acedemy of scinece

Re: ROMS Swan coupling

#15 Unread post by yang »

I have tried that,and the same error appears again in 16th day.
Does that means : SWAN input currents according the grid as following
INPGRID CURRENT CURVILINEAR 0 0 432 334 EXC 9.999000e+003 &
NONSTAT 20040101.000000 30 DAY 20041210.000000

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

Re: ROMS Swan coupling

#16 Unread post by jcwarner »

are there PRINT-0* files? What do they look like, at the end?

yang
Posts: 56
Joined: Mon Sep 25, 2006 2:37 pm
Location: Institue of oceanology ,Chinese acedemy of scinece

Re: ROMS Swan coupling

#17 Unread post by yang »

jcwarner wrote:are there PRINT-0* files? What do they look like, at the end?
Time of computation -> 20040116.000000 in sec: 1296000.
accuracy OK in 97.01 % of wet grid points ( 98.00 % required)


Time of computation -> 20040116.020000 in sec: 1303200.
accuracy OK in 83.13 % of wet grid points ( 98.00 % required)


Time of computation -> 20040116.040000 in sec: 1310400.
accuracy OK in 93.02 % of wet grid points ( 98.00 % required)


Time of computation -> 20040116.060000 in sec: 1317600.
accuracy OK in 96.68 % of wet grid points ( 98.00 % required)


Time of computation -> 20040116.080000 in sec: 1324800.
accuracy OK in 83.97 % of wet grid points ( 98.00 % required)


Time of computation -> 20040116.100000 in sec: 1332000.
accuracy OK in 93.26 % of wet grid points ( 98.00 % required)


Time of computation -> 20040116.120000 in sec: 1339200.
accuracy OK in 97.10 % of wet grid points ( 98.00 % required)


Time of computation -> 20040116.140000 in sec: 1346400.
accuracy OK in 84.44 % of wet grid points ( 98.00 % required)


Time of computation -> 20040116.160000 in sec: 1353600.
accuracy OK in 93.29 % of wet grid points ( 98.00 % required)


Time of computation -> 20040116.180000 in sec: 1360800.
accuracy OK in 97.04 % of wet grid points ( 98.00 % required)


** Severe error : All free units used
Time of computation -> 20040116.200000 in sec: 1368000.
** No continuation of computation because of error level: 3
** To ignore this error, change [maxerr] with the SET command


32 #
32 # Details on timings of the simulation:
32 #
32 # cpu-time wall-clock
32 #
32 # total time: 10.62 10.62
32 #
32 # total pre-processing: 1.15 1.15
32 # total calculation: 175.88 175.84
32 # total communication: 1449.56 1449.59
32 # total post-processing: 95.70 95.70
32 #
32 # Splitting up calc. + comm. times:
32 #
32 # calc. propagation: 25.94 25.89
32 # exchanging data: 1144.42 1144.45
32 # calc. sources: 69.21 69.24
32 # solving system: 22.26 22.27
32 # reductions: 305.14 305.14
32 # collecting data: 0.00 0.00
32 # calc. setup: 0.00 0.00
32 # other computing: 58.46 58.44
32 #
32 # Overview source contributions:
32 #
32 # prop. velocities: 12.26 12.24
32 # x-y advection: 5.08 5.05
32 # sigma advection: 3.40 3.41
32 # theta advection: 5.21 5.19
32 # wind: 2.87 2.89
32 # whitecapping: 26.20 26.19
32 # bottom friction: 1.79 1.78
32 # wave breaking: 2.93 2.93
32 # quadruplets: 19.37 19.36
32 # triads: 1.77 1.77
32 # limiter: 2.93 2.96
32 # rescaling: 3.08 3.07
32 # reflections: 8.28 8.29
32 # diffraction: 0.00 0.00

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

Re: ROMS Swan coupling

#18 Unread post by jcwarner »

try this:
comment these out:


&&BLOCK 'COMPGRID' NOHEADER './WPO_wave_output/depth.mat' &
LAY 4 DEPTH 1. OUTPUT 20040101.000000 6 HR

BLOCK 'COMPGRID' NOHEADER './WPO_wave_output/dissip.mat' &
LAY 4 DISSIP 1. OUTPUT 20040101.000000 6 HR

&&BLOCK 'COMPGRID' NOHEADER './WPO_wave_output/force.mat' &
LAY 4 FORCE 1. OUTPUT 20040101.000000 6 HR

BLOCK 'COMPGRID' NOHEADER './WPO_wave_output/fric.mat' &
LAY 4 FRCOEF 1. OUTPUT 20040101.000000 6 HR

BLOCK 'COMPGRID' NOHEADER './WPO_wave_output/hsig.mat' &
LAY 4 HSIGN 1. OUTPUT 20040101.000000 6 HR

BLOCK 'COMPGRID' NOHEADER './WPO_wave_output/rtp.mat' &
LAY 4 RTP 1. OUTPUT 20040101.000000 6 HR

BLOCK 'COMPGRID' NOHEADER './WPO_wave_output/tmbot.mat' &
LAY 4 TMBOT 1. OUTPUT 20040101.000000 6 HR

BLOCK 'COMPGRID' NOHEADER './WPO_wave_output/ubot.mat' &
LAY 4 UBOT 1. OUTPUT 20040101.000000 6 HR

&&BLOCK 'COMPGRID' NOHEADER './WPO_wave_output/vel.mat' &
LAY 4 VEL 1. OUTPUT 20040101.000000 6 HR

BLOCK 'COMPGRID' NOHEADER './WPO_wave_output/wdir.mat' &
LAY 4 DIR 1. OUTPUT 20040101.000000 6 HR

BLOCK 'COMPGRID' NOHEADER './WPO_wave_output/wlen.mat' &
LAY 4 WLEN 1. OUTPUT 20040101.000000 6 HR

&&BLOCK 'COMPGRID' NOHEADER './WPO_wave_output/xp.mat' LAY 4 XP 1.
&&BLOCK 'COMPGRID' NOHEADER './WPO_wave_output/yp.mat' LAY 4 YP 1.

&&POINTS 'point1' 119.0 39.0
&&SPECOUT 'point1' SPEC2D './WPO_wave_output/point1.spc2d' &
OUTPUT 20040101.000000 6 HR
&&TABLE 'point1' HEADER './WPO_wave_output/point1.table' &
HSIGN DIR WLEN OUTPUT 20040101.000000 6 HR

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

Re: ROMS Swan coupling

#19 Unread post by jcwarner »

something else to try, more advanced:
Edit SWAN/Src/waves_coupler.F
and comment out line 648 (or thereabouts, depending on code version)
from
!-----------------------------------------------------------------------
! Create a restart file.
!-----------------------------------------------------------------------
!
CALL BACKUP (AC2, SPCSIG, SPCDIR, KGRPNT, XCGRID, YCGRID, ng)


to


! CALL BACKUP (AC2, SPCSIG, SPCDIR, KGRPNT, XCGRID, YCGRID, ng)


Recompile and see if that helps.

yang
Posts: 56
Joined: Mon Sep 25, 2006 2:37 pm
Location: Institue of oceanology ,Chinese acedemy of scinece

Re: ROMS Swan coupling

#20 Unread post by yang »

jcwarner wrote:something else to try, more advanced:
Edit SWAN/Src/waves_coupler.F
and comment out line 648 (or thereabouts, depending on code version)
from
!-----------------------------------------------------------------------
! Create a restart file.
!-----------------------------------------------------------------------
!
CALL BACKUP (AC2, SPCSIG, SPCDIR, KGRPNT, XCGRID, YCGRID, ng)


to


! CALL BACKUP (AC2, SPCSIG, SPCDIR, KGRPNT, XCGRID, YCGRID, ng)


Recompile and see if that helps.
Thanks for your help.
My roms version is :src433.

the number of line of CALL BACKUP (AC2, SPCSIG, SPCDIR, KGRPNT, XCGRID, YCGRID, ng) is 358 in waves_couplers.F with src433.

I comment it ,and i will run it again.
thank you a lot
Last edited by yang on Tue Jan 05, 2010 4:59 am, edited 1 time in total.

yang
Posts: 56
Joined: Mon Sep 25, 2006 2:37 pm
Location: Institue of oceanology ,Chinese acedemy of scinece

Re: ROMS Swan coupling

#21 Unread post by yang »

jcwarner wrote:something else to try, more advanced:
Edit SWAN/Src/waves_coupler.F
and comment out line 648 (or thereabouts, depending on code version)
from
!-----------------------------------------------------------------------
! Create a restart file.
!-----------------------------------------------------------------------
!
CALL BACKUP (AC2, SPCSIG, SPCDIR, KGRPNT, XCGRID, YCGRID, ng)


to


! CALL BACKUP (AC2, SPCSIG, SPCDIR, KGRPNT, XCGRID, YCGRID, ng)


Recompile and see if that helps.
When i changed the TimeInterval(in coupling.dat) from 6 hour to 12 hour,the error will appear in 32th model day!!
!
! TimeInterval = v(1) v(2) v(3)

TimeInterval = 43200.0d0

nganju
Posts: 82
Joined: Mon Aug 16, 2004 8:47 pm
Location: U.S. Geological Survey, Woods Hole
Contact:

Re: ROMS Swan coupling

#22 Unread post by nganju »

I think the problem is the time step and duration of the ROMS and SWAN runs not matching. Can you show us the number and size of the ROMS time steps?

nganju
Posts: 82
Joined: Mon Aug 16, 2004 8:47 pm
Location: U.S. Geological Survey, Woods Hole
Contact:

Re: ROMS Swan coupling

#23 Unread post by nganju »

I also think the first error may be fixed by changing the "highest file ref. number" in the SWAN configuration file (swaninit)

yang
Posts: 56
Joined: Mon Sep 25, 2006 2:37 pm
Location: Institue of oceanology ,Chinese acedemy of scinece

Re: ROMS Swan coupling

#24 Unread post by yang »

jcwarner wrote:something else to try, more advanced:
Edit SWAN/Src/waves_coupler.F
and comment out line 648 (or thereabouts, depending on code version)
from
!-----------------------------------------------------------------------
! Create a restart file.
!-----------------------------------------------------------------------
!
CALL BACKUP (AC2, SPCSIG, SPCDIR, KGRPNT, XCGRID, YCGRID, ng)


to


! CALL BACKUP (AC2, SPCSIG, SPCDIR, KGRPNT, XCGRID, YCGRID, ng)


Recompile and see if that helps.
Thanks ,jcwarner
According your suggestion,i comment out the 358 line ( CALL BACKUP (AC2, SPCSIG, SPCDIR, KGRPNT, XCGRID, YCGRID, ng)), and recompile that. It seems to work.
Now, the ROMS-SWAN has been runing for 340 model days and give no error information.
Can you tell me the exactly meaning of CALL BACKUP (AC2, SPCSIG, SPCDIR, KGRPNT, XCGRID, YCGRID, ng). Why does it work if i comment out the 358 line??. And does it influence the results of simulation???

yang
Posts: 56
Joined: Mon Sep 25, 2006 2:37 pm
Location: Institue of oceanology ,Chinese acedemy of scinece

Re: ROMS Swan coupling

#25 Unread post by yang »

nganju wrote:I think the problem is the time step and duration of the ROMS and SWAN runs not matching. Can you show us the number and size of the ROMS time steps?
The number and size of the ROMS time steps is:

! Time-Stepping parameters.

NTIMES == 86400
DT == 360.0d0
NDTFAST == 90

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

Re: ROMS Swan coupling

#26 Unread post by jcwarner »

the call to backup was something i added. This writes the model state (2d spectra) to a file so that it can be restarted. The idea is the same as the restart file in roms. But i think what is happening is that swan is reopening the same file over and over, and incrementing the counter for the number of files open. this is not the desired behavior, and it just needs to be informed that the file is already open and does not need to be re-opened. This is not going to affect the results in any way. I will look into how the file is being opened and closed, and correct the problem. for now, just leave that commented out and go ahead with the simulations.

-j

yang
Posts: 56
Joined: Mon Sep 25, 2006 2:37 pm
Location: Institue of oceanology ,Chinese acedemy of scinece

Re: ROMS Swan coupling

#27 Unread post by yang »

Thanks
Give my best wish to you.

yang
Posts: 56
Joined: Mon Sep 25, 2006 2:37 pm
Location: Institue of oceanology ,Chinese acedemy of scinece

Re: ROMS Swan coupling

#28 Unread post by yang »

Why is there no information about wind field in swan_inlet_test.in?
SWAN is forcing by What??
SWAN is forcing by the same wind field with ROMS??

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

Re: ROMS Swan coupling

#29 Unread post by jcwarner »


yang
Posts: 56
Joined: Mon Sep 25, 2006 2:37 pm
Location: Institue of oceanology ,Chinese acedemy of scinece

Re: ROMS Swan coupling

#30 Unread post by yang »

ROMS/TOMS: DONE... Thursday - January 7, 2010 - 5:48:26 AM
PGFIO/stdio: Too many open files
PGFIO-F-/OPEN/unit=1046/error code returned by host stdio - 24.
File name = ./WPO_SWAN_output_x5/tmbot.mat-129
In source file swanparll.f90, at line number 3764
--------------------------------------------------------------------------
jcwarner,
I have run the ROMS+SWAN for 360 days that is my duration of my case ,and there is a 'Too many open files' error after the last model step?
Why does it not occur before the last model step??

yang
Posts: 56
Joined: Mon Sep 25, 2006 2:37 pm
Location: Institue of oceanology ,Chinese acedemy of scinece

Re: ROMS Swan coupling

#31 Unread post by yang »

4 version of initialisation file
Delft University of Technology name of institute
3 command file ref. number
INPUT command file name
4 print file ref. number
PRINT print file name
4 test file ref. number
test file name
6 screen ref. number
200 highest file ref. number

hi,nganju
When i changed the highest file ref.number in swaninit, the error still occurs ?
ROMS/TOMS: DONE... Thursday - January 7, 2010 - 8:45:04 AM
PGFIO/stdio: Too many open files
PGFIO-F-/OPEN/unit=1046/error code returned by host stdio - 24.
File name = ./WPO_SWAN_output_x5/tmbot.mat-129
In source file swanparll.f90, at line number 3764
--------------------------------------------------------------------------

nganju
Posts: 82
Joined: Mon Aug 16, 2004 8:47 pm
Location: U.S. Geological Survey, Woods Hole
Contact:

Re: ROMS Swan coupling

#32 Unread post by nganju »

The ROMS run is instructed to run for 86400 time steps at 360 s per time step = 360 days
The SWAN run is instructed to run from 1/1/04 to 12/10/04 = 344 days
This will cause SWAN to stop coupling and ROMS to sit and wait. These times need to match, for both coupling and the length of your SWAN input files. You need to look at those carefully to make sure the forcing data extend to the end of your simulation.

Change the "200" from swaninit to something bigger like "99999".

Good luck...

yang
Posts: 56
Joined: Mon Sep 25, 2006 2:37 pm
Location: Institue of oceanology ,Chinese acedemy of scinece

Re: ROMS Swan coupling

#33 Unread post by yang »

nganju wrote:The ROMS run is instructed to run for 86400 time steps at 360 s per time step = 360 days
The SWAN run is instructed to run from 1/1/04 to 12/10/04 = 344 days
This will cause SWAN to stop coupling and ROMS to sit and wait. These times need to match, for both coupling and the length of your SWAN input files. You need to look at those carefully to make sure the forcing data extend to the end of your simulation.

Change the "200" from swaninit to something bigger like "99999".

Good luck...
Thanks
I have change the duration of SWAN from 20040101.0000 2hr 20041126.0000 to 2004.01.01 2hr 20041226 two days ago. And the question is that there is alway a error info(when swan and roms is over at the 360th model day):
ROMS/TOMS: DONE... Thursday - January 7, 2010 - 8:45:04 AM
PGFIO/stdio:
Too many open files
PGFIO-F-/OPEN/unit=1046/error code returned by host stdio - 24.
File name = ./WPO_SWAN_output_x5/tmbot.mat-129
In source file swanparll.f90, at line number 3764

nganju
Posts: 82
Joined: Mon Aug 16, 2004 8:47 pm
Location: U.S. Geological Survey, Woods Hole
Contact:

Re: ROMS Swan coupling

#34 Unread post by nganju »

Did you try changing the max file number to something larger than 200?

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

Re: ROMS Swan coupling

#35 Unread post by jcwarner »

try running swan with a more realistic number of processors, like 32.

yang
Posts: 56
Joined: Mon Sep 25, 2006 2:37 pm
Location: Institue of oceanology ,Chinese acedemy of scinece

Re: ROMS Swan coupling

#36 Unread post by yang »

Warner is right.
In the latest simulation, i use 64 processor and it is ok.

Post Reply