Re: Date representation
- From: Marin Brkic <mbrkic@xxxxxxxxxxxxxxxxxxx>
- Date: Sat, 13 Sep 2008 19:11:48 +0200
On Thu, 11 Sep 2008 15:41:07 +0200, "Kurt Kallblad"
<kurt.kallblad@xxxxxxxx> wrote:
Looking at your example I guess that the amount of data is not
more than you easily can keep in memory and it is a quick job to
read the file. In cases like that I read the file twice. The
first reading is used to determine the needed array sizes. Then I
allocate the arrays, rewind the file and read in the data.
Hello all,
let me just use this post to thank all who answered. I found some very
useful information and ideas on how to proceed in your replies.
to Kurt Kallblad:
Yes, the amount of data is not very large. There are several
files, each one not over 2 Mb. Not a problem for today's standards.
I used your idea of reading the file twice, and it works fine.
Previously I just allocated some ridicously big array and it also
worked fine, but I guess this is more rational approach.
Some nostalgia which may be useful:
Below you will find a routine to convert the dates to JULDAG.
Thank you for the routine.
These are not the Julian day but my own day numbers. These
numbers start with 1 for 1901-01-01 and ends with 72684 for
2099-12-31, this to get rid of leap year problems.
works fine for me, by the time the routine is no longer valid,
date-wise, CERN LHC will do its thing, create a black hole, and the
problem will be gone, along with planet Earth :-)
The original
version was on punched cards but it is still in use in some
commercial programs. A small Swedish wordlist is attached to help
you to understand the variables.
By some weird coincidence I actually know some (very) little of your
language, having spend some time there (beautiful hiking trails,
especially in autumn :-) but thank you for the effort of translation.
--
Marin
Kurt.
- References:
- Date representation
- From: Marin Brkic
- Re: Date representation
- From: Kurt Kallblad
- Date representation
- Prev by Date: Re: How to create a new folder in FORTRAN 77?
- Next by Date: Re: Date representation
- Previous by thread: Re: Date representation
- Next by thread: Source code beautifier for f90 and f77
- Index(es):
Relevant Pages
|