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

Error with tslist : reinitialize when nest begins

MLandreau

Member
Hi,

I experienced some bug with tslist. I ran a simulation with 5 nested domains, each domain started a certain time after its parent, each domain has a ts output location in the center of the domain. In my ts output files, the time series start approximately when its nest begins (+/- few timesteps) instead of when itself begins, except for d05 which behaves perfectly since he has no nested domains inside.

It seems like when a nest starts, the tslist output file is reset to an empty file. I investigated a bit and I have an idea about the origin of this error :
in subroutine integrate : call med_nest_initial if it is time for a nest to begin
- in subroutine med_nest_initial : call start_domain(parent). I think parent domain is initialized again in order to interpolate some values from parent to nest to initialize the nest.
- in subroutine start_domain : call calc_ts_location.
- in subroutine calc_ts_location : each output file is opened with the option STATUS='REPLACE' which delete the previous output.

A possible solution might be to add a test before calling calc_ts_location in start_domain, but I don't know which test.

Please note that I am using both input_from_file and _fine_input_stream options. It might impact which subroutines are called in med_nest_initial.

I didn't make any test to check my hypothesis for now.

Mathieu
 
Hi Mathieu,
Thank you for notifying us about this. Do you mind posting it in the "Issues" on our WRF GitHub repository page? Thanks!
 
Sure I will.

Meanwhile, I found a way to correct the bug by adding a test in start_domain, at the beginning of the subroutine juste after the call of set_scalar_indices_from_config. The few lines I added are :
IF ( grid%itimestep > 0 ) THEN
grid%have_calculated_tslocs = .TRUE.
END IF

Note : if these lines are added just before calc_ts_location, it doesn't work since itimestep is reset to 0 somewhere in the start_domain routine.

I attach here the corrected file for those who would face the same issue
 

Attachments

  • start_domain.F
    1.8 KB · Views: 1
Top