OK, it’s time to list and figure out the Subroutine structure of Model II.
I’m doing this on a new download onto the Devuan chip using userid pi.
This is so that the structure is not tied to my userid.
This is so that (if I’m lucky) I can offer clones of the chip to any Pi user. We’ll see…
First, we just find all instances of SUBROUTINE in the FORTRAN code. Then we’ll make a very reduced list (one line per subroutine defintion) Don’t let this large block of text scare you. I break it down to smaller bits below. This is just the raw data capture from the source code.
As I remove the comments down below, this lets you have a reverence to see a bit of the comments near the active code.
pi@raspberrypi:/Climate/GCM/modelII/trunk $ grep SUB *.f
DB11pdC9.f: SUBROUTINE DIAGA (U,V,T,P,Q)
DB11pdC9.f: SUBROUTINE DIAGB (U,V,T,P,Q)
DB11pdC9.f:c ** ZERO OUT SUBSURFACE VERTICAL WINDS
DB11pdC9.f: SUBROUTINE DIAGJ
DB11pdC9.f:c ** THIS SUBROUTINE PRODUCES AREA WEIGHTED STATISTICS OF
DB11pdC9.f:c ** TITLES FOR SUBROUTINE DIAGJK
DB11pdC9.f: SUBROUTINE DIAGJK
DB11pdC9.f: SUBROUTINE JKMAP (NT,PM,AX,SCALE,SCALEJ,SCALEK,KMAX,JWT,J1)
DB11pdC9.f:c ** TITLES FOR SUBROUTINE DIAGJL
DB11pdC9.f: 2'SUBGRID SCALE TEMPERATURE DEVIATION (HUNDREDTHS OF DEGREES KEL.)'
DB11pdC9.f: SUBROUTINE DIAGJL
DB11pdC9.f:c ** SUBGRID SCALE TEMPERATURE DEVIATION
DB11pdC9.f: SUBROUTINE JLMAP (NT,PL,AX,SCALE,SCALEJ,SCALEL,LMAX,JWT,J1)
DB11pdC9.f:c ** THIS SUBROUTINE PRODUCES LAYER BY LATITUDE TABLES ON THE LINE
DB11pdC9.f:c ** TITLES FOR SUBROUTINE DIAGIL
DB11pdC9.f: SUBROUTINE DIAGIL
DB11pdC9.f: SUBROUTINE ILMAP (NT,PL,AX,SCALE,SCALEL,LMAX,JWT,ISHIFT)
DB11pdC9.f:c ** TITLES FOR SUBROUTINE DIAG7
DB11pdC9.f: SUBROUTINE DIAG7A
DB11pdC9.f:c ** THIS SUBROUTINE ACCUMULATES A TIME SEQUENCE FOR SELECTED
DB11pdC9.f: SUBROUTINE MEM (SERIES,ITM,MMAX,NUAMAX,NUBMAX,POWER,FPE,VAR,PNU)
DB11pdC9.f: SUBROUTINE DIAGIJ
DB11pdC9.f:c ** THIS SUBROUTINE PRODUCES LATITUDE BY LONGITUDE MAPS OF
DB11pdC9.f: SUBROUTINE IJMAP (NT,ARRAY,BYIACC)
DB11pdC9.f:c ** THIS SUBROUTINE PRODUCES NUMERICAL LATITUDE BY LONGITUDE MAPS OF
DB11pdC9.f:c ** TITLES FOR SUBROUTINE DIAG9
DB11pdC9.f: SUBROUTINE DIAG9A (M)
DB11pdC9.f: SUBROUTINE DIAG5A (M5,NDT)
DB11pdC9.f:c ** TITLES FOR SUBROUTINE DIAG6
DB11pdC9.f: SUBROUTINE DIAG6
DB11pdC9.f:c ** THIS SUBROUTINE PRINTS THE DIURNAL CYCLE OF SOME QUANTITIES
DB11pdC9.f: SUBROUTINE DIAG4A
DB11pdC9.f:c ** THIS SUBROUTINE PRODUCES A TIME HISTORY OF ENERGIES
DB11pdC9.f: SUBROUTINE DIAGKS
DB11pdC9.f:c ** THIS SUBROUTINE PRODUCES A SUMMARY OF KEY NUMBERS CALCULATED IN
DB11pdC9.f:c ** OTHER DIAGNOSTIC SUBROUTINES
DB11pdC9.f: SUBROUTINE DIAG10(IPFLAG)
DB11pdC9.f:c ** THIS SUBROUTINE SAVES THE INSTANTANEOUS SEA LEVEL PRESSURES
DB11pdC9.f: SUBROUTINE SIJMAP
DB11pdC9.f:c ** THIS SUBROUTINE PRODUCES LATITUDE BY LONGITUDE MAPS OF:
FFT36macDBL.f: SUBROUTINE FRTR0 (KM)
FFT36macDBL.f: 901 FORMAT ('0THIS FOURT SUBROUTINE NOT SUITED FOR KM = ',I8)
FFT36macDBL.f: SUBROUTINE FRTR (F)
FFT36macDBL.f:c ** THIS SUBROUTINE PERFORMS A FOURIER ANALYSIS ON THE ONE DIMENSIONAL
FFT36macDBL.f: SUBROUTINE GETAN (F,G)
FORCINGSjalC9.f: SUBROUTINE SOLARFORCING
FORCINGSjalC9.f: SUBROUTINE DATAREFYEAR(XGAS,YEAR,NGAS)
FORCINGSjalC9.f: SUBROUTINE DATAFILETREND(XGAS,YEAR,NGAS)
Mjal2cpdC9.f: SUBROUTINE GEOM 401.
Mjal2cpdC9.f: SUBROUTINE GEOM_8x10
Mjal2cpdC9.f: SUBROUTINE INPUT 501.
Mjal2cpdC9.f:C**** THIS SUBROUTINE SETS THE PARAMETERS IN THE C ARRAY, READS IN THE 503.
Mjal2cpdC9.f:C IN SUBROUTINE SURFACE THE MORE PRECISE VALUE 99.66 IS USED 850.3
Mjal2cpdC9.f: * ' RESUBMIT JOB WITH AN EARLIER TAUE CARD' 882.2
Mjal2cpdC9.f: SUBROUTINE DYNAM
Mjal2cpdC9.f: SUBROUTINE AFLUX (U,V,P) 1001.
Mjal2cpdC9.f:C**** THIS SUBROUTINE CALCULATES THE HORIZONTAL AIR MASS FLUXES 1003.
Mjal2cpdC9.f: SUBROUTINE ADVECM (P,PA,DT1) 1501.
Mjal2cpdC9.f:C**** THIS SUBROUTINE CALCULATES UPDATED COLUMN PRESSURES AS 1503.
Mjal2cpdC9.f: SUBROUTINE ADVECV (PA,UT,VT,PB,U,V,P,DT1) 2001.
Mjal2cpdC9.f:C**** THIS SUBROUTINE ADVECTS MOMENTUM (INCLUDING THE CORIOLIS FORCE) 2003.
Mjal2cpdC9.f: SUBROUTINE PGF (UT,VT,PB,U,V,T,P,DT1) 2501.
Mjal2cpdC9.f:C**** THIS SUBROUTINE ADDS TO MOMENTUM THE TENDENCIES DETERMINED BY 2503.
Mjal2cpdC9.f: SUBROUTINE ADVECT (PA,TT,PB,T,DT1) 3001.
Mjal2cpdC9.f:C**** THIS SUBROUTINE ADVECTS POTENTIAL TEMPERATURE 3003.
Mjal2cpdC9.f: SUBROUTINE ADVECQ (PA,QT,PB,Q,DT1) 3501.
Mjal2cpdC9.f:C**** THIS SUBROUTINE ADVECTS HUMIDITY AS DETERMINED BY DT1 AND THE 3503.
Mjal2cpdC9.f: SUBROUTINE AVRX (PU) 1801.
Mjal2cpdC9.f:C**** THIS SUBROUTINE SMOOTHES THE ZONAL MASS FLUX AND GEOPOTENTIAL 1803.
Mjal2cpdC9.f: SUBROUTINE SDRAG 7001.
Mjal2cpdC9.f:C**** THIS SUBROUTINE PUTS A DRAG ON THE WINDS ON THE TOP LAYER OF 7003.
Mjal2cpdC9.f: SUBROUTINE FILTER 7501.
Mjal2cpdC9.f:C**** THIS SUBROUTINE PERFORMS AN 8-TH ORDER SHAPIRO FILTER ON 7503.
Mjal2cpdC9.f: SUBROUTINE SHAP1D (NORDER) 7801.
Mjal2cpdC9.f:C**** THIS SUBROUTINE SMOOTHES THE ARRAY X IN THE ZONAL DIRECTION 7803.
Mjal2cpdC9.f: SUBROUTINE DAILY 8001.
Mjal2cpdC9.f:C**** THIS SUBROUTINE PERFORMS THOSE FUNCTIONS OF THE PROGRAM WHICH 8003.
Mjal2cpdC9.f: SUBROUTINE CHECKT (N) 9001.
Mjal2cpdC9.f:C**** THIS SUBROUTINE CHECKS WHETHER THE TEMPERATURES ARE REASONABLE 9003.
Pjal0C9.f: SUBROUTINE CONDSE 2001.
Pjal0C9.f:C**** THIS SUBROUTINE MIXES AIR CAUSED BY MOIST CONVECTION, AND 2003.
Pjal0C9.f:C**** SET UP VERTICAL ARRAYS, OMITTING THE J AND I SUBSCRIPTS 2170.
Pjal0C9.f:C**** SUBSIDENCE AND MIXING 2306.
Pjal0C9.f: SUBROUTINE PRECIP 3001.
Pjal0C9.f:C**** THIS SUBROUTINE USES THE PRECIPITATION TO CALCULATE THE GROUND 3003.
Pjal0C9.f: SUBROUTINE RADIA0 3501.
Pjal0C9.f:C**** THIS SUBROUTINE SETS THE RADIATION CONTROL PARAMETERS AND 3503.
Pjal0C9.f: SUBROUTINE RADIA 4001.
Pjal0C9.f:C**** THIS SUBROUTINES ADDS THE RADIATION HEATING TO THE TEMPERATURES 4003.
Pjal0C9.f: SUBROUTINE SURFCE 4801.
Pjal0C9.f:C**** THIS SUBROUTINE CALCULATES THE SURFACE FLUXES WHICH INCLUDE 4803.
Pjal0C9.f: SUBROUTINE GROUND 6001.
Pjal0C9.f:C**** THIS SUBROUTINE USES THE SURFACE FLUXES TO PREDICT IN TIME THE 6003.
Pjal0C9.f:C**** TG1 IS AT FREEZING POINT, SUBTRACT WATER THAT DIFFUSES OUT OF G1 6481.
Pjal0C9.f: SUBROUTINE DRYCNV 6801.
Pjal0C9.f:C**** THIS SUBROUTINE MIXES AIR CAUSED BY DRY CONVECTION. SINCE DRY 6803.
Pjal0C9.f:C**** CONVECTION IN THE BOUNDARY LAYER IS DONE IN SUBROUTINE SURFCE, 6804.
Pjal0C9.f: SUBROUTINE ORBIT (OBLIQ,ECCN,OMEGT,DAY,SDIST,SIND,COSD,LAMBDA) 8201.
Pjal0C9.f: SUBROUTINE OSTRUC 8501.
Pjal0C9.f:C**** THIS SUBROUTINE RESTRUCTURES THE OCEAN TEMPERATURE PROFILE 8503.
Pjal0C9.f:C**** THE SUBROUTINE ALSO MELTS ICE WHEN TGO > 0 (C). 8506.
Pjal0C9.f: SUBROUTINE ODIFS 8601.
Pjal0C9.f:C**** THIS SUBROUTINE CALCULATES THE ANNUAL OCEAN TEMPERATURE AT THE 8603.
Pjal0C9.f:C**** TEMPERATURE, CALLS SUBROUTINE DIFFUS, AND REDUCES THE UPPER 8605.
Pjal0C9.f: SUBROUTINE DIFFUS (IM,JM,DT,ALPHA,ED,Z12O,PWATER,R) 8701.
Pjal0C9.f:C**** THIS SUBROUTINE CALCULATES THE VERTICAL MIXING OF A TRACER, R, 8703.
R83ZAmacDBL.f: SUBROUTINE RCOMP1(NFTTTR,NFTTSR,NFTFOR) 1.
R83ZAmacDBL.f: SUBROUTINE SETALB 179.
R83ZAmacDBL.f: SUBROUTINE SETGAS 587.
R83ZAmacDBL.f: SUBROUTINE SETAER 1011.
R83ZAmacDBL.f: SUBROUTINE TAUGAS 1236.
R83ZAmacDBL.f: SUBROUTINE THERML 1515.
R83ZAmacDBL.f: SUBROUTINE SOLAR 1958.
R83ZAmacDBL.f: SUBROUTINE SETAO2(O2CMA,NL) 2609.
R83ZAmacDBL.f: SUBROUTINE SETO3D 2877.
R83ZAmacDBL.f: SUBROUTINE PHDATM(P,H,D,T,O,Q,S,OCM,WCM,NPHD,NATM) 4238.
R83ZAmacDBL.f:C NATM=4 GIVES ATMOSPHERE DATA FOR SUBARCTIC SUMMER 4252.
R83ZAmacDBL.f:C NATM=5 GIVES ATMOSPHERE DATA FOR SUBARCTIC WINTER 4253.
R83ZAmacDBL.f:C4444 SUBARCTIC SUMMER MCCLATCHY (1972) ATMOSPHERE DATA VS HEIGHT4422.
R83ZAmacDBL.f:C5555 SUBARCTIC WINTER MCCLATCHY (1972) ATMOSPHERE DATA VS HEIGHT4453.
R83ZAmacDBL.f: SUBROUTINE WRITER(INDEX,KPAGE) 4813.
R83ZAmacDBL.f: SUBROUTINE SOLARZ(NG,KWRITE) 5668.
R83ZAmacDBL.f: SUBROUTINE GAUSST(NG,X1,X2,XP,WT) 5782.
R83ZAmacDBL.f: SUBROUTINE SETATM 5833.
R83ZAmacDBL.f: SUBROUTINE SETFOR(NFTFOR) 6108.
R83ZAmacDBL.f: SUBROUTINE HGAER1(XMU,TAU,G,GG) 6301.
R83ZAmacDBL.f: SUBROUTINE HGCLD1(XMU,TAU,G,GG) 6820.
R83ZAmacDBL.f: SUBROUTINE ADDVOL 7472.
RFRCmacDBL.f: SUBROUTINE FORSET(TREF,KTREND,KWRITE) 1.
RFRCmacDBL.f: SUBROUTINE ATREND(XGAS,YEAR,NGAS) 1001.
RFRCmacDBL.f: SUBROUTINE BTREND(XGAS,YEAR,NGAS) 2001.
RFRCmacDBL.f: SUBROUTINE CTREND(XGAS,YEAR,NGAS) 3001.
RFRCmacDBL.f: SUBROUTINE DTREND(XGAS,YEAR,NGAS) 4001.
RFRCmacDBL.f: SUBROUTINE YTREND(XGAS,YEAR,NGAS) 5001.
RFRCmacDBL.f: SUBROUTINE ZTREND(XGAS,YEAR,NGAS) 6001.
RFRCmacDBL.f: SUBROUTINE DTDX1D(XNOW,XREF,XDT0,SDT0,KFOR,NFOR) 7101.
RFRCmacDBL.f: SUBROUTINE DXDT1D(XNOW,XREF,XDT0,SDT0,KFOR,NFOR) 7201.
RFRCmacDBL.f: SUBROUTINE DXDT3D(XNOW,XREF,XDT0,SDT0,KFOR,NFOR) 7301.
RFRCmacDBL.f: SUBROUTINE DTDX3D(XNOW,XREF,XDT0,SDT0,KFOR,NFOR) 7401.
RFRCmacDBL.f: SUBROUTINE DTXCFY(DTSUM,DTNR,XNOW,XREF,NGAS) 7501.
RFRCmacDBL.f: SUBROUTINE DTXCFZ(DTSUM,DTNR,XNOW,XREF,NGAS) 7601.
RFRCmacDBL.f: SUBROUTINE VMSSET(KDTAUA,KWRITE) 8001.
setpath.f: SUBROUTINE SETPATH
UTILmacDBL.f: SUBROUTINE CLOCKS(IHSC)
UTILmacDBL.f: SUBROUTINE DREAD (IUNIT,AIN,LENGTH,AOUT)
UTILmacDBL.f: SUBROUTINE MREAD (IUNIT,M,NSKIP,AIN,LENGTH,AOUT)
UTILmacDBL.f: SUBROUTINE READT (IUNIT,NSKIP,AIN,LENGTH,AOUT,IPOS)
UTILmacDBL.f: SUBROUTINE TIMER (MNOW,MINC,MSUM)
UTILmacDBL.f:c ** MINC (.01 S) = TIME SINCE LAST CALL TO SUBROUTINE TIMER
UTILwinDBL.f: SUBROUTINE CLOCKS(IHSC)
UTILwinDBL.f: SUBROUTINE DREAD (IUNIT,AIN,LENGTH,AOUT)
UTILwinDBL.f: SUBROUTINE MREAD (IUNIT,M,NSKIP,AIN,LENGTH,AOUT)
UTILwinDBL.f: SUBROUTINE READT (IUNIT,NSKIP,AIN,LENGTH,AOUT,IPOS)
UTILwinDBL.f: SUBROUTINE TIMER (MNOW,MINC,MSUM)
UTILwinDBL.f:c ** MINC (.01 S) = TIME SINCE LAST CALL TO SUBROUTINE TIMER
Breaking It Down by Program
OK, now to reduce it to “one per definition” (or ‘weed out the comments and crap’)
DB11pdC9.f: SUBROUTINE DIAGA (U,V,T,P,Q) DB11pdC9.f: SUBROUTINE DIAGB (U,V,T,P,Q) DB11pdC9.f: SUBROUTINE DIAGJ DB11pdC9.f: SUBROUTINE DIAGJK DB11pdC9.f: SUBROUTINE JKMAP (NT,PM,AX,SCALE,SCALEJ,SCALEK,KMAX,JWT,J1) DB11pdC9.f: SUBROUTINE DIAGJL DB11pdC9.f: SUBROUTINE JLMAP (NT,PL,AX,SCALE,SCALEJ,SCALEL,LMAX,JWT,J1) DB11pdC9.f: SUBROUTINE DIAGIL DB11pdC9.f: SUBROUTINE ILMAP (NT,PL,AX,SCALE,SCALEL,LMAX,JWT,ISHIFT) DB11pdC9.f: SUBROUTINE DIAG7A DB11pdC9.f: SUBROUTINE MEM (SERIES,ITM,MMAX,NUAMAX,NUBMAX,POWER,FPE,VAR,PNU) DB11pdC9.f: SUBROUTINE DIAGIJ
I note in passing that we already have confusingly similar names in DIAGJK DIAGJL DIAGIL DIAGIJ … That’s just very human hostile coding practice…
DB11pdC9.f: SUBROUTINE IJMAP (NT,ARRAY,BYIACC) DB11pdC9.f: SUBROUTINE DIAG9A (M) DB11pdC9.f: SUBROUTINE DIAG5A (M5,NDT) DB11pdC9.f: SUBROUTINE DIAG6 DB11pdC9.f: SUBROUTINE DIAG4A DB11pdC9.f: SUBROUTINE DIAGKS DB11pdC9.f: SUBROUTINE DIAG10(IPFLAG) DB11pdC9.f: SUBROUTINE SIJMAP
So at this point, we have 20 subroutines devoted to “Diagnostics”. I suspect these are not very important at this stage of the analysis, but we’ll see when we get more into it. The diagnostic part is not high on my investigation rank of what to look at next…
FFT36macDBL.f: SUBROUTINE FRTR (F) FFT36macDBL.f: SUBROUTINE GETAN (F,G)
Two subroutines in the Fast Fourier Transform module. OK, might be worth a look to assure it’s done right and efficiently, but most likely it is and it is fine. Wonder why they did their own Get Tangent function, though…
FORCINGSjalC9.f: SUBROUTINE SOLARFORCING FORCINGSjalC9.f: SUBROUTINE DATAREFYEAR(XGAS,YEAR,NGAS) FORCINGSjalC9.f: SUBROUTINE DATAFILETREND(XGAS,YEAR,NGAS)
Gee, “FORCINGS” that have a (IMHO too simple) Solar component of seasonal and orbital shift of TSI / latitude and then two that look at GAS as “FORCINGS”… Worth looking into the SOLARFOCING routine to see what makes it tick, to confirm my suspicions. (Or refute them…)
This next block seems to do the bulk of the world modeling, with air flux and geometry and such.
Mjal2cpdC9.f: SUBROUTINE GEOM 401. Mjal2cpdC9.f: SUBROUTINE GEOM_8x10 Mjal2cpdC9.f: SUBROUTINE INPUT 501. Mjal2cpdC9.f: SUBROUTINE DYNAM Mjal2cpdC9.f: SUBROUTINE AFLUX (U,V,P) 1001. Mjal2cpdC9.f: SUBROUTINE ADVECM (P,PA,DT1) 1501. Mjal2cpdC9.f: SUBROUTINE ADVECV (PA,UT,VT,PB,U,V,P,DT1) 2001. Mjal2cpdC9.f: SUBROUTINE PGF (UT,VT,PB,U,V,T,P,DT1) 2501. Mjal2cpdC9.f: SUBROUTINE ADVECT (PA,TT,PB,T,DT1) 3001. Mjal2cpdC9.f: SUBROUTINE ADVECQ (PA,QT,PB,Q,DT1) 3501.
This next one has the comment that it covers the advection of humidity. I need to look inside it to see if it covers vertical movement as well (though advection ought not…). IMHO it is likely one of the ones with “something wrong” in how moisture is handled.
Mjal2cpdC9.f:C**** THIS SUBROUTINE ADVECTS HUMIDITY AS DETERMINED BY DT1 AND THE 3503.
Mjal2cpdC9.f: SUBROUTINE AVRX (PU) 1801. Mjal2cpdC9.f: SUBROUTINE SDRAG 7001.
As I recall it, the Hansen paper said they needed to add this drag to get things to stabilize. An interesting “Dig Here!” would be the justification for the particular value used. Near as I could tell from the paper, it was a tuning point…
Mjal2cpdC9.f:C**** THIS SUBROUTINE PUTS A DRAG ON THE WINDS ON THE TOP LAYER OF 7003.
Continuing…
Mjal2cpdC9.f: SUBROUTINE FILTER 7501. Mjal2cpdC9.f: SUBROUTINE SHAP1D (NORDER) 7801. Mjal2cpdC9.f: SUBROUTINE DAILY 8001. Mjal2cpdC9.f: SUBROUTINE CHECKT (N) 9001. Mjal2cpdC9.f:C**** THIS SUBROUTINE CHECKS WHETHER THE TEMPERATURES ARE REASONABLE 9003.
Another interesting question: What is done when temperatures have gotten “unreasonable”? Is this just a lid crammed on instabilities in the model? What does it do, and why? With what justification other than bringing stability to an out of control runaway process?
OK, 16 subroutines in Mjal* to look at. Not too bad for the global driver part.
This next one (Pjal*) looks to have the physics in it.
Pjal0C9.f: SUBROUTINE CONDSE 2001. Pjal0C9.f:C**** THIS SUBROUTINE MIXES AIR CAUSED BY MOIST CONVECTION, AND 2003.
Another place where one ought to look for how humidity ends up at altitude in the model, but not in reality…
Pjal0C9.f: SUBROUTINE PRECIP 3001. Pjal0C9.f: SUBROUTINE RADIA0 3501. Pjal0C9.f: SUBROUTINE RADIA 4001. Pjal0C9.f: SUBROUTINE SURFCE 4801. Pjal0C9.f: SUBROUTINE GROUND 6001. Pjal0C9.f: SUBROUTINE DRYCNV 6801. Pjal0C9.f:C**** THIS SUBROUTINE MIXES AIR CAUSED BY DRY CONVECTION. SINCE DRY 6803. Pjal0C9.f:C**** CONVECTION IN THE BOUNDARY LAYER IS DONE IN SUBROUTINE SURFCE, 6804.
More clue on where to look for the wrong moisture at altitude part. Dry Convection likely needs to be higher, and mixing less? Or maybe just the precipitation routine needs to wring out more water…
Pjal0C9.f: SUBROUTINE ORBIT (OBLIQ,ECCN,OMEGT,DAY,SDIST,SIND,COSD,LAMBDA) 8201. Pjal0C9.f: SUBROUTINE OSTRUC 8501. Pjal0C9.f: SUBROUTINE ODIFS 8601. Pjal0C9.f: SUBROUTINE DIFFUS (IM,JM,DT,ALPHA,ED,Z12O,PWATER,R) 8701.
I make that 11 physics routines to work through. IMHO, it is likely where things need the most help. Then again, the next block does a lot of the actual stirring of the pot.
R83ZAmacDBL.f: SUBROUTINE RCOMP1(NFTTTR,NFTTSR,NFTFOR) 1. R83ZAmacDBL.f: SUBROUTINE SETALB 179. R83ZAmacDBL.f: SUBROUTINE SETGAS 587. R83ZAmacDBL.f: SUBROUTINE SETAER 1011. R83ZAmacDBL.f: SUBROUTINE TAUGAS 1236. R83ZAmacDBL.f: SUBROUTINE THERML 1515. R83ZAmacDBL.f: SUBROUTINE SOLAR 1958. R83ZAmacDBL.f: SUBROUTINE SETAO2(O2CMA,NL) 2609. R83ZAmacDBL.f: SUBROUTINE SETO3D 2877. R83ZAmacDBL.f: SUBROUTINE PHDATM(P,H,D,T,O,Q,S,OCM,WCM,NPHD,NATM) 4238. R83ZAmacDBL.f: SUBROUTINE WRITER(INDEX,KPAGE) 4813. R83ZAmacDBL.f: SUBROUTINE SOLARZ(NG,KWRITE) 5668. R83ZAmacDBL.f: SUBROUTINE GAUSST(NG,X1,X2,XP,WT) 5782. R83ZAmacDBL.f: SUBROUTINE SETATM 5833. R83ZAmacDBL.f: SUBROUTINE SETFOR(NFTFOR) 6108. R83ZAmacDBL.f: SUBROUTINE HGAER1(XMU,TAU,G,GG) 6301. R83ZAmacDBL.f: SUBROUTINE HGCLD1(XMU,TAU,G,GG) 6820. R83ZAmacDBL.f: SUBROUTINE ADDVOL 7472.
Looks like 18 that do the setup of various batches of input and such. Ought to look through it to see if this is where the input files get read in too.
RFRCmacDBL.f: SUBROUTINE FORSET(TREF,KTREND,KWRITE) 1. RFRCmacDBL.f: SUBROUTINE ATREND(XGAS,YEAR,NGAS) 1001. RFRCmacDBL.f: SUBROUTINE BTREND(XGAS,YEAR,NGAS) 2001. RFRCmacDBL.f: SUBROUTINE CTREND(XGAS,YEAR,NGAS) 3001. RFRCmacDBL.f: SUBROUTINE DTREND(XGAS,YEAR,NGAS) 4001. RFRCmacDBL.f: SUBROUTINE YTREND(XGAS,YEAR,NGAS) 5001. RFRCmacDBL.f: SUBROUTINE ZTREND(XGAS,YEAR,NGAS) 6001. RFRCmacDBL.f: SUBROUTINE DTDX1D(XNOW,XREF,XDT0,SDT0,KFOR,NFOR) 7101. RFRCmacDBL.f: SUBROUTINE DXDT1D(XNOW,XREF,XDT0,SDT0,KFOR,NFOR) 7201. RFRCmacDBL.f: SUBROUTINE DXDT3D(XNOW,XREF,XDT0,SDT0,KFOR,NFOR) 7301. RFRCmacDBL.f: SUBROUTINE DTDX3D(XNOW,XREF,XDT0,SDT0,KFOR,NFOR) 7401. RFRCmacDBL.f: SUBROUTINE DTXCFY(DTSUM,DTNR,XNOW,XREF,NGAS) 7501. RFRCmacDBL.f: SUBROUTINE DTXCFZ(DTSUM,DTNR,XNOW,XREF,NGAS) 7601. RFRCmacDBL.f: SUBROUTINE VMSSET(KDTAUA,KWRITE) 8001.
Looks to me like 14 subroutines devoted to Radiative Forcing calculations. (RFR?) Gee, wonder where the ocean cycle forcing and the cosmic ray forcing and the solar UV vs IR forcing and the… where are they handled?…
setpath.f: SUBROUTINE SETPATH UTILmacDBL.f: SUBROUTINE CLOCKS(IHSC) UTILmacDBL.f: SUBROUTINE DREAD (IUNIT,AIN,LENGTH,AOUT) UTILmacDBL.f: SUBROUTINE MREAD (IUNIT,M,NSKIP,AIN,LENGTH,AOUT) UTILmacDBL.f: SUBROUTINE READT (IUNIT,NSKIP,AIN,LENGTH,AOUT,IPOS) UTILmacDBL.f: SUBROUTINE TIMER (MNOW,MINC,MSUM) UTILwinDBL.f: SUBROUTINE CLOCKS(IHSC) UTILwinDBL.f: SUBROUTINE DREAD (IUNIT,AIN,LENGTH,AOUT) UTILwinDBL.f: SUBROUTINE MREAD (IUNIT,M,NSKIP,AIN,LENGTH,AOUT) UTILwinDBL.f: SUBROUTINE READT (IUNIT,NSKIP,AIN,LENGTH,AOUT,IPOS) UTILwinDBL.f: SUBROUTINE TIMER (MNOW,MINC,MSUM)
Then 11 that do utility functions. Not likely to be ‘an issue’, so lower priority to look over.
So what’s that total make?
Diagnostic: 20 FFT: 2 FORCINGS 3 Model Outer 16 Physics 11 Setting Up 18 Radiative 14 Utilities 11
I make that a total of 95 subroutines. OK, that’s going to take some time.
I’m going to start with disposing of the 2 FFT and 3 FORCINGS, just because they are small.
Then look at the 11 physics as I think they are likely the meat of it.
I suspect the Diagnostics are for postmortem of runs and will leave them for last (or a cursory examination may make it ‘never’ if they don’t contribute anything to the actual model runs.)
That will be followed by the 16 “Model Outer” as I seems to do a lot of interesting stuff in terms of how it coordinates the physics and such. (And has a lot of modification comments so a high ‘dick with’ factor implying it may be where tuning happened…)
IFF, after that, there’s still too much mystery, I’ll move on into the Setting Up 18 (or if I need to look at it to get the thing to run…) and the 14 Radiative (though I think they have the radiative physics right, just messed up the actual physical physics and left out important processes…)
I doubt “Utilities” has much interest, but I’ll poke my nose into it long enough to assure that.
In Conclusion
So that’s the “big lumps” on the block diagram of Subroutines.
I still need to search through the code for functions and such. Then make sure I understand the outer driving cycle of the MAIN body (when I find it ;-)
Still, as a first cruise through, I think this is likely coming together nicely. We have some math and science parts (FFT and Radiative and Physics) that can be vetted (both for correctness and completion). We have an apparent Setting Up part and some Utilities and Diagnostics that likly have more to do with operations than execution of science, Then we have a FORCINGS that provides an understanding of what the modeler decided are the only relevant FORCINGS. Finally, the model MAIN driving the process of connecting all the bits and the outer loops. (Time and Geography…)
Doesn’t look to big, or too hard, just a bit long. Even at “one subroutine a day”, we’re talking 95 days. With 20 work days a month, that’s 5 months. And that’s just for the subroutines…
But every journey begins with just one step, and this is about step 3 on MODEL II, so we’re well on our way.
Anyone wishing to download, unpack, and take a whack at one of these, feel free (Hint! Hint!) and post anything you find in a comment. The download is at: http://edgcm.columbia.edu/ModelII/modelII_source.zip as a simple zip file, so just about any OS can download and unpack it… (HINT! HINT!! HINT!!!)
With that, I’m off to cook dinner (We’re having pepperoni and kielbasa on Naan bread pizza … yum! With olives and lots of Mexican Mix cheese on it…) then I’ll be back to start looking at FFT and FORCINGS.
Carping Comments – Idiots and “poseur”
It’s been a long while since we had a “Carping Comments” posting. Seems that aggressive discouragement of trolls, Alinsky Method attacks, and rudeness has generally removed the value from carping and insulting. I.e. no “emotional reward” so no bad behaviour.
Yet every so often some new person wonders by and just can’t resist tossing a firebomb. This one was on the https://chiefio.wordpress.com/2016/12/27/a-remarkably-tiny-global-circulation-model-you-can-run/ thread.
Now you might think that a posting consisting almost entirely of links to where you can download a GCM Global Circulation Model and run it (on a Mac or PC with 30 day free trial then a payment, or as source code to inspect) and then a cursory walk through the code mostly saying things like “This part seems to handle solar and that part looks to do clouds” would be about as uncontroversial as you can get. But some folks just have their hair catch on fire over most anything, and love to toss rocks at others to watch them duck. Perhaps it was my assertion that the program is forced to find CO2 causal and it makes forcings only from radiative gasses… yet that is what the code does. (Yes, there are other parameters, things like TSI, but they just flesh out the context for the ‘FORCING’ data)
So what was the “insult to the person” in this one?
“What an idiot you are, plus a poseur”
Now that kind of insult has exactly zero effect on me. First off, I know my I.Q., know I’m well above the acceptance level for Mensa (though still have not bothered to join… but it’s on my list of someday things). I’ve got my official I.Q. number, my SAT scores (that qualify me for Mensa all on their own) and my GMAT scores (that had Wharton School of Business solicit me to apply…) and more (including a NASA examination and …) all of which prove beyond any doubt that I’m not “an idiot”. So such insults are, at most, information about the bomb thrower. I don’t agree with them on some point, and they best they can muster is name calling… so most likely they are the ones of, shall we say, “diminished capacity”?
Then the other part “plus a poseur”. Since a “poseur” is someone pretending to be what they are not, and that posting was about being a computer programmer, the pertinent facts (which I’ve shared before, but the firelighter clearly doesn’t know) are: My first programming language was FORTRAN IV back in the early 1970s. I’ve been programming ever since (so about 45 years). I then learned COBOL (that I then avoided using for most of my professional career having seen what was in it…) and ALGOL (that is in many ways my favorite). Then ALGOL begat Pascal, that I’ve used. Which begat C, that I’ve used more. Also some PL/1 and one program in APL (that taught me never to use it again…) along with lots and lots of SH, KSH, and C shell scripting. Oh, and several database systems (being a Senior Consultant on the RAMIS II product in the ’80s) including FOCUS, HP Image and Query (oh, and used their Business Basic that is Basic created by a frustrated Pascal programmer – functions and long variable names and BEGIN END blocks and…) along with Sequel, Informix, and some others. Plus modest amounts of maintenance work on Perl and Ruby and Python and some others. Frankly, I’ve lost track of all the languages I’ve used at one time or another. (Oh, and was sent off to Germany once to evaluate an ADA Compiler for Amdahl…interesting language and better than JOVIAL, but a bit complex in the compiler making…)
So in the end, looking back on a lifetime of programming ranging from Mainframes to Supercomputers (life on the Cray was interesting… “supercompting is never having to say ‘now we wait for a response’…”) to several Mini computers (VAXen and Sun and HP and..) and just about every micro-computer from 286 and 6800 on up to now – including assembly language programming one built from piece parts with an Intel 8080? chip in it. Altair MITS? I think it was. Yes, this is it: https://en.wikipedia.org/wiki/Altair_8800 I find it hard to think of what, related to computers, I might be “posing” as that I haven’t actually done, several times…
I once took a contract to “bring up a Sun Server” for a new client. They wanted it done over the weekend. It was a 16? CPU box about the size of a refrigerator. Easy, takes about 3 hours if you are slow. Mostly just checking boxes and answering config questions. When I got there, I found the CFO had figured he could buy the ‘repair parts’ cheaper than the whole machine, so “bring it up” also consisted of installing the CPUs on the boards, installing memory, loading a base OS, etc. etc. That MITS experience paid off ;-) Well, long story short, “we had a talk” and renegotiated to “time and materials” and then I ran off to FRYs to get an allen wrench… the CPUs are held on by hex head screws at 6 inch-pounds IIRC.. and I calibrated my finger with a 1 lb can… there not being an inch pound torque wrench available at 9 PM on a Friday… Bottom line was I had it up and running on Monday Morning when it was critical to their production to have it running (another long story there…), but only on 12 CPUs as some of the CPU / board release levels were not compatible with others.
Now when you’ve done everything from building computers up from piece parts, installing operating systems and applications software, hacking Unix and Linux OS code, writing applications software that was sold commercially, managed data centers including a supercomputer center, and been an independent contractor doing ‘whatever is needed’ at dozens of companies for a decade or two (including network design and install at Sun’s Newark campus… several LARGE buildings – 3 Cisco Catalyst switches per building with fibre cross connects and a MAN…) AND installed it including wiring… Well, it’s a bit hard to see what I’m supposed to be “posing” about.
Running the Cray (for 7 1/2 years) was fun. It was mostly used for simulations. Moldflow for plastic injection flow modeling. Several secret CPU and computer simulations. And more. The key point being I have lot of years of High Performance Computing in the context of running computer models. Each Moldflow run was about 10 hours. For ONE well described fluid in ONE mold and ONE injection temperature… Oh, and on decommisioning, I let a Ph.D. student at Stanford run his “Cloud formation model” on the Cray for several days. (Well, really, for security reasons, I ran the codes after inspecting them, then returned the output when done… so you could say I’ve been running Climate and Cloud models from as early as the 1990s) He’d used all the time he was allowed at school, but didn’t have enough to finish his thesis. As we had spare cycles then, it was a nice gift to him (and he got his Ph.D.) As the computer was to be decommissioned in a couple of days, it wasn’t economical to sell the time (since at any minute we might pull the plug… site shutdowns are like that) So it can’t be about any unfamiliarity with computer models or high performance computing. Oh, and I built a 7 node Beowulf Cluster out of old machines “just for fun” in the early ’90s… and used to compile a BSD based ‘I.T. Department in a box’ product for one client. That’s the whole BSD plus enhancements and applications… so it can’t be per ‘distributed computing’.
So I’m left to assume the guy is just a 20 something (or an immature 30 something) who doesn’t have the experience to know what a Data Dictionary is, so assumes I’m making it up. It is a term of art from Mainframe Database use (mostly some years back, but still with currency) and a very useful term, but even in the ’80 we had a hard time getting most of the programmers to accept the importance of building one for their programs. (The main database guy made most of them after the fact when trying to get their applications to play well with others… and squeeze out data redundancy. This was at Amdahl Corp.) So I do it to this day.
It’s really a pretty simple idea. You collect the metadata about a data item and put it all in one place. Things like, oh, the name of it, what it contains, size, type, etc. For example:
Client Name, CNAME, 32 Characters, AlphaNumeric, used in: List of programs or databases.
Now if (or perhaps “since”) they don’t know that concept, and maybe do ‘by the seat of their pants’ maintenance programming at the junior level, they think I’m “posing” for saying I’m making a Data Dictionary. Yet I know I am doing it, and it is a Very Good Idea… Similarly, Block Diagram. I typically list all the subroutines, then graph out the MAIN program, then make a list of which block is called by which other and make a nice diagram of how all the blocks fit together. Now at that point, you have a decent idea what all the data items are, where they are used, and what they do, along with what processes the program does. ALL before you get into the down and dirty details of what happens inside any one block of actual code. Saves a lot of time. Reduces error rates greatly. Eases the workload on the mind. LOTS of benefits.
So what “poseur” tells me is this person lacks clue. (Lacks a lot of clues, actually… both about my personal history, and about good programming style and efficient program maintenance.) Given that, I’ve provided that clue in the above discussion.
Oh, and I’ve got a lifetime Teaching Credential at the Community College level in “Data Processing and Related Technologies”… so I do get a bit pedantic sometimes and do like to show folks better ways to marshal information and ideas. So yeah, I’m being a “bit the teach” in this posting. This also is part of why I try to speak in Standard English and not Tech Jargon. Sometimes I’ve had folks mistake that for lack of Tech Knowledge. In fact, it indicates a higher level of Tech Knowledge AND the ability to express it in different language styles.
Now, given all that, I think it’s pretty clear how “idiot and poseur” causes me to just smirk and chuckle. Clearly it is they who are waving the “idiot” flag around and just as clearly, they don’t have enough experience to gauge me and my experience (so just who is posing? Hmmm?)
So “Tkach thenos” gets added to the “forever moderated” list in WordPress. It is a nice little setting given to blog operators where they can list keywords that toss that posting into the moderation queue. Or SPAM.
And yes, that’s what I do with all folks who’s ability and ‘style’ limit them to Carping Comments. Things with zero intellectual interest and loads of insult and invective need not see the light of day nor trouble others. Trolls, firelilghters, Alynsky Acolytes and serial insulters especially “insult to the person”; have no place here. “Life is too short to drink bad wine!” and they are all piss and vinegar, so down the drain with them. If Tkach had read the “About” box they would have known that, but apparently “know your opponent” is not in their wheelhouse either…
OK, with that, I now return you to the rest of 2017, but with the hope that others can learn from this bit of Carping Comment commentary and behave accordingly. I know it’s a foolish hope, but I’m ever the optimist.