[ncl-talk] Output not correct while using write_matrix

Ipshita Majhi ipmajhi at alaska.edu
Wed Dec 10 15:01:42 MST 2014


Thank you! I did look at the data and here are the min and max result
min= 47385.7
max=514020

I ran the code again using 52f6.1 but it still does not fit in.
This is my understang that the number before the decimal gives the biggest
range of the output and after decimal is the number after that. Am I still
missing something.
Thank you
Best Regards
Ipshita

On Wed, Dec 10, 2014 at 3:46 PM, Dennis Shea <shea at ucar.edu> wrote:

> **As we always recommend**  "look at your data"
>
> printVarSummary(air_month_decade)
> printMinMax(air_month_decade, 0)
>
> ===
> What range of values to you see?
>
> If the numbers are (say) 123456.789
>
> Then fortran will print ****** because it can no fit the number in the
> format  you provided. Specifically,
> the  f7.2  part of the specification.
>
>
>
>
> On Wed, Dec 10, 2014 at 2:24 PM, Ipshita Majhi <ipmajhi at alaska.edu> wrote:
>
>> Dear NCL,
>>
>> I have a code that works and I am trying to write output out to a file,
>> the file is 47X52 and I am using write_matrix. The output gives only stars
>> or no numbers. I tried taking slices of the 2D matrix and I am not able to
>> get the right output. Should I write a code in fortran and then make it
>> work in NCL?
>> Here is a piece of my code:-
>> do i=1,47-1
>> do j=0,357,7
>> pweek(i,j/7) = avg(y(j:j+6))
>> end do
>> end do
>>
>> opt = True
>> opt at fout = "weekly_mean_sce.txt"
>> write_matrix(air_month_decade, "52f7.2", opt)
>>
>> It would be great if someone can help me.
>>
>> _______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20141210/ff318a3e/attachment.html 


More information about the ncl-talk mailing list