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

hist_avgflag_pertape='M' or 'X' did not work

Status
Not open for further replies.

KeerZ

Member
Hello!

I am running a BSSP585-compset simulation on cheyenne. I met a problem when I was trying to use averaging flag 'hist_avgflag_pertape' in user_nl_clm.

In user_nl_clm, I specified the output average flag as 'X' or 'M' for several file tapes. However, after finishing this simulation, I found that the average flags did not work for some file tapes.

For my h1 file tape, it works properly: I specified hist_avgflag_pertape(2)= 'X', and in my output *h1*.nc files the cell_methods = "time: maximum".

For some other file tapes (for example my h4 and h5 file tape), even though I specified hist_avgflag_pertape(5)= 'X' or hist_avgflag_pertape(6)= 'M', the cell_methods is "time: mean" instead of "time: maximum" or "time: minimum". And I confirmed that the output in h4 and h5 file tape are indeed average values instead of maximum or minimum values over history period. Similarly, the hist_avgflag_pertape (8), (9), (10) did not work either.

Here is my user_nl_clm file (attached): /glade/u/home/keerzhang/cases/b.e20.BSSP585.f09_g16.SSP5_TestMonthlyMaximum4/user_nl_clm
and the output is at /glade/scratch/keerzhang/archive/b.e20.BSSP585.f09_g16.SSP5_TestMonthlyMaximum4/lnd/hist

I am wondering how to make hist_avgflag_pertape='M' or 'X' work properly? Thank you!

Regards,
Keer
 

Attachments

  • user_nl_clm.txt
    5.9 KB · Views: 9

oleson

Keith Oleson
CSEG and Liaisons
Staff member
At first glance, I don't see what the problem is. The lnd log file indicates that the model is reading in the hist_avgflag_pertape correctly for each type of history file. I'll have to look more closely at the end of the week when the supercomputer is back up.
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
I replicated the problem by cloning your case.
Then I tried a similar case but without your changes to the model and had the same problem.
However, I also tried the same history file configuration in a single point run and the files were output with the correct average/max/min per hist_avgflag_pertape. I was hoping to troubleshoot the problem in a much simpler case, but it's working fine unfortunately.
I've spent some time trying to figure this out but no luck, I'll probably have to file an issue and get some more help.
 

KeerZ

Member
I replicated the problem by cloning your case.
Then I tried a similar case but without your changes to the model and had the same problem.
However, I also tried the same history file configuration in a single point run and the files were output with the correct average/max/min per hist_avgflag_pertape. I was hoping to troubleshoot the problem in a much simpler case, but it's working fine unfortunately.
I've spent some time trying to figure this out but no luck, I'll probably have to file an issue and get some more help.
Thank you, Keith!
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
This turned out to be an actual bug in the code, as found by Bill Sacks. He suggested a fix. You could replace this line in src/main/controlMod.F90:

call mpi_bcast (hist_avgflag_pertape, size(hist_avgflag_pertape), MPI_CHARACTER, 0, mpicom, ier)

with this line:

call mpi_bcast (hist_avgflag_pertape, len(hist_avgflag_pertape)*size(hist_avgflag_pertape), &
MPI_CHARACTER, 0, mpicom, ier)

I've tested this in my cases and it seems to fix the problem. We haven't done any formal testing on this, but I feel you can use this for now without much risk.
 
Status
Not open for further replies.
Top