File indexing completed on 2018-03-02 18:37:46 UTC
view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
b2ea1d2979 Jean*0001 module simple_sat_vapor_pres_mod
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033 use constants_mod, only: hlv,rvgas
0034
0035
0036 implicit none
0037 private
0038
0039 public :: lookup_es, lookup_des
0040 public :: escomp, descomp
0041
0042
0043
0044 interface lookup_es
0045 module procedure lookup_es_0d, lookup_es_1d, lookup_es_2d, lookup_es_3d
0046 end interface
0047
0048 interface escomp
0049 module procedure lookup_es_0d, lookup_es_1d, lookup_es_2d, lookup_es_3d
0050 end interface
0051
0052 interface lookup_des
0053 module procedure lookup_des_0d, lookup_des_1d, lookup_des_2d, lookup_des_3d
0054 end interface
0055
0056 interface descomp
0057 module procedure lookup_des_0d, lookup_des_1d, lookup_des_2d, lookup_des_3d
0058 end interface
0059
0060
0061
0062
0063
0064
0065
0066
0067
0068
0069
0070 real, parameter :: T0 = 273.16, &
0071 e0 = 610.78
0072
0073
0074
0075
0076
0077 subroutine lookup_es_0d ( temp, esat )
0078
0079 real, intent(in) :: temp
0080 real, intent(out) :: esat
0081
0082
0083
0084 esat = e0 * exp( -hlv/rvgas*(1.0/temp-1.0/T0))
0085
0086
0087
0088 end subroutine lookup_es_0d
0089
0090
0091
0092 subroutine lookup_es_1d ( temp, esat )
0093
0094 real, intent(in) :: temp(:)
0095 real, intent(out) :: esat(:)
0096
0097
0098
0099 esat = e0 * exp( -hlv/rvgas*(1.0/temp-1.0/T0))
0100
0101
0102
0103 end subroutine lookup_es_1d
0104
0105
0106
0107 subroutine lookup_es_2d ( temp, esat )
0108
0109 real, intent(in) :: temp(:,:)
0110 real, intent(out) :: esat(:,:)
0111
0112
0113
0114 esat = e0 * exp( -hlv/rvgas*(1.0/temp-1.0/T0))
0115
0116
0117
0118 end subroutine lookup_es_2d
0119
0120
0121
0122 subroutine lookup_es_3d ( temp, esat )
0123
0124 real, intent(in) :: temp(:,:,:)
0125 real, intent(out) :: esat(:,:,:)
0126
0127
0128
0129 esat = e0 * exp( -hlv/rvgas*(1.0/temp-1.0/T0))
0130
0131
0132
0133
0134 end subroutine lookup_es_3d
0135
0136
0137
0138
0139
0140 subroutine lookup_des_0d ( temp, desat )
0141
0142 real, intent(in) :: temp
0143 real, intent(out) :: desat
0144
0145
0146
0147 desat = e0*hlv/(rvgas*temp**2)*exp( -hlv/rvgas*(1.0/temp-1.0/T0))
0148
0149
0150
0151 end subroutine lookup_des_0d
0152
0153
0154
0155 subroutine lookup_des_1d ( temp, desat )
0156
0157 real, intent(in) :: temp (:)
0158 real, intent(out) :: desat(:)
0159
0160
0161
0162 desat = e0*hlv/(rvgas*temp**2)*exp( -hlv/rvgas*(1.0/temp-1.0/T0))
0163
0164
0165
0166 end subroutine lookup_des_1d
0167
0168
0169
0170 subroutine lookup_des_2d ( temp, desat )
0171
0172 real, intent(in) :: temp (:,:)
0173 real, intent(out) :: desat(:,:)
0174
0175
0176
0177 desat = e0*hlv/(rvgas*temp**2)*exp( -hlv/rvgas*(1.0/temp-1.0/T0))
0178
0179
0180
0181 end subroutine lookup_des_2d
0182
0183
0184
0185 subroutine lookup_des_3d ( temp, desat )
0186
0187 real, intent(in) :: temp (:,:,:)
0188 real, intent(out) :: desat(:,:,:)
0189
0190
0191
0192 desat = e0*hlv/(rvgas*temp**2)*exp( -hlv/rvgas*(1.0/temp-1.0/T0))
0193
0194
0195
0196
0197 end subroutine lookup_des_3d
0198
0199
0200
0201 end module simple_sat_vapor_pres_mod
0202