37 SUBROUTINE mpi_first()
40 use vrbls4d, only: dust, salt, soot, waso, suso, pp25, pp10
41 use vrbls3d, only: u, v, t, q, uh, vh, wh, pmid, pmidv, pint, alpint, zmid, &
42 zint, q2, omga, t_adj, ttnd, rswtt, rlwtt, exch_h, train, tcucn, &
43 el_pbl, cwm, f_ice, f_rain, f_rimef, qqw, qqi, qqr, qqs,qqg, qqni, qqnr, &
44 extcof55, cfr, dbz, dbzr, dbzi, dbzc, mcvg, nlice, nrain, o3, vdifftt, &
45 tcucns, vdiffmois, dconvmois, sconvmois, nradtt, o3vdiff, o3prod, &
46 o3tndy, mwpv, unknown, vdiffzacce, zgdrag, cnvctummixing, vdiffmacce, &
47 mgdrag, cnvctvmmixing, ncnvctcfrac, cnvctumflx, cnvctdmflx, cnvctdetmflx,&
48 cnvctzgdrag, cnvctmgdrag, icing_gfip, asy, ssa, duem, dusd, dudp, &
49 duwt, suem, susd, sudp, suwt, ocem, ocsd, ocdp, ocwt, bcem, bcsd, &
50 bcdp, bcwt, ssem, sssd, ssdp, sswt, ext, dpres, rhomid
51 use vrbls2d, only: wspd10max, w_up_max, w_dn_max, w_mean, refd_max, up_heli_max, &
52 prate_max, fprate_max, swupt, &
53 up_heli_max16, grpl_max, up_heli, up_heli16, ltg1_max, ltg2_max, &
54 up_heli_min, up_heli_min16, up_heli_max02, up_heli_min02, up_heli_max03, &
55 up_heli_min03, rel_vort_max, rel_vort_max01, wspd10umax, wspd10vmax, &
56 refdm10c_max, hail_max2d, hail_maxk1, ltg3_max,rel_vort_maxhy1, &
57 nci_ltg, nca_ltg, nci_wq, nca_wq, nci_refd, &
58 u10, v10, tshltr, qshltr, mrshltr, smstav, ssroff, bgroff, &
59 nca_refd, vegfrc, acsnow, acsnom, cmc, sst, qz0, thz0, uz0, vz0, qs, ths,&
60 sno, snonc, snoavg, psfcavg, t10m, t10avg, akmsavg, akhsavg, u10max, &
61 v10max, u10h, v10h, akms, akhs, cuprec, acprec, ancprc, cuppt, &
62 rainc_bucket, rainnc_bucket, pcp_bucket, snow_bucket, qrmax, tmax, &
63 snownc, graupelnc, tsnow, qvg, qv2m, rswin, rlwin, rlwtoa, tg, sfcshx, &
64 fis, t500, cfracl, cfracm, cfrach, acfrst, acfrcv, hbot, potevp, &
65 sfclhx, htop, aswin, alwin, aswout, alwout, aswtoa, alwtoa, czen, czmean,&
66 sigt4, rswout, radot, ncfrst, ncfrcv, smstot, pctsno, pshltr, th10, &
67 q10, sr, prec, subshx, snopcx, sfcuvx, sfcevp, z0, ustar, pblh, mixht, &
68 twbs, qwbs, sfcexc, grnflx, soiltb, z1000, slp, pslp, f, albedo, albase, &
69 cldfra, cprate, cnvcfr, ivgtyp, hbotd, htopd, hbots, isltyp, htops, &
70 cldefi, islope, si, lspa, rswinc, vis, pd, mxsnal, epsr, sfcux, &
71 sfcvx, sfcuxi, sfcvxi, avgalbedo, avgcprate, avgprec, ptop, pbot, avgcfrach, avgcfracm, &
72 avgcfracl, avgtcdc, auvbin, auvbinc, ptopl, pbotl, ttopl, ptopm, &
73 pbotm, ttopm, ptoph, pboth, ttoph, sfcugs, sfcvgs, pblcfr, cldwork, &
74 gtaux, gtauy, mdltaux, mdltauy, runoff, maxtshltr, mintshltr, &
75 maxrhshltr, minrhshltr, dzice, alwinc, alwoutc, alwtoac, aswinc, &
76 aswoutc,aswtoac, aswintoa, smcwlt, suntime, fieldcapa, avisbeamswin, &
77 avisdiffswin, airbeamswin, airdiffswin, snowfall, dusmass, ducmass, &
78 dusmass25, susmass, sucmass, susmass25, sucmass25, ocsmass, occmass, &
79 ocsmass25, occmass25, bcsmass, bccmass, bcsmass25, bccmass25, &
80 sssmass, sscmass, sssmass25, sscmass25, ducmass25, &
81 dustcb, sscb, bccb, occb, sulfcb, dustallcb, ssallcb,dustpm,sspm, pp25cb,&
82 dustpm10, pp10cb, maod, ti
83 use soil, only: smc, stc, sh2o, sldpth, rtdpth, sllevel
84 use masks, only: htm, vtm, hbm2, sm, sice, lmh, gdlat, gdlon, dx, dy, lmv
85 use ctlblk_mod
, only: me, num_procs, jm, jsta, jend, jsta_m, jsta_m2, &
86 jend_m, jend_m2, iup, idn, icnt, im, idsp, jsta_2l, jend_2u, &
87 jvend_2u, lm, lp1, jsta_2l, jend_2u, nsoil, nbin_du, nbin_ss, &
88 nbin_bc, nbin_oc, nbin_su
97 integer ierr,i,jsx,jex
103 if ( num_procs > 1024 )
then
104 print *,
' too many MPI tasks, max is 1024, stopping'
105 call mpi_abort(mpi_comm_world,1,ierr)
111 if ( num_procs > jm/2 )
then
112 print *,
' too many MPI tasks, max is ',jm/2,
' stopping'
113 call mpi_abort(mpi_comm_world,1,ierr)
119 call para_range(1,jm,num_procs,me,jsta,jend)
128 if ( me == num_procs - 1 )
then
140 if ( me == num_procs - 1 )
then
151 do i = 0, num_procs - 1
152 call para_range(1,jm,num_procs,i,jsx,jex)
153 icnt(i) = (jex-jsx+1)*im
156 print *,
' i, icnt(i),idsp(i) = ',i,icnt(i), &
163 jsta_2l = max(jsta - 2, 1 )
164 jend_2u = min(jend + 2, jm )
166 jvend_2u = min(jend + 2, jm+1 )
175 print *,
' me, jsta_2l, jend_2u = ',me,jsta_2l, jend_2u, &
176 'jvend_2u=',jvend_2u,
'im=',im,
'jm=',jm,
'lm=',lm, &