Negative soil moisture from ERA5 crashing wrf.exe

Ahmathlete

New member
I'm trying to run a WRF simulation using WPS 4.3.1 and WRF 4.3.1. The complete WPS and real.exe work fine, except wrf.exe is always crashing. After further investigation (e.g., by configuring with "-D" and compiling), I found failures in certain MPI tasks from module_sf_noahlsm.f90 due to some negative soil moisture in the wrfinput files. I traced the negative values back to ERA5 surface data.

To solve it, I replaced these values with 0.0001 and rerun ungrib and metgrid using:
Bash:
cdo setrtoc,-1,0,0.0001 -selvar,var39,var40,var41,var42 $file fixed.grb
cdo delvar,var39,var40,var41,var42 $file rest.grb
cdo merge rest.grb fixed.grb tmp.grb && mv tmp.grb $file
rm fixed.grb rest.grb

However, these negative moisture values reappear in the met_em files. The original negative values are not near any water bodies. Additionally, I used the NCL manuscript from Vaishnavi_198's question; the negative values do not appear in the intermediate files. It seems the issue arises from metgrid.

I attached both namelists, surface Vtable, and METGRID.TBL. Also, the negative_values.txt shows the propagation of negative values in each stage.

Any help to circumvent this issue is welcome and appreciated. :)
 

Attachments

Addition:

ERA5 data was downloaded as GRIB from ECMWF - MARS Catalogue.

Update:

After I found that soil negative values are not present in the intermediate files, but reappear in met_em files, I corrected the values in met_em files using NCO:
Bash:
for f in met_em.d0*.*.nc; do
    echo $f
    ncap2 -s 'where(SM000007<0) SM000007=0.0001f; where(SM007028<0) SM007028=0.0001f; where(SM028100<0) SM028100=0.0001f; where(SM100289<0) SM100289=0.0001f' $f fixed_$f && mv fixed_$f $f
done

Then I rerun real.exe. Unfortuntely, the soil negative values emerge again in wrfinput files. But at least now, the negative values are only in the deeper layers.

Bash:
> cdo output -fldmin -selname,SMOIS wrfinput_d01
        0.005     
   -0.0102678
  -0.00625499
  -0.00407762

> cdo output -fldmin -selname,SMOIS wrfinput_d02
        0.005     
  -0.00835714
  -0.00631263
  -0.00152066
 
Thanks @Ming Chen for your suggestion. Unfortunately, we have ERA5 surface data downloaded on the cluster. The two options remaining could be:

1. run the flow normally until real.exe and then edit SMOIS negative values in wrfinput files. I'm not sure about this option. It could be valid since the negative values in met_em files (after replacing -ve in ERA5 grib files) appear in desert (see the attached image).

2. use "wt_average_16pt " option to interpolate soil moisture.

Happy to receive further advice or input :)
cheers,
 

Attachments

  • 1000000414.jpg
    1000000414.jpg
    76.8 KB · Views: 2
Update:

I compared soil moisture "SWVL1" from NSF NCAR GDEX Dataset d633000 and ECMWF - MARS Catalogue for the 2007-01-15_03. It seems, it is a regional issue and the -ve values exist in both datasets. Left is swvl1 from ECMWF-MARS and right from NSF NCAR dataset.
 

Attachments

  • 1779814914862.png
    1779814914862.png
    248.2 KB · Views: 2
Hi,

Thanks for the update. I looked at your METGRID.TBL, in which you set
Code:
name=SW000010
            interp_option=sixteen_pt+four_pt+wt_average_4pt+wt_average_16pt+search

Can you try:
Code:
interp_option=sixteen_pt+four_pt+wt_average_4pt

Please let me know whether this option still gives you negative values.

I am perplexed that no negative values are found in your intermediate files, but negative values appear in your met_em files. metgrid simply conducts horizontal interpolation, and I see no reason it ouputs negative values.
 
Just saw this post after I posted my answers above....

It seems that negative values do exist in the original data. Let me know if I am wrong....

Anyway,
Update:

I compared soil moisture "SWVL1" from NSF NCAR GDEX Dataset d633000 and ECMWF - MARS Catalogue for the 2007-01-15_03. It seems, it is a regional issue and the -ve values exist in both datasets. Left is swvl1 from ECMWF-MARS and right from NSF NCAR dataset.
 
Hi,

Thanks a lot for your response. Just to clear any confusion, I tried three pathways:

1. ERA5 as is → intermediate files (not sure if -ve exist) → met_em files (-ve values exist) → wrfinput (-ve values exist)
2. ERA5 with -ve replaced → intermediate files (-ve do not exist) → met_em files (-ve values exist) → wrfinput (-ve values exist)
3. ERA5 with -ve replaced → intermediate files (-ve do not exist) → met_em files (with -ve replaced) → wrfinput (-ve values exist)

I'm also perplexed why they appear again in pathways 2 & 3. It could be a steep gradient of moisture!?

"sixteen_pt+four_pt+wt_average_4pt" for SMXXXXXX not SW000010, correct? If so, I will test it and inform you. Thanks again.
cheers,
 
Hi @Ming Chen,

I used intermediate files without -ve soil moisture and run metgrid.exe with "sixteen_pt+four_pt+wt_average_4pt" for soil data. Unfortunately, negative values appears in met_em files in the four soil levels. In SM as well as all SM000007,SM007028,SM028100,SM100289.


Looking forward to hearing from you.
Cheers,
 
Back
Top