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

Contents of /MITgcm/pkg/aim/aim_aim2dyn.F

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


Revision 1.2 - (show annotations) (download)
Fri Sep 27 20:05:11 2002 UTC (21 years, 7 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint46n_post, checkpoint48f_post, checkpoint51k_post, checkpoint53f_post, checkpoint47j_post, checkpoint54a_pre, checkpoint55c_post, checkpoint53b_pre, checkpoint48d_pre, checkpoint51l_post, checkpoint51j_post, branch-exfmods-tag, checkpoint47e_post, checkpoint57m_post, checkpoint52l_pre, checkpoint48i_post, checkpoint52e_pre, hrcube4, hrcube5, checkpoint57g_pre, checkpoint52j_post, checkpoint47f_post, checkpoint48d_post, checkpoint51o_pre, checkpoint57f_post, checkpoint46j_post, checkpoint47c_post, checkpoint50e_post, checkpoint52e_post, checkpoint50c_post, checkpoint46i_post, checkpoint51n_pre, checkpoint47d_post, checkpoint57j_post, checkpoint47a_post, checkpoint57b_post, checkpoint52d_pre, checkpoint53c_post, checkpoint53d_post, checkpoint57f_pre, checkpoint48a_post, checkpoint55d_pre, checkpoint51f_pre, checkpoint57g_post, checkpoint48e_post, checkpoint57c_pre, checkpoint48h_post, checkpoint55j_post, checkpoint56b_post, checkpoint50c_pre, checkpoint57h_pre, branchpoint-genmake2, checkpoint46k_post, checkpoint52j_pre, checkpoint54a_post, branch-netcdf, checkpoint50d_pre, checkpoint55h_post, checkpoint51r_post, checkpoint47i_post, checkpoint52b_pre, checkpoint52n_post, checkpoint54b_post, checkpoint46l_pre, checkpoint46j_pre, checkpoint51i_post, checkpoint57e_post, checkpoint54d_post, checkpoint47h_post, checkpoint48c_post, checkpoint46l_post, checkpoint56c_post, checkpoint54e_post, checkpoint55b_post, checkpoint51e_post, checkpoint51b_post, checkpoint51l_pre, checkpoint52m_post, checkpoint51c_post, checkpoint55, checkpoint53a_post, checkpoint55a_post, checkpoint57a_post, checkpoint48, checkpoint49, checkpoint47b_post, checkpoint56, checkpoint57o_post, checkpoint55g_post, checkpoint57h_done, checkpoint51o_post, checkpoint48g_post, checkpoint57k_post, checkpoint57d_post, checkpoint55f_post, checkpoint57i_post, checkpoint51q_post, checkpoint52l_post, checkpoint52k_post, checkpoint57h_post, checkpoint57a_pre, checkpoint54, checkpoint57, checkpoint53b_post, checkpoint51, checkpoint50, checkpoint53, checkpoint52, checkpoint50d_post, checkpoint52d_post, checkpoint51b_pre, checkpoint52a_post, checkpoint47g_post, checkpoint52b_post, checkpoint53g_post, checkpoint52f_post, checkpoint57n_post, checkpoint52c_post, checkpoint46m_post, checkpoint57p_post, checkpoint51h_pre, checkpoint50g_post, checkpoint50b_pre, checkpoint51g_post, ecco_c52_e35, checkpoint54f_post, checkpoint51f_post, checkpoint48b_post, checkpoint50b_post, eckpoint57e_pre, checkpoint57c_post, checkpoint50f_post, checkpoint50a_post, checkpoint50f_pre, checkpoint52a_pre, checkpoint47d_pre, checkpoint51d_post, checkpoint48c_pre, checkpoint51m_post, checkpoint51t_post, checkpoint53d_pre, checkpoint47, checkpoint55e_post, checkpoint54c_post, checkpoint50h_post, checkpoint52i_post, checkpoint51a_post, checkpoint50e_pre, checkpoint50i_post, checkpoint51p_post, checkpoint51n_post, checkpoint55i_post, checkpoint51i_pre, checkpoint57l_post, checkpoint52i_pre, checkpoint51u_post, checkpoint52h_pre, checkpoint52f_pre, hrcube_1, hrcube_2, hrcube_3, checkpoint56a_post, checkpoint51s_post, checkpoint55d_post
Branch point for: netcdf-sm0, branch-genmake2, branch-nonh, tg2-branch, checkpoint51n_branch, branch-exfmods-curt
Changes since 1.1: +12 -26 lines
Clean up AIM package (and keep the results unchanged):
a) include CPP_OPTION and use IMPLICT NONE in all routines ;
  declare all the variables _RL ;
