# 'WRF LSM is not supported' Error

**URL:** <https://forum.cmascenter.org/t/wrf-lsm-is-not-supported-error/2518>\
**Category:** Run Time Errors and Issues\
**Created:** [July 17, 2021, 10:08am UTC](https://forum.cmascenter.org/t/wrf-lsm-is-not-supported-error/2518 "2021-07-17T10:08:41Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![skunwar](https://avatars.discourse-cdn.com/v4/letter/s/9f8e36/32.png) [@skunwar](https://forum.cmascenter.org/u/skunwar)\
**Post date:** [July 17, 2021, 10:08am UTC](https://forum.cmascenter.org/t/wrf-lsm-is-not-supported-error/2518/1 "2021-07-17T10:08:41Z")

</div>

Even when I set PX LSM to True in CMAQ 5.3.2 version (with stage dry deposition module built) runscript, I get this strange runtime error right after starting CMAQ simulation:

```auto
 *** ERROR ABORT in subroutine GET_MET on PE 000
     WRF LSM is not supported. PX, CLM and NOAH are supported

```

I am not even sure an LSM called ‘WRF LSM’ exists, but more importantly, I set LSM to PX in the runscript but it is not being recognized.

---

<div class="post-metadata">

**Author:** ![hogrefe.christian](https://avatars.discourse-cdn.com/v4/letter/h/74df32/32.png) [@hogrefe.christian](https://forum.cmascenter.org/u/hogrefe.christian)\
**Post date:** [July 20, 2021, 3:45pm UTC](https://forum.cmascenter.org/t/wrf-lsm-is-not-supported-error/2518/2 "2021-07-20T15:45:50Z")

</div>

To confirm, when you say you ‘set PX LSM to True’ and ‘set LSM to PX in the runscript’, this is what you did, correct?

`setenv PX_VERSION Y #> WRF PX LSM`  
`setenv CLM_VERSION N #> WRF CLM LSM`  
`setenv NOAH_VERSION N #> WRF NOAH LSM`

---

<div class="post-metadata">

**Author:** ![skunwar](https://avatars.discourse-cdn.com/v4/letter/s/9f8e36/32.png) [@skunwar](https://forum.cmascenter.org/u/skunwar)\
**Post date:** [July 20, 2021, 3:57pm UTC](https://forum.cmascenter.org/t/wrf-lsm-is-not-supported-error/2518/3 "2021-07-20T15:57:18Z")

</div>

That is correct @hogrefe.christian !

---

<div class="post-metadata">

**Author:** ![hogrefe.christian](https://avatars.discourse-cdn.com/v4/letter/h/74df32/32.png) [@hogrefe.christian](https://forum.cmascenter.org/u/hogrefe.christian)\
**Post date:** [July 20, 2021, 5:19pm UTC](https://forum.cmascenter.org/t/wrf-lsm-is-not-supported-error/2518/4 "2021-07-20T17:19:38Z")

</div>

Thanks. Could you please post your run script?

Looking at the code, the only scenario in which this error message in line 607 of ASX\_DATA\_MOD.F should be encountered would be if PX\_VERSION, CLM\_VERSION, and NOAH\_VERSION (as obtained by RUNTIME\_VARS.F and stored as PX\_LSM, CLM\_LSM, and NOAH\_LSM) are all set to F, so I’m not quite sure what is happening here. (as an aside, the message `WRF LSM is not supported` conveys that the LSM used in WRF is not being recognized as one of the three supported LSMs, not that there is a LSM called WRF)

---

<div class="post-metadata">

**Author:** ![skunwar](https://avatars.discourse-cdn.com/v4/letter/s/9f8e36/32.png) [@skunwar](https://forum.cmascenter.org/u/skunwar)\
**Post date:** [July 20, 2021, 6:12pm UTC](https://forum.cmascenter.org/t/wrf-lsm-is-not-supported-error/2518/5 "2021-07-20T18:12:38Z")

</div>

I just checked my runscript and saw that PX\_LSM is set to Y and the others to N:

![image](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/2X/a/a885079e813482026fca71d93d99c7db54d4335a.png)

This only occurred when stage dry deposition model was built in CCTM.exe! It was not an issue with m3dry deposition model being built in to CCTM.exe.

---

<div class="post-metadata">

**Author:** ![hogrefe.christian](https://avatars.discourse-cdn.com/v4/letter/h/74df32/32.png) [@hogrefe.christian](https://forum.cmascenter.org/u/hogrefe.christian)\
**Post date:** [July 20, 2021, 6:37pm UTC](https://forum.cmascenter.org/t/wrf-lsm-is-not-supported-error/2518/6 "2021-07-20T18:37:34Z")

</div>

If you can, please post your entire run script as attachment.

In addition, please check your main log file and look for the following section:

```
 |> Air-Surface Exchange Processes:
 +===================================
  --Env Variable-- | --Value--
  --------------------------------------------------------------------------------

```

What do you see posted in that section?

---

<div class="post-metadata">

**Author:** ![skunwar](https://avatars.discourse-cdn.com/v4/letter/s/9f8e36/32.png) [@skunwar](https://forum.cmascenter.org/u/skunwar)\
**Post date:** [July 20, 2021, 7:18pm UTC](https://forum.cmascenter.org/t/wrf-lsm-is-not-supported-error/2518/7 "2021-07-20T19:18:31Z")

</div>

I grepped my standard output file and got this:

![image](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/2X/a/a8ea51f83d1e220ad034cdfd03179e121499e625.png)

It is interesting that none of the LSM were T, and also CTM\_STAGE is FALSE despite building it in CCTM.exe!

[stage\_gdrive\_mcip\_run0\_cctm\_2014H1\_12US1\_testrun.1janInitialized.2017gb\_emissions.cmaqv532\_official.17jul2021.txt](https://forum.cmascenter.org/uploads/short-url/1jUWatehilKTxBxPH3vj79zInOv.txt) (43.1 KB)

---

<div class="post-metadata">

**Author:** ![hogrefe.christian](https://avatars.discourse-cdn.com/v4/letter/h/74df32/32.png) [@hogrefe.christian](https://forum.cmascenter.org/u/hogrefe.christian)\
**Post date:** [July 20, 2021, 7:38pm UTC](https://forum.cmascenter.org/t/wrf-lsm-is-not-supported-error/2518/8 "2021-07-20T19:38:13Z")

</div>

Your run script shows that after first setting PX\_VERSION to Y, you later set it to N in the inline biogenic emissions section:

> #\> In-line biogenic emissions configuration  
> if ( $CTM\_BIOGEMIS == ‘Y’ ) then

> ```
> set IN_BEISpath = ${INPDIR}/land ##surface
> setenv GSPRO ${BLD}/gspro_biogenics.txt
> setenv B3GRD $IN_BEISpath/b3grd_12US1_2017gb_17j.ncf ##b3grd_myUS36k_2016fh_16j.ncf ##b3grd.beld5.aggwndw_v48.myUS36k.ncf ###$IN_BEISpath/b3grd.smoke30_beis361.12US1.2011NLCD_FIA5.1_CDL_norm_v3.ncf
> setenv BIOSW_YN Y #> use frost date switch [default: Y]
> setenv BIOSEASON $IN_BEISpath/bioseason.cmaq.2017_ramboll_12US1.ncf_full ##m3tshift.${YYYY}.bioseason.cmaq.2016j_myUS36k.ncf ###bioseason.cmaq.2016j_12US2_${YYYY1}.ncf ###$IN_BEISpath/bioseason.cmaq.2016j_12US1.ncf_full #> ignore season switch file if BIOSW_YN = N
> setenv SUMMER_YN Y #> Use summer normalized emissions? [default: Y]
> setenv PX_VERSION N ###Y #> MCIP is PX version? [default: N]
> setenv SOILINP $OUTDIR/CCTM_SOILOUT_${RUNID}_${YESTERDAY}.nc
> #> Biogenic NO soil input file; ignore if INITIAL_RUN = Y
> 
> ```
> 
> endif

Please try changing this back to Y.

The log message about CTM\_STAGE being set to F can be ignored, it is a vestige of an earlier development version in which the choice between M3DRY and STAGE was made at run time via a variable named CTM\_STAGE rather than at compile time. Since it is a compile time option now, the use of this environment variable has been discontinued and it is no longer present in the run script.

---

<div class="post-metadata">

**Author:** ![skunwar](https://avatars.discourse-cdn.com/v4/letter/s/9f8e36/32.png) [@skunwar](https://forum.cmascenter.org/u/skunwar)\
**Post date:** [July 20, 2021, 8:10pm UTC](https://forum.cmascenter.org/t/wrf-lsm-is-not-supported-error/2518/9 "2021-07-20T20:10:44Z")

</div>

Good catch @hogrefe.christian , Thanks! I had missed the PX environment variable in the biogenics section of runscript.

In a related note, though, I had the same PX settings when running CCTM.exe built with m3dry and CMAQ never complained or stopped:

```auto
setenv PX_VERSION Y ##N #> WRF PX LSM
setenv CLM_VERSION N #> WRF CLM LSM
setenv NOAH_VERSION N ##Y #> WRF NOAH LSM
setenv CTM_ABFLUX N ##Y #> ammonia bi-directional flux for in-line deposition
                             #> velocities [default: N]
setenv CTM_BIDI_FERT_NH3 N #T #> subtract fertilizer NH3 from emissions because it will be handled
--
     setenv GSPRO ${BLD}/gspro_biogenics.txt
     setenv B3GRD $IN_BEISpath/b3grd_12US1_2017gb_17j.ncf ##b3grd_myUS36k_2016fh_16j.ncf
     setenv BIOSW_YN Y #> use frost date switch [default: Y]
     setenv BIOSEASON $IN_BEISpath/bioseason.cmaq.2017_ramboll_12US1.ncf_full 
     setenv SUMMER_YN Y #> Use summer normalized emissions? [default: Y]
     setenv PX_VERSION N ###Y #> MCIP is PX version? [default: N]
     setenv SOILINP $OUTDIR/CCTM_SOILOUT_${RUNID}_${YESTERDAY}.nc
                             #> Biogenic NO soil input file; ignore if INITIAL_RUN = Y

```

The standard output for that situation was not very different from the stage one above:

![image](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/2X/0/0a6badbf267d44edf2938c1c9a172b6bf1fb8cf1.png)

It puzzles me why this run did not trip in the beginning!

---

<div class="post-metadata">

**Author:** ![hogrefe.christian](https://avatars.discourse-cdn.com/v4/letter/h/74df32/32.png) [@hogrefe.christian](https://forum.cmascenter.org/u/hogrefe.christian)\
**Post date:** [July 20, 2021, 8:47pm UTC](https://forum.cmascenter.org/t/wrf-lsm-is-not-supported-error/2518/10 "2021-07-20T20:47:37Z")

</div>

The reason that the M3DRY run did not trip with your run script in which you (inadvertently) set PX\_VERSION, NOAH\_VERSION, and CLM\_VERSION all to N was that the M3DRY version of ASX\_DATA\_MOD.F does not perform this high-level check on whether the LSM was set to PX, CLM, or NOAH - you can compare CCTM/src/vdiff/acm2\_stage/ASX\_DATA\_MOD.F to CCTM/src/vdiff/acm2\_m3dry/ASX\_DATA\_MOD.F.

The reason why STAGE includes this check appears to be that while a portion of the STAGE dry deposition code (specifically CCTM/src/depv/stage/NH3\_BIDI\_MOD.F) depends on the settings of these variables when estimating 5cm soil moisture, the corresponding section of the M3DRY dry deposition code (CCTM/src/depv/m3dry/ABFLUX\_MOD.F) does not. However, I’d have to defer to the developers of these modules to provide a more detailed explanation.

---

<div class="post-metadata">

**Author:** ![skunwar](https://avatars.discourse-cdn.com/v4/letter/s/9f8e36/32.png) [@skunwar](https://forum.cmascenter.org/u/skunwar)\
**Post date:** [July 21, 2021, 1:15pm UTC](https://forum.cmascenter.org/t/wrf-lsm-is-not-supported-error/2518/11 "2021-07-21T13:15:04Z")

</div>

Thanks for explaining @hogrefe.christian. Is it safe to assume that PX\_VERSION environment variable in the biogenics section of the runscript is just for check and will not affect the chemistry?

---

<div class="post-metadata">

**Author:** ![hogrefe.christian](https://avatars.discourse-cdn.com/v4/letter/h/74df32/32.png) [@hogrefe.christian](https://forum.cmascenter.org/u/hogrefe.christian)\
**Post date:** [July 21, 2021, 1:53pm UTC](https://forum.cmascenter.org/t/wrf-lsm-is-not-supported-error/2518/12 "2021-07-21T13:53:16Z")

</div>

No, this is not safe to assume.

If you look at the inline biogenics code, specifically the calculation of soil NO in CCTM/src/biog/beis3/hrno.F, you’ll see from the comments at the top of the file and the code lines 430 - 498 that the calculations differ depending on whether PX\_VERSION, CLM\_VERSION, and NOAH\_VERSION are all N (i.e. detailed soil information is not available) or whether at least one of them is set to Y, indicating that detailed soil information is available (of course, it doesn’t make much sense to set more than one of them to Y).

Given that PX\_VERSION, CLM\_VERSION, and NOAH\_VERSION all have the same effect on the calculation of soil NO emissions in hrno.F, the run script should probably be updated to just rely on the settings of these variables in the first section where they appear and not list PX\_VERSION a second time in the inline biogenics section of the run script or - if duplication is desired (I don’t know why it would be, though, given the potential for creating inconsistencies) - repeat all three of these variables and not just PX\_VERSION in that section.
