| 1 |
heimbach |
1.1 |
c $Header: /u/u0/gcmpack/MITgcm/pkg/exf/exf_getclim.F,v 1.3 2003/10/09 04:19:19 edhill Exp $ |
| 2 |
|
|
|
| 3 |
|
|
#include "EXF_OPTIONS.h" |
| 4 |
|
|
|
| 5 |
|
|
|
| 6 |
|
|
subroutine exf_getclim( |
| 7 |
|
|
I mytime, |
| 8 |
|
|
I myiter, |
| 9 |
|
|
I mythid |
| 10 |
|
|
& ) |
| 11 |
|
|
|
| 12 |
|
|
c ================================================================== |
| 13 |
|
|
c SUBROUTINE exf_getclim |
| 14 |
|
|
c ================================================================== |
| 15 |
|
|
c |
| 16 |
|
|
c o Get the climatogy fields for the current time step. The switches |
| 17 |
|
|
c for the inclusion of the individual forcing components have to |
| 18 |
|
|
c be set in EXF_OPTIONS.h . |
| 19 |
|
|
c |
| 20 |
|
|
c A note on surface fluxes: |
| 21 |
|
|
c |
| 22 |
|
|
c The MITgcmUV's vertical coordinate z is positive upward. |
| 23 |
|
|
c This implies that a positive flux is out of the ocean |
| 24 |
|
|
c model. However, the wind stress forcing is not treated |
| 25 |
|
|
c this way. A positive zonal wind stress accelerates the |
| 26 |
|
|
c model ocean towards the east. |
| 27 |
|
|
c |
| 28 |
|
|
c started: Ralf.Giering@FastOpt.de 25-Mai-2000 |
| 29 |
|
|
c |
| 30 |
|
|
c ================================================================== |
| 31 |
|
|
c SUBROUTINE exf_getclim |
| 32 |
|
|
c ================================================================== |
| 33 |
|
|
|
| 34 |
|
|
implicit none |
| 35 |
|
|
|
| 36 |
|
|
c == global variables == |
| 37 |
|
|
#include "SIZE.h" |
| 38 |
|
|
#include "EEPARAMS.h" |
| 39 |
|
|
#include "PARAMS.h" |
| 40 |
|
|
#include "GRID.h" |
| 41 |
|
|
#include "DYNVARS.h" |
| 42 |
|
|
#include "exf_fields.h" |
| 43 |
|
|
#include "exf_clim_fields.h" |
| 44 |
|
|
|
| 45 |
|
|
c == routine arguments == |
| 46 |
|
|
|
| 47 |
|
|
c mythid - thread number for this instance of the routine. |
| 48 |
|
|
|
| 49 |
|
|
integer mythid |
| 50 |
|
|
integer myiter |
| 51 |
|
|
_RL mytime |
| 52 |
|
|
|
| 53 |
|
|
c == local variables == |
| 54 |
|
|
|
| 55 |
|
|
integer i, j, k |
| 56 |
|
|
integer bi, bj |
| 57 |
|
|
|
| 58 |
|
|
c == end of interface == |
| 59 |
|
|
|
| 60 |
|
|
#ifdef ALLOW_CLIMTEMP_RELAXATION |
| 61 |
|
|
c Get values of climatological temperature fields. |
| 62 |
|
|
call exf_set_climtemp ( mytime, myiter, mythid ) |
| 63 |
|
|
c-- Update the tile edges. |
| 64 |
|
|
_EXCH_XY_R8(climtemp, mythid) |
| 65 |
|
|
#endif |
| 66 |
|
|
|
| 67 |
|
|
#ifdef ALLOW_CLIMSALT_RELAXATION |
| 68 |
|
|
c Get values of climatological salinity fields. |
| 69 |
|
|
call exf_set_climsalt ( mytime, myiter, mythid ) |
| 70 |
|
|
c-- Update the tile edges. |
| 71 |
|
|
_EXCH_XY_R8(climsalt, mythid) |
| 72 |
|
|
#endif |
| 73 |
|
|
|
| 74 |
|
|
#ifdef ALLOW_CLIMSST_RELAXATION |
| 75 |
|
|
c Get values of climatological sst fields. |
| 76 |
|
|
call exf_set_climsst ( mytime, myiter, mythid ) |
| 77 |
|
|
c-- Update the tile edges. |
| 78 |
|
|
_EXCH_XY_R8(climsst, mythid) |
| 79 |
|
|
#endif |
| 80 |
|
|
|
| 81 |
|
|
#ifdef ALLOW_CLIMSSS_RELAXATION |
| 82 |
|
|
c Get values of climatological sst fields. |
| 83 |
|
|
call exf_set_climsss ( mytime, myiter, mythid ) |
| 84 |
|
|
c-- Update the tile edges. |
| 85 |
|
|
_EXCH_XY_R8(climsss, mythid) |
| 86 |
|
|
#endif |
| 87 |
|
|
|
| 88 |
|
|
DO bj=myByLo(myThid),myByHi(myThid) |
| 89 |
|
|
DO bi=myBxLo(myThid),myBxHi(myThid) |
| 90 |
|
|
cph DO k=1,Nr |
| 91 |
|
|
DO j=1-oLy,sNy+oLy |
| 92 |
|
|
DO i=1-oLx,sNx+oLx |
| 93 |
|
|
theta(i,j,1,bi,bj) = climsst(i,j,bi,bj) |
| 94 |
|
|
if ( myiter .EQ. niter0 ) then |
| 95 |
|
|
if ( maskC(i,j,1,bi,bj) .NE. 0. .AND. |
| 96 |
|
|
& theta(i,j,1,bi,bj) .EQ. 0. ) then |
| 97 |
|
|
print *, 'ph-warn-exf-clim ', i, j, theta(i,j,1,bi,bj) |
| 98 |
|
|
cph STOP 'in exf_getclim' |
| 99 |
|
|
endif |
| 100 |
|
|
endif |
| 101 |
|
|
ENDDO |
| 102 |
|
|
ENDDO |
| 103 |
|
|
cph ENDDO |
| 104 |
|
|
ENDDO |
| 105 |
|
|
ENDDO |
| 106 |
|
|
|
| 107 |
|
|
end |