b) use _d 0 for all numerical constants in Physics package,
  so that the code works with g77 (and give the right answer)
c) use ifdef ALLOW_AIM everywhere so that the package can be
 compiled without increasing the memory size.
d) clean-up the AIM interface (remove commented lines, unused
  variables ...)

1 C $Header: /u/gcmpack/MITgcm/pkg/aim/aim_aim2dyn.F,v 1.1 2001/05/29 19:28:53 cnh Exp $
2 C $Name: $
3
4 #include "AIM_OPTIONS.h"
5
6 CStartOfInterface
7 SUBROUTINE AIM_AIM2DYN(
8 I bi,bj, myCurrentTime,myThid)
9 C /==========================================================\
10 C | S/R AIM_AIM2DYN |
11 C | o Remap AIM outputs to dynamics conforming arrays. |
12 C |==========================================================|
13 C | Currently AIM exports to the dynmaics |
14 C | - PBL drag coefficient |
15 C | - Net tendency for temperature |
16 C | - Net tendency for water vapor |
17 C | Exporting drag has the nice property that it is a scalar.|
18 C | This means that the exchanges on the AIM exported fields |
19 C | do not need special piaring on the cube. It may not be |
20 C | a good idea in the long term as it makes assumptions |
21 C | about the momentum schemes within AIM. |
22 C \==========================================================/
23 IMPLICIT NONE
24
25 C == Global data ==
26 C-- size for MITgcm & Physics package :
27 #include "AIM_SIZE.h"
28
29 #include "EEPARAMS.h"
30 #include "PARAMS.h"
31 #include "GRID.h"
32 #include "DYNVARS.h"
33
34 #include "AIM2DYN.h"
35 #include "com_physvar.h"
36
37 C == Routine arguments ==
38 INTEGER bi, bj
39 _RL myCurrentTime
40 INTEGER myThid
41 CEndOfInterface
42
43 #ifdef ALLOW_AIM
44 C == Local variables ==
45 C Loop counters
46 INTEGER I, J
47 INTEGER I2, kAtm, kLev
48
49 C-- Forcing term
50 _RL pGround,CPAIR,RD
51 _RL conv_T2theta
52
53 pGround = 1. _d 5
54 RD = 287. _d 0
55 CPAIR = 1004. _d 0
56 DO kLev=1,Nr
57 conv_T2theta = (pGround/rC(kLev))**(RD/CPAIR)
58 C-- for Energy consistency, need to use same value as in calc_phi_hyd:
59 c conv_T2theta = (atm_po/rC(kLev))**atm_kappa
60 DO J=1,sNy
61 DO I=1,sNx
62 I2 = sNx*(J-1)+I
63 Katm = _KD2KA( Klev )
64 C Planetary boundary layer drag coeff.
65 aim_drag(i,j,bi,bj) = DRAG(I2,myThid)
66
67 C Net temperature tendency
68 aim_dTdt(i,j,kLev,bi,bj) = ( TT_PBL(I2,katm,myThid)
69 & +TT_CNV(I2,katm,myThid)
70 & +TT_LSC(I2,katm,myThid)
71 & +TT_RSW(I2,katm,myThid)
72 & +TT_RLW(I2,katm,myThid)
73 & )*conv_T2theta
74
75 C Net water vapor tendency
76 aim_dSdt(i,j,kLev,bi,bj) = QT_PBL(I2,katm,myThid)
77 & +QT_CNV(I2,katm,myThid)
78 & +QT_LSC(I2,katm,myThid)
79
80 ENDDO
81 ENDDO
82 ENDDO
83
84 #endif /* ALLOW_AIM */
85
86 RETURN
87 END

  ViewVC Help
Powered by ViewVC 1.1.22