File indexing completed on 2018-03-02 18:37:03 UTC
view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
d87b427b2d Jean*0001 #include "CPP_OPTIONS.h"
0002
0003
0004
0005
0006 SUBROUTINE SET_GRID_FACTORS( myThid )
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 IMPLICIT NONE
0017
0018 #include "SIZE.h"
0019 #include "EEPARAMS.h"
0020 #include "PARAMS.h"
0021 #include "GRID.h"
0022
0023
0024
0025
0026 INTEGER myThid
0027
0028
0029
0030
f04f2001af Jean*0031
d87b427b2d Jean*0032 INTEGER k
f04f2001af Jean*0033
0034
d87b427b2d Jean*0035
0036
0037 _BEGIN_MASTER(myThid)
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048 DO k=1,Nr
0049 deepFacC(k) = 1. _d 0
0050 deepFac2C(k)= 1. _d 0
0051 recip_deepFacC(k) = 1. _d 0
0052 recip_deepFac2C(k)= 1. _d 0
0053 ENDDO
0054 DO k=1,Nr+1
0055 deepFacF(k) = 1. _d 0
0056 deepFac2F(k)= 1. _d 0
0057 recip_deepFacF(k) = 1. _d 0
0058 recip_deepFac2F(k)= 1. _d 0
0059 ENDDO
0060 IF ( deepAtmosphere ) THEN
0061
0062 IF ( usingZCoords ) THEN
0063 DO k=1,Nr
0064 deepFacC(k) = (rSphere+rC(k))*recip_rSphere
0065 deepFac2C(k) = deepFacC(k)*deepFacC(k)
0066 ENDDO
0067 DO k=1,Nr+1
0068 deepFacF(k) = (rSphere+rF(k))*recip_rSphere
0069 deepFac2F(k) = deepFacF(k)*deepFacF(k)
0070 ENDDO
0071 ELSE
0072 DO k=1,Nr
0073 deepFacC(k) = ( rSphere + phiRef(2*k)*recip_gravity
0074 & )*recip_rSphere
0075 deepFac2C(k) = deepFacC(k)*deepFacC(k)
0076 ENDDO
0077 DO k=1,Nr+1
0078 deepFacF(k) = ( rSphere + phiRef(2*k-1)*recip_gravity
0079 & )*recip_rSphere
0080 deepFac2F(k) = deepFacF(k)*deepFacF(k)
0081 ENDDO
0082 ENDIF
0083
0084 DO k=1,Nr
0085 recip_deepFacC(k) = 1. _d 0/deepFacC(k)
0086 recip_deepFac2C(k)= 1. _d 0/deepFac2C(k)
0087 ENDDO
0088 DO k=1,Nr+1
0089 recip_deepFacF(k) = 1. _d 0/deepFacF(k)
0090 recip_deepFac2F(k)= 1. _d 0/deepFac2F(k)
0091 ENDDO
0092 ENDIF
0093
0094 _END_MASTER(myThid)
0095 _BARRIER
0096
0097 RETURN
0098 END