Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...This site is awesome!...Things I have been trying to figure out for weeks, I got the answer in hours!..."

Geography

Where in the world do Tek-Tips members come from?

print specific values of arrayHelpful Member!(2) 

ellipm (Programmer)
10 May 12 18:06

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 --> fortran

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.

Helpful Member!  xwb (Programmer)
10 May 12 18:11

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.

ellipm (Programmer)
10 May 12 18:17

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!!

salgerman (Programmer)
10 May 12 22:23

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

xwb (Programmer)
11 May 12 0:15

Well spotted salgerman.

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

Helpful Member!  gummibaer (Programmer)
11 May 12 5:15

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 http://fortranwiki.org/fortran/show/Libraries 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.

xwb (Programmer)
11 May 12 17:58
If you are using ifort (IVF), there is a graphical array viewer that comes with it.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Back To Forum

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close