The NCEP Way of doing things
INTEGER NX
INTEGER NY
INTEGER NSOLD
INTEGER NMONTH
INTEGER NHOUR
PARAMETER (NX = 29)
PARAMETER (NY = 14)
PARAMETER (NSOLD = 4)
PARAMETER (NMONTH = 12)
INTEGER NSOIL(NX,NY)
INTEGER SOILTYP(NX,NY)
INTEGER VEGTYP(NX,NY)
INTEGER SLOPETYP(NX,NY)
INTEGER LAND_SEA(NX,NY)
LOGICAL FIRST_STEP
REAL SOILDEPTH(NSOLD,NX,NY)
REAL STC(NSOLD,NX,NY)
REAL SMC(NSOLD,NX,NY)
REAL SH2O(NSOLD,NX,NY)
REAL ALBEDO(NMONTH,NX,NY)
REAL SHDFAC(NMONTH,NX,NY)
REAL TBOT(NX,NY)
REAL T1(NX,NY)
REAL CMC(NX,NY)
REAL CMC_old(NX,NY)
REAL SNOWH(NX,NY)
REAL SNEQV(NX,NY)
REAL SNEQV_old(NX,NY)
REAL SMCWLT
REAL SMCDRY
REAL SMCREF
REAL SMCMAX
CHARACTER*100 CNTRFL, FILENAME, DIREC
CHARACTER*2 YEAR_CH, YEAR_CH2
CHARACTER*8 YESTERDAY, BEFOREYESTER
INTEGER LENGTH
INTEGER LUGB
INTEGER JULDAY
INTEGER SUB_DT
REAL W1
REAL W2
REAL W_PRECIP(4)
REAL W_now(4)
REAL W_minus(4)
REAL W_plus(4)
DATA W_PRECIP /1.0,1.0,1.0,1.0/
DATA W_now /0.625,0.875,0.875,0.625/
DATA W_minus /0.375,0.125,0.000,0.000/
DATA W_plus /0.000,0.000,0.125,0.375/
INTEGER M1
INTEGER M2
INTEGER ICE
INTEGER NT
INTEGER I, IYEAR
INTEGER J
INTEGER K
REAL DT
REAL Z
REAL SNOALB
REAL SNODEP
REAL SFCSPD
REAL PTU
REAL CH(NX,NY)
REAL CM(NX,NY)
REAL ALBEDO_D(NX,NY)
REAL SHDFAC_D(NX,NY)
REAL DT_TAIR
REAL DT_SPFH
REAL DT_PSFC
REAL DT_UWIND
REAL DT_VWIND
REAL DT_LWDN
REAL DT_SOLDN
REAL DT_PRCP
REAL DT_SPFH_SAT
REAL DQSDT2
REAL DQSDT
REAL TH2
REAL ETP(NX,NY)
REAL ETA(NX,NY)
REAL H(NX,NY)
REAL S(NX,NY)
REAL RUNOFF1(NX,NY)
REAL RUNOFF2(NX,NY)
REAL Q1(NX,NY)
REAL SNMAX(NX,NY)
REAL HOUR_SNMAX(NX,NY)
REAL SOILM(NX,NY)
REAL SOILM_old(NX,NY)
REAL SOILW(NX,NY)
REAL ALBSNO(NX,NY)
REAL HOUR_LWDN_MODEL(NX,NY)
REAL HOUR_LWDN_BUDGET(NX,NY)
REAL HOUR_ETA(NX,NY)
REAL HOUR_EVAP(NX,NY)
REAL HOUR_H(NX,NY)
REAL HOUR_S(NX,NY)
REAL HOUR_RUNOFF1(NX,NY)
REAL HOUR_RUNOFF2(NX,NY)
REAL DelSoil(NX,NY)
REAL DelInter(NX,NY)
REAL DelSWE(NX,NY)
REAL HOUR_TAIR(NX,NY)
REAL HOUR_SPFH(NX,NY)
REAL HOUR_PSFC(NX,NY)
REAL HOUR_UWIND(NX,NY)
REAL HOUR_VWIND(NX,NY)
REAL HOUR_LWDN(NX,NY)
REAL HOUR_SOLDN(NX,NY)
REAL HOUR_PRCP(NX,NY)
REAL HOUR_T(NX,NY)
REAL HOUR_ALBEDO(NX,NY)
REAL SNEQV_ALMA(NX,NY)
REAL SNOWT(NX,NY)
REAL SoilMoist(NX,NY,NSOLD)
REAL LSoilMoist(NX,NY,NSOLD)
REAL SoilTemp(NX,NY,NSOLD)
REAL SoilWet(NX,NY)
REAL RootMoist(NX,NY), RM
REAL SAlbedo(NX,NY)
CHARACTER*32 out1name, out2name
CHARACTER*33 out3name, out4name, out5name, out6name
INTEGER out1, out2, out3, out4, out5, out6
INTEGER TSPEPID,SWNETID,LWNETID,QLEID,QHID,QGID
INTEGER EVAPID,QSID,QSBID,QSMID,DELSOILID,DELSWEID
INTEGER DELINTERID,Snowf2id,Rainf2id
INTEGER SnowTid, BaresoilTid, RadTid, SWEid, VegTid
INTEGER AvgSurfTid, Albedoid
INTEGER SoilMoistid, LSoilMoistid, SoilTempid
INTEGER SoilWetid
INTEGER ECanopid, Esoilid, RootMoistid, TVegid
INTEGER CanopIntid, SubSnowid, RootMoistid
INTEGER SnowFracid, SnowDepthid, SAlbedoid
REAL EDIR1(NX,NY), EC1(NX,NY)
REAL ETT1(NX,NY), ESNOW(NX,NY)
REAL HOUR_EDIR1(NX,NY)
REAL HOUR_EC1(NX,NY)
REAL HOUR_ETT1(NX,NY)
REAL HOUR_CMC(NX,NY)
REAL HOUR_ESNOW(NX,NY)
REAL HOUR_SNOWDEPTH(NX,NY)
REAL SCOVER
REAL SnowFrac(NX,NY)
REAL HOUR_SNOWDEPTH(NX,NY)
INTEGER lonid1, latid1, timeid1, timestpid1
INTEGER lonid2, latid2, timeid2, timestpid2
INTEGER lonid3, latid3, timeid3, timestpid3
INTEGER lonid4, latid4, timeid4, timestpid4
INTEGER lonid5, latid5, timeid5, timestpid5
INTEGER lonid6, latid6, timeid6, timestpid6
INTEGER lon2id, lat2id, time2id, timestp2id
REAL lon(NX)
REAL lat(NY)
REAL layerdepth(NSOLD)
DATA layerdepth /0.1,0.4,1.0,2.0/
REAL time
INTEGER timestp, layerid