Yes, I agree it is the format line. After I changed the text to read as you suggested, the first program worked great :) I am simply not accustomed to working with the format command and therefore I am having a hard time figuring out the context of all the values. I understand that 'F' is used for float, 'I' for integer, 'A' for characters. I also understand that if you have 'A100' then your file name (or whatever) can not exceed 100 characters.
However I am struggling with other inputs like:
'/'-- does this mean a new line or return?
','-- does this mean the next command?
'()'-- why would you have some values in additional parenthesis while others not
'F6.3'-- what is the relevance of the 6.3. I see (below) that there are 6 values for the number, but why the .3?
'A100,5'-- what is the relevance of ,5?
Anyways this is the header information for the .ctl file that you requested:
7931
7001
224
464
25.063
-124.938
E:\ET code\workassignment\NEWwork\workassignment\final_simple_meth od_code\latlon_grid.dat
33.0
30.0
-86.5
-83.0
right now the format line is written as:
(I5,/,I5(/,I5),/,F6.3,/,F8.3,/,A100,5(/,F5.1))',nmx,nmy,nx,n y,lat1,lon1,fname1,$
TM_lat_ul,TM_lat_ll,TM_lon_ul,TM_lon_ll
Does that help you?
:) A
On Monday, August 13, 2012 2:19:48 PM UTC-4, Helder wrote:
> On Monday, August 13, 2012 6:27:58 PM UTC+2, adh...@gmail.com wrote:
>
>> Hi Helder,
>
>>
>
>>
>
>>
>
>> Thank you for your response! I have inserted your suggested change, however this particular program works off of several separate programs. Another section of code follows. This one will also need to be changed as well and simply replacing the 3 with a 4 is not working. Do you have a suggestion as to how this line should be altered to accommodate the new text you suggested?
>
>>
>
>>
>
>>
>
>> FORMAT = '(I3,3(/,I3),/,F6.3,/,F8.3,/,A100,4(/,F5.1))',nmx,nmy,nx,ny, lat1,lon1,fname1,$
>
>>
>
>> TM_lat_ul,TM_lat_ll,TM_lon_ul,TM_lon_ll
>
>>
>
>>
>
>>
>
>> Thank you!
>
>>
>
>>
>
>>
>
>>>
>
>>
>
>>> Hi,
>
>>
>
>>>
>
>>
>
>>> although I have no experience with such images, my first guess is that you need to change the FORMAT in the READF command.
>
>>
>
>>>
>
>>
>
>>> Using '(I3)' will read 3 digits of integer numbers. I would put a I4. Can you check what comes up by doing that?
>
>>
>
>>>
>
>>
>
>>> Therefore try with: FORMAT = '(I4,/,I4,2(/,I4),25(/,A100),/,A100)'
>
>>
>
>>>
>
>>
>
>>> (I have not tested this...!!!)
>
>>
>
>>>
>
>>
>
>>> Cheers,
>
>>
>
>>>
>
>>
>
>>> Helder
>
>
>
> Sorry, I don't because I don't know how the file header actually looks like.
>
> But I do think that you're having a problem with truncation in the format line.
>
>
>
> If you send me the first four or five header lines I can have a go at it. I'm not into satellite images, therefore I can't find such information quickly.
>
>
>
> Cheers,
>
> Helder
|