<p><b>dwj07@fsu.edu</b> 2012-10-24 11:07:59 -0600 (Wed, 24 Oct 2012)</p><p><br>
        -- TRUNK COMMIT --<br>
<br>
        Fixing issues where the model dies due to undefined input variables and/or dimensions.<br>
<br>
        The framework should not hinder a run with an input file that has missing<br>
        dimensions or varaibles.<br>
        The core should be responsible for this, because some variables are not<br>
        used by the core and then it doesn't matter if they are defined or not.<br>
</p><hr noshade><pre><font color="gray">Modified: trunk/mpas/src/framework/mpas_dmpar.F
===================================================================
--- trunk/mpas/src/framework/mpas_dmpar.F        2012-10-24 14:59:47 UTC (rev 2263)
+++ trunk/mpas/src/framework/mpas_dmpar.F        2012-10-24 17:07:59 UTC (rev 2264)
@@ -2827,6 +2827,12 @@
logical :: comm_list_found
+ do i = 1, 1
+ if(field % dimSizes(i) <= 0) then
+ return
+ end if
+ end do
+
dminfo => field % block % domain % dminfo
if(present(haloLayersIn)) then
@@ -3101,6 +3107,12 @@
logical :: comm_list_found
+ do i = 1, 2
+ if(field % dimSizes(i) <= 0) then
+ return
+ end if
+ end do
+
dminfo => field % block % domain % dminfo
if(present(haloLayersIn)) then
@@ -3376,6 +3388,12 @@
logical :: comm_list_found
+ do i = 1, 3
+ if(field % dimSizes(i) <= 0) then
+ return
+ end if
+ end do
+
dminfo => field % block % domain % dminfo
if(present(haloLayersIn)) then
@@ -3657,6 +3675,12 @@
logical :: comm_list_found
+ do i = 1, 1
+ if(field % dimSizes(i) <= 0) then
+ return
+ end if
+ end do
+
dminfo => field % block % domain % dminfo
if(present(haloLayersIn)) then
@@ -3928,7 +3952,13 @@
integer, dimension(:), pointer :: haloLayers
logical :: comm_list_found
-
+
+ do i = 1, 2
+ if(field % dimSizes(i) <= 0) then
+ return
+ end if
+ end do
+
dminfo => field % block % domain % dminfo
if(present(haloLayersIn)) then
@@ -4206,6 +4236,12 @@
logical :: comm_list_found
+ do i = 1, 3
+ if(field % dimSizes(i) <= 0) then
+ return
+ end if
+ end do
+
dminfo => field % block % domain % dminfo
if(present(haloLayersIn)) then
Modified: trunk/mpas/src/framework/mpas_io.F
===================================================================
--- trunk/mpas/src/framework/mpas_io.F        2012-10-24 14:59:47 UTC (rev 2263)
+++ trunk/mpas/src/framework/mpas_io.F        2012-10-24 17:07:59 UTC (rev 2264)
@@ -366,6 +366,7 @@
if (present(ierr)) ierr = MPAS_IO_ERR_PIO
deallocate(new_dimlist_node % dimhandle)
deallocate(new_dimlist_node)
+ write(0,*) 'WARNING: Dimension ', trim(dimname), ' not in input file.'
dimsize = -1
return
end if
@@ -551,6 +552,7 @@
if (present(ierr)) ierr = MPAS_IO_ERR_PIO
deallocate(new_fieldlist_node % fieldhandle)
deallocate(new_fieldlist_node)
+ write(0,*) 'WARNING: Variable ', trim(fieldname), ' not in input file.'
return
end if
!write(0,*) 'Inquired about variable ID', new_fieldlist_node % fieldhandle % fieldid
</font>
</pre>