<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>I'm trying to do something which I think should be relatively
      simple, but I think my lack of understanding of gridded files is
      causing me problems.</p>
    <p>I'd like to take the NetCDF output file from a WRF run and just
      pull out the variables I need, so that I have a smaller version of
      the file that I can work with. I'm giving it to somebody to load
      into IDV and they need to be able to aggregate times. I would like
      to be able to plot horizontal and vertical velocity at different
      levels in the model, and keep the time information so that I can
      see the evolution. My program runs, but IDV tells me that there is
      "No gridded data" found in my output file.  <br>
    </p>
    <p>My question is what do I need to do to make this a gridded data
      file?</p>
    <p>Here is some example code, I used unstagger because I thought
      that might be my problem, but unstaggering didn't seem to help.</p>
    <p>Thanks,</p>
    <p>Jim</p>
    <p><br>
    </p>
    <p>begin<br>
      ;<br>
      <br>
      ;***************************************************<br>
      ; Open full NetCDF file and get variable names<br>
      ;***************************************************<br>
      <br>
       nc_in = addfile("wrfout_d02_2018-07-22_06:00:00.nc","r")<br>
      <br>
      <br>
      ;***************************************************<br>
      ; Open output netcdf file. Remove first just in case.<br>
      ;***************************************************<br>
         nc_out_fname = "testout.nc"<br>
         system("rm -f " + nc_out_fname) ; remove any pre-existing file
      <br>
         ncdf_out = addfile(nc_out_fname,"c")   <br>
      <br>
      <br>
      ;***************************************************<br>
      ; Specify desired  variables <br>
      ;***************************************************<br>
      <br>
      lat = nc_in->XLAT<br>
      lon = nc_in->XLONG<br>
      znu = nc_in->ZNU<br>
      u = nc_in->U<br>
      v = nc_in->V<br>
      w = nc_in->W<br>
       ua = wrf_user_unstagger(u,u@stagger)<br>
       va = wrf_user_unstagger(v,v@stagger)<br>
       wa = wrf_user_unstagger(w,w@stagger)<br>
      <br>
      xtime = nc_in->XTIME<br>
      <br>
      <br>
      ncdf_out->LAT = lat<br>
      ncdf_out->LON = lon<br>
      ncdf_out->ZNU = znu<br>
      ncdf_out->U = ua<br>
      ncdf_out->V=va<br>
      ncdf_out->W=wa<br>
      <br>
      ncdf_out->XTIME = xtime<br>
      <br>
      end<br>
    </p>
    <div class="moz-signature">-- <br>
      <meta http-equiv="content-type" content="text/html; charset=utf-8">
      <meta charset="UTF-8">
      <title>Untitled Document</title>
      <link href="%7E/Documents/jimsignature_files/css.css"
        rel="stylesheet">
      <p style="text-decoration:none; color:#000000; font-size:13px;
        font-family: 'Roboto', sans-serif; font-weight:700 !important;">James
        D. Means, Ph.D.<br>
        <span style="font-size:10px; font-family: 'Roboto', sans-serif;">Senior
          Atmospheric & Climate Scientist</span><br>
        <span style="text-decoration:none; font-size:10px;">California
          Office</span><br>
        <span style="text-decoration:none; font-size:10px;">Tele:
          619-495-1638 | Fax: 775-636-8430</span><br>
        <span style="text-decoration:none; font-size:10px;">930 Tahoe
          Blvd., Suite 802-560<span style="text-decoration:none;"><br>
            <span style="text-decoration:none; font-size:10px;"> Incline
              Village, Nevada 89451</span><br>
            <span style="text-decoration:none; color:red;"><a
                style="color:red; font-size:10px;"
                href="mailto:jim@weatherextreme.com">jim@weatherextreme.com</a>
              | <a style="color:red; font-size:10px; "
                target"_blank"=""
                href="http://www.weatherextreme.com/vcards/James%20Means.vcf">vcard</a></span><br>
            <span style="text-decoration:none; font-size:10px;"> <a
                target="_blank" style="color:#000000;"
                href="http://www.weatherextreme.com/">www.<span
                  style="color: red;">w</span>eather<span style="color:
                  red;">e</span>xtreme.com</a></span></span></span></p>
      <a href="http://www.weatherextreme.com/"><img
          src="%7E/Documents/jimsignature_files/wx-logo.jpg" alt=""
          width="361" height="96"></a>
    </div>
  </body>
</html>