Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/release-v4.1.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
smileMchen committed Feb 12, 2020
2 parents bf4dfb1 + 659ea83 commit f3d6c32
Show file tree
Hide file tree
Showing 15 changed files with 100 additions and 50 deletions.
50 changes: 47 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -878,9 +878,53 @@ nmm_real : nmm_wrf
( cd test/nmm_real ; /bin/rm -f real_nmm.exe ; ln -s ../../main/real_nmm.exe . )
( cd test/nmm_real ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
( cd test/nmm_real ; /bin/rm -f ETAMPNEW_DATA.expanded_rain ETAMPNEW_DATA RRTM_DATA ; \
ln -sf ../../run/ETAMPNEW_DATA . ; \
ln -sf ../../run/ETAMPNEW_DATA.expanded_rain . ; \
ln -sf ../../run/RRTM_DATA . ; \
ln -sf ../../run/ETAMPNEW_DATA . ; \
ln -sf ../../run/ETAMPNEW_DATA.expanded_rain . ; \
ln -sf ../../run/RRTM_DATA . ; \
ln -sf ../../run/RRTMG_LW_DATA . ; \
ln -sf ../../run/RRTMG_SW_DATA . ; \
ln -sf ../../run/CAM_ABS_DATA . ; \
ln -sf ../../run/CAM_AEROPT_DATA . ; \
ln -sf ../../run/CAMtr_volume_mixing_ratio.RCP4.5 . ; \
ln -sf ../../run/CAMtr_volume_mixing_ratio.RCP6 . ; \
ln -sf ../../run/CAMtr_volume_mixing_ratio.RCP8.5 CAMtr_volume_mixing_ratio ; \
ln -sf ../../run/CAMtr_volume_mixing_ratio.A1B . ; \
ln -sf ../../run/CAMtr_volume_mixing_ratio.A2 . ; \
ln -sf ../../run/CLM_ALB_ICE_DFS_DATA . ; \
ln -sf ../../run/CLM_ALB_ICE_DRC_DATA . ; \
ln -sf ../../run/CLM_ASM_ICE_DFS_DATA . ; \
ln -sf ../../run/CLM_ASM_ICE_DRC_DATA . ; \
ln -sf ../../run/CLM_DRDSDT0_DATA . ; \
ln -sf ../../run/CLM_EXT_ICE_DFS_DATA . ; \
ln -sf ../../run/CLM_EXT_ICE_DRC_DATA . ; \
ln -sf ../../run/CLM_KAPPA_DATA . ; \
ln -sf ../../run/CLM_TAU_DATA . ; \
ln -sf ../../run/ozone.formatted . ; \
ln -sf ../../run/ozone_lat.formatted . ; \
ln -sf ../../run/ozone_plev.formatted . ; \
ln -sf ../../run/aerosol.formatted . ; \
ln -sf ../../run/aerosol_lat.formatted . ; \
ln -sf ../../run/aerosol_lon.formatted . ; \
ln -sf ../../run/aerosol_plev.formatted . ; \
ln -sf ../../run/capacity.asc . ; \
ln -sf ../../run/coeff_p.asc . ; \
ln -sf ../../run/coeff_q.asc . ; \
ln -sf ../../run/constants.asc . ; \
ln -sf ../../run/masses.asc . ; \
ln -sf ../../run/termvels.asc . ; \
ln -sf ../../run/kernels.asc_s_0_03_0_9 . ; \
ln -sf ../../run/kernels_z.asc . ; \
ln -sf ../../run/bulkdens.asc_s_0_03_0_9 . ; \
ln -sf ../../run/bulkradii.asc_s_0_03_0_9 . ; \
ln -sf ../../run/CCN_ACTIVATE.BIN . ; \
ln -sf ../../run/p3_lookup_table_1.dat-v4.1 . ; \
ln -sf ../../run/p3_lookup_table_2.dat-v4.1 . ; \
ln -sf ../../run/HLC.TBL . ; \
ln -sf ../../run/wind-turbine-1.tbl . ; \
ln -sf ../../run/ishmael-gamma-tab.bin . ; \
ln -sf ../../run/ishmael-qi-qc.bin . ; \
ln -sf ../../run/ishmael-qi-qr.bin . ; \
ln -sf ../../run/BROADBAND_CLOUD_GODDARD.bin . ; \
if [ $(RWORDSIZE) -eq 8 ] ; then \
ln -sf ../../run/ETAMPNEW_DATA_DBL ETAMPNEW_DATA ; \
ln -sf ../../run/ETAMPNEW_DATA.expanded_rain_DBL ETAMPNEW_DATA.expanded_rain ; \
Expand Down
2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
WRF Model Version 4.1.3
WRF Model Version 4.1.4

http://www2.mmm.ucar.edu/wrf/users/

Expand Down
14 changes: 7 additions & 7 deletions Registry/registry.hyb_coord
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Dry pressure, Pd
# Dry surface pressure = Pds
# Model top pressure = Pt
# Mass in column, Pc = Pds - Pt
# Dry mass in column (base + perturbation), Pcb + Pc = Pds - Pt
# 1d column weighting term, B: BF is full levels, BH is half levels

# Total dry pressure
Expand Down Expand Up @@ -40,17 +40,17 @@

#<Table> <Type> <Sym> <Dims> <Use> <NumTLev> <Stagger> <IO> <DNAME> <DESCRIP> <UNITS>

state real c1h k misc 1 - i02rh0{22}{23}{24} "C1H" "half levels, c1h = d bf / d eta, using znw" "Dimensionless"
state real c2h k misc 1 - i02rh0{22}{23}{24} "C2H" "half levels, c2h = (1-c1h)*(p0-pt)" "Pa"
state real c1h k misc 1 - i02rh0{22}{23}{24} "C1H" "half levels, c1h = d bf / d eta, using znw" "Dimensionless"
state real c2h k misc 1 - i02rh0{22}{23}{24} "C2H" "half levels, c2h = (1-c1h)*(p0-pt)" "Pa"

state real c1f k misc 1 Z i02rh0{22}{23}{24} "C1F" "full levels, c1f = d bf / d eta, using znu" "Dimensionless"
state real c2f k misc 1 Z i02rh0{22}{23}{24} "C2F" "full levels, c2f = (1-c1f)*(p0-pt)" "Pa"
state real c1f k misc 1 Z i02rh0{22}{23}{24} "C1F" "full levels, c1f = d bf / d eta, using znu" "Dimensionless"
state real c2f k misc 1 Z i02rh0{22}{23}{24} "C2F" "full levels, c2f = (1-c1f)*(p0-pt)" "Pa"

state real c3h k misc 1 - i02rh0{22}{23}{24} "C3H" "half levels, c3h = bh" "Dimensionless"
state real c4h k misc 1 - i02rh0{22}{23}{24} "C4H" "half levels, c4h = (eta-bh)*(p0-pt)+pt, using znu" "Pa"
state real c4h k misc 1 - i02rh0{22}{23}{24} "C4H" "half levels, c4h = (eta-bh)*(p0-pt), using znu" "Pa"

state real c3f k misc 1 Z i02rh0{22}{23}{24} "C3F" "full levels, c3f = bf" "Dimensionless"
state real c4f k misc 1 Z i02rh0{22}{23}{24} "C4F" "full levels, c4f = (eta-bf)*(p0-pt)+pt, using znw" "Pa"
state real c4f k misc 1 Z i02rh0{22}{23}{24} "C4F" "full levels, c4f = (eta-bf)*(p0-pt), using znw" "Pa"

state real pcb ij dyn_em 1 - irhdus "PCB" "base state dry air mass in column" "Pa"
state real pc ijb dyn_em 2 - irhusdf=(bdy_interp:dt) "PC" "perturbation dry air mass in column" "Pa"
Expand Down
13 changes: 3 additions & 10 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -204,16 +204,9 @@ fi

# If the user asked for classic netcdf, acquiesce to the request.

if [ "`uname`" = "Linux" ] ; then
ans="`whereis nf-config`"
elif [ "`uname`" = "Darwin" ] ; then
ans="`which nf-config`"
else
ans=""
# echo "Add in your architecture's uname and the command to find executables in the path"
# exit 1
fi
if [ "$ans" = "nf-config:" -o "$ans" = "" ] ; then
ans="`which nf-config`"
status="$?"
if [ "$ans" = "nf-config:" -o "$ans" = "" -o "$status" != "0" ] ; then
export NETCDF_classic=1
unset NETCDF4
else
Expand Down
4 changes: 3 additions & 1 deletion dyn_em/module_initialize_real.F
Original file line number Diff line number Diff line change
Expand Up @@ -7049,7 +7049,9 @@ END SUBROUTINE rh_to_mxrat1
#if 0
program foo
integer , parameter :: max_eta = 1000
! Make this local variable have the same value as in
! frame/module_driver_constants.F: MAX_ETA
integer , parameter :: max_eta = 10001
INTEGER :: ids , ide , jds , jde , kds , kde , &
ims , ime , jms , jme , kms , kme , &
Expand Down
16 changes: 14 additions & 2 deletions external/RSL_LITE/module_dm.F
Original file line number Diff line number Diff line change
Expand Up @@ -2507,6 +2507,8 @@ END MODULE module_dm
SUBROUTINE push_communicators_for_domain( id )
USE module_dm
INTEGER, INTENT(IN) :: id ! if specified also does an instate for grid id
! Only required for distrbuted memory parallel runs
#if ( defined( DM_PARALLEL ) && ( ! defined( STUBMPI ) ) )
IF ( communicator_stack_cursor .GE. max_domains ) CALL wrf_error_fatal("push_communicators_for_domain would excede stacksize")
communicator_stack_cursor = communicator_stack_cursor + 1
Expand All @@ -2524,10 +2526,13 @@ SUBROUTINE push_communicators_for_domain( id )
mytask_y_stack( communicator_stack_cursor ) = mytask_y
CALL instate_communicators_for_domain( id )
#endif
END SUBROUTINE push_communicators_for_domain
SUBROUTINE pop_communicators_for_domain
USE module_dm
IMPLICIT NONE
! Only required for distrbuted memory parallel runs
#if ( defined( DM_PARALLEL ) && ( ! defined( STUBMPI ) ) )
IF ( communicator_stack_cursor .LT. 1 ) CALL wrf_error_fatal("pop_communicators_for_domain on empty stack")
current_id = id_stack(communicator_stack_cursor)
local_communicator = local_communicator_stack( communicator_stack_cursor )
Expand All @@ -2542,9 +2547,12 @@ SUBROUTINE pop_communicators_for_domain
mytask_x = mytask_x_stack( communicator_stack_cursor )
mytask_y = mytask_y_stack( communicator_stack_cursor )
communicator_stack_cursor = communicator_stack_cursor - 1
#endif
END SUBROUTINE pop_communicators_for_domain
SUBROUTINE instate_communicators_for_domain( id )
USE module_dm
! Only required for distrbuted memory parallel runs
#if ( defined( DM_PARALLEL ) && ( ! defined( STUBMPI ) ) )
IMPLICIT NONE
INTEGER, INTENT(IN) :: id
INTEGER ierr
Expand All @@ -2560,9 +2568,12 @@ SUBROUTINE instate_communicators_for_domain( id )
ntasks_y = ntasks_y_store( id )
mytask_x = mytask_x_store( id )
mytask_y = mytask_y_store( id )
#endif
END SUBROUTINE instate_communicators_for_domain
SUBROUTINE store_communicators_for_domain( id )
USE module_dm
! Only required for distrbuted memory parallel runs
#if ( defined( DM_PARALLEL ) && ( ! defined( STUBMPI ) ) )
IMPLICIT NONE
INTEGER, INTENT(IN) :: id
local_communicator_store( id ) = local_communicator
Expand All @@ -2576,6 +2587,7 @@ SUBROUTINE store_communicators_for_domain( id )
mytask_store( id ) = mytask
mytask_x_store( id ) = mytask_x
mytask_y_store( id ) = mytask_y
#endif
END SUBROUTINE store_communicators_for_domain
!=========================================================================
Expand Down Expand Up @@ -6334,9 +6346,9 @@ SUBROUTINE feedback_domain_nmm_part2 ( grid, intermediate_grid, ngrid , config_f
cims, cime, cjms, cjme, ckms, ckme, &
cips, cipe, cjps, cjpe, ckps, ckpe )
smoother: if(config_flags%smooth_option/=0) then
smoothr: if(config_flags%smooth_option/=0) then
#include "nest_feedbackup_smooth.inc"
endif smoother
endif smoothr
CALL pop_communicators_for_domain
END IF
Expand Down
12 changes: 4 additions & 8 deletions frame/module_driver_constants.F
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,10 @@ MODULE module_driver_constants

INTEGER , PARAMETER :: max_moves = 50

! The maximum number of eta levels
!DJW 140701 Increased from 501 to 1001 since I can imagine using more than
!501 total vertical levels across multiple nested domains. Now that the
!code is modified to allow specification of all domains eta_levels using a
!array of length max_eta, this will need to be larger. I'll also add a check
!in module_initialize_real to ensure we don't exceed this value.

INTEGER , PARAMETER :: max_eta = 1001
! The maximum number of eta levels. With vertical refinement defining
! each domain separately, the aggregated number of levels could be large.

INTEGER , PARAMETER :: max_eta = 10001

! The maximum number of ocean levels in the 3d U Miami ocean.

Expand Down
2 changes: 1 addition & 1 deletion inc/version_decl
Original file line number Diff line number Diff line change
@@ -1 +1 @@
CHARACTER (LEN=*), PARAMETER :: release_version = 'V4.1.3'
CHARACTER (LEN=*), PARAMETER :: release_version = 'V4.1.4'
2 changes: 1 addition & 1 deletion phys/module_mp_wdm5.F
Original file line number Diff line number Diff line change
Expand Up @@ -1563,8 +1563,8 @@ SUBROUTINE wdm52D(t, q, qci, qrs, ncr, den, p, delz &
! (NC->NCCN)
!----------------------------------------------------------------------
if(pcond(i,k).eq.-qci(i,k,1)/dtcld) then
ncr(i,k,2) = 0.
ncr(i,k,1) = ncr(i,k,1)+ncr(i,k,2)
ncr(i,k,2) = 0.
endif
!
q(i,k) = q(i,k)-pcond(i,k)*dtcld
Expand Down
13 changes: 8 additions & 5 deletions phys/module_mp_wdm6.F
Original file line number Diff line number Diff line change
Expand Up @@ -905,8 +905,6 @@ subroutine wdm62D(t, q, qci, qrs, ncr, den, p, delz &
+precs2*work2(i,k)*coeres)/den(i,k)
psmlt(i,k) = min(max(psmlt(i,k)*dtcld/mstep(i),-qrs(i,k,2) &
/mstep(i)),0.)
qrs(i,k,2) = qrs(i,k,2) + psmlt(i,k)
qrs(i,k,1) = qrs(i,k,1) - psmlt(i,k)
!-------------------------------------------------------------------
! nsmlt: melting of snow [LH A27]
! (T>T0: ->NR)
Expand All @@ -915,6 +913,9 @@ subroutine wdm62D(t, q, qci, qrs, ncr, den, p, delz &
sfac = rslope(i,k,2)*n0s*n0sfac(i,k)/qrs(i,k,2)
ncr(i,k,3) = ncr(i,k,3) - sfac*psmlt(i,k)
endif
! error correction based on Lei et al., (JGR, 2020)
qrs(i,k,2) = qrs(i,k,2) + psmlt(i,k)
qrs(i,k,1) = qrs(i,k,1) - psmlt(i,k)
t(i,k) = t(i,k) + xlf/cpm(i,k)*psmlt(i,k)
endif
!---------------------------------------------------------------
Expand All @@ -928,8 +929,6 @@ subroutine wdm62D(t, q, qci, qrs, ncr, den, p, delz &
/den(i,k)
pgmlt(i,k) = min(max(pgmlt(i,k)*dtcld/mstep(i), &
-qrs(i,k,3)/mstep(i)),0.)
qrs(i,k,3) = qrs(i,k,3) + pgmlt(i,k)
qrs(i,k,1) = qrs(i,k,1) - pgmlt(i,k)
!-------------------------------------------------------------------
! ngmlt: melting of graupel [LH A28]
! (T>T0: ->NR)
Expand All @@ -938,6 +937,9 @@ subroutine wdm62D(t, q, qci, qrs, ncr, den, p, delz &
gfac = rslope(i,k,3)*n0g/qrs(i,k,3)
ncr(i,k,3) = ncr(i,k,3) - gfac*pgmlt(i,k)
endif
! error correction based on Lei et al., (JGR, 2020)
qrs(i,k,3) = qrs(i,k,3) + pgmlt(i,k)
qrs(i,k,1) = qrs(i,k,1) - pgmlt(i,k)
t(i,k) = t(i,k) + xlf/cpm(i,k)*pgmlt(i,k)
endif
endif
Expand Down Expand Up @@ -1982,8 +1984,9 @@ subroutine wdm62D(t, q, qci, qrs, ncr, den, p, delz &
! (NC->NCCN)
!----------------------------------------------------------------
if(pcond(i,k).eq.-qci(i,k,1)/dtcld) then
ncr(i,k,2) = 0.
ncr(i,k,1) = ncr(i,k,1)+ncr(i,k,2)
! error correction based on Lei et al. (JGR, 2020)
ncr(i,k,2) = 0.
endif
!
q(i,k) = q(i,k)-pcond(i,k)*dtcld
Expand Down
10 changes: 5 additions & 5 deletions phys/module_mp_wdm7.F
Original file line number Diff line number Diff line change
Expand Up @@ -917,8 +917,6 @@ SUBROUTINE wdm72D(t, q, qci, qrs, ncr, den, p, delz &
+precs2*work2(i,k)*coeres)/den(i,k)
psmlt(i,k) = min(max(psmlt(i,k)*dtcld/mstep(i),-qrs(i,k,2) &
/mstep(i)),0.)
qrs(i,k,2) = qrs(i,k,2) + psmlt(i,k)
qrs(i,k,1) = qrs(i,k,1) - psmlt(i,k)
!
! nsmlt: melting of snow [LH A27]
! (T>T0: ->NR)
Expand All @@ -927,6 +925,8 @@ SUBROUTINE wdm72D(t, q, qci, qrs, ncr, den, p, delz &
sfac = rslope(i,k,2)*n0s*n0sfac(i,k)/qrs(i,k,2)
ncr(i,k,3) = ncr(i,k,3) - sfac*psmlt(i,k)
endif
qrs(i,k,2) = qrs(i,k,2) + psmlt(i,k)
qrs(i,k,1) = qrs(i,k,1) - psmlt(i,k)
t(i,k) = t(i,k) + xlf/cpm(i,k)*psmlt(i,k)
endif
!
Expand All @@ -940,8 +940,6 @@ SUBROUTINE wdm72D(t, q, qci, qrs, ncr, den, p, delz &
/den(i,k)
pgmlt(i,k) = min(max(pgmlt(i,k)*dtcld/mstep(i), &
-qrs(i,k,3)/mstep(i)),0.)
qrs(i,k,3) = qrs(i,k,3) + pgmlt(i,k)
qrs(i,k,1) = qrs(i,k,1) - pgmlt(i,k)
!
! ngmlt: melting of graupel [LH A28]
! (T>T0: ->NR)
Expand All @@ -950,6 +948,8 @@ SUBROUTINE wdm72D(t, q, qci, qrs, ncr, den, p, delz &
gfac = rslope(i,k,3)*n0g/qrs(i,k,3)
ncr(i,k,3) = ncr(i,k,3) - gfac*pgmlt(i,k)
endif
qrs(i,k,3) = qrs(i,k,3) + pgmlt(i,k)
qrs(i,k,1) = qrs(i,k,1) - pgmlt(i,k)
t(i,k) = t(i,k) + xlf/cpm(i,k)*pgmlt(i,k)
endif
!
Expand Down Expand Up @@ -2277,8 +2277,8 @@ SUBROUTINE wdm72D(t, q, qci, qrs, ncr, den, p, delz &
! (NC->NCCN)
!
if(pcond(i,k).eq.-qci(i,k,1)/dtcld) then
ncr(i,k,2) = 0.
ncr(i,k,1) = ncr(i,k,1)+ncr(i,k,2)
ncr(i,k,2) = 0.
endif
!
q(i,k) = q(i,k)-pcond(i,k)*dtcld
Expand Down
1 change: 0 additions & 1 deletion phys/module_radiation_driver.F
Original file line number Diff line number Diff line change
Expand Up @@ -1601,7 +1601,6 @@ SUBROUTINE radiation_driver ( &
DO k=kts,kte
DO i=its,ite
cldfra(I,K,J) = max(cldfra_sh(I,K,J), cldfra(I,K,J))
qc_save(I,K,J)=qc(I,K,J)
qc(I,K,J)=cw_rad(I,K,J)+qc(I,K,J)
ENDDO
ENDDO
Expand Down
2 changes: 2 additions & 0 deletions phys/module_sf_sfclayrev.F
Original file line number Diff line number Diff line change
Expand Up @@ -1119,6 +1119,8 @@ function zolri(ri,z,z0)
fx1=zolri2(x1,ri,z,z0)
fx2=zolri2(x2,ri,z,z0)
Do While (abs(x1 - x2) > 0.01)
! check added for potential divide by zero (2019/11)
if(fx1.eq.fx2)return
if(abs(fx2).lt.abs(fx1))then
x1=x1-fx1/(fx2-fx1)*(x2-x1)
fx1=zolri2(x1,ri,z,z0)
Expand Down
3 changes: 1 addition & 2 deletions run/README.namelist
Original file line number Diff line number Diff line change
Expand Up @@ -787,8 +787,7 @@ Namelist variables for controlling the adaptive time step option:
= 7, Zhang-McFarlane scheme from CAM5 (CESM 1_0_1)
= 10, Modified Kain-Fritsch scheme with trigger function based on PDFs (ARW only)
= 11, Multi-scale Kain-Fritsch scheme
= 14, A modified GFS simplified Arakawa-Schubert scheme that enables NSAS to work
in various model grids across gray-zone resolutions (from KIAPS,ARW only)
= 14, KIM Simplified Arakawa-Schubert scheme (KSAS) across gray-zone resolutions
= 16, A newer Tiedtke scheme
= 94, 2015 GFS Simplified Arakawa-Schubert scheme (HWRF)
= 95, Previous GFS Simplified Arakawa-Schubert scheme (HWRF)
Expand Down
6 changes: 3 additions & 3 deletions var/da/da_radiance/da_cld_eff_radius.inc
Original file line number Diff line number Diff line change
Expand Up @@ -142,13 +142,13 @@ subroutine da_cld_eff_radius(t,rho,qci,qrn,qsn,qgr,snow,xice,xland,method, &
!
piover6 = pi/6.
if ( qrn > limit ) then
lamda_rain = (piover6*rho_w*n0_rain*rho/qrn)**0.25
lamda_rain = (piover6*rho_w*n0_rain/(rho*qrn))**0.25
end if
if ( qsn > limit ) then
lamda_snow = (piover6*rho_snow*n0_snow*rho/qsn)**0.25
lamda_snow = (piover6*rho_snow*n0_snow/(rho*qsn))**0.25
end if
if ( qgr > limit ) then
lamda_grau = (piover6*rho_grau*n0_grau*rho/qgr)**0.25
lamda_grau = (piover6*rho_grau*n0_grau/(rho*qgr))**0.25
end if
sum1_rain = 0.0
sum2_rain = 0.0
Expand Down

0 comments on commit f3d6c32

Please sign in to comment.