Class BadNetCDFWidget

java.lang.Object
edu.wisc.ssec.mcidasv.data.BadNetCDFWidget
All Implemented Interfaces:
Constants, IdvConstants

public class BadNetCDFWidget extends Object implements Constants
GUI widget that allows users to attempt to specify an "NCML" if a given NetCDF is not CF-compliant.
  • Field Details

  • Constructor Details

    • BadNetCDFWidget

      Handles problems from openDataset.
      Parameters:
      ncFile - NetCDF that caused a problem. Cannot be null.
      idv - Reference to the IDV. Cannot be null.
    • BadNetCDFWidget

      public BadNetCDFWidget(String filepath) throws IOException
      Passes through any exception from openDataset - this function doesn't provide an IDV and should only be used for testing. (Some functionality using the rest of the IDV won't work.)
      Parameters:
      filepath - Path to a NetCDF file.
      Throws:
      IOException - if there was a problem.
  • Method Details

    • showChoices

      public void showChoices()
      Displays our "main menu" of choices to fix the given file. Everything else needed can get called from here.
    • showNcMLEditor

      private void showNcMLEditor()
      Creates an editor for NcML and displays it in a window. This includes buttons for saving just the NcML and the full NetCDF file with the changes made.
    • createIDVdisplay

      private void createIDVdisplay()
      Takes our ncFile and puts it back into IDV (McV).
    • showVarPicker

      private void showVarPicker()
      Shows a window that gives a choice of variables.
    • reshape

      private static float[][] reshape(float[] arr, int m, int n)
      Reshape a 1D float array into a 2D float array.
      Parameters:
      arr - Array to reshape.
      m - First dimension.
      n - Second dimension.
      Returns:
      arr reshaped into a new 2D array.
    • showNavChooser

      private void showNavChooser()
      Shows a window that gives the opportunity to either define coordinate variables or specify corner points. Borrowed heavily from FlatFileChooser's makeNavigationPanel for style.
    • checkSetLatLon

      private void checkSetLatLon()
      Enable or disable widgets for navigation.
    • main

      public static void main(String... args)
      Tester function to pick a file and send it through the paces.
      Parameters:
      args - Incoming arguments.