Ignore:
Timestamp:
Feb 16, 2018, 3:17:02 PM (7 years ago)
Author:
lfita
Message:

Adding:

  • `WRFz': as height above surface unstaggering WRFgeop
  • Fixing zwind computation
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/module_ForDiagnosticsVars.f90

    r1776 r1777  
    10271027  END SUBROUTINE var_zmla_generic
    10281028
    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)
    10301030! Subroutine to extrapolate the wind at a given height following the 'power law' methodology
    10311031!    wss[newz] = wss[z1]*(newz/z1)**alpha
     
    10391039    INTEGER, INTENT(in)                                  :: d1
    10401040    REAL(r_k), DIMENSION(d1), INTENT(in)                 :: u,v,z
    1041     REAL(r_k), INTENT(in)                                :: u10, v10, topo, sa, ca, newz
     1041    REAL(r_k), INTENT(in)                                :: u10, v10, sa, ca, newz
    10421042    REAL(r_k), INTENT(out)                               :: unewz, vnewz
    10431043
     
    10491049!!!!!!! Variables
    10501050! u,v: vertical wind components [ms-1]
    1051 ! z: height above surface [m]
     1051! z: height above surface on half-mass levels [m]
    10521052! u10,v10: 10-m wind components [ms-1]
    1053 ! topo: topographical height [m]
    10541053! sa, ca: local sine and cosine of map rotation [1.]
    10551054! newz: desired height above grpund of extrapolation
     
    10581057    fname = 'var_zwind'
    10591058
    1060     PRINT *,' ilev zaground newz z[ilev+1] z[ilev+2] _______'
     1059    !PRINT *,' ilev zaground newz z[ilev+1] z[ilev+2] _______'
    10611060    IF (z(1) < newz ) THEN
    10621061      DO inear = 1,d1-2
    10631062        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)
    10651064        IF ( zaground >= newz) EXIT
    10661065      END DO
    10671066    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'
    10691068      inear = d1 - 2
    10701069    END IF
     
    10831082       v2(1) = u(inear+1)
    10841083       v2(2) = v(inear+1)
    1085        zz(1) = z(inear) - topo
    1086        zz(2) = z(inear+1) - topo
     1084       zz(1) = z(inear)
     1085       zz(2) = z(inear+1)
    10871086    END IF
    10881087
    10891088    ! Computing for each component
    10901089    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)
    10941093   
    10951094    uvnewz = v1*(newz/zz(1))**alpha
     
    10981097    vnewz = uvnewz(1)*sa + uvnewz(2)*ca
    10991098
    1100     PRINT *,'  result vz:', uvnewz
     1099    !PRINT *,'  result vz:', uvnewz
    11011100
    11021101    !STOP
Note: See TracChangeset for help on using the changeset viewer.