/[MITgcm]/MITgcm/pkg/aim_v23/aim_aim2dyn.F
ViewVC logotype

Annotation of /MITgcm/pkg/aim_v23/aim_aim2dyn.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (hide annotations) (download)
Fri Oct 31 20:35:32 2003 UTC (20 years, 6 months ago) by edhill
Branch: MAIN
Changes since 1.1: +2 -1 lines
 o remove all '#include "PACACKAGES_CONFIG.h"' from model/inc/* and cleanup
   the verification tests that this breaks
 o this was confirmed to work for the basic tests ("testreport -ieee") on
   shelley

1 edhill 1.2 C $Header: /u/u3/gcmpack/MITgcm/pkg/aim_v23/aim_aim2dyn.F,v 1.1 2002/11/22 17:17:03 jmc Exp $
2 jmc 1.1 C $Name: $
3    
4 edhill 1.2 #include "PACKAGES_CONFIG.h"
5 jmc 1.1 #include "AIM_OPTIONS.h"
6    
7     CStartOfInterface
8     SUBROUTINE AIM_AIM2DYN(
9     I bi, bj, myTime, myIter, myThid)
10     C *==========================================================*
11     C | S/R AIM_AIM2DYN |
12     C | o Remap AIM outputs to dynamics conforming arrays. |
13     C |==========================================================*
14     C | Currently AIM exports to the dynmaics |
15     C | - PBL drag coefficient |
16     C | - Net tendency for temperature |
17     C | - Net tendency for water vapor |
18     C | Exporting drag has the nice property that it is a scalar.|
19     C | This means that the exchanges on the AIM exported fields |
20     C | do not need special piaring on the cube. It may not be |
21     C | a good idea in the long term as it makes assumptions |
22     C | about the momentum schemes within AIM. |
23     C *==========================================================*
24     C-------
25     C Note: Except LSC tendency, all others need to be /dpFac.
26     C-------
27     IMPLICIT NONE
28    
29     C == Global data ==
30     C-- size for MITgcm & Physics package :
31     #include "AIM_SIZE.h"
32    
33     #include "EEPARAMS.h"
34     #include "PARAMS.h"
35     #include "GRID.h"
36     #include "DYNVARS.h"
37    
38     #include "AIM2DYN.h"
39     #include "com_physvar.h"
40    
41     C == Routine arguments ==
42     C bi,bj - Tile index
43     C myTime - Current time of simulation ( s )
44     C myIter - Current iteration number in simulation
45     C myThid - Number of this instance of the routine
46     INTEGER bi, bj, myIter, myThid
47     _RL myTime
48     CEndOfInterface
49    
50     #ifdef ALLOW_AIM
51     C == Local variables ==
52     C i,j,k :: loop counters
53     C I2,Katm :: loop counters
54     C conv_T2theta :: conversion factor from (absolute) Temp. to Pot.Temp.
55     _RL conv_T2theta
56     INTEGER i,j,k
57     INTEGER I2, Katm
58    
59     C-- Physics tendency term
60    
61     DO k=1,Nr
62     conv_T2theta = (atm_po/rC(k))**atm_kappa
63     DO j=1,sNy
64     DO i=1,sNx
65     I2 = i+(j-1)*sNx
66     Katm = _KD2KA( k )
67     C Planetary boundary layer drag coeff.
68     aim_drag(i,j,bi,bj) = DRAG(I2,3,myThid)
69    
70     C Net temperature tendency
71     aim_dTdt(i,j,k,bi,bj) = TT_LSC(I2,Katm,myThid)
72     & + ( TT_CNV(I2,Katm,myThid)
73     & +TT_PBL(I2,Katm,myThid)
74     & +TT_RSW(I2,Katm,myThid)
75     & +TT_RLW(I2,Katm,myThid)
76     & )*recip_hFacC(i,j,k,bi,bj)
77     aim_dTdt(i,j,k,bi,bj) = aim_dTdt(i,j,k,bi,bj)*conv_T2theta
78    
79     C Net water vapor tendency
80     aim_dSdt(i,j,k,bi,bj) = QT_LSC(I2,Katm,myThid)
81     & + ( QT_CNV(I2,Katm,myThid)
82     & +QT_PBL(I2,Katm,myThid)
83     & )*recip_hFacC(i,j,k,bi,bj)
84    
85     ENDDO
86     ENDDO
87     ENDDO
88    
89     #endif /* ALLOW_AIM */
90    
91     RETURN
92     END

  ViewVC Help
Powered by ViewVC 1.1.22