nmlpar_mod.f
279 lines · 1 definitions · on GitHub (7be4133)
Python version: nmlpar_mod.py, 257 lines, on the right (switch to Python above the code).
Variables on this page (235)
abstol, acfpft, alatm_alpha, alatm_feh, alphac, alphae, alpham, atime, atmbeg, atmd0, atmerr, atmmax, atmmin, atmstp, betac, calsolage, calsolzx, cmin, cmixla, codm, compacc, constfactor, creim, cstdiffmix, cstmixing, djok, dmdt0, dpenv, dt_gs, dtdif, dtwind, end_dcen, end_xcen, end_ycen, endage, envbeg, enverr, envmax, envmin, envstp, etadh0, etadh1, excen, exl, exm, exmd, expr, exr, extau, exw, fc, fcore, fcorr0, fcorri, fczdmdt, fes, fesc, fgry, fgrz, fgsf, fgsfc, fmu, frac_c, frac_n, frac_o, fss, fssc, ftotdmdt, fw, grtol, hpttol, htoler, ies, igsf, ilambda, impjmod, imu, inewcp, ipver, itdif1, itdif2, itfp1, itfp2, itrver, kemmax, kttau, kttau0, l_zerodt_prems, ladov, lalex06, laltptau100, lbscale, lcalcenv, lcals, lcalsolzx, lcalst, lcodm, lcondopacp, lcore, lcorr, ldebug, ldh, ldifad, ldifli, ldify, ldifz, ldisk, lexcom, lfirst, linstb, lisotope, ljdot0, lkuthe, lmdot, lmilne, lmixture, lmwind, lnew0, lnewcp, lnewdif, lnews, lnewtcz, lnoj, lnulos1, lnumderiv, lopal95, lopale06, lovmax, lovstc, lovste, lovstm, lpout, lptime, lpulse, lpurez, lreimer, lrel, lrossby, lrot, lrwsh, lscv, lsdepth, lsemic, lsenv0a, lsnu, lsolid, lsolwind, lstatm, lstch, lstenv, lstmod, lstore, lstpch, lstphys, lstrot, lteff, lthoul, lthoulfit, ltrack, ltrist, lttau, lvfc, lwnew, lzramp, mcore, niter1, niter2, niter3, niter4, niter_gs, nmodls, npoint, nprtmod, nprtpt, numrun, optol, pdisk, pmmsolp, pmmsoltau, pmmsolw, poa, pob, poc, pomax, r12_13, r16_18, rcrit, reltol, rsclzc, rsclzm1, rsclzm2, sbe91, sbe92, sbe93, senv0a, setdt, sli6, sli7, spotf, spotx, sr, sstandard, steff, tcut, tdisk, tenv0, tenv1, tgcut, tmolmax, tmolmin, toll, tollaol, tolr, tolz, tridl, tridt, tscut, vnew, walpcz, weakscreening, wmax, wnew, xbe9_ini, xenv0a, xh2_ini, xhe3_ini, xli6_ini, xli7_ini, xls, xlstol, xmin, xnewcp, ymin, zenv0a, zopal951
Purpose
NMLPAR_MOD holds the run's settings that the physics routines read: the 235 members of the CONTROL and PHYSICS namelists (and a few quantities PARMIN derives from them), shared by 103 routines. It replaces COMMON/NMLPAR/ (MHP via Claude, 10/14/26), which had gathered, in two steps, the 35 COMMON blocks whose members were all namelist variables (/ALATM03/, /BURNSCS/ … /WEAK/) and the namelist members of 27 blocks that also held working variables (such as /CTOL/, /DISK/, /DPMIX/, /DEBHU/, /NEWOPAC/, /CWIND/); those blocks keep only their other members, now in their own modules (such as CTOL_MOD). The derivation-only namelist variables went to NMLBYPASS_MOD instead.
What its variables hold, who sets them, who reads them. What each member means, with its default, is on YREC's Control and Physics namelist pages; this page groups the members by topic and says where they go. PARMIN reads the namelists into them (CONTROL from unit ISTAND, PHYSICS from IRUN); 203 members carry initial values, the namelists' defaults, moved from PARMIN's DATA statements. Each member's readers are on the routine pages, and the site's module list names the files that use the module. By topic:
- Runs and output (
CONTROL): the number of runsNUMRUNand, per run (arrays of 50), the modelsNMODLS, agesENDAGE, stepsSETDT, stopping valuesEND_DCEN,END_XCEN,END_YCEN, compositionsXENV0A,ZENV0A,CMIXLA, envelope fitting pointsLSENV0A,SENV0A, rescalingsRSCLZC,RSCLZM1,RSCLZM2,LFIRST; the switchL_ZERODT_PREMS(default false), which lets a rescale card relax a pre-main-sequence model without ageing it (read by the main program); the output switches (LSTORE,LSTATM,LSTENV,LSTMOD,LSTPHYS,LSTROT,LSTCH,LTRACK,LMILNE,LPULSE,LPOUT,ITRVER,IPVER,NPRTMOD,NPRTPT,NPOINT); and the calibration to the Sun or a target (LCALS,LCALST,CALSOLZX,CALSOLAGE,TOLL,TOLR,TOLZ,XLS,XLSTOL,STEFF,SR,LTEFF), whichSETCAL,SETSCAL,CHKCALandCHKSCALchange between runs. - Numerics: the Henyey tolerances and iteration limits (
HTOLER(5,2),FCORR0,FCORRI,NITER1–NITER4,LCORR), the mesh tolerancesHPTTOL(12), the time-step controlsATIME(14),LPTIME,TRIDT,TRIDL,LNEWS, the integration of the atmosphere and envelope (ATMERR,ATMD0,ATMBEG,ATMMIN,ATMMAX,ENV…,ATMSTP,ENVSTP,TENV0,TENV1), the burning network (CMIN,ABSTOL,RELTOL,KEMMAX) and the temperature cutsTCUT(5),TSCUT,TGCUT. - Physics: the opacities (
LOPAL95,LALEX06,LPUREZ,LCONDOPACP,ZOPAL951,TMOLMIN,TMOLMAX,OPTOL,TOLLAOL,LZRAMP), the equation of state (LOPALE06,LSCV,LNUMDERIV,LDH,ETADH0,ETADH1), the atmosphere (KTTAU,ALATM_FeH,ALATM_Alpha,LALTPTau100,SPOTF,SPOTX,LSDEPTH), nuclear rates (SSTANDARD(17),SLI6…SBE93,WEAKSCREENING,LSNU,LNULOS1), convection and overshoot (DPENV,ALPHAC,ALPHAE,ALPHAM,BETAC,LOVSTC,LOVSTE,LOVSTM,LSEMIC,LADOV,LOVMAX), diffusion and settling (LDIFY,LDIFZ,LDIFLI,LTHOUL,LTHOULFIT,LNEWDIF,FGRY,FGRZ,GRTOL,NITER_GS,DT_GS,XMIN,YMIN,ILAMBDA,CSTMIXING,CSTDIFFMIX), mass loss and accretion (LMDOT,DMDT0,FCZDMDT,FTOTDMDT,COMPACC(15),LREIMER,CREIM,LSOLWIND), the starting composition (VNEW(12),FRAC_C,FRAC_N,FRAC_O,R12_13,R16_18(whose default looks swapped withR16_17's: starin.f, suspected bug 3),XH2_INI…XBE9_INI), and the helium flash (LKUTHE). - Rotation: the switches
LROT,LINSTB,LSOLID,IMPJMOD,LNOJ,LJDOT0,LDIFAD,LVFC,LWNEW,WNEW,WALPCZ, the transport factors (FW,FC,FES,FGSF,FMU,FSS,RCRIT,FESC,FSSC,FGSFC,IES,IGSF,IMU,CODM,LCODM), the diffusion steps (DTWIND,DTDIF,DJOK,ITDIF1,ITDIF2,LEXCOM,LTRIST), the moment of inertia (ACFPFT,ITFP1,ITFP2), disk locking (LDISK,TDISK,PDISK) and the wind laws (WMAX,PMMSOLP,PMMSOLW,PMMSOLTAU,LMWIND,LROSSBY,LBSCALE). - Derived by PARMIN (in no input namelist; written in its output-only
DERIVEDnamelist): the wind law's exponents and factor (EXMD,EXW,EXTAU,EXR,EXM,EXL,EXPR,CONSTFACTOR,EXCEN),INEWCP,LREL,KTTAU0,LTTAU,LMIXTURE,LISOTOPE. - Changed during a run, despite being inputs:
REMAPoverwritesHPTTOL,ATIME,LPTIME,DTWIND,DTDIF(withLNEWVARS) andSSTANDARD(withLNEWNUC); the calibration routines the per-run arrays;CALCAD,STITCH,WRTMOD,GETNEWENVandSTARINthe integration stepsATM…,ENV…;ENVINTandSURFBCKTTAU,LTTAU,LSTATM;MDOTLMDOT;MIXandROTMIXLDIFY;CHECKJACFPFT(temporarily); STARINMCORE,FCORE; the main programITDIF1,LPULSE,END_DCEN,END_YCEN.
Members without an initial value. Where Namelist Variables Live describes the namelists' defaults as the module's initializers; 32 of the 235 members have none. 15 are derived by PARMIN (above); the other 17 are inputs: the per-run XENV0A, ZENV0A, CMIXLA (PARMIN stops the run if a CMIXLA it uses is not positive), the calibration targets XLS, XLSTOL, STEFF, SR, the output switches LSTATM, LSTENV, LSTMOD, LSTPHYS, LSTROT, the Allard atmosphere's ALATM_FeH, ALATM_Alpha, LALTPTau100, and the opacity settings LOPAL95, ZOPAL951. Unless the namelist sets them, they start at whatever the compiler gives a saved variable, in practice zero or false. The module's header still counts "202 of the 234 members" (line 19↗), from before L_ZERODT_PREMS.
Design
A blanket USE NMLPAR_MOD in each of the 103 routines, so every routine sees all 235 settings; the module makes the namelists global state by design. The header says the initializers' literals are copied verbatim from the DATA statements (single-precision ones such as CSTMIXING = 1.0 included), so that no stored value changes.
Definitions
moduleNMLPAR_MOD
Used by (103 units)
(file level), ALFILEIN, ALSURFP, AMCALC, BURSMIX, CALCAD, CHECKC, CHECKJ, CHKCAL, CHKSCAL, CODIFF, COEFFT, CONVEC, COWIND, CRRECT, DADCOEFT, DBURN, DBURNM, DCOEFT, ENGEB, ENTIME, ENVINT, EQBURN, EQRELV, EQSTAT, EQSTAT2, EQUAL_TO_MODEL, FINDSH, GETFC, GETGRID, GETNEWENV, GETOPAC, GETTAU, GETW, GRSETT, GTPURZ, HPOINT, HSUBP, HTIMER, KEMCOM, LAX_WENDROF1, LAX_WENDROF2, LIBURN, LIBURN2, LIRATE88, LL95TBL, MASSLOSS, MCOWIND, MDOT, MICRODIFF, MICRODIFF_COD, MICRODIFF_ETM, MICRODIFF_MTE, MICRODIFF_RUN, MICRODIFF_SETUP, MIDMOD, MIX, MIXCZ, MIXGRID, MODEL_TO_EQUAL, MOMI, MWIND, OVERSH, PARMIN, PDIST, PHYSIC, PINDEX, PTIME, PUTSTORE, QATM, RATES, REMAP, ROTGRID, ROTMIX, RSCALE, SCONVEC, SECULR, SETCAL, SETSCAL, SETUPOPAC, SETUPS, SETUPV, SETUP_GRSETT, SHAPE, SOLID, STARIN, STITCH, SURFBC, SURFOPAC, TAUCAL, TAUINT, TPGRAD, VCIRC, WCZIMP, WIND, WRTHEAD, WRTLST, WRTMIL, WRTMOD, WRTOUT, WTIME, XTIME, YTIME
Change log
The changes since rp_1
Changed since rp_1. New file: the namelist members of 62 COMMON blocks as one module, with their defaults moved from PARMIN's DATA statements.
Changed since 09c3b9b. One new CONTROL member, L_ZERODT_PREMS (now 235 members, 203 with initial values), read in main.f.
Changed since a8a5950. LOVMAX now defaults to .TRUE. (it is read only when LOVSTC is true), so core overshoot is capped by BETAC of the core's size unless a deck turns the cap off.