[Dart-dev] [5894] DART/branches/development/models/mpas_atm/model_mod.f90: Restore the line that sets 'ivar' based on the current interpolation KIND.
nancy at ucar.edu
nancy at ucar.edu
Thu Oct 11 17:11:10 MDT 2012
Revision: 5894
Author: nancy
Date: 2012-10-11 17:11:09 -0600 (Thu, 11 Oct 2012)
Log Message:
-----------
Restore the line that sets 'ivar' based on the current interpolation KIND.
if the kind doesn't match any of the special cases, it will fall into the
generic triangle interpolation code and ivar is needed there to tell which
field to interpolate. also minor text changes in comments at the end of
the module - no code changes there. (the previous version of the code
coredumped if the kind was one that did not need special handling.)
Modified Paths:
--------------
DART/branches/development/models/mpas_atm/model_mod.f90
-------------- next part --------------
Modified: DART/branches/development/models/mpas_atm/model_mod.f90
===================================================================
--- DART/branches/development/models/mpas_atm/model_mod.f90 2012-10-08 21:55:03 UTC (rev 5893)
+++ DART/branches/development/models/mpas_atm/model_mod.f90 2012-10-11 23:11:09 UTC (rev 5894)
@@ -920,7 +920,8 @@
! we have because we require potential temp, mixing ratio, and
! density to be in the state vector in all cases.)
-if (get_progvar_index_from_kind(obs_kind) > 0) then
+ivar = get_progvar_index_from_kind(obs_kind)
+if (ivar > 0) then
goodkind = .true.
else
goodkind = .false.
@@ -936,8 +937,8 @@
case (KIND_U_WIND_COMPONENT,KIND_V_WIND_COMPONENT)
! if the reconstructed winds at the cell centers aren't there,
! we can use the edge normal winds, if the user allows it.
- ivar = get_progvar_index_from_kind(KIND_EDGE_NORMAL_SPEED)
- if (ivar > 0 .and. use_u_for_wind) goodkind = .true.
+ if (get_progvar_index_from_kind(KIND_EDGE_NORMAL_SPEED) > 0 &
+ .and. use_u_for_wind) goodkind = .true.
end select
endif
@@ -6093,7 +6094,7 @@
function theta_to_tk (theta, rho, qv)
! Compute sensible temperature [K] from potential temperature [K].
-! matches computation done in MPAS model
+! code matches computation done in MPAS model
real(r8), intent(in) :: theta ! potential temperature [K]
real(r8), intent(in) :: rho ! dry density
@@ -6122,7 +6123,10 @@
subroutine compute_full_pressure(theta, rho, qv, pressure, tk)
! Compute full pressure from the equation of state.
-! matches computation done in MPAS model
+! since it has to compute sensible temp along the way,
+! make temp one of the return values rather than having
+! to call theta_to_tk() separately.
+! code matches computation done in MPAS model
real(r8), intent(in) :: theta ! potential temperature [K]
real(r8), intent(in) :: rho ! dry density
More information about the Dart-dev
mailing list