Opened 5 years ago
Last modified 5 years ago
#247 new Defect
allow for using WRF output with lakes
Reported by: | ahilboll | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | FP other | Version: | FLEXPART-WRF |
Keywords: | Cc: |
Description
There is a hard-coded check for the value of num_land_cat in the
WRF output, and FLEXPART-WRF would only recognize values 24 (for USGS)
and 20 (for MODIS). However, when one uses lakes in WPS geogrid, the
value of num_land_cat will be 28 or 21 for USGS and MODIS land use
data, respectively.
This patch modifies the check accordingly.
Also, now a warning message is printed if the value of num_land_cat
is not recognized.
1 file changed, 3 insertions(+), 2 deletions(-) readwind.f90 | 5 +++-- modified readwind.f90 @@ -1125,7 +1125,7 @@ enddo enddo enddo - if (num_land_cat.eq.24) then ! Assume USGS landuse data + if (num_land_cat.eq.24 .or. num_land_cat.eq.28) then ! Assume USGS landuse data do j = 0, nymin1 do i = 0, nxmin1 k = nint(landuse_wrf(i,j)) ! Safely convert element to integer (nearest) @@ -1174,7 +1174,7 @@ endselect enddo enddo - elseif (num_land_cat.eq.20) then ! Assume MODIS data + elseif (num_land_cat.eq.20 .or. num_land_cat.eq.21) then ! Assume MODIS data do j = 0, nymin1 do i = 0, nxmin1 k = nint(landuse_wrf(i,j)) ! Safely convert element to integer (nearest) @@ -1219,6 +1219,7 @@ enddo enddo endif + write(*,*) 'WARNING: unknown num_land_cat in WRF files:', num_land_cat endif ! lu_option.eq.1 ! snow depth
Note: See
TracTickets for help on using
tickets.
of course the warning in the end is wrong; it should be inside an else one line further up.