File indexing completed on 2018-03-02 18:37:17 UTC
view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
a27dd2281d Jean*0001 #include "AIM_OPTIONS.h"
0002 #ifdef ALLOW_LAND
0003 #include "LAND_OPTIONS.h"
0004 #endif
0005
0006
0007
0008
0009 SUBROUTINE AIM_AIM2LAND(
0010 I land_frc, bi, bj, myTime, myIter, myThid)
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020 IMPLICIT NONE
0021
0022
0023
0024 #include "AIM_SIZE.h"
0025
0026 #include "EEPARAMS.h"
0027 #include "PARAMS.h"
0028
b3097ed02d Jean*0029
0030 #include "AIM_PARAMS.h"
a27dd2281d Jean*0031 #include "com_physcon.h"
0032 #include "com_physvar.h"
0033
0034 #ifdef ALLOW_LAND
0035 #include "LAND_SIZE.h"
0036 #include "LAND_PARAMS.h"
0037 #include "LAND_VARS.h"
0038 #endif
0039
0040
0041
0042
0043
0044
0045
0046
0047 _RS land_frc(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
0048 INTEGER bi, bj, myIter, myThid
0049 _RL myTime
0050
0051
0052 #ifdef ALLOW_AIM
0053 #ifdef ALLOW_LAND
0054
b3097ed02d Jean*0055
0056
a27dd2281d Jean*0057 _RL conv_precip
b3097ed02d Jean*0058 INTEGER i,j,k,I2
a27dd2281d Jean*0059
b3097ed02d Jean*0060
0061 IF ( .NOT.land_impl_grT ) THEN
0062 DO j=1,sNy
0063 DO i=1,sNx
0064 land_Pr_m_Ev(i,j,bi,bj) = 0. _d 0
1b19160514 Jean*0065 land_EnWFlux(i,j,bi,bj) = 0. _d 0
b3097ed02d Jean*0066 ENDDO
0067 ENDDO
0068 ENDIF
0069
0070
a27dd2281d Jean*0071
0072
0073
b3097ed02d Jean*0074
0075 conv_Precip = 1. _d -3
a27dd2281d Jean*0076
1b19160514 Jean*0077 IF ( land_calc_grT .AND. .NOT.land_impl_grT ) THEN
0078
b3097ed02d Jean*0079 k = 0
0080 IF (aim_splitSIOsFx) k = 1
0081 DO j=1,sNy
0082 DO i=1,sNx
0083 I2 = i+(j-1)*sNx
0084
0085
1b19160514 Jean*0086 land_HeatFlx(i,j,bi,bj) =
b3097ed02d Jean*0087 & SSR(I2,k,myThid)
0088 & - SLR(I2,k,myThid)
0089 & - SHF(I2,1,myThid)
0090 & - EVAP(I2,1,myThid)*ALHC
0091 ENDDO
0092 ENDDO
0093
1b19160514 Jean*0094 IF ( land_calc_snow ) THEN
b3097ed02d Jean*0095
0096 DO j=1,sNy
0097 DO i=1,sNx
0098 I2 = i+(j-1)*sNx
1b19160514 Jean*0099 IF ( land_skinT(i,j,bi,bj).LT. 0. _d 0 .OR.
0100 & land_hSnow(i,j,bi,bj).GT. 0. _d 0 ) THEN
0101 land_HeatFlx(i,j,bi,bj) = land_HeatFlx(i,j,bi,bj)
b3097ed02d Jean*0102 & - EVAP(I2,1,myThid)*ALHF
1b19160514 Jean*0103 land_EnWFlux(i,j,bi,bj) =
0104 & EVAP(I2,1,myThid)*ALHF
0105 ENDIF
b3097ed02d Jean*0106 ENDDO
0107 ENDDO
0108 ENDIF
0109
0110
0111 ENDIF
0112
1b19160514 Jean*0113
0114 DO j=1,sNy
0115 DO i=1,sNx
0116 I2 = i+(j-1)*sNx
0117
0118
0119
0120 land_Pr_m_Ev(i,j,bi,bj) = land_Pr_m_Ev(i,j,bi,bj)
0121 & + conv_precip*( PRECNV(I2,myThid)
0122 & + PRECLS(I2,myThid)
0123 & - EVAP(I2,1,myThid)
0124 & )
0125
0126 ENDDO
0127 ENDDO
0128
0129 IF ( aim_energPrecip ) THEN
0130
0131
0132 DO j=1,sNy
0133 DO i=1,sNx
0134 I2 = i+(j-1)*sNx
0135 land_EnWFlux(i,j,bi,bj) = land_EnWFlux(i,j,bi,bj)
0136 & + EnPrec(I2,myThid)*( PRECNV(I2,myThid)
0137 & +PRECLS(I2,myThid) )
0138 ENDDO
0139 ENDDO
0140 ENDIF
0141
a27dd2281d Jean*0142
0143
0144
0145 #endif /* ALLOW_LAND */
0146 #endif /* ALLOW_AIM */
0147
0148 RETURN
0149 END