[Info-vax] [OT] Current students apparently can't read Fortran code...
Dan Cross
cross at spitfire.i.gajendra.net
Fri Apr 15 08:26:56 EDT 2022
In article <62596294$0$703$14726298 at news.sunsite.dk>,
Arne Vajhøj <arne at vajhoej.dk> wrote:
>On 4/15/2022 8:04 AM, Dan Cross wrote:
>> In article <6258c4e1$0$693$14726298 at news.sunsite.dk>,
>> Arne Vajhøj <arne at vajhoej.dk> wrote:
>>> On 4/13/2022 10:02 PM, Don Baccus wrote:
>>>> [snip]
>>>> "While much of the subsequent reworking of the model has led to a
>>>> reduction in these historical influences, some parts of the model
>>>> still hark back to the days of punch cards, FORTRAN 66 and line
>>>> printer output. A charitable interpretation would be that while
>>>> embracing the new (FORTRAN 90/95, multi-processing, netcdf, etc.), we
>>>> endeavour to maintain some of the more harmless GISS traditions
>>>> (which some might call eccentricities) in a spirit of continuity with
>>>> those who have previously worked on the model. On the other hand,
>>>> some of those early decisions (for instance regarding diagnostics, or
>>>> conservation properties) turned out to be very far-sighted and are a
>>>> principle reason why the GISS series of models continue to play a
>>>> useful and important role in the world of GCM simulations."
>>>
>>> A quick look at a few randomly selected files from the
>>> code at https://simplex.giss.nasa.gov/snapshots/
>>> did not show very old code - lots of 90 and some
>>> 77 upgraded to 90.
>>
>> Hmm, I'm not sure about that:
>>
>> : chandra; pwd
>> /Users/cross/Downloads/modelE2_dev/model
>> : chandra; cloc .
>> 613 text files.
>> 568 unique files.
>> 26 files ignored.
>>
>> github.com/AlDanial/cloc v 1.92 T=1.67 s (340.1 files/s, 279550.2 lines/s)
>> -------------------------------------------------------------------------------
>> Language files blank comment code
>> -------------------------------------------------------------------------------
>> Fortran 77 361 30746 86473 272461
>> Fortran 90 175 9720 14530 50033
>> C/C++ Header 11 264 0 1148
>> make 13 130 36 418
>> Korn Shell 1 31 35 128
>> m4 3 56 312 127
>> Pascal 2 1 0 120
>> C 2 33 27 78
>> -------------------------------------------------------------------------------
>> SUM: 568 40981 101413 324513
>> -------------------------------------------------------------------------------
>> : chandra;
>>
>> I took a peak at a few files; it seems pretty archaic to me.
>
>If you look at the .f files that are supposedly 77 then
>it really just are old fixed format - the code are full of
>90 features.
>
>Example advc1d.f - code starts in column 7, comments are
>a c in column 1 - but the code would not build with 77.
>
>Declarations like:
>
> integer, intent(IN) :: kk
I think it's fair to say that there are some FORTRAN 90 features
thrown in, but I don't think it's fair to say that that makes it
FORTRAN 90 in anything other than a strictly technical sense.
Idly, I wonder if this is what "modernized" COBOL code bases
look like?
>Loops like:
>
> do k=1,kk
> ...
> end do
My VAX FORTRAN manual from well before 1990 shows support for
that particular construct. :-)
- Dan C.
More information about the Info-vax
mailing list