<p><b>duda</b> 2010-05-19 11:25:39 -0600 (Wed, 19 May 2010)</p><p>BRANCH COMMIT<br>
<br>
Fix bug in MPAS_TO_CAM: After a call to MPAS_INIT2 or MPAS_DYN_RUN, the<br>
current fields are located in time_levs(1) rather than time_levs(2).<br>
Accordingly, use fields from time_levs(2) in MPAS_TO_CAM; it's still unclear<br>
which time level arrays to put the tendencies from CAM into in<br>
CAM_TO_MPAS(), but time_levs(1) would also seem to make more sense.<br>
<br>
M module_mpas_cam_interface.F<br>
</p><hr noshade><pre><font color="gray">Modified: branches/mpas_cam_coupling/src/driver_cam_interface/module_mpas_cam_interface.F
===================================================================
--- branches/mpas_cam_coupling/src/driver_cam_interface/module_mpas_cam_interface.F        2010-05-18 17:34:31 UTC (rev 279)
+++ branches/mpas_cam_coupling/src/driver_cam_interface/module_mpas_cam_interface.F        2010-05-19 17:25:39 UTC (rev 280)
@@ -639,13 +639,13 @@
lonCell => block % mesh % lonCell % array
east => block % mesh % east % array
north => block % mesh % north % array
- theta => block % time_levs(2) % state % theta % array
- pressure => block % time_levs(2) % state % pressure % array
- ww => block % time_levs(2) % state % ww % array
- uReconstX => block % time_levs(2) % state % uReconstructX % array
- uReconstY => block % time_levs(2) % state % uReconstructY % array
- uReconstZ => block % time_levs(2) % state % uReconstructZ % array
- scalars => block % time_levs(2) % state % scalars % array
+ theta => block % time_levs(1) % state % theta % array
+ pressure => block % time_levs(1) % state % pressure % array
+ ww => block % time_levs(1) % state % ww % array
+ uReconstX => block % time_levs(1) % state % uReconstructX % array
+ uReconstY => block % time_levs(1) % state % uReconstructY % array
+ uReconstZ => block % time_levs(1) % state % uReconstructZ % array
+ scalars => block % time_levs(1) % state % scalars % array
!
@@ -666,11 +666,11 @@
!
- ! Fill in CAM arrays from block % time_levs(2) % state arrays
+ ! Fill in CAM arrays from block % time_levs(1) % state arrays
!
do iCell=1,block % mesh % nCellsSolve
- Psd(iCell) = block % time_levs(2) % state % surface_pressure % array(iCell)
- Phis(iCell) = block % time_levs(2) % state % geopotential % array(1,iCell)
+ Psd(iCell) = block % time_levs(1) % state % surface_pressure % array(iCell)
+ Phis(iCell) = block % time_levs(1) % state % geopotential % array(1,iCell)
do k=1,block % mesh % nVertLevels
T(iCell,k) = theta(k,iCell) * (0.5*(pressure(k,iCell)+pressure(k+1,iCell)) / p0) ** (rgas/cp)
Omega(iCell,k) = 0.5*(ww(k,iCell) + ww(k+1,iCell))
@@ -739,11 +739,11 @@
east => block % mesh % east % array
north => block % mesh % north % array
edge_normal => block % mesh % edge_normal % array
- pressure => block % time_levs(2) % state % pressure % array
- scalars => block % time_levs(2) % state % scalars % array
- scalars_phys_tend => block % time_levs(2) % state % scalars_phys_tend % array
- theta_tend => block % time_levs(2) % state % theta_phys_tend % array
- u_tend => block % time_levs(2) % state % u_phys_tend % array
+ pressure => block % time_levs(1) % state % pressure % array
+ scalars => block % time_levs(1) % state % scalars % array
+ scalars_phys_tend => block % time_levs(1) % state % scalars_phys_tend % array
+ theta_tend => block % time_levs(1) % state % theta_phys_tend % array
+ u_tend => block % time_levs(1) % state % u_phys_tend % array
!
! Perform basic sanity check on expected and available field dimensions
</font>
</pre>