Re: converting SYNOP meteorological code into readable observations

From: Christopher Steele <christopher.steele_at_nyahnyahspammersnyahnyah>
Date: Wed Nov 02 2011 - 07:09:24 MDT

Forgot to attach the new code

Chris

On Wed, Nov 2, 2011 at 1:08 PM, Christopher Steele <
christopher.steele@uea.ac.uk> wrote:

> Hi again,
>
> I'm running into further problems with this code when I try to link the
> outputs together. I keep getting the following error message but I'm not
> sure why.
>
>
> fatal:Undefined identifier: (datafile) is undefined, can't continue
> fatal:Execute: Error occurred at or near line 64 in file read_synop.ncl
>
> I'm not sure how "datafile" has become undefined
>
> cheers
>
> Chris
>
>
>
> On Tue, Nov 1, 2011 at 1:17 PM, Andrew Dawson <dawson@atm.ox.ac.uk> wrote:
>
>> Hi Chris,
>>
>> When you use str_index_of_substr to set pres_test you have opt set to 0,
>> which means you get an array of the indexes of all matches. If there is
>> more than one match then pres_test will not be a scalar. This means that
>> the following if statement is invalid because it is expecting a scalar. You
>> need to refine your test for substrings I think, perhaps through
>> appropriate use of the any or all functions, or if you are only interested
>> in the first match then change the setting of opt (the last argument to
>> str_index_substr).
>>
>> Anyway, hope that helps,
>>
>> Andrew
>>
>> On 1 November 2011 12:43, Christopher Steele <
>> christopher.steele@uea.ac.uk> wrote:
>>
>>> Hi everyone
>>>
>>> I've been attempting to write a script to sort out some meteorological
>>> observations from their original synop form into something usable in the
>>> MET tools software. Unfortunately I keep coming across this error message:
>>>
>>> fatal:Conditional statements (if and do while) require SCALAR logical
>>> values, see all and any functions
>>> fatal:Execute: Error occurred at or near line 122 in file read_synop.ncl
>>>
>>>
>>> SYNOP code is a bit of a mess to interpret. Attached you will find a
>>> sample of the code and my ncl file to decode it.
>>>
>>> Hope someone can help
>>>
>>> cheers
>>>
>>> Chris
>>>
>>> _______________________________________________
>>> ncl-talk mailing list
>>> List instructions, subscriber options, unsubscribe:
>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>
>>>
>>
>>
>> --
>> Dr Andrew Dawson
>> Atmospheric, Oceanic & Planetary Physics
>> Clarendon Laboratory
>> Parks Road
>> Oxford OX1 3PU, UK
>> Tel: +44 (0)1865 282438
>> Email: dawson@atm.ox.ac.uk
>> Web Site: http://www2.physics.ox.ac.uk/contacts/people/dawson
>>
>>
>

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

Received on Wed Nov 2 07:09:30 2011

This archive was generated by hypermail 2.1.8 : Fri Nov 04 2011 - 08:43:41 MDT