Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The problem is that <code>UOGRD</code> (and probably <code>VOGRD</code> too) contains too many dimensions. You need to reduce the number of dimensions by slicing it. However, given the current information, I cannot instruct you which dimension to remove. </p> <p>However, you should convert the <code>lat</code>, <code>lon</code>, <code>UOGRD</code> and <code>VOGRD</code> to <code>np.array</code> using the command and print out each array's shape</p> <pre><code>UOGRD = np.array(UOGRD) print UOGRD.shape </code></pre> <p>Do this for all 4 of your arrays. This will print out tuples <code>(d1_length, d2_length, ..., dn_length)</code>. </p> <p>If we know the dimensionality of <code>lat=N</code> and <code>lon=M</code>, we should hope that the dimensions of <code>UOGRD</code> will be something like <code>(N, M, x, y, z)</code> and we can slice out the dimensions we don't need. </p> <p><strong>EDIT:</strong></p> <p>From the shape functions in your, it shows us that <code>uin</code> and <code>vin</code> are both 3 dimensional. And you can see that <code>len(lat) = 321</code>, <code>len(lon) = 720</code> and both <code>uin</code> and <code>vin</code> have dimensions <code>(x, 321, 720)</code>. That means we want to plot the last two dimensions of <code>uin</code> and <code>vin</code>. Therefore, try this</p> <pre><code>uin = nc.variables['UOGRD_GDSO_DBSL'] uin = np.array(uin) uin = uin[0, :, :] vin = nc.variables['vOGRD_GDSO_DBSL'] vin = np.array(vin) vin = vin[0, :, :] </code></pre> <p>Do not do <code>uin = uin.shape</code> as that will set <code>uin = (4, 321, 720)</code> instead of your data. The only thing is, we have to figure out is which index we should put in the slicing. Try <code>[0,:,:]</code> then <code>[1,:,:]</code> ... <code>[3,:,:]</code>. </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload