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

Diff of /MITgcm/pkg/aim_v23/aim_initialise.F

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

revision 1.1 by jmc, Fri Nov 22 17:17:03 2002 UTC revision 1.2 by jmc, Tue Dec 10 02:35:27 2002 UTC
# Line 18  C     -------------- Global variables -- Line 18  C     -------------- Global variables --
18  #include "SIZE.h"  #include "SIZE.h"
19  #include "EEPARAMS.h"  #include "EEPARAMS.h"
20  #include "PARAMS.h"  #include "PARAMS.h"
 #include "DYNVARS.h"  
21  #include "GRID.h"  #include "GRID.h"
22    #include "SURFACE.h"
23    #include "DYNVARS.h"
24    #include "AIM_PARAMS.h"
25    #include "AIM_FFIELDS.h"
26    c #include "AIM_GRID.h"
27  #include "AIM_DIAGS.h"  #include "AIM_DIAGS.h"
28    
29  C     == Routine arguments ==  C     == Routine arguments ==
# Line 30  C     myThid -  Number of this instance Line 34  C     myThid -  Number of this instance
34  C     == Local variables ==  C     == Local variables ==
35  C     HSG  - Cell face in vertical  C     HSG  - Cell face in vertical
36  C     pGround - Lower boundary pressure  C     pGround - Lower boundary pressure
37  C     I, J, K, bi,bj  - Loop counters  C     i, j, k, bi,bj  - Loop counters
38        _RL HSG(0:Nr)        _RL HSG(0:Nr)
39        _RL pGround        _RL pGround, tmpPgrnd
40        INTEGER K, bi, bj        INTEGER i, j, K, bi, bj
41        INTEGER Katm        INTEGER Katm
42    
43        pGround = atm_po  C--  Set default value for AIM interface code (AIM_PARAMS.h):
44        DO K=1,Nr        aim_useFMsurfBC = .TRUE.
45         Katm = _KD2KA( K )        aim_useMMsurfFc = .FALSE.
46         HSG(Katm) = rF(K)/pGround        aim_surfPotTemp = .FALSE.
47          aim_MMsufx = '.bin'
48          aim_MMsufxLength = 4
49          aim_LandFile = ' '
50          aim_albFile  = ' '
51          aim_vegFile  = ' '
52          aim_sstFile  = ' '
53          aim_lstFile  = ' '
54          aim_oiceFile = ' '
55          aim_snowFile = ' '
56          aim_swcFile  = ' '
57          aim_diagFreq = dumpFreq
58          aim_tendFreq = 0.
59          
60    C--  Set default value for atmos. physics parameters:
61          pGround = atm_Po
62          DO k=1,Nr
63           Katm = _KD2KA( k )
64           HSG(Katm) = rF(k)/pGround
65        ENDDO        ENDDO
66         K=Nr+1         k=Nr+1
67         Katm = _KD2KA( K )         Katm = _KD2KA( k )
68         HSG(Katm) = rF(K)/pGround         HSG(Katm) = rF(k)/pGround
69    
70  c     DO bj = myByLo(myThid), myByHi(myThid)  c     DO bj = myByLo(myThid), myByHi(myThid)
71  c      DO bi = myBxLo(myThid), myBxHi(myThid)  c      DO bi = myBxLo(myThid), myBxHi(myThid)
# Line 54  C--   set default value for all atmos. p Line 76  C--   set default value for all atmos. p
76  c      ENDDO  c      ENDDO
77  c     ENDDO  c     ENDDO
78    
79    C--   Read AIM parameters (from file data.aimphys):
80          CALL AIM_READPARMS( myThid )
81    
82  C--   set energy fractions in LW bands as a function of temperature:  C--   set energy fractions in LW bands as a function of temperature:
83  C     initialize common block RADFIX (originally called from FORDATE in SPEEDY)  C     initialize common block RADFIX (originally called from FORDATE in SPEEDY)
84        _BEGIN_MASTER(myThid)          _BEGIN_MASTER(myThid)  
85         CALL RADSET( myThid)         CALL RADSET( myThid)
86        _END_MASTER ( myThid)          _END_MASTER ( myThid)  
87    
88        CALL AIM_READPARMS( myThid )  C--   Set truncSurfP : used to correct for truncation (because of hFacMin)
89    C      of surface reference pressure Ro_surf that affects Surf.Temp.
90          CALL INI_P_GROUND(selectFindRoSurf, topoZ, truncSurfP, myThid )
91          DO bj = myByLo(myThid), myByHi(myThid)
92           DO bi = myBxLo(myThid), myBxHi(myThid)
93            DO j=1,sNy
94             DO i=1,sNx
95              tmpPgrnd = MIN(truncSurfP(i,j,bi,bj),atm_Po)
96              truncSurfP(i,j,bi,bj)=
97         &     ( Ro_surf(i,j,bi,bj)/tmpPgrnd )**atm_kappa
98             ENDDO
99            ENDDO
100            IF (aim_useMMsurfFc .AND. aim_surfPotTemp) THEN
101             DO j=1,sNy
102              DO i=1,sNx
103               truncSurfP(i,j,bi,bj) =
104         &      ( Ro_surf(i,j,bi,bj)/atm_Po )**atm_kappa
105              ENDDO
106             ENDDO
107            ENDIF
108           ENDDO
109          ENDDO
110          
111    C--   Initialise surface forcing fields (in AIM_FFIELDS.h):
112    c     DO bj = myByLo(myThid), myByHi(myThid)
113    c      DO bi = myBxLo(myThid), myBxHi(myThid)
114    c       DO j=1-Oly,sNy+Oly
115    c        DO i=1-Olx,sNx+Olx  
116    c         aim_surfTemp(i,j,bi,bj) = 300.
117    c         aim_soilWater(i,j,bi,bj) = 0.
118    c         aim_albedo   (i,j,bi,bj) = 0.
119    c         aim_landFr   (i,j,bi,bj) = 0.
120    c        ENDDO
121    c       ENDDO
122    c      ENDDO
123    c     ENDDO
124    
125  #ifdef ALLOW_TIMEAVE  #ifdef ALLOW_TIMEAVE
126  C     Initialise diagnostic counters (these are cleared on model start  C     Initialise diagnostic counters (these are cleared on model start

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.22