| 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 |
#ifdef ALLOW_AUTODIFF |
| 45 |
# include "ctrl.h" |
| 46 |
# include "ctrl_dummy.h" |
| 47 |
#endif |
| 48 |
|
| 49 |
c == routine arguments == |
| 50 |
|
| 51 |
c mythid - thread number for this instance of the routine. |
| 52 |
|
| 53 |
integer mythid |
| 54 |
integer myiter |
| 55 |
_RL mytime |
| 56 |
|
| 57 |
c == local variables == |
| 58 |
|
| 59 |
integer i, j, k |
| 60 |
integer bi, bj |
| 61 |
|
| 62 |
c == end of interface == |
| 63 |
|
| 64 |
#ifdef ALLOW_CLIMTEMP_RELAXATION |
| 65 |
c Get values of climatological temperature fields. |
| 66 |
call exf_set_climtemp ( mytime, myiter, mythid ) |
| 67 |
c-- Update the tile edges. |
| 68 |
_EXCH_XY_R8(climtemp, mythid) |
| 69 |
#endif |
| 70 |
|
| 71 |
#ifdef ALLOW_CLIMSALT_RELAXATION |
| 72 |
c Get values of climatological salinity fields. |
| 73 |
call exf_set_climsalt ( mytime, myiter, mythid ) |
| 74 |
c-- Update the tile edges. |
| 75 |
_EXCH_XY_R8(climsalt, mythid) |
| 76 |
#endif |
| 77 |
|
| 78 |
#ifdef ALLOW_CLIMSST_RELAXATION |
| 79 |
c Get values of climatological sst fields. |
| 80 |
call exf_set_climsst ( mytime, myiter, mythid ) |
| 81 |
c-- Update the tile edges. |
| 82 |
_EXCH_XY_R8(climsst, mythid) |
| 83 |
#endif |
| 84 |
|
| 85 |
#ifdef ALLOW_CLIMSSS_RELAXATION |
| 86 |
c Get values of climatological sst fields. |
| 87 |
call exf_set_climsss ( mytime, myiter, mythid ) |
| 88 |
c-- Update the tile edges. |
| 89 |
_EXCH_XY_R8(climsss, mythid) |
| 90 |
#endif |
| 91 |
|
| 92 |
#ifdef ALLOW_SST_CONTROL |
| 93 |
call ctrl_get_gen ( |
| 94 |
& xx_sst_file, xx_sststartdate, xx_sstperiod, |
| 95 |
& maskc, climsst, xx_sst0, xx_sst1, xx_sst_dummy, |
| 96 |
& mytime, myiter, mythid ) |
| 97 |
#endif |
| 98 |
|
| 99 |
DO bj=myByLo(myThid),myByHi(myThid) |
| 100 |
DO bi=myBxLo(myThid),myBxHi(myThid) |
| 101 |
cph DO k=1,Nr |
| 102 |
DO j=1-oLy,sNy+oLy |
| 103 |
DO i=1-oLx,sNx+oLx |
| 104 |
theta(i,j,1,bi,bj) = climsst(i,j,bi,bj) |
| 105 |
if ( myiter .EQ. niter0 ) then |
| 106 |
if ( maskC(i,j,1,bi,bj) .NE. 0. .AND. |
| 107 |
& theta(i,j,1,bi,bj) .EQ. 0. ) then |
| 108 |
print *, 'ph-warn-exf-clim ', i, j, theta(i,j,1,bi,bj) |
| 109 |
cph STOP 'in exf_getclim' |
| 110 |
endif |
| 111 |
endif |
| 112 |
ENDDO |
| 113 |
ENDDO |
| 114 |
cph ENDDO |
| 115 |
ENDDO |
| 116 |
ENDDO |
| 117 |
|
| 118 |
|
| 119 |
end |