From 6663459e58a04e3bda2157d5891d227e3abc3c7a Mon Sep 17 00:00:00 2001 From: BinLi-NOAA Date: Thu, 1 Feb 2024 15:15:57 -0500 Subject: [PATCH] Include surface ocean current in the computation of air-sea fluxes (#311) * 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. --- driver/fvGFS/atmosphere.F90 | 66 +++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/driver/fvGFS/atmosphere.F90 b/driver/fvGFS/atmosphere.F90 index dc4e208fa..db9c42ab3 100644 --- a/driver/fvGFS/atmosphere.F90 +++ b/driver/fvGFS/atmosphere.F90 @@ -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