Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

To the WRF developers: write_hist_at_0h_rst for user-defined output streams?

jamesrup

Member
Hi all,

I'm wondering if there's a way to set an equivalent of write_hist_at_0h_rst = .true. but for special user-defined output streams?

If not, is that possible to add?

Cheers,
James
 
Hi James,
Sorry for the delay in response. It may be possible to do this. I would recommend looking for this option in the code to see how it's handled. Then you could try to do something for another stream, using this option as a 'template.'
 
Hi kwerner,

You were right - I was able to copy an if-statement that simply checks for write_hist_at_0h_rst = .true. when calling the history write-out for other streams. Do you suggest trying to push this up to wrf-devel? Or I could copy the change here?
 
Hi James,
Since we haven't had a lot of demand for something like this, I think for now it would be beneficial for you to copy the changes here. That way if anyone else does need something like this, we can point them here. Thanks for agreeing to provide it!
 
Okay, can do!

For reference, I'm using WRFv4.5.2, in case there are changes to the file in question.

The change is extremely simple. In the file
  • WRF/share/mediation_integrate.F
I added the following text starting at line 113

!----------------------------------------------------------------------
! Write history for other streams at restart - James Ruppert - October 2024
!----------------------------------------------------------------------
DO ialarm = first_auxhist, last_auxhist
IF ( (config_flags%restart) .AND. ( currTime .EQ. startTime ) .AND. ( config_flags%write_hist_at_0h_rst )) THEN
! output history at beginning of restart
CALL med_hist_out ( grid , ialarm, config_flags )
ENDIF
ENDDO

which should place this chunk of code in the following location as far as IF statements go:

IF( (WRFU_AlarmIsRinging( grid%alarms( HISTORY_ALARM ), rc=rc ) .AND. &
NOT HERE
ELSE IF ( (config_flags%restart) .AND. ( currTime .EQ. startTime ) .AND. &
HERE
ENDIF

Hope that helps!
 
Hi, thank you so much for providing this fix, the inconsistent files from auxhist streams have been driving me mad, and I suspect might be why I'm getting errors trying to restart a particular run. +1 request for it to be added to future releases!
 
Top