/[MITgcm]/MITgcm/model/src/ini_eos.F
ViewVC logotype

Diff of /MITgcm/model/src/ini_eos.F

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

revision 1.9 by jmc, Mon Feb 3 21:58:09 2003 UTC revision 1.10 by jmc, Tue Feb 18 15:34:25 2003 UTC
# Line 2  C $Header$ Line 2  C $Header$
2  C $Name$  C $Name$
3    
4  #include "CPP_OPTIONS.h"  #include "CPP_OPTIONS.h"
5    #define EXCLUDE_EOS_CHECK
6    
7  CBOP  CBOP
8  C     !ROUTINE: INI_EOS  C     !ROUTINE: INI_EOS
# Line 38  C     I,J,K Line 39  C     I,J,K
39        INTEGER  I,  J,  K        INTEGER  I,  J,  K
40        CHARACTER*(MAX_LEN_MBUF) msgBuf        CHARACTER*(MAX_LEN_MBUF) msgBuf
41                
42          IF ( buoyancyRelation .EQ. 'ATMOSPHERIC' ) RETURN
43    
44        equationOfState = eosType        equationOfState = eosType
45    
# Line 63  C     I,J,K Line 65  C     I,J,K
65           eosMDJWFden(k) = 0. _d 0           eosMDJWFden(k) = 0. _d 0
66        end do        end do
67    
 C     initialise pressure to zero (this is not really the right place to  
 C     do it, but let's do it anyway; pressure will be initialised to  
 C     sensible values in ini_pressure)  
       do bj = myByLo(myThid), myByHi(myThid)  
        do bi = myBxLo(myThid), myBxHi(myThid)  
         do K=1,Nr  
          do J=1-Oly,sNy+Oly  
           do I=1-Olx,sNx+Olx  
            pressure(i,j,k,bi,bj) = 0. _d 0  
           end do  
          end do  
         end do  
        end do  
       end do  
 C  
 C     initialise pressure to something sensible (will be overwritten)  
 C  
       if ( buoyancyRelation .eq. 'OCEANIC' ) then  
        do bj = myByLo(myThid), myByHi(myThid)  
         do bi = myBxLo(myThid), myBxHi(myThid)  
          do K=1,Nr  
           do J=1-Oly,sNy+Oly  
            do I=1-Olx,sNx+Olx  
             pressure(i,j,k,bi,bj) = rhoConst * (  
      &           - gravity*rC(k)  
      &           )  
            end do  
           end do  
          end do  
         end do  
        end do  
       elseif ( buoyancyRelation .eq. 'OCEANICP' ) then  
 C      
 C     in pressure coordinates the pressure is just the coordinate of  
 C     the tracer point, that is, its constant in time  
 C  
        do bj = myByLo(myThid), myByHi(myThid)  
         do bi = myBxLo(myThid), myBxHi(myThid)  
          do K=1,Nr  
           do J=1-Oly,sNy+Oly  
            do I=1-Olx,sNx+Olx  
             pressure(i,j,k,bi,bj) = rC(k)  
            end do  
           end do  
          end do  
         end do  
        end do  
       endif  
   
68        if ( equationOfState .eq. 'LINEAR' ) then        if ( equationOfState .eq. 'LINEAR' ) then
69           if ( tAlpha .eq. UNSET_RL ) tAlpha = 2.D-4           if ( tAlpha .eq. UNSET_RL ) tAlpha = 2.D-4
70           if ( sBeta  .eq. UNSET_RL ) sBeta  = 7.4D-4           if ( sBeta  .eq. UNSET_RL ) sBeta  = 7.4D-4
# Line 307  C--   Check EOS initialisation: Line 260  C--   Check EOS initialisation:
260    
261        call check_eos( myThid )        call check_eos( myThid )
262    
       IF ( buoyancyRelation .EQ. 'OCEANIC' .AND.  
      &     ( equationOfState .EQ. 'JMD95P'.OR.  
      &       equationOfState .EQ. 'MDJWF' .OR.  
      &       equationOfState .EQ. 'UNESCO'   ) ) THEN  
         WRITE(msgBuf,'(A)')  
      &   'S/R INI_EOS: WARNING >>> Wrong Restart !!!'  
         CALL PRINT_MESSAGE(msgBuf, errorMessageUnit,  
      &                     SQUEEZE_RIGHT,myThid)  
         WRITE(msgBuf,'(2A)') 'S/R INI_EOS: ',  
      &   'not correct using Z-coord with EOS function of P'  
         CALL PRINT_MESSAGE(msgBuf, errorMessageUnit,  
      &                     SQUEEZE_RIGHT,myThid)  
         WRITE(msgBuf,'(A)')  
      &   'S/R INI_EOS: WARNING <<< Wrong Restart !!!'  
         CALL PRINT_MESSAGE(msgBuf, errorMessageUnit,  
      &                     SQUEEZE_RIGHT,myThid)  
       ENDIF                                          
   
263        _END_MASTER( myThid )        _END_MASTER( myThid )
264    
265        return        RETURN
266        end        END
267    
268  CBOP  CBOP
269  C     !ROUTINE: CHECK_EOS  C     !ROUTINE: CHECK_EOS
# Line 354  C     == Routine arguments == Line 289  C     == Routine arguments ==
289  C     myThid -  Number of this instance of CHECK_EOS  C     myThid -  Number of this instance of CHECK_EOS
290        INTEGER myThid        INTEGER myThid
291    
292    #ifndef EXCLUDE_EOS_CHECK
293  C     !LOCAL VARIABLES:  C     !LOCAL VARIABLES:
294  C     == Local variables ==  C     == Local variables ==
295  C     bi,bj  - Loop counters  C     bi,bj  - Loop counters
# Line 465  C     check nonlinear EOS Line 401  C     check nonlinear EOS
401       &           '(a4,f4.1,a5,f4.1,a6,f5.0,a5,a3,f10.5,1x,f11.5)')       &           '(a4,f4.1,a5,f4.1,a6,f5.0,a5,a3,f10.5,1x,f11.5)')
402       &           'rho(', sFld(i,j,k,bi,bj), ' PSU,',       &           'rho(', sFld(i,j,k,bi,bj), ' PSU,',
403       &           tFld(i,j,k,bi,bj), ' degC,',       &           tFld(i,j,k,bi,bj), ' degC,',
404       &           pressure(i,j,k,bi,bj)*SItoBar, ' bar)',' = ',  c    &           pressure(i,j,k,bi,bj)*SItoBar, ' bar)',' = ',
405       &           rloc(kcheck), bloc(kcheck)       &           rloc(kcheck), bloc(kcheck)
406              CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,              CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
407       &           SQUEEZE_RIGHT , 1)       &           SQUEEZE_RIGHT , 1)
# Line 486  C     check nonlinear EOS Line 422  C     check nonlinear EOS
422                            
423           enddo           enddo
424  C     end check nonlinear EOS  C     end check nonlinear EOS
425           pressure(i,j,k,bi,bj) = psave  c        pressure(i,j,k,bi,bj) = psave
426    
427           write(msgBuf,'(A)') 'end check the equation of state'           write(msgBuf,'(A)') 'end check the equation of state'
428           CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,           CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
429       &        SQUEEZE_RIGHT , 1)       &        SQUEEZE_RIGHT , 1)
430    
431        endif        endif
432    #endif /* EXCLUDE_EOS_CHECK */
433    
434        return        RETURN
435        end        END
436    

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

  ViewVC Help
Powered by ViewVC 1.1.22