[Dart-dev] DART/branches Revision: 12491

dart at ucar.edu dart at ucar.edu
Tue Apr 3 15:12:59 MDT 2018


nancy at ucar.edu
2018-04-03 15:12:59 -0600 (Tue, 03 Apr 2018)
121
add a comment about why it's ok for now to convert
the real array into integers - but in ~20 years it
won't be anymore.




Modified: DART/branches/nsc_updates/observations/obs_converters/MADIS/convert_madis_mesonet.f90
===================================================================
--- DART/branches/nsc_updates/observations/obs_converters/MADIS/convert_madis_mesonet.f90	2018-04-03 20:58:04 UTC (rev 12490)
+++ DART/branches/nsc_updates/observations/obs_converters/MADIS/convert_madis_mesonet.f90	2018-04-03 21:12:59 UTC (rev 12491)
@@ -140,6 +140,9 @@
 if (is_variable_integer(ncid, "observationTime")) then
    call getvar_int (ncid, "observationTime", tobs           ) ! observation time as integer
 else
+   ! this is ok until 2038, at which time the number of seconds
+   ! since 1970 will overflow a 32-bit integer.  for now we're good.
+   ! (could scale it by a different and more recent reference time)
    call getvar_real(ncid, "observationTime", tobs_r         ) ! observation time as real
    tobs = nint(tobs_r)                                        ! and convert to nearest second
 endif


More information about the Dart-dev mailing list