! subroutine minor(tn,o2,ox,n2,he,w,difkk,fin,fnm,fhd,flbc,fubc, | sloss,sprod,small,rmass,phix,alfax,xy,ilbc,iubc,fout,fout_nm, | lev0,lev1,lon0,lon1,lat0,lat1,idebug) ! ! Advances minor species by one time step. ! ! Lower boundary: ! If ilbc == 0, then ! flbc(1) = A, flbc(2) = B, flbc(3) = C, where A*DPSX/DZ + B*PSX + C = 0. ! If ilbc == 1, (not the normal case) ! flbc(3) = total upward number flux of F at lower boundary. ! ! Upper boundary: ! If iubc == 0, then ! fubc = diffusive upward number flux of F at upper boundary. ! If iubc == 1, then ! fubc = total upward number flux of F at upper boundary. ! If iubc == 2, then ! fubc = value of PSX at upper boundary. ! ! Sources: ! sloss = Sx/n(x), where sx is portion of number density ! source proportional to n(x), the minor species number ! density (level k+1/2) ! sprod = Portion of number density source independent ! of n(x). (level k+1/2) ! use params_module,only: nlonp4,dz use lbc,only: b,fb use cons_module,only: rmassinv_o2,rmassinv_ox,rmassinv_n2,p0, | expz,expzmid,expzmid_inv,boltz,rmass_o2,rmass_ox,rmass_n2, | dtx2inv,grav,avo,dtsmooth,dtsmooth_div2,shapiro,rmassinv_he use input_module,only: difhor use fields_module,only: tlbc use addfld_module,only: addfld #ifdef MPI use mpi_module,only: mp_bndlons_f3d, mp_periodic_f3d #endif implicit none ! ! Input Args: integer,intent(in) :: lev0,lev1,lon0,lon1,lat0,lat1,iubc,ilbc, | idebug real,dimension(lev0:lev1,lon0-2:lon1+2,lat0-2:lat1+2),intent(in):: | tn,o2,ox,n2,he,w,difkk,fin,fnm,fhd real,dimension(lev0:lev1,lon0:lon1,lat0:lat1),intent(in):: | sloss, ! portion of number density source proportional to minor sp s1,s14 | sprod ! portion of number density source independent of minor sp s2,s15 real,dimension(lon0:lon1),intent(in) :: | flbc(lon0:lon1,3,lat0:lat1), ! 3 components of lower boundary | fubc(lon0:lon1,lat0:lat1) ! upper boundary real,intent(in) :: rmass,phix(3),alfax,small(lev1-lev0+1),xy ! ! Output Args: real,dimension(lev0:lev1,lon0-2:lon1+2,lat0-2:lat1+2), | intent(out) :: fout,fout_nm