Back to home page

MITgcm

 
 

    


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

view on githubraw file Latest commit 30fcb891 on 2019-07-20 15:39:54 UTC
6d54cf9ca1 Ed H*0001 #include "EXF_OPTIONS.h"
7f861c1808 Patr*0002 
4aa4270510 Jean*0003 C--  File exf_set_gen.F: General routines to load-in an input field
                0004 C--   Contents
                0005 C--   o EXF_SET_GEN
                0006 C--   o EXF_INIT_GEN
                0007 
                0008 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
                0009 
1fc1e2c3e5 Jean*0010       SUBROUTINE EXF_SET_GEN(
66f8faf47e Jean*0011      &     genfile, genStartTime, genperiod,
4bf6063982 Patr*0012      &     exf_inscal_gen, genremove_intercept, genremove_slope,
981f32514d Dimi*0013      &     genfld, gen0, gen1, genmask,
                0014 #ifdef USE_EXF_INTERPOLATION
                0015      &     gen_lon0, gen_lon_inc, gen_lat0, gen_lat_inc,
4aa81846e7 Dimi*0016      &     gen_nlon, gen_nlat, gen_xout, gen_yout, interp_method,
981f32514d Dimi*0017 #endif
1fc1e2c3e5 Jean*0018      &     myTime, myIter, myThid )
                0019 
8a0f942cd7 Jean*0020 C  *=================================================================*
                0021 C  | SUBROUTINE EXF_SET_GEN
                0022 C  *=================================================================*
                0023 C  | o old version of current S/R EXF_SET_FLD, with fewer arguments
                0024 C  | o kept to allow to compile and use old piece of code
                0025 C  *=================================================================*
1fc1e2c3e5 Jean*0026 
                0027       IMPLICIT NONE
                0028 
                0029 C     == global variables ==
7f861c1808 Patr*0030 #include "EEPARAMS.h"
                0031 #include "SIZE.h"
082e18c36c Jean*0032 #include "EXF_PARAM.h"
30fcb891cf Jean*0033 #include "EXF_INTERP_SIZE.h"
7f861c1808 Patr*0034 
1fc1e2c3e5 Jean*0035 C     == routine arguments ==
66f8faf47e Jean*0036       _RL genStartTime, genperiod
4bf6063982 Patr*0037       _RL exf_inscal_gen
                0038       _RL genremove_intercept, genremove_slope
