Hi Dave
On Tue, Mar 31, 2009 at 11:06:09 -0600, Dave Allured wrote:
> Karsten,
>
> That function has five arguments. Your function call has six arguments.
> I believe this will cause that exact error message.
You are right I should have checked that.
I actually find it a pitty that there is a difference between the F77
and F90 argument list for this function.
I used to allocate and array like:
integer :: dims(4)
that could be re-used like:
dims(1) = lon_dim
iret = nf_def_var(ncid,'lon',NF_REAL,1,dims,lon_id)
dims(1) = lon_dim
dims(2) = lat_dim
dims(3) = time_dim
iret = nf_def_var(ncid,'sst',NF_REAL,3,dims, sst_id)
call check_err(iret)
i.e. the number of dimensiosn for a specific variable is given
explicitly and not determined by the size of the dimids vector.
Instead I now have to do like:
integer :: dims_3(3)
integer :: dims_4(4)
>
> This is a Fortran 90 thing. When a generic interface is used, any
> mismatch in number of arguments, arg type, or dimensionality can trigger
> a "no matching specific function" error.
>
> Dave Allured
> CU/CIRES Climate Diagnostics Center (CDC)
> http://cires.colorado.edu/science/centers/cdc/
> NOAA/ESRL/PSD, Climate Analysis Branch (CAB)
> http://www.cdc.noaa.gov/psd1/
>
Karsten
--
----------------------------------------------------------------------
Karsten Bolding Bolding & Burchard ApS
Strandgyden 25 Phone: +45 64422058
DK-5466 Asperup Fax: +45 64422068
Denmark Email: karsten@xxxxxxxxxxxxxxxxxxxx
http://www.findvej.dk/Strandgyden25,5466,11,3
Q: What is irony?
A: Almost the same as goldy and bronzy - just made of iron ...
(from Blackadder)
----------------------------------------------------------------------