Skip to content

Commit

Permalink
Removed commented-out unnecessary codes
Browse files Browse the repository at this point in the history
  • Loading branch information
yuanjianz committed Jul 18, 2024
1 parent 7551941 commit 7a0db0e
Showing 1 changed file with 1 addition and 80 deletions.
81 changes: 1 addition & 80 deletions src/Extensions/hcox_dustdead_mod.F
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,6 @@ SUBROUTINE HCOX_DustDead_Run( ExtState, HcoState, RC )
REAL*8 :: PMID(HcoState%NX) ! mid layer P (L=1)
REAL*8 :: TLON(HcoState%NX) ! temperature (L=1)
REAL*8 :: THLON(HcoState%NX) ! pot. temp. (L=1)
! REAL*8 :: ULON(HcoState%NX) ! U-wind (L=1)
! REAL*8 :: VLON(HcoState%NX) ! V-wind (L=1)
REAL*8 :: BHT2(HcoState%NX) ! half box height (L=1)
REAL*8 :: Q_H2O(HcoState%NX) ! specific humidity (L=1)
REAL*8 :: ORO(HcoState%NX) ! "orography"
Expand Down Expand Up @@ -426,11 +424,6 @@ SUBROUTINE HCOX_DustDead_Run( ExtState, HcoState, RC )
! Potential temperature [K] at midpoint
THLON(I) = TLON(I) * ( P1000 / PMID(I) )**AKAP
! U and V winds at surface [m/s]
! --> These variables won't be used at all...
! ULON(I) = ExtState%U10M%Arr%Val(I,J)
! VLON(I) = ExtState%V10M%Arr%Val(I,J)

