@Test public void createCalendarByFilename() throws Exception { Calendar calendar; calendar = AtmosphericAuxdataStatic.createCalendarByFilename("N201519412_O3_AURAOMI_24h.hdf"); verifyCalendar(calendar, 194, 2015, 6, 13, 12); calendar = AtmosphericAuxdataStatic.createCalendarByFilename("N201606006_O3_AURAOMI_24h.hdf"); verifyCalendar(calendar, 60, 2016, 1, 29, 6); calendar = AtmosphericAuxdataStatic.createCalendarByFilename("N201606108_O3_AURAOMI_24h.hdf"); verifyCalendar(calendar, 61, 2016, 2, 1, 8); }
static Calendar createCalendarByFilename(String fileName) { int year = Integer.parseInt(fileName.substring(1, 5)); int doy = Integer.parseInt(fileName.substring(5, 8)); int hour = Integer.parseInt(fileName.substring(8, 10)); final Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone("UTC"), Locale.ENGLISH); calendar.set(Calendar.YEAR, year); calendar.set(Calendar.DAY_OF_YEAR, doy); calendar.set(Calendar.HOUR_OF_DAY, hour); calendar.set(Calendar.MINUTE, 0); calendar.set(Calendar.SECOND, 0); calendar.set(Calendar.MILLISECOND, 0); return calendar; }
AtmosphericAuxdataStatic implements AtmosphericAuxdata { static Calendar createCalendarByFilename(String fileName) { int year = Integer.parseInt(fileName.substring(1, 5)); int doy = Integer.parseInt(fileName.substring(5, 8)); int hour = Integer.parseInt(fileName.substring(8, 10)); final Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone("UTC"), Locale.ENGLISH); calendar.set(Calendar.YEAR, year); calendar.set(Calendar.DAY_OF_YEAR, doy); calendar.set(Calendar.HOUR_OF_DAY, hour); calendar.set(Calendar.MINUTE, 0); calendar.set(Calendar.SECOND, 0); calendar.set(Calendar.MILLISECOND, 0); return calendar; } }
AtmosphericAuxdataStatic implements AtmosphericAuxdata { static Calendar createCalendarByFilename(String fileName) { int year = Integer.parseInt(fileName.substring(1, 5)); int doy = Integer.parseInt(fileName.substring(5, 8)); int hour = Integer.parseInt(fileName.substring(8, 10)); final Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone("UTC"), Locale.ENGLISH); calendar.set(Calendar.YEAR, year); calendar.set(Calendar.DAY_OF_YEAR, doy); calendar.set(Calendar.HOUR_OF_DAY, hour); calendar.set(Calendar.MINUTE, 0); calendar.set(Calendar.SECOND, 0); calendar.set(Calendar.MILLISECOND, 0); return calendar; } AtmosphericAuxdataStatic(Product startOzone, Product endOzone,
                             String ozoneBandName, double ozoneDefault,
                             Product startPressure, Product endPressure,
                             String pressureBandName, double pressureDefault); private  AtmosphericAuxdataStatic(DataInterpolator ozoneInterpolator, DataInterpolator pressureInterpolator); }
AtmosphericAuxdataStatic implements AtmosphericAuxdata { static Calendar createCalendarByFilename(String fileName) { int year = Integer.parseInt(fileName.substring(1, 5)); int doy = Integer.parseInt(fileName.substring(5, 8)); int hour = Integer.parseInt(fileName.substring(8, 10)); final Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone("UTC"), Locale.ENGLISH); calendar.set(Calendar.YEAR, year); calendar.set(Calendar.DAY_OF_YEAR, doy); calendar.set(Calendar.HOUR_OF_DAY, hour); calendar.set(Calendar.MINUTE, 0); calendar.set(Calendar.SECOND, 0); calendar.set(Calendar.MILLISECOND, 0); return calendar; } AtmosphericAuxdataStatic(Product startOzone, Product endOzone,
                             String ozoneBandName, double ozoneDefault,
                             Product startPressure, Product endPressure,
                             String pressureBandName, double pressureDefault); private  AtmosphericAuxdataStatic(DataInterpolator ozoneInterpolator, DataInterpolator pressureInterpolator); @Override double getOzone(double mjd, int x, int y, double lat, double lon); @Override double getSurfacePressure(double mjd, int x, int y, double lat, double lon); @Override void dispose(); }
AtmosphericAuxdataStatic implements AtmosphericAuxdata { static Calendar createCalendarByFilename(String fileName) { int year = Integer.parseInt(fileName.substring(1, 5)); int doy = Integer.parseInt(fileName.substring(5, 8)); int hour = Integer.parseInt(fileName.substring(8, 10)); final Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone("UTC"), Locale.ENGLISH); calendar.set(Calendar.YEAR, year); calendar.set(Calendar.DAY_OF_YEAR, doy); calendar.set(Calendar.HOUR_OF_DAY, hour); calendar.set(Calendar.MINUTE, 0); calendar.set(Calendar.SECOND, 0); calendar.set(Calendar.MILLISECOND, 0); return calendar; } AtmosphericAuxdataStatic(Product startOzone, Product endOzone,
                             String ozoneBandName, double ozoneDefault,
                             Product startPressure, Product endPressure,
                             String pressureBandName, double pressureDefault); private  AtmosphericAuxdataStatic(DataInterpolator ozoneInterpolator, DataInterpolator pressureInterpolator); @Override double getOzone(double mjd, int x, int y, double lat, double lon); @Override double getSurfacePressure(double mjd, int x, int y, double lat, double lon); @Override void dispose();  }