Changeset 1777 in lmdz_wrf for trunk/tools/module_ForDiagnosticsVars.f90
- Timestamp:
- Feb 16, 2018, 3:17:02 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/module_ForDiagnosticsVars.f90
r1776 r1777 1027 1027 END SUBROUTINE var_zmla_generic 1028 1028 1029 SUBROUTINE var_zwind(d1, u, v, z, u10, v10, sa, ca, topo,newz, unewz, vnewz)1029 SUBROUTINE var_zwind(d1, u, v, z, u10, v10, sa, ca, newz, unewz, vnewz) 1030 1030 ! Subroutine to extrapolate the wind at a given height following the 'power law' methodology 1031 1031 ! wss[newz] = wss[z1]*(newz/z1)**alpha … … 1039 1039 INTEGER, INTENT(in) :: d1 1040 1040 REAL(r_k), DIMENSION(d1), INTENT(in) :: u,v,z 1041 REAL(r_k), INTENT(in) :: u10, v10, topo,sa, ca, newz1041 REAL(r_k), INTENT(in) :: u10, v10, sa, ca, newz 1042 1042 REAL(r_k), INTENT(out) :: unewz, vnewz 1043 1043 … … 1049 1049 !!!!!!! Variables 1050 1050 ! u,v: vertical wind components [ms-1] 1051 ! z: height above surface [m]1051 ! z: height above surface on half-mass levels [m] 1052 1052 ! u10,v10: 10-m wind components [ms-1] 1053 ! topo: topographical height [m]1054 1053 ! sa, ca: local sine and cosine of map rotation [1.] 1055 1054 ! newz: desired height above grpund of extrapolation … … 1058 1057 fname = 'var_zwind' 1059 1058 1060 PRINT *,' ilev zaground newz z[ilev+1] z[ilev+2] _______'1059 !PRINT *,' ilev zaground newz z[ilev+1] z[ilev+2] _______' 1061 1060 IF (z(1) < newz ) THEN 1062 1061 DO inear = 1,d1-2 1063 1062 zaground = z(inear+2) 1064 PRINT *, inear, z(inear), newz, z(inear+1), z(inear+2)1063 !PRINT *, inear, z(inear), newz, z(inear+1), z(inear+2) 1065 1064 IF ( zaground >= newz) EXIT 1066 1065 END DO 1067 1066 ELSE 1068 PRINT *, 1, z(1), newz, z(2), z(3), ' z(1) > newz'1067 !PRINT *, 1, z(1), newz, z(2), z(3), ' z(1) > newz' 1069 1068 inear = d1 - 2 1070 1069 END IF … … 1083 1082 v2(1) = u(inear+1) 1084 1083 v2(2) = v(inear+1) 1085 zz(1) = z(inear) - topo1086 zz(2) = z(inear+1) - topo1084 zz(1) = z(inear) 1085 zz(2) = z(inear+1) 1087 1086 END IF 1088 1087 1089 1088 ! Computing for each component 1090 1089 alpha = (LOG(ABS(v2))-LOG(ABS(v1)))/(LOG(zz(2))-LOG(zz(1))) 1091 PRINT *,' Computing with v1:', v1, ' ms-1 v2:', v2, ' ms-1'1092 PRINT *,' z1:', zz(1), 'm z2:', zz(2), ' m'1093 PRINT *,' alhpa u:', alpha(1), ' alpha 2:', alpha(2)1090 !PRINT *,' Computing with v1:', v1, ' ms-1 v2:', v2, ' ms-1' 1091 !PRINT *,' z1:', zz(1), 'm z2:', zz(2), ' m' 1092 !PRINT *,' alhpa u:', alpha(1), ' alpha 2:', alpha(2) 1094 1093 1095 1094 uvnewz = v1*(newz/zz(1))**alpha … … 1098 1097 vnewz = uvnewz(1)*sa + uvnewz(2)*ca 1099 1098 1100 PRINT *,' result vz:', uvnewz1099 !PRINT *,' result vz:', uvnewz 1101 1100 1102 1101 !STOP
Note: See TracChangeset
for help on using the changeset viewer.