Skip to content

Commit

Permalink
Finalize WRFV4.4.2 by merging release-v4.4.2 branch onto master'
Browse files Browse the repository at this point in the history
  • Loading branch information
kkeene44 committed Dec 19, 2022
2 parents f34b11d + 1a2125e commit 6233639
Show file tree
Hide file tree
Showing 18 changed files with 470 additions and 166 deletions.
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.4.1
WRF Model Version 4.4.2

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

Expand Down
6 changes: 3 additions & 3 deletions Registry/registry.noahmp
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,9 @@ state real soilenergy ij - 1 - hd=(interp_mask_land_fie
state real snowenergy ij - 1 - hd=(interp_mask_land_field:lu_index)u=(copy_fcnm) "snowenergy" "energy content in snow relative to 273.16" "kJ/m2"

state real acc_ssoil ij - 1 - rd=(interp_mask_land_field:lu_index)u=(copy_fcnm) "acc_ssoil" "accumulated SSOIL between dt_soil" "W/m2"
state real acc_qinsur ij - 1 - rd=(interp_mask_land_field:lu_index)u=(copy_fcnm) "acc_qinsur" "accumulated QINSUR between dt_soil" "mm/s"
state real acc_qseva ij - 1 - rd=(interp_mask_land_field:lu_index)u=(copy_fcnm) "acc_qseva" "accumulated QSEVA between dt_soil" "mm/s"
state real acc_etrani ilj - 1 - rd=(interp_mask_land_field:lu_index)u=(copy_fcnm) "acc_etrani" "accumulated ETRANI between dt_soil" "mm/s"
state real acc_qinsur ij - 1 - rd=(interp_mask_land_field:lu_index)u=(copy_fcnm) "acc_qinsur" "accumulated QINSUR between dt_soil" "m/s*dt_soil/dt_noahmp"
state real acc_qseva ij - 1 - rd=(interp_mask_land_field:lu_index)u=(copy_fcnm) "acc_qseva" "accumulated QSEVA between dt_soil" "m/s*dt_soil/dt_noahmp"
state real acc_etrani ilj - 1 - rd=(interp_mask_land_field:lu_index)u=(copy_fcnm) "acc_etrani" "accumulated ETRANI between dt_soil" "m/s*dt_soil/dt_noahmp"
state real aceflxb ij - 1 - rhd=(interp_mask_land_field:lu_index)u=(copy_fcnm) "aceflxb " "accumulated bottom soil heat flux" "kJ/m2"
state real eflxbxy ij - 1 - rd=(interp_mask_land_field:lu_index)u=(copy_fcnm) "eflxbxy " "bottom soil heat flux" "W/m2"
state real acc_dwaterxy ij - 1 - rd=(interp_mask_land_field:lu_index)u=(copy_fcnm) "acc_dwater" "accumulated canopy,snow,soil water change between dt_soil" "mm"
Expand Down
40 changes: 20 additions & 20 deletions external/RSL_LITE/rsl_bcast.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,26 @@ static destroy_par_info ( p )
if ( p != NULL ) RSL_FREE( p ) ;
}

static destroy_list( list, dfcn )
rsl_list_t ** list ; /* pointer to pointer to list */
int (*dfcn)() ; /* pointer to function for destroying
the data field of the list */
{
rsl_list_t *p, *trash ;
if ( list == NULL ) return(0) ;
if ( *list == NULL ) return(0) ;
for ( p = *list ; p != NULL ; )
{
if ( dfcn != NULL ) (*dfcn)( p->data ) ;
trash = p ;
p = p->next ;
RSL_FREE( trash ) ;
}
*list = NULL ;
return(0) ;
}


static rsl_list_t *Xlist, *Xp, *Xprev ;
static rsl_list_t *stage ;
static int stage_len = 0 ; /* 96/3/15 */
Expand Down Expand Up @@ -726,23 +746,3 @@ rsl_lite_from_peerpoint_msg ( len_p, buf )

/********************************************/

