/[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.5 by mlosch, Wed Sep 18 16:38:02 2002 UTC revision 1.10.2.2 by heimbach, Tue Jun 24 23:05:29 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 105  C Line 107  C
107              CALL PRINT_ERROR( msgBuf , 1)              CALL PRINT_ERROR( msgBuf , 1)
108              STOP 'ABNORMAL END: S/R INI_EOS'              STOP 'ABNORMAL END: S/R INI_EOS'
109           endif           endif
 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) = rhonil * (  
      &                          - gravity*rC(k)  
      &                          )  
                         end do  
                      end do  
                   end do  
                end do  
             end do  
          elseif ( buoyancyRelation .eq. 'ATMOSPHERIC'  
      &           .or. buoyancyRelation .eq. 'OCEANICP' ) then  
 C     in pressure coordinates the pressure is just the coordinate of  
 C     the tracer point  
             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  
110    
111  C     coefficients nonlinear equation of state in pressure coordinates for  C     coefficients nonlinear equation of state in pressure coordinates for
112  C     1. density of fresh water at p = 0  C     1. density of fresh water at p = 0
# Line 245  C     5. secant bulk modulus K of sea wa Line 216  C     5. secant bulk modulus K of sea wa
216    
217        elseif ( equationOfState .eq. 'MDJWF' ) then        elseif ( equationOfState .eq. 'MDJWF' ) then
218    
219           eosMDJWFnum( 0) =  9.99843699e+02           eosMDJWFnum( 0) =  9.99843699 _d +02
220           eosMDJWFnum( 1) =  7.35212840e+00           eosMDJWFnum( 1) =  7.35212840 _d +00
221           eosMDJWFnum( 2) = -5.45928211e-02           eosMDJWFnum( 2) = -5.45928211 _d -02
222           eosMDJWFnum( 3) =  3.98476704e-04           eosMDJWFnum( 3) =  3.98476704 _d -04
223           eosMDJWFnum( 4) =  2.96938239e+00           eosMDJWFnum( 4) =  2.96938239 _d +00
224           eosMDJWFnum( 5) = -7.23268813e-03           eosMDJWFnum( 5) = -7.23268813 _d -03
225           eosMDJWFnum( 6) =  2.12382341e-03           eosMDJWFnum( 6) =  2.12382341 _d -03
226           eosMDJWFnum( 7) =  1.04004591e-02           eosMDJWFnum( 7) =  1.04004591 _d -02
227           eosMDJWFnum( 8) =  1.03970529e-07           eosMDJWFnum( 8) =  1.03970529 _d -07
228           eosMDJWFnum( 9) =  5.18761880e-06           eosMDJWFnum( 9) =  5.18761880 _d -06
229           eosMDJWFnum(10) = -3.24041825e-08           eosMDJWFnum(10) = -3.24041825 _d -08
230           eosMDJWFnum(11) = -1.23869360e-11           eosMDJWFnum(11) = -1.23869360 _d -11
231                    
232                    
233           eosMDJWFden( 0) =  1.00000000e+00           eosMDJWFden( 0) =  1.00000000 _d +00
234           eosMDJWFden( 1) =  7.28606739e-03           eosMDJWFden( 1) =  7.28606739 _d -03
235           eosMDJWFden( 2) = -4.60835542e-05           eosMDJWFden( 2) = -4.60835542 _d -05
236           eosMDJWFden( 3) =  3.68390573e-07           eosMDJWFden( 3) =  3.68390573 _d -07
237           eosMDJWFden( 4) =  1.80809186e-10           eosMDJWFden( 4) =  1.80809186 _d -10
238           eosMDJWFden( 5) =  2.14691708e-03           eosMDJWFden( 5) =  2.14691708 _d -03
239           eosMDJWFden( 6) = -9.27062484e-06           eosMDJWFden( 6) = -9.27062484 _d -06
240           eosMDJWFden( 7) = -1.78343643e-10           eosMDJWFden( 7) = -1.78343643 _d -10
241           eosMDJWFden( 8) =  4.76534122e-06           eosMDJWFden( 8) =  4.76534122 _d -06
242           eosMDJWFden( 9) =  1.63410736e-09           eosMDJWFden( 9) =  1.63410736 _d -09
243           eosMDJWFden(10) =  5.30848875e-06           eosMDJWFden(10) =  5.30848875 _d -06
244           eosMDJWFden(11) = -3.03175128e-16           eosMDJWFden(11) = -3.03175128 _d -16
245           eosMDJWFden(12) = -1.27934137e-17           eosMDJWFden(12) = -1.27934137 _d -17
246                    
247        elseif( equationOfState .eq. 'IDEALG' ) then        elseif( equationOfState .eq. 'IDEALG' ) then
248  C      C    
# Line 284  C Line 255  C
255                    
256        end if        end if
257    
258          _BEGIN_MASTER( myThid )
259    C--   Check EOS initialisation:
260    
261        call check_eos( myThid )        call check_eos( myThid )
262    
263        return        _END_MASTER( myThid )
264        end  
265          RETURN
266          END
267    
268  CBOP  CBOP
269  C     !ROUTINE: CHECK_EOS  C     !ROUTINE: CHECK_EOS
# Line 313  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 424  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)
408              write(msgBuf,'(a14,a22,f10.5,1x,f11.5)')              write(msgBuf,'(a14,a22,f10.5,1x,f11.5)')
409       &           'rho(find_rho) ',       &           'rho(find_rho) ',
410       &           ' = ', rholoc(i,j)+rhoNil, bulkMod(i,j)       &           ' = ', rholoc(i,j)+rhoConst, bulkMod(i,j)
411              CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,              CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
412       &           SQUEEZE_RIGHT , 1)       &           SQUEEZE_RIGHT , 1)
413    
# Line 439  C     check nonlinear EOS Line 416  C     check nonlinear EOS
416              bulkMod(i,j) = 0. _d 0              bulkMod(i,j) = 0. _d 0
417              write(msgBuf,'(a21,a15,f10.5,1x,f11.5)')              write(msgBuf,'(a21,a15,f10.5,1x,f11.5)')
418       &           'rho(find_rho_scalar) ',       &           'rho(find_rho_scalar) ',
419       &           ' = ', rholoc(i,j)+rhoNil, bulkMod(i,j)       &           ' = ', rholoc(i,j)+rhoConst, bulkMod(i,j)
420              CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,              CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
421       &           SQUEEZE_RIGHT , 1)       &           SQUEEZE_RIGHT , 1)
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.5  
changed lines
  Added in v.1.10.2.2

  ViewVC Help
Powered by ViewVC 1.1.22