|
||||
File indexing completed on 2018-03-02 18:45:26 UTC
view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC88974492f6 Andr*0001 #include "FIZHI_OPTIONS.h" c18993e51a Andr*0002 subroutine update_ocean_exports (myTime, myIter, myThid) 0003 c---------------------------------------------------------------------- 0004 c Subroutine update_ocean_exports - 'Wrapper' routine to update 88f72205aa Jean*0005 c the fields related to the ocean surface that are needed 88974492f6 Andr*0006 c by fizhi (sst and sea ice extent). c18993e51a Andr*0007 c 0008 c Call: getsst (Return the current sst field-read dataset if needed) 0009 c getsice (Return the current sea ice field-read data if needed) 0010 c----------------------------------------------------------------------- 0011 implicit none 0012 #include "SIZE.h" 0013 #include "GRID.h" 88974492f6 Andr*0014 #include "fizhi_ocean_coms.h" c18993e51a Andr*0015 #include "EEPARAMS.h" 88974492f6 Andr*0016 #include "chronos.h" c18993e51a Andr*0017 f0587bb5d2 Andr*0018 integer myIter, myThid 0019 _RL myTime c18993e51a Andr*0020 88974492f6 Andr*0021 integer i, j, bi, bj, biglobal, bjglobal c18993e51a Andr*0022 integer im1, im2, jm1, jm2, idim1, idim2, jdim1, jdim2 88974492f6 Andr*0023 integer nSxglobal, nSyglobal 0024 _RL sstmin 0025 parameter ( sstmin = 273.16 ) c18993e51a Andr*0026 88974492f6 Andr*0027 idim1 = 1-OLx 0028 idim2 = sNx+OLx 0029 jdim1 = 1-OLy 0030 jdim2 = sNy+OLy 0031 im1 = 1 0032 im2 = sNx 0033 jm1 = 1 0034 jm2 = sNy 0035 nSxglobal = nSx*nPx 0036 nSyglobal = nSy*nPy c18993e51a Andr*0037 88974492f6 Andr*0038 C*********************************************************************** c18993e51a Andr*0039 88974492f6 Andr*0040 DO BJ = myByLo(myThid),myByHi(myThid) 0041 DO BI = myBxLo(myThid),myBxHi(myThid) c18993e51a Andr*0042 88974492f6 Andr*0043 biglobal=bi+(myXGlobalLo-1)/im2 0044 bjglobal=bj+(myYGlobalLo-1)/jm2 0045 0046 call getsst(ksst,idim1,idim2,jdim1,jdim2,im1,im2,jm1,jm2,nSx, 0047 . nSy,nSxglobal,nSyglobal,bi,bj,biglobal,bjglobal,nymd,nhms,sst) 0048 call getsice(kice,idim1,idim2,jdim1,jdim2,im1,im2,jm1,jm2,nSx, 0049 . nSy,nSxglobal,nSyglobal,bi,bj,biglobal,bjglobal,nymd,nhms,sice) 0050 0051 c Check for Minimum Open-Water SST 0052 c -------------------------------- 0053 do j=jm1,jm2 0054 do i=im1,im2 0055 if(sice(i,j,bi,bj).eq.0.0 .and. sst(i,j,bi,bj).lt.sstmin) 0056 . sst(i,j,bi,bj) = sstmin c18993e51a Andr*0057 enddo 0058 enddo 0059 88974492f6 Andr*0060 ENDDO 0061 ENDDO 0062 c18993e51a Andr*0063 return 0064 end 88974492f6 Andr*0065 0066 subroutine getsice(iunit,idim1,idim2,jdim1,jdim2,im1,im2,jm1,jm2, 0067 . nSumx,nSumy,nPgx,nPgy,bi,bj,biglobal,bjglobal,nymd,nhms,sice) 0068 C************************************************************************ 0069 C 0070 C!ROUTINE: GETSICE 0071 C!DESCRIPTION: GETSICE returns the sea ice depth. 0072 C! This routine is adaptable for any frequency 0073 C! data upto a daily frequency. 0074 C! note: for diurnal data ndmax should be increased. 0075 C 0076 C!INPUT PARAMETERS: 0077 C! iunit Unit number assigned to the sice data file 0078 C! idim1 Start dimension in x-direction 0079 C! idim2 End dimension in x-direction 0080 C! jdim1 Start dimension in y-direction 0081 C! jdim2 End dimension in y-direction 0082 C! im1 Begin of x-direction span for filling sice 0083 C! im2 End of x-direction span for filling sice 0084 C! jm1 Begin of y-direction span for filling sice 0085 C! jm2 End of y-direction span for filling sice 0086 C! nSumx Number of processors in x-direction (local processor) 0087 C! nSumy Number of processors in y-direction (local processor) 0088 C! nPgx Number of processors in x-direction (global) 0089 C! nPgx Number of processors in y-direction (global) 0090 C! bi Processor number in x-direction (local to processor) 0091 C! bj Processor number in y-direction (local to processor) 0092 C! biglobal Processor number in x-direction (global) 0093 C! bjglobal Processor number in y-direction (global) 0094 C! nymd YYMMDD of the current model timestep 0095 C! nhms HHMMSS of the model time 0096 C 0097 C!OUTPUT PARAMETERS: 0098 C! sice(idim1:idim2,jdim1:jdim2,nSumx,nSumy) Sea ice depth in meters 0099 C 0100 C!ROUTINES CALLED: 0101 C 0102 C! bcdata Reads the data for a given unit number 0103 C! bcheader Reads the header info for a given unit number 0104 C! interp_time Returns weights for linear interpolation 0105 C 0106 C-------------------------------------------------------------------------- 0107 0108 implicit none 0109 #include "SIZE.h" 0110 0111 integer iunit,idim1,idim2,jdim1,jdim2,im1,im2,jm1,jm2,nSumx,nSumy 0112 integer nPgx,nPgy,bi,bj,biglobal,bjglobal,nymd,nhms 0113 0114 _RL sice(idim1:idim2,jdim1:jdim2,nSumx,nSumy) 0115 0116 integer i,j 0117 0118 do j = jm1,jm2 0119 do i = im1,im2 0120 sice(i,j,bi,bj) = 0. 0121 enddo 0122 enddo 0123 0124 return 0125 end 0126 subroutine getsst(iunit,idim1,idim2,jdim1,jdim2,im1,im2,jm1,jm2, 0127 . nSumx,nSumy,nPgx,nPgy,bi,bj,biglobal,bjglobal,nymd,nhms,sst) 0128 C************************************************************************ 0129 C 0130 C!ROUTINE: GETSST 0131 C!DESCRIPTION: GETSST gets the SST data. 0132 C! This routine is adaptable for any frequency 0133 C! data upto a daily frequency. 0134 C! note: for diurnal data ndmax should be increased. 0135 C 0136 C!INPUT PARAMETERS: 0137 C! iunit Unit number assigned to the sice data file 0138 C! idim1 Start dimension in x-direction 0139 C! idim2 End dimension in x-direction 0140 C! jdim1 Start dimension in y-direction 0141 C! jdim2 End dimension in y-direction 0142 C! im1 Begin of x-direction span for filling sice 0143 C! im2 End of x-direction span for filling sice 0144 C! jm1 Begin of y-direction span for filling sice 0145 C! jm2 End of y-direction span for filling sice 0146 C! nSumx Number of processors in x-direction (local processor) 0147 C! nSumy Number of processors in y-direction (local processor) 0148 C! nPgx Number of processors in x-direction (global) 0149 C! nPgy Number of processors in y-direction (global) 0150 C! bi Processor number in x-direction (local to processor) 0151 C! bj Processor number in y-direction (local to processor) 0152 C! biglobal Processor number in x-direction (global) 0153 C! bjglobal Processor number in y-direction (global) 0154 C! nymd YYMMDD of the current model timestep 0155 C! nhms HHMMSS of the model time 0156 C 0157 C!OUTPUT PARAMETERS: 0158 C! sst(idim1:idim2,jdim1:jdim2,nSumx,nSumy) Sea surface temperature (K) 0159 C 0160 C!ROUTINES CALLED: 0161 C 0162 C! bcdata Reads the data for a given unit number 0163 C! bcheader Reads the header info for a given unit number 0164 C! interp_time Returns weights for linear interpolation 0165 C 0166 C-------------------------------------------------------------------------- 0167 0168 implicit none 0169 #include "SIZE.h" 0170 0171 integer iunit,idim1,idim2,jdim1,jdim2,im1,im2,jm1,jm2,nSumx,nSumy 0172 integer nPgx,nPgy,bi,bj,biglobal,bjglobal,nymd,nhms 0173 0174 _RL sst(idim1:idim2,jdim1:jdim2,nSumx,nSumy) 0175 0176 integer i,j 0177 0178 do j = jm1,jm2 0179 do i = im1,im2 0180 sst(i,j,bi,bj) = 280. 0181 enddo 0182 enddo 0183 0184 return 0185 end
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated from https://github.com/MITgcm/MITgcm by the 2.2.1-MITgcm-0.1 LXR engine. The LXR team |