[Scilab-users] Find the error

classic Classic list List threaded Threaded
11 messages Options
Richard llom Richard llom
Reply | Threaded
Open this post in threaded view
|

[Scilab-users] Find the error

Hello,
when trying to read in this file:
ftp://ftp-cdc.dwd.de/pub/CDC/grids_germany/monthly/radiation_direct/grids_germany_monthly_radiation_direct_201706.zip
with:
M = fscanfMat('grids_germany_monthly_radiation_direct_201706.asc')

I'm getting an error message. I suppose there is something wrong in that
file, but what and where exactly?

Not directly a Scilab problem (except for the fact that the 'fscanfMat'
error message could be more verbose), but maybe someone here has an idea how
to find the error...

Thanks
richard



--
Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Eric Dubois Eric Dubois
Reply | Threaded
Open this post in threaded view
|

Re: Find the error

Hello

Maybe you could unzip the files before trying to read it?

Éric

Envoyé de mon iPhone

> Le 28 nov. 2017 à 15:30, Richard llom <[hidden email]> a écrit :
>
> Hello,
> when trying to read in this file:
> ftp://ftp-cdc.dwd.de/pub/CDC/grids_germany/monthly/radiation_direct/grids_germany_monthly_radiation_direct_201706.zip
> with:
> M = fscanfMat('grids_germany_monthly_radiation_direct_201706.asc')
>
> I'm getting an error message. I suppose there is something wrong in that
> file, but what and where exactly?
>
> Not directly a Scilab problem (except for the fact that the 'fscanfMat'
> error message could be more verbose), but maybe someone here has an idea how
> to find the error...
>
> Thanks
> richard
>
>
>
> --
> Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
> _______________________________________________
> users mailing list
> [hidden email]
> http://lists.scilab.org/mailman/listinfo/users
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Samuel GOUGEON Samuel GOUGEON
Reply | Threaded
Open this post in threaded view
|

Re: Find the error

In reply to this post by Richard llom
Le 28/11/2017 à 15:30, Richard llom a écrit :
> Hello,
> when trying to read in this file:
> ftp://ftp-cdc.dwd.de/pub/CDC/grids_germany/monthly/radiation_direct/grids_germany_monthly_radiation_direct_201706.zip

I don't get any file in this zipped archive. 0 k.

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Denis Crété Denis Crété
Reply | Threaded
Open this post in threaded view
|

Re: Find the error

In reply to this post by Eric Dubois
When the header is stripped off, there is no error:
M=fscanfMat('grids_germany_monthly_radiation_direct_201706.asc');
 
-->size(M)
 ans  =
    866.    654.  
 
-->max(M)
 ans  =
    136.16  
 
-->min(M(M>-999))
 ans  =  59.  

Denis

-----Message d'origine-----
De : users [mailto:[hidden email]] De la part de Éric Dubois
Envoyé : mardi 28 novembre 2017 15:45
À : Users mailing list for Scilab
Objet : Re: [Scilab-users] Find the error

Hello

Maybe you could unzip the files before trying to read it?

Éric

Envoyé de mon iPhone

> Le 28 nov. 2017 à 15:30, Richard llom <[hidden email]> a écrit :
>
> Hello,
> when trying to read in this file:
> ftp://ftp-cdc.dwd.de/pub/CDC/grids_germany/monthly/radiation_direct/gr
> ids_germany_monthly_radiation_direct_201706.zip
> with:
> M = fscanfMat('grids_germany_monthly_radiation_direct_201706.asc')
>
> I'm getting an error message. I suppose there is something wrong in
> that file, but what and where exactly?
>
> Not directly a Scilab problem (except for the fact that the 'fscanfMat'
> error message could be more verbose), but maybe someone here has an
> idea how to find the error...
>
> Thanks
> richard
>
>
>
> --
> Sent from:
> http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f26
> 02246.html _______________________________________________
> users mailing list
> [hidden email]
> http://lists.scilab.org/mailman/listinfo/users
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Denis Crété
Richard llom Richard llom
Reply | Threaded
Open this post in threaded view
|

Re: Find the error

Hey all,
@Denis
Very strange. For me it doesn't change if I strip the header of or not, I
get both times an error...

@Samuel
For me it unpacks a ~3 MB big file.

@Eric
yes, I'm unzipping them ...



--
Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
JLan JLan
Reply | Threaded
Open this post in threaded view
|

Re: Find the error

In reply to this post by Richard llom


On 28.11.2017 15:30, Richard llom wrote:

> Hello,
> when trying to read in this file:
> ftp://ftp-cdc.dwd.de/pub/CDC/grids_germany/monthly/radiation_direct/grids_germany_monthly_radiation_direct_201706.zip
> with:
> M = fscanfMat('grids_germany_monthly_radiation_direct_201706.asc')
>
> I'm getting an error message. I suppose there is something wrong in that
> file, but what and where exactly?
>
> Not directly a Scilab problem (except for the fact that the 'fscanfMat'
> error message could be more verbose), but maybe someone here has an idea how
> to find the error...
>
> Thanks
> richard
>
This is what I get when using csvRead. It seems to be OK up to row 
558(after the header) - I renamed the file t.txt.

mmm=csvRead("t.txt"," ",[],[],[],[],,28);
Warning: Inconsistency found in the columns. At line 559, found 1307
columns while the previous had 654.

csvRead: can not read file t.txt: Error in the column structure

