From 6093321153e31ec70fe51f06c09bb403ee9ff0c2 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 23 Jul 2024 16:29:40 +0000 Subject: [PATCH] Move data copying outside of block loop --- stochastic_physics/stochastic_physics_wrapper.F90 | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/stochastic_physics/stochastic_physics_wrapper.F90 b/stochastic_physics/stochastic_physics_wrapper.F90 index 94d888f9d..260f4bb5e 100644 --- a/stochastic_physics/stochastic_physics_wrapper.F90 +++ b/stochastic_physics/stochastic_physics_wrapper.F90 @@ -398,18 +398,14 @@ subroutine stochastic_physics_wrapper (GFS_Control, GFS_Statein, GFS_Grid, GFS_S sst (nb,1:GFS_Control%blksz(nb)) = GFS_Sfcprop%tsfco(ixs:ixe) lmsk (nb,1:GFS_Control%blksz(nb)) = GFS_Sfcprop%slmsk(ixs:ixe) lake (nb,1:GFS_Control%blksz(nb)) = GFS_Sfcprop%lakefrac(ixs:ixe) - ! DH* note - don't think we need the transfer_field logic, just use ixs:ixe? - !uwind (nb,1:GFS_Control%blksz(nb),:) = GFS_Data(nb)%Statein%ugrs(:,:) - call transfer_field_to_stochastics_3d(GFS_Control%blksz, GFS_Statein%ugrs, uwind) - !vwind (nb,1:GFS_Control%blksz(nb),:) = GFS_Data(nb)%Statein%vgrs(:,:) - call transfer_field_to_stochastics_3d(GFS_Control%blksz, GFS_Statein%vgrs, vwind) - !height (nb,1:GFS_Control%blksz(nb),:) = GFS_Data(nb)%Statein%phil(:,:) - call transfer_field_to_stochastics_3d(GFS_Control%blksz, GFS_Statein%phil, height) condition (nb,1:GFS_Control%blksz(nb)) = GFS_Coupling%condition(GFS_Control%chunk_begin(nb):GFS_Control%chunk_end(nb)) ca_deep_cpl(nb,1:GFS_Control%blksz(nb)) = GFS_Coupling%ca_deep(GFS_Control%chunk_begin(nb):GFS_Control%chunk_end(nb)) ca_turb_cpl(nb,1:GFS_Control%blksz(nb)) = GFS_Coupling%ca_turb(GFS_Control%chunk_begin(nb):GFS_Control%chunk_end(nb)) ca_shal_cpl(nb,1:GFS_Control%blksz(nb)) = GFS_Coupling%ca_shal(GFS_Control%chunk_begin(nb):GFS_Control%chunk_end(nb)) - enddo + enddo + call transfer_field_to_stochastics_3d(GFS_Control%blksz, GFS_Statein%ugrs, uwind) + call transfer_field_to_stochastics_3d(GFS_Control%blksz, GFS_Statein%vgrs, vwind) + call transfer_field_to_stochastics_3d(GFS_Control%blksz, GFS_Statein%phil, height) call transfer_field_to_stochastics(GFS_Control%blksz, GFS_Grid%dx, dx) call cellular_automata_sgs(GFS_Control%kdt,GFS_control%dtp,GFS_control%restart,GFS_Control%first_time_step, & sst,lmsk,lake,uwind,vwind,height,dx,condition,ca_deep_cpl,ca_turb_cpl,ca_shal_cpl, Atm(mygrid)%domain_for_coupler,nblks, &