Back to home page

MITgcm

 
 

    


File indexing completed on 2019-08-13 05:10:48 UTC

view on githubraw file Latest commit 056678d4 on 2019-07-20 15:49:54 UTC
056678d46d Jean*0001 #include "EXF_OPTIONS.h"
                0002 #ifdef ALLOW_EXCH2
                0003 # include "W2_OPTIONS.h"
                0004 #endif /* ALLOW_EXCH2 */
                0005 
                0006 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
                0007 CBOP 0
                0008 C     !ROUTINE: EXF_INIT_INTERP
                0009 
                0010 C     !INTERFACE:
                0011       SUBROUTINE EXF_INIT_INTERP( myThid )
                0012 
                0013 C     !DESCRIPTION:
                0014 C     Define input grid setting to be used for EXF interpolated fields
                0015 C     as default input grid.
                0016 C     Note: default input grid matches (in case of simple Lat-Lonp grid)
                0017 C     model grid cell-center position, leading to trivial interpolation.
                0018 
                0019 C     !USES:
                0020       IMPLICIT NONE
                0021 #include "SIZE.h"
                0022 #include "EEPARAMS.h"
                0023 #include "PARAMS.h"
                0024 #ifdef USE_EXF_INTERPOLATION
                0025 # ifdef ALLOW_EXCH2
                0026 # include "W2_EXCH2_SIZE.h"
                0027 # include "W2_EXCH2_TOPOLOGY.h"
                0028 # endif /* ALLOW_EXCH2 */
                0029 # include "SET_GRID.h"
                0030 #endif /* USE_EXF_INTERPOLATION */
                0031 #include "EXF_INTERP_SIZE.h"
                0032 #include "EXF_INTERP_PARAM.h"
                0033 
                0034 C     !INPUT PARAMETERS:
                0035       INTEGER myThid
                0036 CEOP
                0037 
                0038 #ifdef USE_EXF_INTERPOLATION
                0039 C     !LOCAL VARIABLES:
                0040       INTEGER j
                0041 c     CHARACTER*(MAX_LEN_MBUF) msgBuf
                0042 
                0043       _BEGIN_MASTER(myThid)
                0044 
                0045 # ifdef ALLOW_EXCH2
                0046       inp_gNx = exch2_mydNx(1)
                0047       inp_gNy = exch2_mydNy(1)
                0048 # else /* ALLOW_EXCH2 */
                0049       inp_gNx = Nx
                0050       inp_gNy = Ny
                0051 # endif /* ALLOW_EXCH2 */
                0052 
                0053       inp_lon0 = xgOrigin + delX(1)*halfRL
                0054       inp_lat0 = ygOrigin + delY(1)*halfRL
                0055 
                0056       inp_dLon = delX(1)
                0057       DO j=1,MAX_LAT_INC
                0058         IF (j.LT.inp_gNy) THEN
                0059           inp_dLat(j) = (delY(j) + delY(j+1))*halfRL
                0060         ELSE
                0061           inp_dLat(j) = 0.
                0062         ENDIF
                0063       ENDDO
                0064 
                0065       _END_MASTER(myThid)
                0066 #endif /* USE_EXF_INTERPOLATION */
                0067 
                0068       RETURN
                0069       END