! Half box height at surface [m]
BHT2(I) = HcoState%Grid%BXHEIGHT_M%Val(I,J,1) / 2.d0
Expand Down Expand Up @@ -461,7 +454,6 @@ SUBROUTINE HCOX_DustDead_Run( ExtState, HcoState, RC )
& BHT2, J, YMID_R, ORO,
& PTHICK, PMID, Q_H2O, DSRC, SNW_HGT_LQD,
& DTSRCE, TLON, THLON,
! & VLON, ULON,
& J, RC )
! Error check
Expand Down Expand Up @@ -1006,13 +998,10 @@ SUBROUTINE HCOX_DustDead_Init ( HcoState, ExtName,
! Activate met fields used by this extension
ExtState%SPHU%DoUse = .TRUE.
ExtState%TK%DoUse = .TRUE.
! ExtState%U10M%DoUse = .TRUE.
! ExtState%V10M%DoUse = .TRUE.
ExtState%T2M%DoUse = .TRUE.
ExtState%GWETTOP%DoUse = .TRUE.
ExtState%SNOWHGT%DoUse = .TRUE.
ExtState%USTAR%DoUse = .TRUE.
! ExtState%Z0%DoUse = .TRUE.
ExtState%FRLAND%DoUse = .TRUE.
ExtState%FRLANDIC%DoUse= .TRUE.
ExtState%FROCEAN%DoUse = .TRUE.
Expand Down Expand Up @@ -1073,7 +1062,6 @@ SUBROUTINE DST_MBL( HcoState, ExtState, Inst,
& PRS_MDP, Q_H2O_VPR, DSRC,
& SNW_HGT_LQD, TM_ADJ, TPT_MDP,
& TPT_PTN_MDP,
! & WND_MRD_MDP, WND_ZNL_MDP,
& NSTEP, RC )
!
!******************************************************************************
Expand All @@ -1097,8 +1085,6 @@ SUBROUTINE DST_MBL( HcoState, ExtState, Inst,
! (10) TM_ADJ, (REAL*8 ) : Adjustment timestep [s ]
! (11) TPT_MDP, (REAL*8 ) : Temperature [K ]
! (12) TPT_PTN_MDP (REAL*8 ) : Midlayer local potential temp. [K ]
! (13) WND_MRD_MDP (REAL*8 ) : Meridional wind component (V-wind) [m/s ] not used
! (14) WND_ZNL_MDP (REAL*8 ) : Zonal wind component (U-wind) [m/s ] not used
! (15) FIRST, (LOGICAL) : Logical used ot open output dataset [unitless]
! (16) NSTEP (INTEGER) : Iteration counter [unitless]
!
Expand Down Expand Up @@ -1145,8 +1131,6 @@ SUBROUTINE DST_MBL( HcoState, ExtState, Inst,
REAL*8, INTENT(IN) :: TM_ADJ
REAL*8, INTENT(IN) :: TPT_MDP(HcoState%NX)
REAL*8, INTENT(IN) :: TPT_PTN_MDP(HcoState%NX)
! REAL*8, INTENT(IN) :: WND_MRD_MDP(HcoState%NX)
! REAL*8, INTENT(IN) :: WND_ZNL_MDP(HcoState%NX)
INTEGER, INTENT(IN) :: NSTEP
REAL*8, INTENT(INOUT) :: DSRC(HcoState%NX, NBINS)
INTEGER, INTENT(INOUT) :: RC
Expand Down Expand Up @@ -1189,21 +1173,14 @@ SUBROUTINE DST_MBL( HcoState, ExtState, Inst,
! of dust
REAL*8 HGT_ZPD(HcoState%NX) ! [m] Zero plane displacement
REAL*8 LND_FRC_MBL_SLICE(HcoState%NX) ! [frc] Bare ground fraction
! REAL*8 MNO_LNG(HcoState%NX) ! [m] Monin-Obukhov length
REAL*8 WND_FRC(HcoState%NX) ! [m/s] Friction velocity
! REAL*8 WND_FRC_GEOS(HcoState%NX) ! [m/s] Friction velocity
! REAL*8 Z0_GEOS(HcoState%NX) ! [m] roughness height
REAL*8 SNW_FRC(HcoState%NX) ! [frc] Fraction of surface covered
! by snow
REAL*8 TRN_FSH_VPR_SOI_ATM(HcoState%NX) ! [frc] Transfer efficiency of vapor
! from soil to atmosphere
REAL*8 wnd_frc_slt(HcoState%NX) ! [m/s] Saltating friction velocity
REAL*8 WND_FRC_THR_SLT(HcoState%NX) ! [m/s] Threshold friction velocity
! for saltation
! REAL*8 WND_MDP(HcoState%NX) ! [m/s] Surface layer mean wind speed
! REAL*8 WND_RFR(HcoState%NX) ! [m/s] Wind speed at reference height
! REAL*8 WND_RFR_THR_SLT(HcoState%NX) ! [m/s] Threshold 10 m wind speed for
! saltation

LOGICAL FLG_CACO3 ! [FLG] Activate CaCO3 tracer
LOGICAL FLG_MBL_SLICE(HcoState%NX) ! [flg] Mobilization candidates
Expand Down Expand Up @@ -1245,8 +1222,6 @@ SUBROUTINE DST_MBL( HcoState, ExtState, Inst,
! content (sand-dependent)
REAL*8 VWC_SFC_SLICE(HcoState%NX) ! [m3/m3] Volumetric water content
REAL*8 GWC_SFC(HcoState%NX) ! [kg/kg] Gravimetric water content
! REAL*8 RGH_MMN(HcoState%NX) ! [m] Roughness length momentum
! REAL*8 W10M

! GCM diagnostics
! Dust tendency due to gravitational settling [kg/kg/s]
Expand Down Expand Up @@ -1281,11 +1256,9 @@ SUBROUTINE DST_MBL( HcoState, ExtState, Inst,
FLX_MSS_VRT_DST(:,:) = 0.0D0 ! [kg m-2 s-1]
FLX_MSS_VRT_DST_TTL(:) = 0.0D0 ! [kg m-2 s-1]
FRC_THR_NCR_WTR(:) = 0.0D0 ! [frc]
! WND_RFR(:) = 0.0D0 ! [m s-1]
WND_FRC(:) = 0.0D0 ! [m s-1]
WND_FRC_SLT(:) = 0.0D0 ! [m s-1]
WND_FRC_THR_SLT(:) = 0.0D0 ! [m s-1]
! WND_RFR_THR_SLT(:) = 0.0D0 ! [m s-1]
HGT_ZPD(:) = HGT_ZPD_MBL ! [m]
DSRC(:,:) = 0.0D0
Expand Down Expand Up @@ -1326,10 +1299,6 @@ SUBROUTINE DST_MBL( HcoState, ExtState, Inst,
! Mass of air currently in gridbox [kg/m2]
MPL_AIR(I) = PRS_DLT(I) * GRV_SFC_RCP
! Mean surface layer horizontal wind speed
! WND_MDP(I) = SQRT( WND_ZNL_MDP(I)*WND_ZNL_MDP(I)
! & + WND_MRD_MDP(I)*WND_MRD_MDP(I) )

ENDDO
!=================================================================
Expand Down Expand Up @@ -1434,38 +1403,17 @@ SUBROUTINE DST_MBL( HcoState, ExtState, Inst,
CND_TRM_SOI(:) = 0.0D0
LVL_DLT(:) = 0.0D0

! The following chuncks are removed since Ustar is read from meteorology now
!=================================================================
! Get reference wind at 10m
! Now ustar is read from meteorology so reference wind is not used
!=================================================================
! DO I = 1, HcoState%NX
! W10M = ExtState%U10M%Arr%Val(I,LAT_IDX)**2 +
! & ExtState%V10M%Arr%Val(I,LAT_IDX)**2
! W10M = SQRT(W10M)

! add mobilisation criterion flag
! IF ( FLG_MBL_SLICE(I) ) THEN
! WND_RFR(I) = W10M
! ENDIF
! ENDDO

!=================================================================
! Compute standard roughness length. This call is probably
! unnecessary, because we are only concerned with mobilisation
! candidates, for which roughness length is imposed in blm_mbl
!=================================================================
! CALL RGH_MMN_GET( ! Set roughness length w/o zero plane displacement
! & HcoState, Inst,
! & ORO, ! I [frc] Orography
! & RGH_MMN, ! O [m] Roughness length momentum
! & SFC_TYP_SLICE, ! I [idx] LSM surface type (0..28)
! & SNW_FRC, ! I [frc] Fraction of surface covered by snow
! & WND_RFR,
! & RC ) ! I [m s-1] 10 m wind speed
! IF ( RC /= HCO_SUCCESS ) THEN
! CALL HCO_ERROR( 'ERROR 18', RC, THISLOC=LOC )
! RETURN
! ENDIF

!=================================================================
! Introduce Ustar and Z0 from GEOS data
Expand All @@ -1489,18 +1437,6 @@ SUBROUTINE DST_MBL( HcoState, ExtState, Inst,
! rgh_mmn_mbl parameter included directly in blm_mbl
! since Monin-Obukhov length is not used as well, comment out this call
!=================================================================
! CALL BLM_MBL(
! & HcoState,
! & FLG_MBL_SLICE, ! I [flg] Mobilization candidate flag
! & RGH_MMN, ! I [m] Roughness length momentum, Z0,m
! & WND_RFR, ! I [m s-1] 10 m wind speed
! & MNO_LNG, ! O [m] Monin-Obukhov length
! & WND_FRC,
! & RC ) ! O [m s-1] Surface friction velocity, U*
! IF ( RC /= HCO_SUCCESS ) THEN
! CALL HCO_ERROR( 'ERROR 19', RC, THISLOC=LOC )
! RETURN
! ENDIF

!=================================================================
! Factor by which surface roughness increases threshold friction
Expand Down Expand Up @@ -1576,14 +1512,6 @@ SUBROUTINE DST_MBL( HcoState, ExtState, Inst,
& * FRC_THR_NCR_DRG(i) ! [frc] Adjustment for roughness
ENDDO

! Threshold saltation wind speed at reference height, 10m
! DO I = 1, HcoState%NX
! IF ( FLG_MBL_SLICE(I) ) THEN
! WND_RFR_THR_SLT(I) = ! [m s-1] Threshold 10 m wind speed
! for saltation
! & WND_RFR(I) * WND_FRC_THR_SLT(I) / WND_FRC(i)
! ENDIF
! ENDDO

!=================================================================
! Saltation increases friction speed by roughening surface
Expand All @@ -1593,13 +1521,6 @@ SUBROUTINE DST_MBL( HcoState, ExtState, Inst,
! accounting for the Owen effect.
! Comment out since WND_FRC_SLT is simply set to WND_FRC in this function
!=================================================================
! CALL WND_FRC_SLT_GET(
! & HcoState,
! & FLG_MBL_SLICE, ! I [flg] Mobilization candidate flag
! & WND_FRC, ! I [m s-1] Surface friction velocity
! & WND_FRC_SLT, ! O [m s-1] Saltating friction velocity
! & WND_RFR, ! I [m s-1] Wind speed at reference height
! & WND_RFR_THR_SLT ) ! I [m s-1] Thresh. 10 m wind speed for saltation
!=================================================================
DO I = 1, HcoState%NX
WND_FRC_SLT(I) = WND_FRC(I)
Expand Down

0 comments on commit 7a0db0e

Please sign in to comment.