'WRF LSM is not supported' Error

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:

 *** 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.

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

That is correct @hogrefe.christian !

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)

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

image

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.

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?

I grepped my standard output file and got this:

image

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 (43.1 KB)

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.

1 Like

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:

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

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

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.

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?

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.

1 Like