Skip to content

Commit b1b0a7e

Browse files
authored
Fix mismatch isltyp and landmask (#746)
TYPE: bug fix KEYWORDS: surface_input_source, isltyp, landmask SOURCE: internal (reported by many users, including Priscilla Mooney from Norway) DESCRIPTION OF CHANGES: To accommodate users who would like to change LU_INDEX after running geogrid program, we changed namelist surface_input_source from default value of 1 (recomputing dominant categories in real) to 3 (using dominant categories from geogrid) in v3.8. Unfortunately, we neglected to consider in the v3.8 fix that when dominant categories for land and soil are recomputed in real, the real program also does mismatch checks: ensuring that the lower resolution ISLTYP matches with LANDMASK data. This check in real has two two effects: the actual ISLTYP, IVGTYP, and XLAND can be different from that from surface_input_source = 1 (a check later in real program effectively matched IVGTYP based on ISLTYP); for certain cases, the real program would stop due to un-matched ISLTYP and P_. This PR fixes the problem of this missing consistency check in the real program when surface_input_source = 3. The ISLTYP, IVGTYP, and XLAND are now identical to those coming from real after setting surface_input_source = 1. LIST OF MODIFIED FILES: M dyn_em/module_initialize_real.F TESTS CONDUCTED: Ran real before and after the change and results are correct. Ran real for a case that failed before and now it succeeds. RELEASE NOTE: In V3.8, we changed default surface_input_source option value from 1 to 3, which uses the dominant categories computed in geogrid. But we neglected that when dominant categories for land and soil are recomputed in real, it also does mismatch checks, making sure the lower resolution isltyp matches with landmask data. This has two two effects: one is the actual isltyp, ivgtyp and xland can be different from that from surface_input_source = 1 (a check later in real program effectively matched ivgtyp based on isltyp); and the other effect is that for certain cases, the real program would stop due to un-matched isltyp and ivgtyp. This change fixes this problem, and isltyp, ivgtyp, and xland are now identical to those coming from surface_input_source = 1.
1 parent 5dfdc82 commit b1b0a7e

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

dyn_em/module_initialize_real.F

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ SUBROUTINE init_domain_rk ( grid &
165165
LOGICAL :: vnest !T if using vertical nesting with vet_refine_method=2, otherwise F
166166

167167
INTEGER :: j_save
168+
INTEGER :: change_soil, change_soilw, iforce
168169

169170
LOGICAL :: wif_upside_down = .FALSE.
170171

@@ -2995,6 +2996,33 @@ SUBROUTINE init_domain_rk ( grid &
29952996
CALL wrf_error_fatal ( a_message )
29962997
END IF
29972998

2999+
! Need to match isltyp to landmask
3000+
3001+
iforce = 0
3002+
change_soil = 0
3003+
change_soilw = 0
3004+
DO j = jts, MIN(jde-1,jte)
3005+
DO i = its, MIN(ide-1,ite)
3006+
IF ( skip_middle_points_t ( ids , ide , jds , jde , i , j , em_width , hold_ups ) ) CYCLE
3007+
IF ( grid%landmask(i,j) .GT. 0.5 .AND. grid%isltyp(i,j) .EQ. grid%isoilwater ) THEN
3008+
grid%isltyp(i,j) = 8
3009+
change_soilw = change_soilw + 1
3010+
iforce = iforce + 1
3011+
ELSE IF ( grid%landmask(i,j) .LT. 0.5 .AND. grid%isltyp(i,j) .NE. grid%isoilwater ) THEN
3012+
grid%isltyp(i,j) = grid%isoilwater
3013+
change_soil = change_soil + 1
3014+
iforce = iforce + 1
3015+
END IF
3016+
END IF
3017+
END DO
3018+
END DO
3019+
IF ( change_soilw .GT. 0 .OR. change_soil .GT. 0 ) THEN
3020+
WRITE(a_message,FMT='(A,I4,A,I6)' ) &
3021+
'forcing artificial silty clay loam at ',iforce,' points, out of ',&
3022+
(MIN(ide-1,ite)-its+1)*(MIN(jde-1,jte)-jts+1)
3023+
CALL wrf_debug(0,a_message)
3024+
END IF
3025+
29983026
END IF
29993027

30003028
! Split NUDAPT Urban Parameters

0 commit comments

Comments
 (0)