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

Writing weekly output

idunkl

István Dunkl
New Member
Dear community,
We are using CESM2.15 to run 7-day simulations that produce an aggregated 7-day mean output.
Code:
STOP_OPTION=ndays,STOP_N=7
Following the model description, we assume the right way is to set nhtfrq to -168 (7*24h).
However, we wanted to confirm whether -168 is correct and started test simulations with a range of values for nhtfrq, assuming that values over 168 would not produce an output.
This is out cam namelist file

Code:
empty_htapes = .true.
nhtfrq = -1, -1, -24, -167, -168, -169, -170, -171, -172
mfilt = 1, 168, 7, 1, 1, 1, 1, 1, 1
fincl1 = 'TREFHT'
fincl2 = 'TREFHT'
fincl3 = 'TREFHT'
fincl4 = 'TREFHT'
fincl5 = 'TREFHT'
fincl6 = 'TREFHT'
fincl7 = 'TREFHT'
fincl8 = 'TREFHT'
fincl9 = 'TREFHT'
and here is the output from this simulation for one grid cell averaged over time
Code:
h0 288.8508605957031
h1 288.8508605957031
h2 288.8508605957031
h3 285.3296203613281
h4 285.56610107421875
h5 284.4306640625
h6 283.8340148925781
h7 288.13861083984375
h8 287.39434814453125

  1. Why is there output in h6, h7 and h8, although nhtfrq > simulation time?
  2. While the hourly and daily output (h1 and h2) produce the same value, why does the 7-day output (h4) produce a different value?
  3. What is the right value for nhtfrq if I want 7-day averages?
Thanks for the help!
 

peverley

Courtney Peverley
Moderator
Staff member
Hi,

1. I think the output you're seeing for nhtfrq > simulation time is for nstep=0 (which is always output). This means you should just get one file that contains time=0 data for h5-h8. In total, you should get:
  • 169 h0 files
  • 2 h1 files (since nstep=0 counts as a sample, you'll need to set mfilt=169 to get all the week's data in one file)
  • 2 h2 files (same reason as h1 above, the first will contain days 0-6 and the second will contain day 7)
  • 2 h3 files (one that has the nstep=0 data and one that contains the averaged data at 167 hours into the run)
  • 2 h4 files (one with nstep=0 and one with the 7-day average)
  • 1 file for each of h5-h8, each containing what should be identical nstep=0 data.
2. Are you confident you're comparing the same timestep across files? e.g. cam.h0.<DATE>-00000.nc should match cam.h5.<DATE>-00000.nc
3. You have the right nhtfrq value. As described above, you should get a two h4 files and the second will contain the week-averaged data.

Hope that helps; let me know if I misunderstood anything or didn't answer your questions!
Courtney

PS: We're removing the default nstep=0 writing for our upcoming CESM3 release.
 
Vote Upvote 0 Downvote

idunkl

István Dunkl
New Member
Hi,
the run did produce 169 h0 files as expected, but only one of h1 to h8.
The simulation starts of the 31.5, but the dates in the filename are all over the place:
Code:
test_hourly.cam.h1.2024-05-31-03600.nc
test_hourly.cam.h2.2024-06-01-00000.nc
test_hourly.cam.h3.2024-06-02-36000.nc
test_hourly.cam.h4.2024-06-02-00000.nc
test_hourly.cam.h5.2024-06-01-28800.nc
test_hourly.cam.h6.2024-05-31-36000.nc
test_hourly.cam.h7.2024-06-06-32400.nc
test_hourly.cam.h8.2024-06-05-00000.nc

Since then I found that ncl_filedump gives time_period_freq : day_7 and the others something like time_period_freq : hour_169.

Thanks for the help! I will use the setup as done for the h4 files. I was just a bit puzzled by the behaviour of h5 to h6 which made me doubt the other output.
 

Attachments

  • test_hourly.zip
    252.4 KB · Views: 0
Vote Upvote 0 Downvote

peverley

Courtney Peverley
Moderator
Staff member
Hmm, that is odd!

What compset/resolution are you using? I'd like to see if I can replicate your results. Have you made any other namelist changes in user_nl_cam?

Thanks!
Courtney
 
Vote Upvote 0 Downvote

idunkl

István Dunkl
New Member
Ok, so i have come a little closer to the problem. It has to do something with the run type: The simulations that show this strange behaviour are branch runs. If I omit the restart files and do a hybrid run instead, the output is exactly as you describe it (two files for h1 to h4, and only the startdate files for h5 to h8).

The branch run creates these history files with the strange dates for h5 to h8:
2025-03-20_11-10.png

I enclosed two minimal runscripts that produce these results.
Cheers,
Istvan
 

Attachments

  • 7day.zip
    2.2 KB · Views: 0
Vote Upvote 0 Downvote
Top