netcdf output from SWAN

Report or discuss software problems and other woes

Moderators: arango, robertson

Post Reply
Message
Author
m567tej
Posts: 10
Joined: Tue Feb 28, 2012 3:10 pm
Location: Iranian National Institute for Oceanography and Atmospheric Sciences

netcdf output from SWAN

#1 Unread post by m567tej »

Dear all,
I ran the only swan model from COAWST; everything is right except that when I decide to have netcdf output.
During run processes, swan (COAWST) makes number of eigth files (in equal to number of used cores) for each quantity and at the end it combine them together to create single output file for each quantity. The job is successful if you want to make *.mat or *.dat output file but when you try for creating netcdf file it write the following message:

At line 1849 of file agioncmd.f90 (unit = 6, file = '')
Fortran runtime error: Too many open files


remember there is no matter how many quantitis you want to make. I try this for 8, 6,4, and this latter only for hsig.
I used the following command:

BLOCK 'COMPGRID' NOHEADER '/opt/mywork/Test3/output-t1/5/hsig.nc' LAY 4 HSIGN 1. OUTPUT 20100101.000000 1 HR

thanks if you reply some help

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

Re: netcdf output from SWAN

#2 Unread post by jcwarner »

you need to make sure you are linked to a netcdf4.
You can use Projects/Inlet_test/Swanonly as an example to run swan by itself in coawst.
I undefined the refined grid, and then changed the swan_inlet_test.in to write out hsig.nc. I ran it on 4 processors so it created 4 hisg.nc-00x files, and then swan automatically pulled the files together to make one netcdf file at the end. give it a try and see if it can work for you.

also, in the future, please start to use
https://coawstmodel-trac.sourcerepo.com ... OAWST/wiki
and from there you can add a ticket for coawst. if it is a specific question for roms, then you can put it here. but swan and coupled model questions can go on the coawst site.
-john

dickson
Posts: 3
Joined: Tue Jan 19, 2016 2:55 pm
Location: MMS, Hong Kong

Re: netcdf output from SWAN

#3 Unread post by dickson »

I encounter a problem when two netcdf files are output from SWAN (SWAN in COAWST) under two nested grids configuration . One is generated from coarse grid and another is from fine grid. At the end of SWAN run, I can only get one netcdf file from coarse grid, I got an error saying "allocatable array already allocated" for fine grid. A number of xxx.nc-00x files for the finer grid are left due to MPI run. Is there any method to merge these files to a single netcdf file so that we don't need to re-run the whole simulation.

I run the sample in Projects/Inlet_test/Swanonly . I change both swan_inlet_test.in and swan_inlet_test_ref5.in to write out hsig.nc. I can reproduce the same error.

Anyone can help ?

Thank you very much in advance

Dickson

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

Re: netcdf output from SWAN

#4 Unread post by jcwarner »

that is a known issue for me. Currently you can only have netcdf output for one of the grids when using my swan nesting. it is on my list to correct soon. sorry.
also, for future reference, can you and others who read this please post non-roms issues on this other github site:
https://github.com/jcwarner-usgs/COAWST

thanks,
-john

Post Reply