19,20c19,20 < use lbc,only: t_lbc,nudge,nudge_nlev, < | t_zm ! (lon0:lon1,lat0:lat1,nudge_nlev) --- > ! use bndry_module,only: tb,tb2,bnd,bnd2,ci,lbc_gswm_dt > use lbc,only: t_lbc 26,27d25 < < 38c36 < ! | tn, ! neutral temperature (deg K) --- > | tn, ! neutral temperature (deg K) 57,60d54 < ! tn is intent(inout) so it can be nudged at the beginning: < real,dimension(lev0:lev1,lon0-2:lon1+2,lat0-2:lat1+2), < | intent(inout):: < | tn ! neutral temperature (deg K) 85c79 < | tnlbc_diag ! tnlbc_diag is redundant in vertical --- > | tnlbc_diag ! tnlbc redundant in vertical 99,137d92 < ! Nudge with CTMT tides and zm MSIS00/TIDI w t_zmctmt(nlonp4,nlat,nlev-defined ctmt_nlev) < ! ctmt_nudge==1.0 at k==1, decreasing upward to 0 at k==ctmt_nlev. < ! When nudge is 1, then we use 100% CTMT, and when nudge is 0, then < ! we use 100% tiegcm. Bottom boundary is already 100% CTMT, so < ! we start at k==2. < ! Note ctmt_nlev is namelist input. If it is 1, then tn will get < ! 100% CTMT lb (see lbc.F), but no nudging above the lb, because < ! the below loop will not execute. < ! < ! if (len_trim(ctmt_di_ncfile) > 0) then < ! if (ctmt_nlev > 1) then < ! call addfld('t_prenudge',' ',' ',tn(:,lon0:lon1,lat), < ! | 'lev',lev0,lev1,'lon',lon0,lon1,lat) < ! Normal nudging with t_zmctmt: < ! do k=2,ctmt_nlev < ! do i=lon0,lon1 < ! tn(k,i,lat) = tn(k,i,lat)*(1.-ctmt_nudge(k))+ < ! | t_zmctmt(i,lat,k)*ctmt_nudge(k) < ! enddo < ! write(6,"('dt nudging tn with ctmt: lat=',i3,' k=',i3, < ! | ' nudge(k)=',f15.5)") lat,k,ctmt_nudge(k) < ! enddo < ! endif ! if (ctmt_nlev > 0) then < ! endif ! end CTMT < < if (nudge_nlev > 1) then < call addfld('t_prenudge',' ',' ',tn(:,lon0:lon1,lat), < | 'lev',lev0,lev1,'lon',lon0,lon1,lat) < ! Normal nudging with t_zm: < do k=2,nudge_nlev < do i=lon0,lon1 < tn(k,i,lat) = tn(k,i,lat)*(1.-nudge(k))+ < | t_zm(i,lat,k)*nudge(k) < enddo < ! write(6,"('dt nudging tn: lat=',i3,' k=',i3, < ! | ' nudge(k)=',f15.5)") lat,k,nudge(k) < enddo < endif ! if (nudge_nlev > 1) then < ! 152,153c107,108 < ! call addfld('HADVECTN',' ',' ',advec_tn(lev0:lev1-1,:,lat), < ! | 'lev',lev0,lev1-1,'lon',lon0,lon1,lat) --- > call addfld('HADVECTN',' ',' ',advec_tn(lev0:lev1-1,:,lat), > | 'lev',lev0,lev1-1,'lon',lon0,lon1,lat) 159,160c114,115 < ! call addfld('ADVEC_TN',' ',' ',advec_tn(lev0:lev1-1,:,lat), < ! | 'lev',lev0,lev1-1,'lon',lon0,lon1,lat) --- > call addfld('ADVEC_TN',' ',' ',advec_tn(lev0:lev1-1,:,lat), > | 'lev',lev0,lev1-1,'lon',lon0,lon1,lat) 193,194c148,149 < ! call addfld('CP' ,' ',' ',cp(:,lon0:lon1,lat), < ! | 'lev',lev0,lev1,'lon',lon0,lon1,lat) --- > ! call addfld('CP' ,' ',' ',cp(:,lon0:lon1,lat), > ! | 'lev',lev0,lev1,'lon',lon0,lon1,lat) 201,202c156,157 < ! call addfld('MBAR' ,' ',' ',mbar(lev0:lev1-1,:), < ! | 'lev',lev0,lev1-1,'lon',lon0,lon1,lat) --- > call addfld('MBAR' ,' ',' ',mbar(lev0:lev1-1,:), > | 'lev',lev0,lev1-1,'lon',lon0,lon1,lat) 225,226c180,181 < ! call addfld('HEATING1',' ',' ',total_heat(lev0:lev1-1,:), < ! | 'lev',lev0,lev1-1,'lon',lon0,lon1,lat) --- > call addfld('HEATING1',' ',' ',total_heat(lev0:lev1-1,:), > | 'lev',lev0,lev1-1,'lon',lon0,lon1,lat) 264,267c219,222 < ! call addfld('QM' ,' ',' ',qm(lev0:lev1-1,:), < ! | 'lev',lev0,lev1-1,'lon',lon0,lon1,lat) < ! call addfld('HEATING2',' ',' ',total_heat(lev0:lev1-1,:), < ! | 'lev',lev0,lev1-1,'lon',lon0,lon1,lat) --- > call addfld('QM' ,' ',' ',qm(lev0:lev1-1,:), > | 'lev',lev0,lev1-1,'lon',lon0,lon1,lat) > call addfld('HEATING2',' ',' ',total_heat(lev0:lev1-1,:), > | 'lev',lev0,lev1-1,'lon',lon0,lon1,lat) 307,312c262,267 < ! call addfld('DEN','Neutral Density','g/cm3',rho, < ! | 'ilev',lev0,lev1,'lon',lon0,lon1,lat) < ! call addfld('G' ,' ',' ',g(lev0:lev1-1,:), < ! | 'lev',lev0,lev1-1,'lon',lon0,lon1,lat) < ! call addfld('F' ,' ',' ',f(lev0:lev1-1,:), < ! | 'lev',lev0,lev1-1,'lon',lon0,lon1,lat) --- > ! call addfld('DEN','Neutral Density','g/cm3',rho, > ! | 'ilev',lev0,lev1,'lon',lon0,lon1,lat) > call addfld('G' ,' ',' ',g(lev0:lev1-1,:), > | 'lev',lev0,lev1-1,'lon',lon0,lon1,lat) > call addfld('F' ,' ',' ',f(lev0:lev1-1,:), > | 'lev',lev0,lev1-1,'lon',lon0,lon1,lat) 341,344c296,299 < ! call addfld('COOL_IMP',' ',' ',cool_imp(:,lon0:lon1,lat), < ! | 'lev',lev0,lev1,'lon',lon0,lon1,lat) < ! call addfld('COOL_EXP',' ',' ',cool_exp(:,lon0:lon1,lat), < ! | 'lev',lev0,lev1,'lon',lon0,lon1,lat) --- > call addfld('COOL_IMP',' ',' ',cool_imp(:,lon0:lon1,lat), > | 'lev',lev0,lev1,'lon',lon0,lon1,lat) > call addfld('COOL_EXP',' ',' ',cool_exp(:,lon0:lon1,lat), > | 'lev',lev0,lev1,'lon',lon0,lon1,lat)