Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

print specific values of array 2

Status
Not open for further replies.

ellipm

Programmer
Apr 19, 2012
7
Hi,
I have an enormous amount of results to print and i'm wondering if there's a way to print them every 100 steps for example. i'm trying to do it that way
Code:
DO I=1,NI,100
    DO J=1,NJ
        WRITE(2,200) DS(I),S(I),U(I,J)
    enddo
ENDDO

but i didn't make any progress so far. I'm not sure that there's such a possibility in fortran.
 
Anything is possible. Your little snippet will print every 100th row of U but it depends on the values of NI and NJ. You could still produce large amounts of output if NJ is large.
 
NJ isn't large. nj=30. NI is 10000.But it seems that my way doesn't work out. I have every i step printed!!
 
Is this exactly the code as you are using it? or
are you simplifying stuff and THEN posting?

By the way, I am not sure I would have written the inner loop like that, I would have
Code:
DO I=1,NI,100
    write(2,*) DS(I),S(I),(U(I,J),J=1,NJ)
ENDDO
 
Well spotted salgerman.

ellipm what you're seeing is 30 lines for every 100th line. What does FORMAT 200 look like?
 
Just my impression:

I would not be too happy to have only one percent of the results presented to me, Murphy's law has it, that the interesting part of your results will be in the other 99 % of your data.

What about graphics ?

This link gives (among others) a list of fortran graphic packages that may be helpful to display a lot of data.

Norbert


The optimist believes we live in the best of all possible worlds - the pessimist fears this might be true.
 
If you are using ifort (IVF), there is a graphical array viewer that comes with it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top