[Dart-dev] DART/branches Revision: 12208

dart at ucar.edu dart at ucar.edu
Fri Dec 15 16:02:10 MST 2017


hendric at ucar.edu
2017-12-15 16:02:10 -0700 (Fri, 15 Dec 2017)
125
reverting build_heights which computes the geopotential 
height column.  Added some comments to try to make things
clearer.




Modified: DART/branches/recam/models/cam-fv/model_mod.f90
===================================================================
--- DART/branches/recam/models/cam-fv/model_mod.f90	2017-12-15 22:15:25 UTC (rev 12207)
+++ DART/branches/recam/models/cam-fv/model_mod.f90	2017-12-15 23:02:10 UTC (rev 12208)
@@ -31,8 +31,9 @@
                                   file_exist, to_upper, E_ERR, E_MSG
 use          obs_kind_mod, only : QTY_SURFACE_ELEVATION, QTY_PRESSURE, &
                                   QTY_GEOMETRIC_HEIGHT, QTY_VERTLEVEL, &
-                                  QTY_SURFACE_PRESSURE, &
+                                  QTY_SURFACE_PRESSURE, QTY_PRECIPITABLE_WATER, &
                                   QTY_TEMPERATURE, QTY_SPECIFIC_HUMIDITY, &
+                                  QTY_GEOPOTENTIAL_HEIGHT,  &
                                   get_index_for_quantity, get_num_quantities
 use     mpi_utilities_mod,  only : my_task_id
 use        random_seq_mod,  only : random_seq_type, init_random_seq, random_gaussian
@@ -502,9 +503,10 @@
 
 integer(i8) :: state_indx
 integer  :: i, j
-real(r8) :: temp_vals(ens_size)
+real(r8) :: temp_vals(ens_size) 
 logical  :: member_done(ens_size)
 
+
 ! as we get the values for each ensemble member, we set the 'done' flag
 ! and a good return code. 
 my_status(:) = 16
@@ -528,17 +530,24 @@
       return
    endif
 
+   !print*, 'state_indx ', state_indx
    temp_vals(:) = get_state(state_indx, ens_handle)    ! all the ensemble members for level (i)
- 
+   ! if (lev_index(1) /= lev_index(2) .and. all(temp_vals > 0.00000001)) then
+   ! endif
+
    ! start at i, because my ensemble member is clearly at this level.
    ! then continue on to see if any other members are also at this level.
    do j=i, ens_size
       if (member_done(j)) cycle
-
+         print*, 'lev_index(1) ', i, lev_index(i)
+         print*, 'lev_index(2) ', j, lev_index(j)
+         print*, 'tem_values(:)', temp_vals(j)
+      
       if (lev_index(j) == lev_index(i)) then
          vals(j) = temp_vals(j)
          member_done(j) = .true.
          my_status(j) = 0
+         print*, 'tem_values(:)', temp_vals(j)
       endif
       
    enddo
@@ -721,6 +730,15 @@
       !>values for members that could compute them
       !>(this is true for all the subsequent returns from this routine)
 
+      !if (any(four_bot_levs(:, 1) /= four_bot_levs(:, 2))) then
+      !   print*, 'four_bot_levs(:, 1)', four_bot_levs(:, 1)
+      !   print*, 'four_bot_levs(:, 2)', four_bot_levs(:, 2)
+      !endif
+      !
+      !if (any(four_bot_levs(:, 1) /= four_bot_levs(:, 2))) then
+      !   print*, 'four_top_levs(:, 1)', four_top_levs(:, 1)
+      !   print*, 'four_top_levs(:, 2)', four_top_levs(:, 2)
+      !endif
       if (any(status_array /= 0)) then
          istatus(:) = 4   ! cannot locate enclosing vertical levels  !>@todo FIXME use where statements?
          return
@@ -732,9 +750,11 @@
       !
       ! level 1 is top, so test that the level numbers are *smaller* than the limit.
       ! (meaning the obs is above the given limit in at least one ensemble member)
+      !print*, 'levs', four_bot_levs(icorner,:), no_assim_above_this_model_level
 
       if (no_assim_above_this_model_level > 0) then
          if (any(four_bot_levs(icorner,:) <= no_assim_above_this_model_level)) then
+            print*, 'istatus is 14'
             istatus(:) = 14
             return
          endif
@@ -760,6 +780,24 @@
 
    endif
 
+      ! if we are avoiding assimilating obs above a given level, test here and return
+      ! if any of the bottom corners are above the limit (meaning the obs is at least
+      ! in the layer above the given cutoff.)
+      !
+      ! level 1 is top, so test that the level numbers are *smaller* than the limit.
+      ! (meaning the obs is above the given limit in at least one ensemble member)
+   do icorner=1, 4
+      !print*, 'levs', four_bot_levs(icorner,:), no_assim_above_this_model_level
+
+      if (no_assim_above_this_model_level > 0) then
+         if (any(four_bot_levs(icorner,:) <= no_assim_above_this_model_level)) then
+            print*, 'istatus is 15'
+            istatus(:) = 15
+            return
+         endif


More information about the Dart-dev mailing list