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
)