[Dart-dev] DART/branches Revision: 12248

dart at ucar.edu dart at ucar.edu
Thu Dec 28 17:00:09 MST 2017


thoar at ucar.edu
2017-12-28 17:00:08 -0700 (Thu, 28 Dec 2017)
783
Configuration that is testing on cheyenne.
Trying to assimilate the test observation sequence file from Sergey that
has 200k observations in it - starting with just a subset.
Changed navdas_innov_mod.f90 to leave original observation times untouched
but can subset based on the obs_window around the CDTG - which is
always available to the module. Do not have to subset.

Only testing the U,V observations - then moving to T, psurf, etc.

May have put un-needed associated() calls around pointer deallocations -
should back them out and try again now that other things have been fixed.

The coamps_intrinsic_mod.f90 has a routine to calculate surface pressure
that looks like it is playing games with 1D vs 2D fortran indexing.
Don't understand how it could possibly work if n /= 1




Modified: DART/branches/coamps/models/coamps_nest/coamps_interp_mod.f90
===================================================================
--- DART/branches/coamps/models/coamps_nest/coamps_interp_mod.f90	2017-12-27 21:50:35 UTC (rev 12247)
+++ DART/branches/coamps/models/coamps_nest/coamps_interp_mod.f90	2017-12-29 00:00:08 UTC (rev 12248)
@@ -47,7 +47,8 @@
   
     use location_mod,         only : location_type,    &
                                      query_location,   &
-                                     is_vertical
+                                     is_vertical,      &
+                                     write_location
     use obs_kind_mod
 
     use types_mod,            only : MISSING_I,        &
@@ -67,7 +68,6 @@
     use distributed_state_mod, only : get_state
   
     implicit none
-  
     private
   
     !------------------------------
@@ -345,6 +345,9 @@
 
           if( .not. is_success) then
 
+!            call write_location(0,obs_loc,charstring=message)
+!            print*,'TJH obs_kind is ',obs_kind,' ',trim(message)
+
              call get_target_var(interpolator, obs_kind)
              call get_coordinate_vars(interpolator)
 
@@ -619,18 +622,27 @@
         character(len=*), parameter :: routine = 'deallocate_raw_values'
         integer                     :: dealloc_status
 
-        deallocate(interpolator%target_values, stat=dealloc_status)
-        call check_dealloc_status(dealloc_status, routine, source, revision, &
+ 
+        if (associated(interpolator%target_values)) then
+            deallocate(interpolator%target_values, stat=dealloc_status)
+            call check_dealloc_status(dealloc_status, routine, source, revision, &
                                 revdate, 'target_values')
-        deallocate(interpolator%vcoord_values, stat=dealloc_status)
-        call check_dealloc_status(dealloc_status, routine, source, revision, &
+        endif
+
+        if (associated(interpolator%vcoord_values)) then
+            deallocate(interpolator%vcoord_values, stat=dealloc_status)
+            call check_dealloc_status(dealloc_status, routine, source, revision, &
                                 revdate, 'vcoord_values')
+        endif
 
         ! After the vertical interpolation to a single level we will have one
         ! value for each neighboring point
-        deallocate(interpolator%vinterp_values, stat=dealloc_status)
-        call check_dealloc_status(dealloc_status, routine, source, revision, &
+     
+        if (associated(interpolator%vinterp_values)) then
+            deallocate(interpolator%vinterp_values, stat=dealloc_status)
+            call check_dealloc_status(dealloc_status, routine, source, revision, &
                                 revdate, 'vinterp_values')
+        endif
 
     end subroutine deallocate_raw_values
 
@@ -638,8 +650,10 @@
     ! ---------------------------
     ! Clean up the dynamic storage for the target variable and vertical
     ! coordinate variable - need to do this after each call to the
-    ! interpolation driver since these will potentially change every
-    ! time
+    ! interpolation driver since these will potentially change every time
+
+    !>@todo when running in an mpi environment - should only one task do this?
+
     subroutine deallocate_available_values(interpolator)
         type(coamps_interpolator), intent(inout) :: interpolator
 
@@ -646,13 +660,17 @@
         character(len=*), parameter :: routine = 'deallocate_available_values'
         integer :: dealloc_status
 
-        deallocate(interpolator%available_target_values, stat=dealloc_status)
-        call check_dealloc_status(dealloc_status, routine, source, revision, &
-                                  revdate, 'available_target_values')
+        if (associated(interpolator%available_target_values)) then
+            deallocate(interpolator%available_target_values, stat=dealloc_status)
+            call check_dealloc_status(dealloc_status, routine, source, revision, &
+                                     revdate, 'available_target_values')
+        endif
 
-        deallocate(interpolator%available_vcoord_values, stat=dealloc_status)
-        call check_dealloc_status(dealloc_status, routine, source, revision, &
+        if (associated(interpolator%available_vcoord_values)) then
+            deallocate(interpolator%available_vcoord_values, stat=dealloc_status)
+            call check_dealloc_status(dealloc_status, routine, source, revision, &
                                   revdate, 'available_vcoord_values')
+        endif
 
     end subroutine deallocate_available_values


More information about the Dart-dev mailing list