Re: function dimension error

From: Karin Meier-Fleischer <meier-fleischer_at_nyahnyahspammersnyahnyah>
Date: Sun Jun 22 2014 - 15:38:04 MDT

One tip

change

  function create_one_station_plot(wind_spd, wind_dir, filename)

to

  function create_one_station_plot(wks,wind_spd, wind_dir, filename)

and delete the line where you define wks in line 71.

Hope this helps,
Karin

Am 22.06.2014 um 23:31 schrieb Karin Meier-Fleischer =
<meier-fleischer@dkrz.de>:

> Hi Amadou,
>
> I don't really know if I understand you right, because you gave the =
answer by yourself.
> You defined the function with 3 arguments but you call it with 4 =
arguments - that's the
> error as described below.
>
> Either you change the definition of the function or you change the =
call of the function.
>
> Bye,
> Karin
>
>
> Am 22.06.2014 um 22:55 schrieb Amadou Coulibaly <mpapin24@gmail.com>:
>
>> Hi NCL users,
>>
>> I have a dimension problem of my function. When I tried to run my =
script, it will show me this error.
>>
>> fatal:syntax error: function create_one_station_plot expects 3 =
arguments, got 4
>> fatal:error at line 233 in file panel_plot_mod.ncl
>>
>> fatal:syntax error: function create_one_station_plot expects 3 =
arguments, got 4
>> fatal:error at line 243 in file panel_plot_mod.ncl
>>
>> fatal:syntax error: function create_one_station_plot expects 3 =
arguments, got 4
>> fatal:error at line 253 in file panel_plot_mod.ncl
>>
>> fatal:Syntax Error in block, block not executed
>> fatal:error at line 257 in file panel_plot_mod.ncl
>>
>> At the beginning of my script, I defined that function as:
>>
>> function create_one_station_plot(wind_spd, wind_dir, filename)
>> which contains 3 arguments.
>>
>> But in my script so far, for panel plot, this function is:
>>
>> plots(0) = create_one_station_plot(wks, wind_spd_cotonou, =
wind_dir_cotonou, "cotonou")
>> Which contains 4 arguments.
>>
>> How to solve this problem?
>>
>> See attached my script.
>>
>> --
>> COULIBALY AMADOU
>> PhD Student on West African Climate System (WACS)
>> FUTA - Federal University of Technology of Akure, Nigeria
>>
>> Visiting Researcher - University of Cologne, Germany
>> Institute of Geophysics and Meteorology
>> Pohligstr. 3 / Office 3.102
>> D-50969 Köln
>>
>> Project: WASCAL (West African Science Service Centre on Climate =
Change and Adapted Land Use)
>> Phone:(+234) 810 795 2836 /(+223) 65 67 27 57 /(+226) 64 57 37 27 =
/+49 15218352574
>>
>> E-mail: mpapin24@gmail.com / coulibalya68@yahoo.com
>>
>> "The time is always right to do right": Nelson Mandela
>>
>> "Character is like a tree and reputation like a shadow. The shadow =
is what we think of it; the tree is the real thing" : Abraham Lincoln
>>
>> "Do what you can, with what you have, where you are" Theodore =
Roosevelt
>>
>>
>>
>>
>>
>>
>> <panel_plot_mod.ncl>_______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
> =
_______________________________________________________________________
> Dipl. Geophys. Karin Meier-Fleischer
> Application Support, Visualization
>
> Deutsches Klimarechenzentrum GmbH E-Mail:
> meier-fleischer@dkrz.de
>
> Bundesstrasse 45a Internet: http://www.dkrz.de/
> 20146 Hamburg Phone: +49 (0)40 460094 126
> Germany Fax: +49 (0)40 460094 270
>
> Geschäftsführer: Prof. Dr. Thomas Ludwig
> Sitz der Gesellschaft: Hamburg
> Amtsgericht Hamburg HRB 39784
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________________________________
Dipl. Geophys. Karin Meier-Fleischer
Application Support, Visualization

Deutsches Klimarechenzentrum GmbH E-Mail:
meier-fleischer@dkrz.de

Bundesstrasse 45a Internet: http://www.dkrz.de/
20146 Hamburg Phone: +49 (0)40 460094 126
Germany Fax: +49 (0)40 460094 270

Geschäftsführer: Prof. Dr. Thomas Ludwig
Sitz der Gesellschaft: Hamburg
Amtsgericht Hamburg HRB 39784





_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk


Received on Sun Jun 22 09:38:15 2014

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