Skip to content

Commit

Permalink
Merge branch 'release-v4.2'
Browse files Browse the repository at this point in the history
This merge finalizes the v4.2 release by adding changes from the 'release-v4.2'
branch onto the 'master' branch.

* release-v4.2:
  Fix scaling of negative starting latitude for Gaussian grids in g2print
  Add configuration stanza for PGI compilers on Linux/POWER9
  Add -qufmt=be to FFLAGS and F77FLAGS for XL/POWER/Linux configuration stanza
  Fix inconsistent kind types of arguments to MIN/MAX in module_map_utils
  Add missing category 21 for landmask calculation with modis_15s_lake land use
  Fix scaling of starting latitude in GRIB2 datasets on a Gaussian grid
  Initialize arrays in calc_ecmwf_p to avoid potential error in GHT calculation
  Update version number to 4.2
  31 MB, not 15.5 MB size
  domain 252 does not have sufficient data, domain 130 does
  change the path and interp option as default
  add new irrigation dataset to table
  update GRIB2 parameters based on newer version RAP and HRRR models at NCEP
  • Loading branch information
mgduda committed Apr 23, 2020
2 parents b9cfb7a + 1292d42 commit b98f858
Show file tree
Hide file tree
Showing 12 changed files with 55 additions and 19 deletions.
2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
WRF Pre-Processing System Version 4.1
WRF Pre-Processing System Version 4.2

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

Expand Down
25 changes: 23 additions & 2 deletions arch/configure.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,35 @@ SFC = xlf2003_r
CC = mpicc
SCC = xlc_r
LD = $(FC)
FFLAGS = -qfree=f90
F77FLAGS = -qfixed
FFLAGS = -qfree=f90 -qufmt=be
F77FLAGS = -qfixed -qufmt=be
FNGFLAGS = $(FFLAGS)
LDFLAGS =
CFLAGS =
CPP = cpp -P -traditional
CPPFLAGS = -Uvector -DBYTESWAP -DLINUX -DIO_NETCDF -DIO_BINARY -DIO_GRIB1 -DBIT32 CONFIGURE_MPI
ARFLAGS =
########################################################################################################################
#ARCH Linux ppc64le POWER Linux, PGI compiler # serial serial_NO_GRIB2 dmpar dmpar_NO_GRIB2
#
COMPRESSION_LIBS = CONFIGURE_COMP_L
COMPRESSION_INC = CONFIGURE_COMP_I
FDEFS = CONFIGURE_FDEFS
NCARG_LIBS =
NCARG_LIBS2 =
FC = mpifort
SFC = pgfortran
CC = mpicc
SCC = pgcc
LD = $(FC)
FFLAGS = -Mfree -byteswapio
F77FLAGS = -Mfixed -byteswapio
FNGFLAGS = $(FFLAGS)
LDFLAGS =
CFLAGS =
CPP = cpp -P -traditional
CPPFLAGS = -Uvector -D_UNDERSCORE -DBYTESWAP -DLINUX -DIO_NETCDF -DIO_BINARY -DIO_GRIB1 -DBIT32 CONFIGURE_MPI
ARFLAGS =

