Global Index (short | long) | Local contents | Local Index (short | long)
This script calls | |
---|---|
cd /home/disk/hayes2/dvimont/ccm/ccm3.6/run/sun/test/data filin = 'mon1.nc'; [ps, theta, airt, vt, vtheta] = getnc(filin, 'PS', 'THETA', 'AIRT', 'VT', 'VTHETA'); [u, v, uv, uu, vv] = getnc(filin, 'U', 'V', 'UV', 'UU', 'VV'); [lat, lon, lev, hyam, hybm, p0] = getll(filin); [nlev, nlat, nlon] = size(theta); ps = reshape(ps, 1, nlat*nlon); airt = reshape(airt, nlev, nlat*nlon); vt = reshape(airt, nlev, nlat*nlon); press = p0 * hyam * ones(1, nlat*nlon) + hybm * ps; th = airt .* ((ones(nlev, 1) * ps) ./ press) .^ (0.4 / 1.4); vth = vt .* ((ones(nlev, 1) * ps) ./ press) .^ (0.4 / 1.4); th = reshape(th, nlev, nlat, nlon); vth = reshape(vth, nlev, nlat, nlon); num = 11; figure(1) sp(1) gcont(squeeze(th(num,:,:)), [-10:10:500]) dc sp(2) gcont(squeeze(theta(num,:,:) - th(num,:,:)), [-.02:.001:.02]) dc th = reshape(th, nlev, nlat*nlon); vth = reshape(vth, nlev, nlat*nlon); th = atlev(th, lev, ps, hyam, hybm, p0); vth = atlev(vth, lev, ps, hyam, hybm, p0); theta = atlev(theta, lev, ps, hyam, hybm, p0); vtheta = atlev(vtheta, lev, ps, hyam, hybm, p0); uv = atlev(uv, lev, ps, hyam, hybm, p0); u = atlev(u, lev, ps, hyam, hybm, p0); v = atlev(v, lev, ps, hyam, hybm, p0); uu = atlev(uu, lev, ps, hyam, hybm, p0); vv = atlev(vv, lev, ps, hyam, hybm, p0); num = 11; th1 = squeeze(th(num,:,:)); vth1 = squeeze(vth(num,:,:)); dtr = pi/180; f = 2 * 7.292e-5 * sin(dtr * lat); thetar = squeeze(mean2(mean2(shiftdim(theta,1)))); scale = f / ((thetar(num-1) - thetar(num)) / (lev(num-1) - lev(num))); f1 = vv - v.^2 - uu + u.^2; f2 = uv - u.*v; f2 = scale