Exact 0 soil$D0cm

42 views
Skip to first unread message

Julia Smith

unread,
Dec 10, 2025, 2:56:33 AM12/10/25
to NicheMapR

Hello,

I am using micro_era5 and getting instances on cold nights where my ground temperature (D0cm) is exactly 0 and then often gets stuck there for a few hours (sometimes persisting into daylight before getting unstuck). Have you encountered this / do you have an idea of what might be causing it and how to fix it?

I am attaching a visual example of this happening, some code in which I call micro_era5(), and the era5 input data around that time and the micro_era5 output (both in csv form; note that time zones differ... UTC and MDT, respectively). I'll also paste the micro_era5 call below for easy access (the attached code won't run anyway since the .nc file is too large and is not attached).

One thing to note is that my era5 data is a little special... I made workflow that merged ERA5 and ERA5-Land data together (using downscaling on some ERA5 variables to match ERA5-Land's spatial resolution). But I was able to reproduce this issue with just ERA5 data obtained using build_era5_request(). 

Code snippet:

micro_era5(
  loc = c(site_lon, site_lat),
  dstart = start_date,
  dfinish = end_date,
 
  # Site parameters
  Usrhyt = 0.03,           # 3cm above ground
  weather.elev = site_elev,
 
  # Shade parameters
  minshade = 0,            # No shade
  maxshade = 1,            # Set to 1 to avoid error
  runshade = 0,            # Only use minshade
 
  # Soil parameters (defaults)
  # DEP = c(0, 2.5, 5, 10, 15, 20, 30, 50, 100, 200)  # Default
 
  # Model parameters
  ERR = 1.5,               # Default error tolerance
  spatial = nc_prefix,     # NetCDF file prefix
  RUF = 0.004,             # Surface roughness
 
  # DEM parameters
  dem.res = 30,
  dem = NA,
  dem2 = NA,
 
  message = 1              # Show messages for debugging
)

example.R
example_image.png
era5_example.xlsx
micro_example.xlsx

NicheMapR

unread,
Dec 10, 2025, 7:48:43 AM12/10/25
to NicheMapR
Hi Julia,

That sort of thing actually should happen - it's because of the phase transition between ice and water in the soil. If you run it with no rainfall, so the soil is dry, you'll see it drop below zero (or if you make it much colder so the freezing process completes more quickly). 

But note that the phase transition wasn't properly implemented in an earlier versions of the model such that it was exaggerating this effect so try it with the latest version to be sure (see the github history since the last release if you want to check out what was wrong and how it changed - we are in the process of making a Julia version of the microclimate model and this revealed a few issues).

And nice job integrating the era5 land data - I think a lot of people on this list would be interested to know more about how you did it.

All the best,
Mike
Reply all
Reply to author
Forward
0 new messages