destroy_list( list, dfcn )
rsl_list_t ** list ; /* pointer to pointer to list */
int (*dfcn)() ; /* pointer to function for destroying
the data field of the list */
{
rsl_list_t *p, *trash ;
if ( list == NULL ) return(0) ;
if ( *list == NULL ) return(0) ;
for ( p = *list ; p != NULL ; )
{
if ( dfcn != NULL ) (*dfcn)( p->data ) ;
trash = p ;
p = p->next ;
RSL_FREE( trash ) ;
}
*list = NULL ;
return(0) ;
}

/********************************************/
1 change: 1 addition & 0 deletions external/RSL_LITE/rsl_lite.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@

char * buffer_for_proc ( int P, int size, int code ) ;
void * rsl_malloc( char * f, int l, int s ) ;
void rsl_free( char ** p ) ;
typedef int * int_p ;

#define INDEX_2(A,B,NB) ( (B) + (A)*(NB) )
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.4.1'
CHARACTER (LEN=*), PARAMETER :: release_version = 'V4.4.2'
37 changes: 15 additions & 22 deletions phys/module_diag_functions.F
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ FUNCTION calc_rh ( p, t, qv ) result ( rh )

END FUNCTION calc_rh



!!!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!!!
!~
!~ Name:
Expand Down Expand Up @@ -111,8 +109,6 @@ FUNCTION Theta ( t, p )

END FUNCTION Theta



