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 |
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 |
|
|
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 |
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 |
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 |
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) |
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 |
|
|