[Dart-dev] DART/branches Revision: 12849

dart at ucar.edu dart at ucar.edu
Tue Sep 25 13:24:35 MDT 2018


nancy at ucar.edu
2018-09-25 13:24:35 -0600 (Tue, 25 Sep 2018)
234
clean up the log statements that print out values
in scale heights - always normalize those by the
reference surface pressure.  also change the wording
of the damping information to be less confusing about
what is being printed out.




Modified: DART/branches/recam/models/cam-fv/model_mod.f90
===================================================================
--- DART/branches/recam/models/cam-fv/model_mod.f90	2018-09-24 21:50:56 UTC (rev 12848)
+++ DART/branches/recam/models/cam-fv/model_mod.f90	2018-09-25 19:24:35 UTC (rev 12849)
@@ -3092,7 +3092,7 @@
                                         iloc, jloc, level_one, surface_pressure, status1)
       if (status1 /= 0) goto 200
    
-      scaleheight_val = scale_height(surface_pressure(1), pressure_array(vloc))
+      scaleheight_val = scale_height(pressure_array(vloc), surface_pressure(1), no_normalization_of_scale_heights)
 
    endif
 
@@ -3453,7 +3453,7 @@
          return
       endif
       
-      scaleheight_val = scale_height(surface_pressure_array(1), pressure_array(1))
+      scaleheight_val = scale_height(pressure_array(1),surface_pressure_array(1), no_normalization_of_scale_heights)
 
    endif
 
@@ -3507,7 +3507,7 @@
 integer :: my_status
 
 integer :: table_type
-character(len=16) :: out_fmt, pres_fmt
+character(len=16) :: out_fmt, out_fmt1, pres_fmt
 real(r8) :: no_assim_above_scaleh
 
 ! pick the better table: 
@@ -3518,19 +3518,19 @@
 ! set formatting which is easiest to read in the log.
 ! the very high top table has very small numbers that need
 ! exponential notation.
-out_fmt = '(A,F12.5,A)'
+out_fmt  = '(A,F12.5,A)'
+out_fmt1 = '(A,I5)'
 pres_fmt = out_fmt
 if (table_type == HIGH_TOP_TABLE) pres_fmt = '(A,E12.5,A)'
 
-! be consistent in our variable types.  obs could have vert w/fractional levels.
-no_assim_above_level = real(no_obs_assim_above_level, r8)
-write(string1, out_fmt) &
-   'Discarding observations higher than model level      ', no_assim_above_level
+! levels can be fractional but the namelist only allows integer, so simplify the formatting
+write(string1, out_fmt1) &
+   'Discarding observations higher than model level ', no_obs_assim_above_level
 call error_handler(E_MSG, 'init_discard_high_obs', string1, source, revision, revdate)
 
 no_assim_above_pressure = single_pressure_value(ref_surface_pressure, no_obs_assim_above_level)
 write(string1, pres_fmt) &
-   'Discarding observations higher than pressure level ', no_assim_above_pressure, ' Pascals' 
+   ' ... which is equivalent to pressure level ', no_assim_above_pressure, ' Pascals' 
 call error_handler(E_MSG, 'init_discard_high_obs', string1, source, revision, revdate)
 
 no_assim_above_height = generic_pressure_to_height(no_assim_above_pressure, my_status)
@@ -3540,12 +3540,13 @@
 endif
  
 write(string1, out_fmt) &
-   'Discarding observations higher than               ', no_assim_above_height, ' meters' 
+   ' ... which is equivalent to height         ', no_assim_above_height, ' meters' 
 call error_handler(E_MSG, 'init_discard_high_obs', string1, source, revision, revdate)
 
-no_assim_above_scaleh = scale_height(ref_surface_pressure, no_assim_above_pressure)
+! special for this - normalize by Ps for printing out
+no_assim_above_scaleh = scale_height(no_assim_above_pressure, ref_surface_pressure, .false.)
 write(string1, out_fmt) &
-   'Discarding observations higher than scale height ', no_assim_above_scaleh, ' (unitless)' 
+   ' ... which is equivalent to scale height   ', no_assim_above_scaleh
 call error_handler(E_MSG, 'init_discard_high_obs', string1, source, revision, revdate)
 
 end subroutine init_discard_high_obs
@@ -3580,7 +3581,7 @@
 
 ! convert to vertical localization units
 call convert_vertical_level_generic(real(model_damping_ends_at_level, r8), &
-                                         vertical_localization_type, ramp_end, string3)
+                                         vertical_localization_type, ramp_end, string3, no_norm=.false.)
 
 ! check for conversion errors
 if (ramp_end == MISSING_R8) then
@@ -3589,9 +3590,9 @@
                       source, revision, revdate, text2=string1)
 endif
 
-! FIXME: not sure we actually need model_top - remove if unused.
+! this value only used for print statement, unused otherwise
 call convert_vertical_level_generic(1.0_r8, vertical_localization_type, &
-                                    model_top, string3)
+                                    model_top, string3, no_norm=.false.)
 
 ! check for conversion errors
 if (model_top == MISSING_R8) then
@@ -3603,11 +3604,11 @@
 ! at this point, ramp_end and model_top are in the localization units
 
 ! let the log know what we're doing
-write(string1, '(A,I5)') 'Increments will go to 0 at model level ', model_damping_ends_at_level
+write(string1, '(A,I5)') 'Increments will go to 0.0 at model level ', model_damping_ends_at_level


More information about the Dart-dev mailing list