Skip to content
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
66 changes: 66 additions & 0 deletions driver/fvGFS/atmosphere.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2390,6 +2390,72 @@ subroutine atmosphere_fill_nest_cpl(Atm_block, IPD_control, IPD_data)
endif
endif

! Deal with usfco and vsfco
if (IPD_control%cplocn2atm .and. IPD_control%icplocn2atm==1) then
! Extract the coupling field
do nb = 1,Atm_block%nblks
blen = Atm_block%blksz(nb)
do ix = 1, blen
i = Atm_block%index(nb)%ii(ix)
j = Atm_block%index(nb)%jj(ix)
Atm(mygrid)%parent2nest_2d(i,j) = IPD_Data(nb)%Sfcprop%usfco(ix)
enddo
enddo
! Loop through and fill all nested grids
do n=2,ngrids
if (n==mygrid .or. mygrid==Atm(n)%parent_grid%grid_number) then
call fill_nested_grid_cpl(n, n==mygrid)
endif
enddo
! Update the nested grids
if (Atm(mygrid)%neststruct%nested) then
do nb = 1,Atm_block%nblks
blen = Atm_block%blksz(nb)
do ix = 1, blen
i = Atm_block%index(nb)%ii(ix)
j = Atm_block%index(nb)%jj(ix)
if (IPD_data(nb)%Sfcprop%oceanfrac(ix) > 0.) then
IPD_data(nb)%Sfcprop%usfco(ix) = Atm(mygrid)%parent2nest_2d(i,j)
else
IPD_data(nb)%Sfcprop%usfco(ix) = 0.0_kind_phys
endif
enddo
enddo
endif

! Extract the coupling field
do nb = 1,Atm_block%nblks
blen = Atm_block%blksz(nb)
do ix = 1, blen
i = Atm_block%index(nb)%ii(ix)
j = Atm_block%index(nb)%jj(ix)
Atm(mygrid)%parent2nest_2d(i,j) = IPD_Data(nb)%Sfcprop%vsfco(ix)
enddo
enddo
! Loop through and fill all nested grids
do n=2,ngrids
if (n==mygrid .or. mygrid==Atm(n)%parent_grid%grid_number) then
call fill_nested_grid_cpl(n, n==mygrid)
endif
enddo
! Update the nested grids
if (Atm(mygrid)%neststruct%nested) then
do nb = 1,Atm_block%nblks
blen = Atm_block%blksz(nb)
do ix = 1, blen
i = Atm_block%index(nb)%ii(ix)
j = Atm_block%index(nb)%jj(ix)
if (IPD_data(nb)%Sfcprop%oceanfrac(ix) > 0.) then
IPD_data(nb)%Sfcprop%vsfco(ix) = Atm(mygrid)%parent2nest_2d(i,j)
else
IPD_data(nb)%Sfcprop%vsfco(ix) = 0.0_kind_phys
endif
enddo
enddo
endif

endif

! Deal with zorlwav (sea surface roughness length)
if (IPD_control%cplwav2atm) then
! Extract the coupling field
Expand Down