Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

[CESM2.1.4] Model fails due to negative snow/water values — attempted fix in SnowHydrologyMod.F90 unsuccessful

Jeongeun

Jeongeun
New Member
CESM version: CESM2.1.4
Component: CLM (SnowHydrologyMod.F90)
Machine: Olaf (SLURM-based HPC)


Hello,

I encountered an error during model execution where the simulation fails immediately due to negative mass values, specifically in SnowHydrologyMod.F90, as shown below.
1748397733165.png

To investigate, I first modified the part labeled Adjust water content inside SnowHydrologyMod.F90 to prevent negative values, as shown below.
Original:
1748397851020.png
After the change:
1748397865349.png
And then, the error no longer occurred.

To validate the changes, I ran a test simulation (initial 1955~1958) under the same conditions on Aleph (other server system) and compared CESM2 outputs.
After the simulations, I selected variables related to water and snow for comparison.
Some variables (SNOWDP, H2OSNO, QSNOMELT, SALT, SOILWATER, TWS) showed very similar values between them, but the others (SNOW, SSH) are different (I also checked the significant).
1748398003471.png1748398029008.png1748398049391.png

So, I was thinking this change might not be correct.
I then found an old CTSM post (Need to increase min_snow_to_keep · Issue #1425 · ESCOMP/CTSM) suggesting to change the value of min_snow_to_keep in SnowHydrologyMod.F90.
So I reverted back to the original SnowHydrologyMod.F90, and only changed the min_snow_to_keep parameter like below.
1748398161652.png
Unfortunately, the model still fails with the same negative value error.

Given this, I would like to ask:

- Is it acceptable to proceed with CESM2 simulations on Olaf using revised SnowHydrologyMod.F90 below?
1748397865349.png
- Are there any additional settings or variables we should review to ensure the results are reliable?
- What is the recommended way to handle this negative value error?

I attached config_compilers, config_batch, config_machines files.
 

Attachments

  • config_batch.txt
    23.8 KB · Views: 1
  • config_compilers.txt
    5.7 KB · Views: 0
  • config_machines.txt
    109.4 KB · Views: 0

slevis

Moderator
Staff member
I do not know details about the snow-capping procedure, but my gut response to your attempt that worked is that it seems fine. Common practice in numerical modeling is to document your changes to the model when you go to publish your work.

I do wonder why you get the error in the first place, while other users do not. I'm guessing that you have changed something in the code or input data. If so, it would help to know about that.

Also, in your validation test, did you compare identical simulations on olaf and aleph? If so, then the diffs are due to running on different machines, right? If not, then what else is different?
 
Top