Skip to content

Commit

Permalink
Updated NACC for CTMLAYS option in WRF
Browse files Browse the repository at this point in the history
  • Loading branch information
drnimbusrain committed Jun 26, 2020
1 parent 674659d commit c5382e0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
9 changes: 5 additions & 4 deletions parallel/src/setup_wrfem.f90
Original file line number Diff line number Diff line change
Expand Up @@ -357,12 +357,13 @@ SUBROUTINE setup_wrfem (cdfid, ctmlays)
!-------------------------------------------------------------------------------
! If layer structure was not defined in user namelist, use WRF layers.
!-------------------------------------------------------------------------------

nlays = met_nz
CALL get_var_1d_real_cdf (cdfid, 'ZNW', ctmlays(1:nlays+1), 1, rcode)
IF ( rcode /= nf90_noerr ) THEN
IF ( needlayers ) THEN
nlays = met_nz
CALL get_var_1d_real_cdf (cdfid, 'ZNW', ctmlays(1:nlays+1), 1, rcode)
IF ( rcode /= nf90_noerr ) THEN
WRITE (*,f9400) TRIM(pname), 'ZNW', TRIM(nf90_strerror(rcode))
CALL graceful_stop (pname)
ENDIF
ENDIF

!-------------------------------------------------------------------------------
Expand Down
9 changes: 5 additions & 4 deletions serial/src/setup_wrfem.f90
Original file line number Diff line number Diff line change
Expand Up @@ -357,12 +357,13 @@ SUBROUTINE setup_wrfem (cdfid, ctmlays)
!-------------------------------------------------------------------------------
! If layer structure was not defined in user namelist, use WRF layers.
!-------------------------------------------------------------------------------

nlays = met_nz
CALL get_var_1d_real_cdf (cdfid, 'ZNW', ctmlays(1:nlays+1), 1, rcode)
IF ( rcode /= nf90_noerr ) THEN
IF ( needlayers ) THEN
nlays = met_nz
CALL get_var_1d_real_cdf (cdfid, 'ZNW', ctmlays(1:nlays+1), 1, rcode)
IF ( rcode /= nf90_noerr ) THEN
WRITE (*,f9400) TRIM(pname), 'ZNW', TRIM(nf90_strerror(rcode))
CALL graceful_stop (pname)
ENDIF
ENDIF

!-------------------------------------------------------------------------------
Expand Down

0 comments on commit c5382e0

Please sign in to comment.