Jan
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
JLan JLan
Reply | Threaded
Open this post in threaded view
|

Re: Find the error -line length

On 28.11.2017 17:53, Jan Åge Langeland wrote:

>
>
> On 28.11.2017 15:30, Richard llom wrote:
>> Hello,
>> when trying to read in this file:
>> ftp://ftp-cdc.dwd.de/pub/CDC/grids_germany/monthly/radiation_direct/grids_germany_monthly_radiation_direct_201706.zip
>>
>> with:
>> M = fscanfMat('grids_germany_monthly_radiation_direct_201706.asc')
>>
>> I'm getting an error message. I suppose there is something wrong in that
>> file, but what and where exactly?
>>
>> Not directly a Scilab problem (except for the fact that the 'fscanfMat'
>> error message could be more verbose), but maybe someone here has an
>> idea how
>> to find the error...
>>
>> Thanks
>> richard
>>
> This is what I get when using csvRead. It seems to be OK up to row 
> 558(after the header) - I renamed the file t.txt.
>
> mmm=csvRead("t.txt"," ",[],[],[],[],,28);
> Warning: Inconsistency found in the columns. At line 559, found 1307
> columns while the previous had 654.
>
> csvRead: can not read file t.txt: Error in the column structure
>
> Jan
It has to do with the line length , try to replace -999 with -9
Jan
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Samuel GOUGEON Samuel GOUGEON
Reply | Threaded
Open this post in threaded view
|

Re: Find the error

In reply to this post by Denis Crété
Le 28/11/2017 à 16:06, CRETE Denis a écrit :
> When the header is stripped off, there is no error:
> M=fscanfMat('grids_germany_monthly_radiation_direct_201706.asc');

I confirm. After using another web browser to download the file,
and after removing the header, fscanfMat() works like a charm.

Samuel

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Rafael Guerra Rafael Guerra
Reply | Threaded
Open this post in threaded view
|

Re: Find the error -line length

In reply to this post by JLan

In Win7 Scilab 6.0.0  it only worked with Jan's recommendation (replacing -999 to -9), with or without header.

The original file seems to have numeric data lines with total number of characters varying from 3270 to 4172 per row.

There must be a limitation somewhere, in Windows or Scilab 6.0.0 ?

 

Regards,

Rafael

 

-----Original Message-----
From: users [mailto:[hidden email]] On Behalf Of Jan Åge Langeland
Sent: Tuesday, November 28, 2017 6:39 PM
To: Users mailing list for Scilab <[hidden email]>; Richard llom <[hidden email]>
Subject: Re: [Scilab-users] Find the error -line length

 

On 28.11.2017 17:53, Jan Åge Langeland wrote:

> 

> 

> On 28.11.2017 15:30, Richard llom wrote:

>> Hello,

>> when trying to read in this file:

>> ftp://ftp-cdc.dwd.de/pub/CDC/grids_germany/monthly/radiation_direct/grids_germany_monthly_radiation_direct_201706.zip

>> 

>> with:

>> M = fscanfMat('grids_germany_monthly_radiation_direct_201706.asc')

>> 

>> I'm getting an error message. I suppose there is something wrong in that

>> file, but what and where exactly?

>> 

>> Not directly a Scilab problem (except for the fact that the 'fscanfMat'

>> error message could be more verbose), but maybe someone here has an

>> idea how

>> to find the error...

>> 

>> Thanks

>> richard

>> 

> This is what I get when using csvRead. It seems to be OK up to row 

> 558(after the header) - I renamed the file t.txt.

> 

> mmm=csvRead("t.txt"," ",[],[],[],[],,28);

> Warning: Inconsistency found in the columns. At line 559, found 1307

> columns while the previous had 654.

> 

> csvRead: can not read file t.txt: Error in the column structure

> 

> Jan

It has to do with the line length , try to replace -999 with -9

Jan

 


_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
JLan JLan
Reply | Threaded
Open this post in threaded view
|

Re: Find the error -line length

This post was updated on .
On 28.11.2017 18:58, Rafael Guerra wrote:
>
> In Win7 Scilab 6.0.0 it only worked with Jan's recommendation
> (replacing -999 to -9), with or without header.
>
> The original file seems to have numeric data lines with total number
> of characters varying from 3270 to 4172 per row.
>
> There must be a limitation somewhere, in Windows or Scilab 6.0.0 ?
>
>
> Regards,
>
> Rafael
>
>
Actually, just making  sure the first data line is the longest seems to
work too, for instance by adding spaces to it.

Jan

_______________________________________________
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users
Richard llom Richard llom
Reply | Threaded
Open this post in threaded view
|

Re: Find the error -line length

On 29.11.17 9:44, JLan wrote:

> On 28.11.2017 18:58, Rafael Guerra wrote:
>>
>> In Win7 Scilab 6.0.0 it only worked with Jan's recommendation
>> (replacing -999 to -9), with or without header.
>>
>> The original file seems to have numeric data lines with total number
>> of characters varying from 3270 to 4172 per row.
>>
>> There must be a limitation somewhere, in Windows or Scilab 6.0.0 ?
>>
> Actually, just making  sure the first data line the longest seems to
> work too, for instance by adding spaces to it.
>
Same for me with or w/o header doesn't matter. However either replacing -999
by -99 or adding 859 Spaces to the first line, makes it readable for me....

Win 10-64bit, Scilab 6.0

regards
richard



--
Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users