diff --git a/atm_land_ice_flux_exchange.F90 b/atm_land_ice_flux_exchange.F90 index d93ef4ae..76fd1cc7 100644 --- a/atm_land_ice_flux_exchange.F90 +++ b/atm_land_ice_flux_exchange.F90 @@ -2011,8 +2011,9 @@ subroutine flux_down_from_atmos (Time, Atm, Land, Ice, Atmos_boundary, Land_boun do j=js_atm,je_atm do i=is_atm,ie_atm if (Smb(k)%mask(i,j) .eq. 1.0) then - Atm%lprec(i,j)=Atm%lprec(i,j)*Smb(k)%scale_factor - Atm%fprec(i,j)=Atm%fprec(i,j)*Smb(k)%scale_factor + !Atm%lprec, Atm%fprec are (1:ie_atm-is_atm+1,1:je_atm-js_atm+1) + Atm%lprec(i-is_atm+1,j-js_atm+1)=Atm%lprec(i-is_atm+1,j-js_atm+1)*Smb(k)%scale_factor + Atm%fprec(i-is_atm+1,j-js_atm+1)=Atm%fprec(i-is_atm+1,j-js_atm+1)*Smb(k)%scale_factor endif enddo enddo @@ -3900,7 +3901,9 @@ subroutine update_surface_mass_balance(Atm, LIAb, Smb,Time) do j=js,je do i=is,ie - Smb%smb_in(i,j) = Smb%mask(i,j)*Atm%grid%area(i,j)*(Atm%lprec(i,j) + Atm%fprec(i,j)) + !Atm%grid%area, LIAb%lhflx are (is:ie,js:je) + !Atm%lprec, Atm%fprec are (1:ie-is+1,1:je-js+1) + Smb%smb_in(i,j) = Smb%mask(i,j)*Atm%grid%area(i,j)*(Atm%lprec(i-is+1,j-js+1) + Atm%fprec(i-is+1,j-js+1)) Smb%smb_out(i,j) = Smb%mask(i,j)*Atm%grid%area(i,j)*LIAb%lhflx(i,j) Smb%smb(i,j) = Smb%smb_in(i,j) - Smb%smb_out(i,j) enddo @@ -3964,7 +3967,9 @@ subroutine smb_balance(Atm,SmbA,SmbB,SmbC,LIAb) do j=js,je do i=is,ie - SmbC%smb_in(i,j) = SmbC%mask(i,j)*Atm%grid%area(i,j)*(Atm%lprec(i,j) + Atm%fprec(i,j)) + !Atm%grid%area, LIAb%lhflx are (is:ie,js:je) + !Atm%lprec, Atm%fprec are (1:ie-is+1,1:je-js+1) + SmbC%smb_in(i,j) = SmbC%mask(i,j)*Atm%grid%area(i,j)*(Atm%lprec(i-is+1,j-js+1) + Atm%fprec(i-is+1,j-js+1)) SmbC%smb_out(i,j) = SmbC%mask(i,j)*Atm%grid%area(i,j)*LIAb%lhflx(i,j) SmbC%smb(i,j)=SmbC%smb_in(i,j)-SmbC%smb_out(i,j) enddo diff --git a/coupler_main.F90 b/coupler_main.F90 index b20b9829..37e61b15 100644 --- a/coupler_main.F90 +++ b/coupler_main.F90 @@ -836,7 +836,8 @@ program coupler_main !$OMP& SHARED(Time_atmos, Atm, Land, Ice, Land_ice_atmos_boundary, Atmos_land_boundary, Atmos_ice_boundary) & !$OMP& SHARED(Ocean_ice_boundary) & !$OMP& SHARED(do_debug, do_chksum, do_atmos, do_land, do_ice, do_concurrent_radiation, omp_sec, imb_sec) & -!$OMP& SHARED(newClockc, newClockd, newClocke, newClockf, newClockg, newClockh, newClocki, newClockj, newClockl) +!$OMP& SHARED(newClockc, newClockd, newClocke, newClockf, newClockg, newClockh, newClocki, newClockj, newClockl) & +!$OMP& SHARED(adjust_surface_mass_balance, Smb_n, Smb_s, Smb_c) !$ if (omp_get_thread_num() == 0) then !$OMP PARALLEL & !$OMP& NUM_THREADS(1) & @@ -846,9 +847,11 @@ program coupler_main !$OMP& SHARED(Time_atmos, Atm, Land, Ice, Land_ice_atmos_boundary, Atmos_land_boundary, Atmos_ice_boundary) & !$OMP& SHARED(Ocean_ice_boundary) & !$OMP& SHARED(do_debug, do_chksum, do_atmos, do_land, do_ice, do_concurrent_radiation, omp_sec, imb_sec) & -!$OMP& SHARED(newClockc, newClockd, newClocke, newClockf, newClockg, newClockh, newClocki, newClockj, newClockl) +!$OMP& SHARED(newClockc, newClockd, newClocke, newClockf, newClockg, newClockh, newClocki, newClockj, newClockl) & +!$OMP& SHARED(adjust_surface_mass_balance, Smb_n, Smb_s, Smb_c) !$ call omp_set_num_threads(atmos_nthreads) !$ dsec=omp_get_wtime() + if (do_concurrent_radiation) call mpp_clock_begin(newClocki) ! ---- atmosphere dynamics ---- @@ -961,6 +964,7 @@ program coupler_main !$OMP& SHARED(newClockj) !$ call omp_set_num_threads(radiation_nthreads) !$ dsec=omp_get_wtime() + call mpp_clock_begin(newClockj) call update_atmos_model_radiation( Land_ice_atmos_boundary, Atm ) call mpp_clock_end(newClockj) @@ -1272,7 +1276,6 @@ subroutine coupler_init endif !----- read date and calendar type from restart file ----- - if (file_exist('INPUT/coupler.res')) then !Balaji: currently written in binary, needs form=MPP_NATIVE call mpp_open( unit, 'INPUT/coupler.res', action=MPP_RDONLY ) @@ -1994,7 +1997,7 @@ subroutine coupler_init lat1=SMB_n%lat_south*atan(1.0)/45.0 lat2=SMB_n%lat_north*atan(1.0)/45.0 do j=js,je ; do i=is,ie - if (lat1