8a0f942cd7 Jean*0039       _RL genfld(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0040       _RL gen0  (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0041       _RL gen1  (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
1fc1e2c3e5 Jean*0042       CHARACTER*1 genmask
                0043       CHARACTER*(128) genfile
                0044       _RL     myTime
                0045       INTEGER myIter
                0046       INTEGER myThid
5d2261ac89 Dimi*0047 
981f32514d Dimi*0048 #ifdef USE_EXF_INTERPOLATION
1fc1e2c3e5 Jean*0049 C     gen_lon_0 ,gen_lat_0 :: longitude and latitude of SouthWest
                0050 C                             corner of global input grid
                0051 C     gen_nlon, gen_nlat   :: input x-grid and y-grid size
                0052 C     gen_lon_inc          :: scalar x-grid increment
                0053 C     gen_lat_inc          :: vector y-grid increments
                0054 C     gen_xout, gen_yout   :: coordinates for output grid
981f32514d Dimi*0055       _RL gen_lon0, gen_lon_inc
                0056       _RL gen_lat0, gen_lat_inc(MAX_LAT_INC)
                0057       INTEGER gen_nlon, gen_nlat
bda7c25f4a Dimi*0058       _RS gen_xout  (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0059       _RS gen_yout  (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
1fc1e2c3e5 Jean*0060       INTEGER interp_method
5d2261ac89 Dimi*0061 #endif /* USE_EXF_INTERPOLATION */
7f861c1808 Patr*0062 
1fc1e2c3e5 Jean*0063 C     == local variables ==
                0064 C     msgBuf     :: Informational/error message buffer
8a0f942cd7 Jean*0065 c     CHARACTER*(MAX_LEN_MBUF) msgBuf
                0066       CHARACTER*(7) gen_name
1fc1e2c3e5 Jean*0067 C     == end of interface ==
7f861c1808 Patr*0068 
8a0f942cd7 Jean*0069       gen_name   = 'exf_gen'
                0070       CALL EXF_SET_FLD(
                0071      I     gen_name, genfile, genmask,
                0072      I     genStartTime, genperiod, repeatPeriod,
                0073      I     exf_inscal_gen, genremove_intercept, genremove_slope,
                0074      U     genfld, gen0, gen1,
981f32514d Dimi*0075 #ifdef USE_EXF_INTERPOLATION
8a0f942cd7 Jean*0076      I     gen_lon0, gen_lon_inc, gen_lat0, gen_lat_inc,
                0077      I     gen_nlon, gen_nlat, gen_xout, gen_yout, interp_method,
                0078 #endif
                0079      I     myTime, myIter, myThid )
7f861c1808 Patr*0080 
72e614f603 Jean*0081       RETURN
                0082       END
7f861c1808 Patr*0083 
4aa4270510 Jean*0084 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
7f861c1808 Patr*0085 
1fc1e2c3e5 Jean*0086       SUBROUTINE EXF_INIT_GEN (
a786f8a6e0 Dimi*0087      &     genfile, genperiod, exf_inscal_gen, genmask,
5d2261ac89 Dimi*0088      &     genconst, genfld, gen0, gen1,
                0089 #ifdef USE_EXF_INTERPOLATION
                0090      &     gen_lon0, gen_lon_inc, gen_lat0, gen_lat_inc,
                0091      &     gen_nlon, gen_nlat, gen_xout, gen_yout, interp_method,
                0092 #endif
1fc1e2c3e5 Jean*0093      &     myThid )
                0094 
8a0f942cd7 Jean*0095 C  *=================================================================*
                0096 C  | SUBROUTINE EXF_INIT_GEN
                0097 C  *=================================================================*
                0098 C  | o old version of current S/R EXF_INIT_FLD, with fewer arguments
                0099 C  | o kept to allow to compile and use old piece of code
                0100 C  *=================================================================*
1fc1e2c3e5 Jean*0101 
                0102       IMPLICIT NONE
                0103 
                0104 C     == global variables ==
7f861c1808 Patr*0105 #include "EEPARAMS.h"
                0106 #include "SIZE.h"
30fcb891cf Jean*0107 #include "EXF_INTERP_SIZE.h"
7f861c1808 Patr*0108 
1fc1e2c3e5 Jean*0109 C     == routine arguments ==
a786f8a6e0 Dimi*0110       _RL genperiod, exf_inscal_gen, genconst
8a0f942cd7 Jean*0111       _RL genfld(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0112       _RL gen0  (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0113       _RL gen1  (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
1fc1e2c3e5 Jean*0114       CHARACTER*1 genmask
                0115       CHARACTER*(128) genfile
                0116       INTEGER myThid
7f861c1808 Patr*0117 
5d2261ac89 Dimi*0118 #ifdef USE_EXF_INTERPOLATION
1fc1e2c3e5 Jean*0119 C     gen_lon_0 ,gen_lat_0 :: longitude and latitude of SouthWest
                0120 C                             corner of global input grid
                0121 C     gen_nlon, gen_nlat   :: input x-grid and y-grid size
                0122 C     gen_lon_inc          :: scalar x-grid increment
                0123 C     gen_lat_inc          :: vector y-grid increments
                0124 C     gen_xout, gen_yout   :: coordinates for output grid
5d2261ac89 Dimi*0125       _RL gen_lon0, gen_lon_inc
                0126       _RL gen_lat0, gen_lat_inc(MAX_LAT_INC)
                0127       INTEGER gen_nlon, gen_nlat
                0128       _RS gen_xout  (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0129       _RS gen_yout  (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
1fc1e2c3e5 Jean*0130       INTEGER interp_method
5d2261ac89 Dimi*0131 #endif /* USE_EXF_INTERPOLATION */
                0132 
1fc1e2c3e5 Jean*0133 C     == local variables ==
                0134 C     msgBuf     :: Informational/error message buffer
8a0f942cd7 Jean*0135 c     CHARACTER*(MAX_LEN_MBUF) msgBuf
                0136       CHARACTER*(7) gen_name
1fc1e2c3e5 Jean*0137 C     == end of interface ==
7f861c1808 Patr*0138 
8a0f942cd7 Jean*0139       gen_name   = 'exf_gen'
                0140       CALL EXF_INIT_FLD (
                0141      I     gen_name, genfile, genmask,
                0142      I     genperiod, exf_inscal_gen, genconst,
                0143      U     genfld, gen0, gen1,
4aa4270510 Jean*0144 #ifdef USE_EXF_INTERPOLATION
8a0f942cd7 Jean*0145      I     gen_lon0, gen_lon_inc, gen_lat0, gen_lat_inc,
                0146      I     gen_nlon, gen_nlat, gen_xout, gen_yout, interp_method,
                0147 #endif
                0148      I     myThid )
6ad6f50e52 Patr*0149 
72e614f603 Jean*0150       RETURN
                0151       END