Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Perturbation/Increments for cold starts #340

Merged
merged 2 commits into from
Jun 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 13 additions & 14 deletions tools/fv_restart.F90
Original file line number Diff line number Diff line change
Expand Up @@ -365,19 +365,6 @@ subroutine fv_restart(fv_domain, Atm, seconds, days, cold_start, grid_type, this
else
if( is_master() ) write(*,*) 'Warm starting, calling fv_io_restart'
call fv_io_read_restart(Atm(n)%domain_for_read,Atm(n:n))
!====== PJP added DA functionality ======
if (Atm(n)%flagstruct%read_increment) then
! print point in middle of domain for a sanity check
i = (Atm(n)%bd%isc + Atm(n)%bd%iec)/2
j = (Atm(n)%bd%jsc + Atm(n)%bd%jec)/2
k = Atm(n)%npz/2
if( is_master() ) write(*,*) 'Calling read_da_inc',Atm(n)%pt(i,j,k)
call read_da_inc(Atm(n), Atm(n)%domain, Atm(n)%bd, Atm(n)%npz, Atm(n)%ncnst, &
Atm(n)%u, Atm(n)%v, Atm(n)%q, Atm(n)%delp, Atm(n)%pt, Atm(n)%delz, isd, jsd, ied, jed, &
isc, jsc, iec, jec )
if( is_master() ) write(*,*) 'Back from read_da_inc',Atm(n)%pt(i,j,k)
endif
!====== end PJP added DA functionailty======
endif

seconds = 0; days = 0 ! Restart needs to be modified to record seconds and days.
Expand Down Expand Up @@ -478,7 +465,19 @@ subroutine fv_restart(fv_domain, Atm, seconds, days, cold_start, grid_type, this

endif !external_ic vs. restart vs. idealized


!====== PJP added DA functionality ======
if (Atm(n)%flagstruct%read_increment) then
! print point in middle of domain for a sanity check
i = (Atm(n)%bd%isc + Atm(n)%bd%iec)/2
j = (Atm(n)%bd%jsc + Atm(n)%bd%jec)/2
k = Atm(n)%npz/2
if( is_master() ) write(*,*) 'Calling read_da_inc',Atm(n)%pt(i,j,k)
call read_da_inc(Atm(n), Atm(n)%domain, Atm(n)%bd, Atm(n)%npz, Atm(n)%ncnst, &
Atm(n)%u, Atm(n)%v, Atm(n)%q, Atm(n)%delp, Atm(n)%pt, Atm(n)%delz, isd, jsd, ied, jed, &
isc, jsc, iec, jec )
if( is_master() ) write(*,*) 'Back from read_da_inc',Atm(n)%pt(i,j,k)
endif
!====== end PJP added DA functionailty======
endif !n==this_grid


Expand Down