diff --git a/cicecore/cicedynB/dynamics/ice_dyn_evp.F90 b/cicecore/cicedynB/dynamics/ice_dyn_evp.F90 index 5f237d9f0..779e84452 100644 --- a/cicecore/cicedynB/dynamics/ice_dyn_evp.F90 +++ b/cicecore/cicedynB/dynamics/ice_dyn_evp.F90 @@ -266,7 +266,7 @@ subroutine evp (dt) call grid_average_X2Y('T2EF',tmass,emass) call grid_average_X2Y('T2EF',aice_init, aie) call grid_average_X2Y('T2NF',tmass,nmass) - call grid_average_X2Y('T2NF',aice_init, aie) + call grid_average_X2Y('T2NF',aice_init, ain) endif !---------------------------------------------------------------- ! Set wind stress to values supplied via NEMO or other forcing @@ -420,22 +420,10 @@ subroutine evp (dt) uvelN (:,:,iblk), vvelN (:,:,iblk), & TbN (:,:,iblk)) - enddo ! iblk - !$TCXOMP END PARALLEL DO - - !$TCXOMP PARALLEL DO PRIVATE(iblk,ilo,ihi,jlo,jhi,this_block) - do iblk = 1, nblocks - !----------------------------------------------------------------- ! more preparation for dynamics on E grid !----------------------------------------------------------------- - this_block = get_block(blocks_ice(iblk),iblk) - ilo = this_block%ilo - ihi = this_block%ihi - jlo = this_block%jlo - jhi = this_block%jhi - call dyn_prep2 (nx_block, ny_block, & ilo, ihi, jlo, jhi, & icellt(iblk), icelle(iblk), & diff --git a/cicecore/cicedynB/general/ice_flux.F90 b/cicecore/cicedynB/general/ice_flux.F90 index e17faab6a..c593d91b1 100644 --- a/cicecore/cicedynB/general/ice_flux.F90 +++ b/cicecore/cicedynB/general/ice_flux.F90 @@ -641,7 +641,7 @@ subroutine init_coupler_flux use ice_flux_bgc, only: flux_bio_atm, flux_bio, faero_atm, fiso_atm, & fnit, famm, fsil, fdmsp, fdms, fhum, fdust, falgalN, & fdoc, fdon, fdic, ffed, ffep - use ice_grid, only: bathymetry + use ice_grid, only: bathymetry, grid_system integer (kind=int_kind) :: n @@ -738,13 +738,24 @@ subroutine init_coupler_flux ! fluxes received from ocean !----------------------------------------------------------------- - ss_tltx(:,:,:)= c0 ! sea surface tilt (m/m) - ss_tlty(:,:,:)= c0 - uocn (:,:,:) = c0 ! surface ocean currents (m/s) - vocn (:,:,:) = c0 - frzmlt(:,:,:) = c0 ! freezing/melting potential (W/m^2) - frzmlt_init(:,:,:) = c0 ! freezing/melting potential (W/m^2) - sss (:,:,:) = 34.0_dbl_kind ! sea surface salinity (ppt) + ss_tltx (:,:,:) = c0 ! sea surface tilt (m/m) + ss_tlty (:,:,:) = c0 + uocn (:,:,:) = c0 ! surface ocean currents (m/s) + vocn (:,:,:) = c0 + frzmlt (:,:,:) = c0 ! freezing/melting potential (W/m^2) + frzmlt_init(:,:,:) = c0 ! freezing/melting potential (W/m^2) + sss (:,:,:) = 34.0_dbl_kind ! sea surface salinity (ppt) + + if (grid_system == 'CD') then + ss_tltxN(:,:,:) = c0 ! sea surface tilt (m/m) + ss_tltyN(:,:,:) = c0 + ss_tltxE(:,:,:) = c0 ! sea surface tilt (m/m) + ss_tltyE(:,:,:) = c0 + uocnN (:,:,:) = c0 ! surface ocean currents (m/s) + vocnN (:,:,:) = c0 + uocnE (:,:,:) = c0 ! surface ocean currents (m/s) + vocnE (:,:,:) = c0 + endif do iblk = 1, size(Tf,3) do j = 1, size(Tf,2) diff --git a/cicecore/cicedynB/infrastructure/ice_grid.F90 b/cicecore/cicedynB/infrastructure/ice_grid.F90 index ad5fb32da..688b7155e 100644 --- a/cicecore/cicedynB/infrastructure/ice_grid.F90 +++ b/cicecore/cicedynB/infrastructure/ice_grid.F90 @@ -2441,7 +2441,7 @@ subroutine grid_average_X2YS(dir,work1,area1,mask1,work2) select case (trim(dir)) case('NE') - !$OMP PARALLEL DO PRIVATE(iblk,i,j,ilo,ihi,jlo,jhi,this_block) + !$OMP PARALLEL DO PRIVATE(iblk,i,j,ilo,ihi,jlo,jhi,this_block,wtmp) do iblk = 1, nblocks this_block = get_block(blocks_ice(iblk),iblk) ilo = this_block%ilo @@ -2466,7 +2466,7 @@ subroutine grid_average_X2YS(dir,work1,area1,mask1,work2) !$OMP END PARALLEL DO case('SW') - !$OMP PARALLEL DO PRIVATE(iblk,i,j,ilo,ihi,jlo,jhi,this_block) + !$OMP PARALLEL DO PRIVATE(iblk,i,j,ilo,ihi,jlo,jhi,this_block,wtmp) do iblk = 1, nblocks this_block = get_block(blocks_ice(iblk),iblk) ilo = this_block%ilo @@ -2491,7 +2491,7 @@ subroutine grid_average_X2YS(dir,work1,area1,mask1,work2) !$OMP END PARALLEL DO case('NW') - !$OMP PARALLEL DO PRIVATE(iblk,i,j,ilo,ihi,jlo,jhi,this_block) + !$OMP PARALLEL DO PRIVATE(iblk,i,j,ilo,ihi,jlo,jhi,this_block,wtmp) do iblk = 1, nblocks this_block = get_block(blocks_ice(iblk),iblk) ilo = this_block%ilo @@ -2516,7 +2516,7 @@ subroutine grid_average_X2YS(dir,work1,area1,mask1,work2) !$OMP END PARALLEL DO case('SE') - !$OMP PARALLEL DO PRIVATE(iblk,i,j,ilo,ihi,jlo,jhi,this_block) + !$OMP PARALLEL DO PRIVATE(iblk,i,j,ilo,ihi,jlo,jhi,this_block,wtmp) do iblk = 1, nblocks this_block = get_block(blocks_ice(iblk),iblk) ilo = this_block%ilo @@ -2541,7 +2541,7 @@ subroutine grid_average_X2YS(dir,work1,area1,mask1,work2) !$OMP END PARALLEL DO case('E') - !$OMP PARALLEL DO PRIVATE(iblk,i,j,ilo,ihi,jlo,jhi,this_block) + !$OMP PARALLEL DO PRIVATE(iblk,i,j,ilo,ihi,jlo,jhi,this_block,wtmp) do iblk = 1, nblocks this_block = get_block(blocks_ice(iblk),iblk) ilo = this_block%ilo @@ -2562,7 +2562,7 @@ subroutine grid_average_X2YS(dir,work1,area1,mask1,work2) !$OMP END PARALLEL DO case('W') - !$OMP PARALLEL DO PRIVATE(iblk,i,j,ilo,ihi,jlo,jhi,this_block) + !$OMP PARALLEL DO PRIVATE(iblk,i,j,ilo,ihi,jlo,jhi,this_block,wtmp) do iblk = 1, nblocks this_block = get_block(blocks_ice(iblk),iblk) ilo = this_block%ilo @@ -2583,7 +2583,7 @@ subroutine grid_average_X2YS(dir,work1,area1,mask1,work2) !$OMP END PARALLEL DO case('N') - !$OMP PARALLEL DO PRIVATE(iblk,i,j,ilo,ihi,jlo,jhi,this_block) + !$OMP PARALLEL DO PRIVATE(iblk,i,j,ilo,ihi,jlo,jhi,this_block,wtmp) do iblk = 1, nblocks this_block = get_block(blocks_ice(iblk),iblk) ilo = this_block%ilo @@ -2604,7 +2604,7 @@ subroutine grid_average_X2YS(dir,work1,area1,mask1,work2) !$OMP END PARALLEL DO case('S') - !$OMP PARALLEL DO PRIVATE(iblk,i,j,ilo,ihi,jlo,jhi,this_block) + !$OMP PARALLEL DO PRIVATE(iblk,i,j,ilo,ihi,jlo,jhi,this_block,wtmp) do iblk = 1, nblocks this_block = get_block(blocks_ice(iblk),iblk) ilo = this_block%ilo