You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Many parameters are calculated by interpolating some parameter against a reference coordinate (T, P, HAGL, H) - need to implement code that could wrap interpolation for:
2-4km AGL Lapse rate. (interpolate temperatures to height AGL level and difference, divide by height difference)
700-500mb LAPSE Rate (interpolate temperatures to pressure level and difference, divide by height difference)
500mb Temperature (in C) (interpolate temperature to pressure level)
0-6km Shear, 0-1km shear (interpolate u, v to height agl, and then take vector difference relative to surface level).
Example Code for the old way: LAPSE = np.zeros((ny,nx)) T500 = np.zeros((ny,nx)) LAPSE_3km = np.zeros((ny,nx)) LAPSE_24km = np.zeros((ny,nx)) THGZ = np.zeros((ny,nx)) for i in range(0,nx): for j in range(0,ny): if(T[0,j,i]>0.0): if(P[0,j,i]>=700.): T700 = vinterp3d.dinterp3dz(T[:,j,i],P[:,j,i],700.) T500[j,i] = vinterp3d.dinterp3dz(T[:,j,i],P[:,j,i],500.) Z700 = vinterp3d.dinterp3dz(H[:,j,i],P[:,j,i],700.) Z500 = vinterp3d.dinterp3dz(H[:,j,i],P[:,j,i],500.) LAPSE[j,i]=(T700-T500[j,i])/((Z500-Z700)/1000.) T3km = vinterp3d.dinterp3dz(T[:,j,i],AGLH[:,j,i],3000.) HT30 = vinterp3d.dinterp3dz(H[:,j,i],T[:,j,i],-30.) HT10 = vinterp3d.dinterp3dz(H[:,j,i],T[:,j,i],-10.) T4km = vinterp3d.dinterp3dz(T[:,j,i],AGLH[:,j,i],4000.) T2km = vinterp3d.dinterp3dz(T[:,j,i],AGLH[:,j,i],2000.) LAPSE_3km[j,i]=(T[0,j,i]-T3km)/3. LAPSE_24km[j,i]=(T2km-T4km)/2. THGZ[j,i]=HT30-HT10
Many parameters are calculated by interpolating some parameter against a reference coordinate (T, P, HAGL, H) - need to implement code that could wrap interpolation for:
2-4km AGL Lapse rate. (interpolate temperatures to height AGL level and difference, divide by height difference)
700-500mb LAPSE Rate (interpolate temperatures to pressure level and difference, divide by height difference)
500mb Temperature (in C) (interpolate temperature to pressure level)
0-6km Shear, 0-1km shear (interpolate u, v to height agl, and then take vector difference relative to surface level).
Example Code for the old way:
LAPSE = np.zeros((ny,nx)) T500 = np.zeros((ny,nx)) LAPSE_3km = np.zeros((ny,nx)) LAPSE_24km = np.zeros((ny,nx)) THGZ = np.zeros((ny,nx)) for i in range(0,nx): for j in range(0,ny): if(T[0,j,i]>0.0): if(P[0,j,i]>=700.): T700 = vinterp3d.dinterp3dz(T[:,j,i],P[:,j,i],700.) T500[j,i] = vinterp3d.dinterp3dz(T[:,j,i],P[:,j,i],500.) Z700 = vinterp3d.dinterp3dz(H[:,j,i],P[:,j,i],700.) Z500 = vinterp3d.dinterp3dz(H[:,j,i],P[:,j,i],500.) LAPSE[j,i]=(T700-T500[j,i])/((Z500-Z700)/1000.) T3km = vinterp3d.dinterp3dz(T[:,j,i],AGLH[:,j,i],3000.) HT30 = vinterp3d.dinterp3dz(H[:,j,i],T[:,j,i],-30.) HT10 = vinterp3d.dinterp3dz(H[:,j,i],T[:,j,i],-10.) T4km = vinterp3d.dinterp3dz(T[:,j,i],AGLH[:,j,i],4000.) T2km = vinterp3d.dinterp3dz(T[:,j,i],AGLH[:,j,i],2000.) LAPSE_3km[j,i]=(T[0,j,i]-T3km)/3. LAPSE_24km[j,i]=(T2km-T4km)/2. THGZ[j,i]=HT30-HT10
S06 = np.zeros((ny,nx)) u6km = vinterp3d.dinterp3dz(U[:,:,:],AGLH[:,:,:],6000.) v6km = vinterp3d.dinterp3dz(V[:,:,:],AGLH[:,:,:],6000.) S06[:,:] = np.sqrt((u6km[:,:] - U[1,:,:])**2 + (v6km[:,:] - V[1,:,:])**2)
The text was updated successfully, but these errors were encountered: