# Minor bug in TMPBEIS4

**URL:** <https://forum.cmascenter.org/t/minor-bug-in-tmpbeis4/6266>\
**Category:** SMOKE\
**Created:** [August 5, 2026, 2:49pm UTC](https://forum.cmascenter.org/t/minor-bug-in-tmpbeis4/6266 "2026-08-05T14:49:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jvukovich](https://avatars.discourse-cdn.com/v4/letter/j/df705f/32.png) [@jvukovich](https://forum.cmascenter.org/u/jvukovich)\
**Post date:** [August 5, 2026, 2:49pm UTC](https://forum.cmascenter.org/t/minor-bug-in-tmpbeis4/6266/1 "2026-08-05T14:49:59Z")

</div>

Need help running SMOKE? If so, first search existing topics under this category, and if your issue is new, post a new topic. [PLEASE READ before posting](https://forum.cmascenter.org/t/please-read-before-posting/1321)

**Describe your issue in detail**

COMPUTE\_SEASON\_FUNCTION environment variable is really only supported when using PX-LSM input data (PX\_VERSION = Y). COMPUTE\_SEASON\_FUNCTION is set to Y by default. If PX\_VERSION is set to N by user then TMPBEIS4 seg faults when it tries to use soil temperature data it hasn’t read in since PX\_VERSION is set to N.

**What version of the SMOKE software are you using?**

version 5+

**What steps have you taken to resolve this issue already?**

I moved the PX\_VERSION ENVYN statement higher in tmpbeis4.f; right before the COMPUTE\_SEASON\_FUNCTION env var is checked and added an error check. Here is what the code looks like:

C… Check if using PX version of MCIP

```auto
    PX_VERSION = ENVYN( 'PX_VERSION', 'MCIP is PX version?',
 & .FALSE., IOS)
    IF ( IOS .GT. 0 ) THEN
        CALL M3EXIT( PROGNAME,0,0, 'Bad env vble "PX_VERSION"', 2 )
    END IF

```

C… Check to compute season function from MCIP soil temperature  
MESG = ‘Compute season function from soil temperature?’  
SEASON\_CALC = ENVYN( ‘COMPUTE\_SEASON\_FUNCTION’, MESG, .TRUE., IOS)

```auto
    IF ( .NOT. PX_VERSION .AND. SEASON_CALC ) THEN
      MESG = "ERROR: COMPUTE_SEASON_FUNCTION only supported when" //
 & " PX-LSM input data is used. If PX not used then set" //
 & " COMPUTE_SEASON_FUNCTION to N"
      CALL M3EXIT( PROGNAME, 0, 0, MESG, 2 )
    ENDIF

```

Also recommend updating SMOKE Users Guide to mention this limitation with COMPUTE\_SEASON\_FUNCTION. Also may want to mention that PX is a 2-layer LSM.

---

<div class="post-metadata">

**Author:** ![lizadams](https://avatars.discourse-cdn.com/v4/letter/l/49beb7/32.png) [@lizadams](https://forum.cmascenter.org/u/lizadams)\
**Post date:** [August 6, 2026, 2:26pm UTC](https://forum.cmascenter.org/t/minor-bug-in-tmpbeis4/6266/2 "2026-08-06T14:26:23Z")

</div>

Thank you recommending this bug fix and update to the documentation and bug fix for TMPBEIS4.
