/[MITgcm]/MITgcm/pkg/land/land_ini_vars.F
ViewVC logotype

Diff of /MITgcm/pkg/land/land_ini_vars.F

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

revision 1.5 by jmc, Wed Apr 6 18:41:51 2005 UTC revision 1.6 by jmc, Sun Aug 13 22:56:17 2006 UTC
# Line 16  C     *================================= Line 16  C     *=================================
16  C     | for now, used only for a restart  C     | for now, used only for a restart
17  C     *==========================================================*  C     *==========================================================*
18  C     \ev  C     \ev
19    
20  C     !USES:  C     !USES:
21        IMPLICIT NONE        IMPLICIT NONE
22    
# Line 31  C-- size for MITgcm & Land package : Line 31  C-- size for MITgcm & Land package :
31  #include "LAND_VARS.h"  #include "LAND_VARS.h"
32    
33  C     !INPUT/OUTPUT PARAMETERS:  C     !INPUT/OUTPUT PARAMETERS:
34  C     == Routine Arguments ==        C     == Routine Arguments ==
35  C     myThid -  Number of this instance  C     myThid -  Number of this instance
36        INTEGER myThid        INTEGER myThid
37  CEOP  CEOP
38    
39  #ifdef ALLOW_LAND  #ifdef ALLOW_LAND
40    
41  C     == Local Variables ==  C     == Local Variables ==
42  C     msgBuf      - Informational/error meesage buffer  C     msgBuf      - Informational/error meesage buffer
43  C     i,j,k,bi,bj :: loop indices  C     i,j,k,bi,bj :: loop indices
44  C     grd_HeatCp   :: Heat capacity of the ground (J/m3/K)  C     grd_HeatCp   :: Heat capacity of the ground (J/m3/K)
# Line 89  C-     end bi,bj loops Line 89  C-     end bi,bj loops
89    
90  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
91    
92    C-    Need to synchronize here before doing master-thread IO
93          _BARRIER
94    
95        IF ( startTime.EQ.baseTime .AND. nIter0.EQ.0 ) THEN        IF ( startTime.EQ.baseTime .AND. nIter0.EQ.0 ) THEN
96    
97  C--   Define the initial state : read from file  C--   Define the initial state : read from file
        _BEGIN_MASTER( myThid )  
98         IF ( land_grT_iniFile .NE. ' ' ) THEN         IF ( land_grT_iniFile .NE. ' ' ) THEN
99          CALL MDSREADFIELD( land_grT_iniFile, readBinaryPrec, 'RL',          CALL MDSREADFIELD( land_grT_iniFile, readBinaryPrec, 'RL',
100       &                     land_nLev, land_groundT, 1, myThid)       &                     land_nLev, land_groundT, 1, myThid)
# Line 105  C--   Define the initial state : read fr Line 107  C--   Define the initial state : read fr
107          CALL MDSREADFIELD( land_snow_iniFile,readBinaryPrec, 'RL',          CALL MDSREADFIELD( land_snow_iniFile,readBinaryPrec, 'RL',
108       &                     1, land_hSnow, 1, myThid)       &                     1, land_hSnow, 1, myThid)
109         ENDIF         ENDIF
        _END_MASTER(myThid)  
110    
111        ELSEIF ( land_calc_grT .OR. land_calc_grW ) THEN        ELSEIF ( land_calc_grT .OR. land_calc_grW ) THEN
112    
# Line 117  C-    a trick to allow to start without Line 118  C-    a trick to allow to start without
118  C        load grT & grW from AIM surf. BC in S/R aim_land2aim  C        load grT & grW from AIM surf. BC in S/R aim_land2aim
119        ENDIF        ENDIF
120    
121    C-    Every one else must wait until loading is done.
122          _BARRIER
123    
124    C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
125    
126        DO bj=myByLo(myThid),myByHi(myThid)        DO bj=myByLo(myThid),myByHi(myThid)
127         DO bi=myBxLo(myThid),myBxHi(myThid)         DO bi=myBxLo(myThid),myBxHi(myThid)
128    
# Line 132  c          IF ( land_frc(i,j,bi,bj).GT.0 Line 138  c          IF ( land_frc(i,j,bi,bj).GT.0
138               mWater = land_rhoLiqW*land_waterCap               mWater = land_rhoLiqW*land_waterCap
139       &               *land_groundW(i,j,k,bi,bj)       &               *land_groundW(i,j,k,bi,bj)
140               grd_HeatCp = land_heatCs + land_CpWater*mWater               grd_HeatCp = land_heatCs + land_CpWater*mWater
141               land_enthalp(i,j,k,bi,bj) =               land_enthalp(i,j,k,bi,bj) =
142       &                     grd_HeatCp*land_groundT(i,j,k,bi,bj)       &                     grd_HeatCp*land_groundT(i,j,k,bi,bj)
143               IF (land_groundT(i,j,k,bi,bj).LT. 0. _d 0)               IF (land_groundT(i,j,k,bi,bj).LT. 0. _d 0)
144       &       land_enthalp(i,j,k,bi,bj) = land_enthalp(i,j,k,bi,bj)       &       land_enthalp(i,j,k,bi,bj) = land_enthalp(i,j,k,bi,bj)
145       &                                 - land_Lfreez*mWater       &                                 - land_Lfreez*mWater
146              ENDDO              ENDDO
# Line 142  c          IF ( land_frc(i,j,bi,bj).GT.0 Line 148  c          IF ( land_frc(i,j,bi,bj).GT.0
148  c          ENDIF  c          ENDIF
149            ENDDO            ENDDO
150           ENDDO           ENDDO
151        ELSE          ELSE
152           DO j=1,sNy           DO j=1,sNy
153            DO i=1,sNx            DO i=1,sNx
154              DO k=1,land_nLev              DO k=1,land_nLev

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

  ViewVC Help
Powered by ViewVC 1.1.22