[Dart-dev] DART/branches Revision: 12342

dart at ucar.edu dart at ucar.edu
Wed Jan 17 13:42:42 MST 2018


nancy at ucar.edu
2018-01-17 13:42:35 -0700 (Wed, 17 Jan 2018)
214
if location is vertissurface and it's being converted to
scale height, set the value explicitly.   

also combine the 2 line messages into one when creating
new output files and adding the date/datesec variables.




Modified: DART/branches/recam/models/cam-fv/model_mod.f90
===================================================================
--- DART/branches/recam/models/cam-fv/model_mod.f90	2018-01-17 18:45:59 UTC (rev 12341)
+++ DART/branches/recam/models/cam-fv/model_mod.f90	2018-01-17 20:42:35 UTC (rev 12342)
@@ -2024,8 +2024,8 @@
 
 ! if the file doesn't already have a "date" variable, so we make one
 if (.not. nc_variable_exists(ncid, "date")) then
-   call error_handler(E_MSG, routine,'"date" variable not found in file ', &
-                      source, revision, revdate, text2='creating one')
+   call error_handler(E_MSG, routine,'"date" variable not found in file, creating one', &
+                      source, revision, revdate)
 
    call nc_begin_define_mode(ncid, routine)
    call nc_define_integer_variable(ncid, 'date', (/ 'time' /), routine)
@@ -2036,8 +2036,8 @@
 ! if the file doesn't already have a "datesec" variable, so we make one
 if (.not. nc_variable_exists(ncid, "datesec")) then
 
-   call error_handler(E_MSG, routine,'"datesec" variable not found in file ', &
-                      source, revision, revdate, text2='creating one')
+   call error_handler(E_MSG, routine,'"datesec" variable not found in file, creating one', &
+                      source, revision, revdate)
 
    call nc_begin_define_mode(ncid, routine)
    call nc_define_integer_variable(ncid, 'datesec', (/ 'time' /), routine)
@@ -3277,6 +3277,12 @@
 
 ens_size = 1
 
+! by definition
+if (query_location(location) == VERTISSURFACE) then
+   call set_vertical(location, -log(1.0_r8), VERTISSCALEHEIGHT)
+   return
+endif
+   
 call ok_to_interpolate(QTY_PRESSURE, varid1, stat1)
 call ok_to_interpolate(QTY_SURFACE_PRESSURE, varid2, stat2)
 if (stat1 /= 0 .or. stat2 /= 0) then


More information about the Dart-dev mailing list