!!!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!!!
!~
!~ Name:
Expand Down Expand Up @@ -500,7 +496,6 @@ FUNCTION Buoyancy ( nz, tk, rh, p, hgt, sfc, cape, cin, zlfc, plfc, lidx, &
INTEGER :: i, j, k !~ Dummy iterator
INTEGER :: lfclev !~ Level of LFC
INTEGER :: ellev !~ Level of EL. Modified by Zhixiao.
INTEGER :: lcllev !~ Level of LCL. Modified by Zhixiao.
INTEGER :: prcl !~ Internal parcel type indicator
INTEGER :: mlev !~ Level for ML calculation
INTEGER :: lyrcnt !~ Number of layers in mean layer
Expand Down Expand Up @@ -628,17 +623,6 @@ FUNCTION Buoyancy ( nz, tk, rh, p, hgt, sfc, cape, cin, zlfc, plfc, lidx, &
tlclK = TLCL ( tK(srclev), rh(srclev) )
plcl = p(srclev) * ( (tlclK/tK(srclev))**(Cp/Rd) )

!Add caculation for LCL. Modified by Zhixiao
lcllev = -1 !Modified by Zhixiao
flag=.false. !Modified by Zhixiao
DO k=sfc,nz !zhixiao search the layer of LCL
IF (p (k) <= plcl) THEN !Modified by Zhixiao
lcllev=k !Modified by Zhixiao
flag=.true. !Modified by Zhixiao
END IF !Modified by Zhixiao
IF (flag) EXIT !Modified by Zhixiao
END DO !Modified by Zhixiao
flag=.false. !Modified by Zhixiao
!~ Now lift the parcel
! -------------------

Expand Down Expand Up @@ -759,7 +743,6 @@ FUNCTION Buoyancy ( nz, tk, rh, p, hgt, sfc, cape, cin, zlfc, plfc, lidx, &
ellev = -1 !Modified by Zhixiao
DO k = sfc, nz !Modified by Zhixiao
!~ LFC is defiend as the highest level when negative buyancy turns postive.
! Let us ignore the lower LFCs, and keep the highest LFC as the final result
! -----------------------------------
IF ( .not. flag .and. buoy (k) > REAL (0) .and. p (k) <= plcl ) THEN !Modified by Zhixiao
flag = .true.
Expand All @@ -772,15 +755,25 @@ FUNCTION Buoyancy ( nz, tk, rh, p, hgt, sfc, cape, cin, zlfc, plfc, lidx, &
ellev = k !Modified by Zhixiao
END IF
END IF
! When buoy turns negative again, reset LFC flag and keep the highest LFC as the effective output
IF (buoy (k) < REAL (0) .and. flag) THEN
flag = .false.
END IF
END DO
IF (ellev >= 0) THEN !Modified by Zhixiao
pel = p(ellev) !Modified by Zhixiao
CIN=REAL ( 0 ) !Modified by Zhixiao
DO k = sfc+1, nz !Modified by Zhixiao
! CAPE and CIN is defined as integrated positive and negative buoyant energy between LCL and EL, respectively. Modified by Zhixiao
IF ( p (k) <= plcl .and. p (k) >= pel) THEN !Modified by Zhixiao
CAPE = CAPE + MAX ( buoy (k), 0.0 ) * ( hgt (k) - hgt (k-1) ) !Modified by Zhixiao
CIN = CIN + MIN ( buoy (k), 0.0 ) * ( hgt (k) - hgt (k-1) ) !Modified by Zhixiao
DO k = sfc+1, nz
! Make CAPE and CIN consistent with AMS definition
! https://glossary.ametsoc.org/wiki/Convective_available_potential_energy
! https://glossary.ametsoc.org/wiki/Convective_inhibition
IF ( p (k) <= plcl .and. p (k) > plfc) THEN !Modified by Zhixiao
! CIN is the vertically integrated negative buoyant energy between LCL and LFC
CIN = CIN + MIN ( buoy (k), 0.0 ) * ( hgt (k) - hgt (k-1) )
END IF
IF ( p (k) <= plfc .and. p (k) > pel) THEN !Modified by Zhixiao
! CAPE is the vertically integrated positive buoyant energy between LFC and EL
CAPE = CAPE + MAX ( buoy (k), 0.0 ) * ( hgt (k) - hgt (k-1) )
END IF !Modified by Zhixiao
END DO !Modified by Zhixiao
END IF !Modified by Zhixiao
Expand Down
7 changes: 2 additions & 5 deletions phys/module_sf_sfclay.F
Original file line number Diff line number Diff line change
Expand Up @@ -138,14 +138,12 @@ SUBROUTINE SFCLAY(U3D,V3D,T3D,QV3D,P3D,dz8w, &
XLAND, &
TSK
!
REAL, DIMENSION( ims:ime, jms:jme ) , &
INTENT(INOUT) :: REGIME, &
HFX, &
QFX, &
LH, &
MOL,RMOL
!m the following 5 are change to memory size
!
REAL, DIMENSION( ims:ime, jms:jme ) , &
INTENT(INOUT) :: GZ1OZ0,WSPD,BR, &
Expand Down Expand Up @@ -326,13 +324,12 @@ SUBROUTINE SFCLAY1D(J,UX,VX,T1D,QV1D,P1D,dz8w1d, &
REAL, DIMENSION( ims:ime ) , &
INTENT(INOUT) :: &
QGH
QSFC,QGH
REAL, DIMENSION( ims:ime ) , &
INTENT(OUT) :: U10,V10, &
TH2,T2,Q2,QSFC,LH
TH2,T2,Q2,LH
REAL, INTENT(IN ) :: CP,G,ROVCP,R,XLV
REAL, DIMENSION( its:ite ), INTENT(IN ) :: DX
Expand Down
9 changes: 4 additions & 5 deletions phys/module_sf_sfclayrev.F
Original file line number Diff line number Diff line change
Expand Up @@ -143,15 +143,14 @@ SUBROUTINE SFCLAYREV(U3D,V3D,T3D,QV3D,P3D,dz8w, &
V10, &
TH2, &
T2, &
Q2, &
QSFC
Q2
!
REAL, DIMENSION( ims:ime, jms:jme ) , &
INTENT(INOUT) :: REGIME, &
HFX, &
QFX, &
LH, &
QSFC, &
MOL,RMOL
!m the following 5 are change to memory size
!
Expand Down Expand Up @@ -320,11 +319,11 @@ SUBROUTINE SFCLAYREV1D(J,UX,VX,T1D,QV1D,P1D,dz8w1d, &
REAL, DIMENSION( ims:ime ) , &
INTENT(INOUT) :: &
QGH
QSFC,QGH
REAL, DIMENSION( ims:ime ) , &
INTENT(OUT) :: U10,V10, &
TH2,T2,Q2,QSFC,LH
TH2,T2,Q2,LH
REAL, INTENT(IN ) :: CP,G,ROVCP,R,XLV,DX
Expand Down
2 changes: 1 addition & 1 deletion phys/noahmp

0 comments on commit 6233639

Please sign in to comment.