Compiling problem with swan coupling
Compiling problem with swan coupling
I updated ROMS this morning and then I couldn't compile it successfully with swan coupling. A array named 'OutField' in roms_export.f90 (line 91)was not be declared.
New update was applied this morning. However, I couldn't compile it either.
fortcom: Error: inp_par.f90, line 494: The ARRAY argument of the ALLOCATED inquiry intrinsic function shall be an allocatable array. [ALLOCATED]
IF (.not.allocated(Export(Iocean)%code)) THEN
------------------------------------------------^
fortcom: Error: inp_par.f90, line 504: The ARRAY argument of the ALLOCATED inquiry intrinsic function shall be an allocatable array. [ALLOCATED]
IF (.not.allocated(Export(Iwaves)%code)) THEN
------------------------------------------------^
fortcom: Error: inp_par.f90, line 514: The ARRAY argument of the ALLOCATED inquiry intrinsic function shall be an allocatable array. [ALLOCATED]
IF (.not.allocated(Export(Iatmos)%code)) THEN
------------------------------------------------^
fortcom: Error: inp_par.f90, line 536: The ARRAY argument of the ALLOCATED inquiry intrinsic function shall be an allocatable array. [ALLOCATED]
IF (.not.allocated(Import(Iocean)%code)) THEN
------------------------------------------------^
fortcom: Error: inp_par.f90, line 546: The ARRAY argument of the ALLOCATED inquiry intrinsic function shall be an allocatable array. [ALLOCATED]
IF (.not.allocated(Import(Iwaves)%code)) THEN
------------------------------------------------^
fortcom: Error: inp_par.f90, line 556: The ARRAY argument of the ALLOCATED inquiry intrinsic function shall be an allocatable array. [ALLOCATED]
IF (.not.allocated(Import(Iatmos)%code)) THEN
fortcom: Error: inp_par.f90, line 494: The ARRAY argument of the ALLOCATED inquiry intrinsic function shall be an allocatable array. [ALLOCATED]
IF (.not.allocated(Export(Iocean)%code)) THEN
------------------------------------------------^
fortcom: Error: inp_par.f90, line 504: The ARRAY argument of the ALLOCATED inquiry intrinsic function shall be an allocatable array. [ALLOCATED]
IF (.not.allocated(Export(Iwaves)%code)) THEN
------------------------------------------------^
fortcom: Error: inp_par.f90, line 514: The ARRAY argument of the ALLOCATED inquiry intrinsic function shall be an allocatable array. [ALLOCATED]
IF (.not.allocated(Export(Iatmos)%code)) THEN
------------------------------------------------^
fortcom: Error: inp_par.f90, line 536: The ARRAY argument of the ALLOCATED inquiry intrinsic function shall be an allocatable array. [ALLOCATED]
IF (.not.allocated(Import(Iocean)%code)) THEN
------------------------------------------------^
fortcom: Error: inp_par.f90, line 546: The ARRAY argument of the ALLOCATED inquiry intrinsic function shall be an allocatable array. [ALLOCATED]
IF (.not.allocated(Import(Iwaves)%code)) THEN
------------------------------------------------^
fortcom: Error: inp_par.f90, line 556: The ARRAY argument of the ALLOCATED inquiry intrinsic function shall be an allocatable array. [ALLOCATED]
IF (.not.allocated(Import(Iatmos)%code)) THEN
- arango
- Site Admin
- Posts: 1367
- Joined: Wed Feb 26, 2003 4:41 pm
- Location: DMCS, Rutgers University
- Contact:
It works for me. The error that you are having indicates to me that the option MODEL_COUPLING has not be activated internally (globaldefs.h) to declare all the necessary arrays in Modules/mod_coupler.F. The switch to couple to SWAN is SWAN_COUPLING
The other error that you are having is probably because you haven't activated MCT_LIB. You need to put something like this in your application header file:
Recall that there are two coupling libraries options in ROMS: ESMF_LIB and MCT_LIB. Currently, the coupling with SWAN is only available with the MCT library. These kind of errors are very easy to find by just looking the compiled f90 files and the standard output information during compilation. You just need to read carefully the dependencies.
I just compiled the INLET_TEST with no errors
The other error that you are having is probably because you haven't activated MCT_LIB. You need to put something like this in your application header file:
Code: Select all
#define SWAN_COUPLING
#ifdef SWAN_COUPLING
# define MCT_LIB
#endif
I just compiled the INLET_TEST with no errors
- arango
- Site Admin
- Posts: 1367
- Joined: Wed Feb 26, 2003 4:41 pm
- Location: DMCS, Rutgers University
- Contact:
I don't get that. I works for me. I compiled the latest version (revision 175) from the trunk with PGI and IFORT. I don't know where your problem is. I compile the INLET_TEST using the build.sh script. You need to check what you are doing and the Build sub-directory to see what files you have. Check the MakeDepend file.
We don't have time to check every problem reported by an user. I only intervene when there is actually a problem that I need to fix. Users need to be more curious and become problem solvers, troubleshooters. There are hundreds of posts in this forum of reported problems with very minimal information.
We don't have time to check every problem reported by an user. I only intervene when there is actually a problem that I need to fix. Users need to be more curious and become problem solvers, troubleshooters. There are hundreds of posts in this forum of reported problems with very minimal information.
- arango
- Site Admin
- Posts: 1367
- Joined: Wed Feb 26, 2003 4:41 pm
- Location: DMCS, Rutgers University
- Contact:
I have more time to think about your problem. This looks like a compiler problem when allocating that structure. It seems that other compilers do this allocation differently. I tried with a newer version of the IFORT compiler and I was able to reproduce your error.
I experimented with different ways to allocate this structure in a more robust way. Then, I was able to compile with the newer IFORT compiler. I think that this will solve your problem. Thank you for reporting this problem. Please update your code.
I experimented with different ways to allocate this structure in a more robust way. Then, I was able to compile with the newer IFORT compiler. I think that this will solve your problem. Thank you for reporting this problem. Please update your code.