########################################################################################################################
#ARCH Linux ppc64 BG bglxf compiler with blxlc # dmpar
Expand Down
2 changes: 1 addition & 1 deletion compile
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ endif
# Print out WPS version, system info, and compiler/version
echo "============================================================================================== "
echo " "
echo Version 4.1
echo Version 4.2
echo " "
uname -a
echo " "
Expand Down
11 changes: 10 additions & 1 deletion geogrid/GEOGRID.TBL.ARW
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ name=LANDUSEF
landmask_water = ssib_10m:16 # Calculate a landmask from this field
landmask_water = ssib_5m:16 # Calculate a landmask from this field
landmask_water = modis_15s:17 # Calculate a landmask from this field
landmask_water = modis_15s_lake:17 # Calculate a landmask from this field
landmask_water = modis_15s_lake:17,21 # Calculate a landmask from this field
landmask_water = modis_30s:17 # Calculate a landmask from this field
landmask_water = modis_30s_lake:17,21 # Calculate a landmask from this field
landmask_water = usgs_30s:16 # Calculate a landmask from this field
Expand Down Expand Up @@ -488,3 +488,12 @@ name = SANDFRAC
rel_path = default:sandfrac_5m/
flag_in_output=FLAG_SANDFRAC
===============================
name=IRRIGATION
priority=1
optional=yes
dest_type=continuous
interp_option=default:average_gcell(0.0)+average_4pt+nearest_neighbor
masked = water
fill_missing = 0.
rel_path=default:irrigation/fao/
===============================
2 changes: 1 addition & 1 deletion geogrid/src/module_map_utils.F
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,7 @@ SUBROUTINE ijll_ps(i, j, proj, lat, lon)
ELSE
gi2 = (proj%rebydx * scale_top)**2.
lat = deg_per_rad * proj%hemi * ASIN((gi2-r2)/(gi2+r2))
arccos = ACOS(MIN(MAX(xx/SQRT(r2),-1.0),1.0))
arccos = ACOS(MIN(MAX(xx/SQRT(r2),-1.0_HIGH),1.0_HIGH))
IF (yy .GT. 0) THEN
lon = reflon + deg_per_rad * arccos
ELSE
Expand Down
2 changes: 1 addition & 1 deletion geogrid/src/process_tile_module.F
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ subroutine process_tile(which_domain, grid_type, dynopt, &
end if

! Initialize the output module now that we have the corner point lats/lons
call output_init(which_domain, 'OUTPUT FROM GEOGRID V4.1', '0000-00-00_00:00:00', grid_type, dynopt, &
call output_init(which_domain, 'OUTPUT FROM GEOGRID V4.2', '0000-00-00_00:00:00', grid_type, dynopt, &
corner_lats, corner_lons, &
start_dom_i, end_dom_i, start_dom_j, end_dom_j, &
start_patch_i, end_patch_i, start_patch_j, end_patch_j, &
Expand Down
4 changes: 3 additions & 1 deletion metgrid/src/input_module.F
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,9 @@ subroutine read_global_attrs(title, start_date, grid_type, dyn_opt,
#endif

call ext_get_dom_ti_char ('TITLE', title)
if (index(title,'GEOGRID V4.1') /= 0) then
if (index(title,'GEOGRID V4.2') /= 0) then
wps_version = 4.2
else if (index(title,'GEOGRID V4.1') /= 0) then
wps_version = 4.1
else if (index(title,'GEOGRID V4.0.3') /= 0) then
wps_version = 4.03
Expand Down
2 changes: 1 addition & 1 deletion metgrid/src/process_domain_module.F
Original file line number Diff line number Diff line change
Expand Up @@ -876,7 +876,7 @@ subroutine process_single_met_time(do_const_processing, &
! now we simply output every field from the storage module.
!

title = 'OUTPUT FROM METGRID V4.1'
title = 'OUTPUT FROM METGRID V4.2'

! Initialize the output module for this domain and time
call mprintf(.true.,LOGFILE,'Initializing output module.')
Expand Down
18 changes: 10 additions & 8 deletions ungrib/Variable_Tables/Vtable.RAP.hybrid.ncep
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,18 @@ Param| Type |Level1|Level2| Name | Units | Description
34 | 109 | * | | VV | m s-1 | V | 0 | 2 | 3 | 105 |
153 | 109 | * | | QC | kg kg-1 | Cloud water mixing ratio | 0 | 1 | 22 | 105 |
170 | 109 | * | | QR | kg kg-1 | Rain water mixing ratio | 0 | 1 | 24 | 105 |
58 | 109 | * | | QI | kg kg-1 | Ice mixing ratio | 0 | 6 | 0 | 105 |
58 | 109 | * | | QI | kg kg-1 | Ice mixing ratio | 0 | 1 | 82 | 105 |
171 | 109 | * | | QS | kg kg-1 | Snow water mixing ratio | 0 | 1 | 25 | 105 |
179 | 109 | * | | QG | kg kg-1 | Graupel mixing ratio | 0 | 1 | 32 | 105 |
148 | 107 | * | | QNR | kg-1 | Rain number concentration | 0 | 3 | 195 | 105 |
198 | 109 | * | | QNI | kg-1 | Ice number concentration | 0 | 1 | 207 | 105 |
153 | 109 | * | | QNR | kg-1 | Rain number concentration | 0 | 1 | 100 | 105 |
255 | 109 | * | | QNC | kg-1 | Cloud number concentration | 0 | 6 | 28 | 105 |
198 | 109 | * | | QNI | kg-1 | Ice number concentration | 0 | 6 | 29 | 105 |
157 | 107 | * | | QNWFA | kg-1 | Water-fr. aerosol number concentration | 0 | 13 | 193 | 105 |
156 | 107 | * | | QNIFA | kg-1 | Ice-fr. aerosol number concentration | 0 | 13 | 192 | 105 |
| 109 | * | | RH | % | Relative Humidity | 0 | 1 | | 105 |
11 | 105 | 2 | | TT | K | Temperature at 2 m | 0 | 0 | 0 | 103 |
51 | 105 | 2 | | SPECHUMD | kg kg-1 | Specific Humidity at 2 m | 0 | 1 | 0 | 103 |
| 105 | 2 | | RH | % | Relative Humidity at 2 m | 0 | 1 | | 103 |
52 | 105 | 2 | | RH | % | Relative Humidity at 2 m | 0 | 1 | 1 | 103 |
33 | 105 | 10 | | UU | m s-1 | U at 10 m | 0 | 2 | 2 | 103 |
34 | 105 | 10 | | VV | m s-1 | V at 10 m | 0 | 2 | 3 | 103 |
1 | 1 | 0 | | PSFC | Pa | Surface Pressure | 0 | 3 | 0 | 1 |
Expand Down Expand Up @@ -58,9 +61,8 @@ Param| Type |Level1|Level2| Name | Units | Description
# Vtable for the Rapid refresh (RAP) hybrid-vertical coordinate grib2 files on the ncep server.
# ftp://ftpprd.ncep.noaa.gov/pub/data/nccf/com/rap/prod/rap.ccyymmdd/
#
# rap.txxz.awp252bgrbfhh.grib2 20km conus 17901 Kb (approx. size)
# rap.txxz.awp130bgrbfhh.grib2 13km conus 34462 Kb
# rap.txxz.awp130bgrbfhh.grib2 13km conus 31 MB (approximate size)
#
# As of 1 June 2016,
# hourly to 18-hours
# As of 20 April, 2020
# hourly to 21 hours
# Level 1 is near the surface, level 50 is the top.
2 changes: 1 addition & 1 deletion ungrib/src/g2print.F
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ SUBROUTINE r_grib2(junit, gribflnm, hdate, &
endif

! Scale lat/lon values to 0-180, default range is 1e6.
if (map%lat1.ge.scale_factor) then
if (abs(map%lat1).ge.scale_factor) then
map%lat1 = map%lat1/scale_factor
endif
if (map%lon1.ge.scale_factor) then
Expand Down
2 changes: 1 addition & 1 deletion ungrib/src/rd_grib2.F
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ SUBROUTINE rd_grib2(junit, gribflnm, hdate,
endif

! Scale lat/lon values to 0-180, default range is 1e6.
if (map%lat1.ge.scale_factor) then
if (abs(map%lat1).ge.scale_factor) then
map%lat1 = map%lat1/scale_factor
endif
if (map%lon1.ge.scale_factor) then
Expand Down
2 changes: 2 additions & 0 deletions util/src/calc_ecmwf_p.F
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ program calc_ecmwf_p

if (.not. allocated(tt)) then
allocate(tt(ecmwf_data%nx,ecmwf_data%ny,n_levels+1)) ! Extra level is for surface
tt(:,:,:) = 0.0
end if

if (nint(ecmwf_data%xlvl) >= 1 .and. &
Expand All @@ -249,6 +250,7 @@ program calc_ecmwf_p

if (.not. allocated(qv)) then
allocate(qv(ecmwf_data%nx,ecmwf_data%ny,n_levels+1)) ! Extra level is for surface
qv(:,:,:) = 0.0
end if

if (nint(ecmwf_data%xlvl) >= 1 .and. &
Expand Down

0 comments on commit b98f858

Please sign in to comment.