Skip to content

Commit

Permalink
Include surface ocean current in the computation of air-sea fluxes (#311
Browse files Browse the repository at this point in the history
)

* Send sea surface current field to nested grids.

* Update driver/fvGFS/atmosphere.F90.

* Change the variable name for zonal ocean current from ssu to usfco.
Change the variable name for meridional ocean current from ssv to vsfco.
  • Loading branch information
binli2337 authored Feb 1, 2024
1 parent 65301dd commit 6663459
Showing 1 changed file with 66 additions and 0 deletions.
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

0 comments on commit 6663459

Please sign in to comment.