[Dart-dev] [3711] DART/trunk/models/wrf/model_mod.f90: An old bug fix from greg lawson .

nancy at ucar.edu nancy at ucar.edu
Fri Dec 12 15:18:38 MST 2008


An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/dart-dev/attachments/20081212/9f8a6255/attachment.html
-------------- next part --------------
Modified: DART/trunk/models/wrf/model_mod.f90
===================================================================
--- DART/trunk/models/wrf/model_mod.f90	2008-12-12 22:13:52 UTC (rev 3710)
+++ DART/trunk/models/wrf/model_mod.f90	2008-12-12 22:18:37 UTC (rev 3711)
@@ -4372,7 +4372,8 @@
               'nc_write_model_vars','put_var '//trim(varname))
    endif
 
-   deallocate(temp3d)
+   ! if n_moist == 0, this was never allocated.
+   if (allocated(temp3d)) deallocate(temp3d)
 
    if ( wrf%dom(id)%n_moist > 7 ) then
       write(*,'(''wrf%dom(id)%n_moist = '',i3)')wrf%dom(id)%n_moist


More information about the Dart-dev mailing list