You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found a problem in nudgeboundary.f90. The issue is that when you start a warmstart simulation, the model reads LBCs every time from 0 hour, i.e., from the coldstart. I found that the procedure of reading the LBCs files from the restart time was somehow missing.
I added this procedure to the subroutine nudgeboundary:
if(.not. lwarmstart) then
! Read the first two input times
call read_new_LBCs(0.)
call read_new_LBCs(dt_input_lbc)
lbc_index = 1
if (lnudge_boundary_sv) then
! Read the first two input times for scalars
call read_new_LBCs_sv(0.)
call read_new_LBCs_sv(dt_input_lbc_sv)
lbc_index_sv = 1
end if
else
! Read the first two input times (starting from restart time): !Arseni
call read_new_LBCs(btime/1000.)
call read_new_LBCs((btime/1000.)+dt_input_lbc)
lbc_index = int(btime/(3600.*1000.))
if (lnudge_boundary_sv) then
! Read the first two input times for scalars (starting from restart time): !Arseni
call read_new_LBCs_sv(btime/1000.)
call read_new_LBCs_sv((btime/1000.)+dt_input_lbc_sv)
lbc_index_sv = int(btime/(3600.*1000.))
end if
endif
However, I still have an issue with nudge boundaries, namely a sudden appearance of the anomalously high values around the domain borders. Is there any idea what could cause this behaviour? (LBCs files are correct, though)
See the movie of co2 scalar tracer (the restart simulation starts from 6h):
test_save_CO2_sv001-1.mp4
Cheers,
Arseni
The text was updated successfully, but these errors were encountered:
adoyenne
changed the title
Issue of correct LBCs reading in warmstart simulation
Problem with reading LBC correctly in warmstart simulation
Dec 7, 2023
I've managed to fix this problem. The thing was that lbc_index_sv calculated incorrectly and temporal interpolation caused a wrong results at boundaries. Here, I advise to replace this part of the code:
! Read the first two input times
call read_new_LBCs(0.)
call read_new_LBCs(dt_input_lbc)
lbc_index = 1
if (lnudge_boundary_sv) then
! Read the first two input times for scalars
call read_new_LBCs_sv(0.)
call read_new_LBCs_sv(dt_input_lbc_sv)
lbc_index_sv = 1
end if
with this one:
! Read the first two input times
!(can be used for cold and warm starts, because rtimee is used)
call read_new_LBCs(rtimee)
call read_new_LBCs(rtimee+dt_input_lbc)
lbc_index = int(rtimee/dt_input_lbc)+1
if (lnudge_boundary_sv) then
! Read the first two input times for scalars
!(can be used for cold and warm starts, because rtimee is used)
call read_new_LBCs_sv(rtimee)
call read_new_LBCs_sv(rtimee+dt_input_lbc_sv)
lbc_index_sv = int(rtimee/dt_input_lbc_sv)+1
end if
This reading procedure is universal and can be used for both cold and warm starts since it is linked to rtimee that is 0 when cold start and equals restart time at warm start. So, there is not need to use separate procedure for warmstart (as in my example in previous message).
Hello,
I found a problem in nudgeboundary.f90. The issue is that when you start a warmstart simulation, the model reads LBCs every time from 0 hour, i.e., from the coldstart. I found that the procedure of reading the LBCs files from the restart time was somehow missing.
I added this procedure to the subroutine nudgeboundary:
if(.not. lwarmstart) then
However, I still have an issue with nudge boundaries, namely a sudden appearance of the anomalously high values around the domain borders. Is there any idea what could cause this behaviour? (LBCs files are correct, though)
See the movie of co2 scalar tracer (the restart simulation starts from 6h):
test_save_CO2_sv001-1.mp4
Cheers,
Arseni
The text was updated successfully, but these errors were encountered: