Calling Fortran 90 subroutine from NCL complains about array dimensions

From: Ekin Akoglu <ekin_at_nyahnyahspammersnyahnyah>
Date: Tue Jun 24 2014 - 14:23:17 MDT

Dear all,

I could not figure out why but I couldn't manage to make a Fortran 90
subroutine work with a call in an NCL script. WRAPIT compiles and creates
the *.so file without problems. But the NCL script gives error on line with
the call to the F90 code. The error is:

fatal:depth_integrator: dimension size of dimension (2) of layer_thickness
must be equal to the value of nlayer
fatal:["Execute.c":8567]:Execute: Error occurred at or near line 90 in file
layers.ncl

I understand that something does not fit when passing between NCL and F90
and it is the array dimensioning. However, I couldn't figure out what is
wrong.I also examined Example 5 (
https://www.ncl.ucar.edu/Document/Tools/WRAPIT.shtml#Example_5) for
differences in array dimensions between NCL and Fortran to no avail. I
would be glad if you could provide some help. Attached is the NCL script,
F90 code and the stub file for your reference.

Thank you in advance.

Kind regards,

Ekin

Received on Tue Jun 24 08:23:25 2014

This archive was generated by hypermail 2.1.8 : Wed Jul 23 2014 - 15:33:46 MDT