From 8c3facdf43e8da63922c3f80d0ce326f667d94c2 Mon Sep 17 00:00:00 2001 From: smileMchen Date: Wed, 5 Dec 2018 15:04:46 -0700 Subject: [PATCH 01/16] Bug fix for the adjustment of urban type in REAL program when NLCD dataset is used (#702) TYPE: bug fix KEYWORDS: urban, land use, MODIS, REAL, NLCD SOURCE: internal DESCRIPTION OF CHANGES: Problem: When NLCD and MODIS are used together, the land use type will be adjusted for all grid cells where the urban fraction is greater than 0.5 in the real program. Due to an incorrect application of DeMorgan's Law, all of the urban land use categories became category 13. While 13 for MODIS is indeed urban, 13 is not the NLCD high-resolution urban categories: 24, 25, 26. These NLCD urban categories should be preferentially used if available. Solution: The logic is supposed to be: if ( the grid point is urban (based on percentage) ) and ( the grid cell is not one of the special NLCD points ) then reset this to the MODIS urban category. if (urban>0.5) if ((cat != 24) AND cat(!=25) AND cat(!=26)) cat = 13 Note that with our incorrect implementation of the logic, the if test above is ALWAYS true: we always reset the urban points to the MODIS value. Here is the line that we need: if ((cat != 24) OR cat(!=25) OR cat(!=26)) The incorrect logic in the IF test means that all urban points (based on percentage) become category 13, which is the MODIS urban category. The correct logic excludes urban points that are identified as NLCD urban points. This bug fix retains the correct urban type defined in NLCD. LIST OF MODIFIED FILES: M dyn_em/module_initialize_real.F TESTS CONDUCTED: Application to a user case confirms the modified code works as expected. --- dyn_em/module_initialize_real.F | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dyn_em/module_initialize_real.F b/dyn_em/module_initialize_real.F index b9b117cb3b..2e12541a93 100644 --- a/dyn_em/module_initialize_real.F +++ b/dyn_em/module_initialize_real.F @@ -3003,7 +3003,7 @@ SUBROUTINE init_domain_rk ( grid & DO i = its , MIN(ide-1,ite) IF ( MMINLU == 'NLCD40' .OR. MMINLU == 'MODIFIED_IGBP_MODIS_NOAH') THEN IF ( grid%FRC_URB2D(i,j) .GE. 0.5 .AND. & - (grid%ivgtyp(i,j).NE.13 .OR. grid%ivgtyp(i,j).NE.24 .OR. grid%ivgtyp(i,j).NE.25 .OR. grid%ivgtyp(i,j).NE.26)) grid%ivgtyp(i,j)=13 + (grid%ivgtyp(i,j).NE.13 .AND. grid%ivgtyp(i,j).NE.24 .AND. grid%ivgtyp(i,j).NE.25 .AND. grid%ivgtyp(i,j).NE.26)) grid%ivgtyp(i,j)=13 ELSE IF ( MMINLU == "USGS" ) THEN IF ( grid%FRC_URB2D(i,j) .GE. 0.5 .AND. & grid%ivgtyp(i,j).NE.1 ) grid%ivgtyp(i,j)=1 From 89c0989a308204c3f8e87340dc10027a8e951663 Mon Sep 17 00:00:00 2001 From: Carlos R <3448877+cross85@users.noreply.github.com> Date: Wed, 5 Dec 2018 19:08:02 -0300 Subject: [PATCH 02/16] Error compiling WRF Plus in WRF 4.0.2 on module_wrf_top.f90 (#710) TYPE: Bug fix KEYWORDS: WRF Plus, module_wrf_top.F, OpenMP error SOURCE: Carlos Ross (DFM Consultores) DESCRIPTION OF CHANGES: Problem: Getting an error when compiling WRF Plus with Intel compiler ``` ../main/module_wrf_top.f90(756): error #6099: An ENDDO statement occurred without a corresponding DO or DO WHILE statement. ``` A DO loop in wrf_adtl_check_spot had a syntax error and a formulation error for one of the OpenMP parallel directives. 1. A unnecessary trailing "&" on the last OpenMP directive caused the following first line of the Fortran DO loop to not be recognized. 2. The OpenMP loop was missing closing directive, "!$OMP END PARALLEL DO", after the DO loop. Solution: Remove the trailing "&" and add in the missing OpenMP directive after the DO loop. I wasn't trying to compile with OpenMP, I actually chose ``` option 10. (dmpar) INTEL (ifort/icc): Xeon (SNB with AVX mods) ``` when I ran the configure. This error occurs only when I was building WRFPLUS. Fixes #709 LIST OF MODIFIED FILES: M main/module_wrf_top.F TESTS CONDUCTED: The code successfully compiled after including the modifications with Intel 19.0.1. RELEASE NOTE: A syntax error was introduced with the v4.0 release that breaks the build of the WRFPLUS code (and only the WRFPLUS code) v19.0.1 of the Intel compiler. An OpenMP parallel loop was incorrectly constructed. That syntax error has been removed, though it is important to note that WRFPLUS never was intended to work with OpenMP, and the WRFPLUS code continues to only work with serial or DM build options. --- main/module_wrf_top.F | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main/module_wrf_top.F b/main/module_wrf_top.F index 0da57ba100..c498ad5326 100644 --- a/main/module_wrf_top.F +++ b/main/module_wrf_top.F @@ -872,13 +872,14 @@ SUBROUTINE wrf_adtl_check_spot( ) CALL allocate_grid ( ) !$OMP PARALLEL DO & - !$OMP DEFAULT (SHARED) PRIVATE ( ij ) & + !$OMP DEFAULT (SHARED) PRIVATE ( ij ) DO ij = 1 , head_grid%num_tiles CALL copy_grid_to_s ( head_grid , & head_grid%i_start(ij), head_grid%i_end(ij), & head_grid%j_start(ij), head_grid%j_end(ij) ) ENDDO - + !$OMP END PARALLEL DO + CALL wrf_message ( "wrf: calling nonlinear integrate" ) model_config_rec%dyn_opt = dyn_em From 3d78ca79869f938927e394e465fa80a8be04f0a4 Mon Sep 17 00:00:00 2001 From: Kelly Werner Date: Wed, 5 Dec 2018 17:25:46 -0700 Subject: [PATCH 03/16] Include calls to check-a-mundo for ideal_em.F (#715) TYPE: bug fix KEYWORDS: ideal, check-a-mundo, namelist consistency, physics, num_soil_layers SOURCE: internal DESCRIPTION OF CHANGES: Problem: The WRF ideal runs were not using any of the routines from module_check_a_mundo, so there were no namelist consistency checks and no physics configurations set. For example, in the subroutine "set_physics_rconfigs" the num_soil_layers is set to the appropriate number of layers, depending on the LSM used. If a user is not using a LSM physics option with 5 layers (which is default in the registry), an error would occur when running ideal. Starting with v4.0, we removed the namelist option "num_soil_layers" from all the namelists because "num_soil_layers" was supposedly redundant information, as "set_physics_rconfigs" from check_a_mundo assigns the correct number of soil layers. However, because check_a_mundo wasn't actually being used by ideal, the only thing assigning num_soil_layers was the namelist option. With the removal of "num_soil_layers" from the namelist, it defaults to 5 layers. Prior to the modification, the default em_scm_xy fails when you try to run ideal.exe, as the default LSM in that case is Noah (which uses 4 layers). Solution: This modification adds a USE statement for module_check_a_mundo, and makes CALLs to both set_physics_rconfigs and check_nml_consistency for the main program of the ideal executable. LIST OF MODIFIED FILES: M main/ideal_em.F TESTS CONDUCTED: Confirmed that all ideal cases are able to compile and give bit-for-bit results before and after modification. RELEASE NOTE: Idealized cases will now utilize the "set_physics_rconfigs" and "check_nml_consistency" subroutines from share/module_check_a_mundo.F. This will ensure that namelist requirements are not overlooked, and that the correct number of soil layers is assigned to cases, depending on what (if any) LSM scheme is used. --- main/ideal_em.F | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main/ideal_em.F b/main/ideal_em.F index 98dc6ce7ea..a770f65632 100644 --- a/main/ideal_em.F +++ b/main/ideal_em.F @@ -6,6 +6,7 @@ PROGRAM ideal USE module_domain , ONLY : domain USE module_initialize_ideal USE module_configure , ONLY : grid_config_rec_type + USE module_check_a_mundo USE module_timing USE module_wrf_error @@ -93,6 +94,8 @@ END SUBROUTINE med_initialdata_output CALL set_wrf_debug_level ( debug_level ) CALL wrf_message ( program_name ) + CALL set_physics_rconfigs + CALL check_nml_consistency ! allocated and configure the mother domain From 3ea3e8dde856859023454a98fdbf68c78954a650 Mon Sep 17 00:00:00 2001 From: Dave Gill Date: Thu, 6 Dec 2018 09:27:00 -0700 Subject: [PATCH 04/16] Replace Intel deprecated -openmp with -qopenmp in configure.defaults (#695) TYPE: bug fix KEYWORDS: Intel, ifort, OpenMP, deprecated SOURCE: internal DESCRIPTION OF CHANGES: Problem: Starting with ifort/18.0.1 on cheyenne, the `-openmp` option is no longer available. The WRF code cannot be built with OpenMP with a compiler that is v18.0 or newer. Solution: The Intel compiler has mentioned for years that the `-openmp` flag was deprecated and that users should select `-qopenmp` instead. The older existing cheyenne Intel compilers (16.0.1 and 17.0.1) both work with `-openmp` and `-qopenmp`. The new Intel compiler requires `-qopenmp`. ISSUE: Fixes #694 "Intel ifort 18 compiler replaces -openmp with -qopenmp" LIST OF MODIFIED FILES: M configure.defaults TESTS CONDUCTED: 1. New compiler - WRF and test OpenMP code - [x] The intel/18.0.1 builds with OpenMP when the `-qopenmp` option replaces the deprecated `-openmp`. - [x] The intel/18.0.1 _does not_ build with OpenMP with the `-openmp` option. 2. Older compiler - WRF and test OpenMP code - [x] The intel/17.0.1 builds with OpenMP when the `-qopenmp` option replaces the deprecated `-openmp`. - [x] The intel/17.0.1 builds with OpenMP with the `-openmp` option. 3. Even older compiler - test OpenMP code - [x] The intel/16.0.1 builds with OpenMP when the `-qopenmp` option replaces the deprecated `-openmp`. - [x] The intel/16.0.1 builds with OpenMP with the `-openmp` option. RELEASE NOTE: WRF now supports the correct compiler flag for OpenMP builds with newer Intel compilers, v18.0 and later. The Intel recommended flag, -qopenmp, was tested successfully with Intel 16.0.1, 17.0.1, and 18.0.1. --- arch/configure.defaults | 54 ++++++++++++++++++++--------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/arch/configure.defaults b/arch/configure.defaults index cc48b0ea9d..0f2bc12d81 100644 --- a/arch/configure.defaults +++ b/arch/configure.defaults @@ -296,8 +296,8 @@ CC_TOOLS = $(SCC) DESCRIPTION = INTEL ($SFC/$SCC) DMPARALLEL = # 1 OMPCPP = # -D_OPENMP -OMP = # -openmp -fpp -auto -OMPCC = # -openmp -fpp -auto +OMP = # -qopenmp -fpp -auto +OMPCC = # -qopenmp -fpp -auto SFC = ifort SCC = icc CCOMP = icc @@ -341,8 +341,8 @@ CC_TOOLS = $(SCC) DESCRIPTION = INTEL ($SFC/$SCC): Xeon Phi (MIC architecture) DMPARALLEL = 1 OMPCPP = -D_OPENMP -OMP = -openmp -fpp -auto -OMPCC = -openmp -fpp -auto +OMP = -qopenmp -fpp -auto +OMPCC = -qopenmp -fpp -auto SFC = ifort -mmic SCC = icc -mmic CCOMP = icc -mmic @@ -369,7 +369,7 @@ FORMAT_FREE = -FR FCSUFFIX = BYTESWAPIO = -convert big_endian RECORDLENGTH = -assume byterecl -FCBASEOPTS_NO_G = -w -openmp -auto -ftz -fno-alias -fp-model fast=1 -no-prec-div -no-prec-sqrt $(FORMAT_FREE) $(BYTESWAPIO) -auto -align array64byte #-vec-report6 +FCBASEOPTS_NO_G = -w -qopenmp -auto -ftz -fno-alias -fp-model fast=1 -no-prec-div -no-prec-sqrt $(FORMAT_FREE) $(BYTESWAPIO) -auto -align array64byte #-vec-report6 FCBASEOPTS = $(FCBASEOPTS_NO_G) $(FCDEBUG) MODULE_SRCH_FLAG = TRADFLAG = CONFIGURE_TRADFLAG @@ -388,8 +388,8 @@ CC_TOOLS = gcc DESCRIPTION = INTEL ($SFC/$SCC): Xeon (SNB with AVX mods) DMPARALLEL = # 1 OMPCPP = # -D_OPENMP -OMP = # -openmp -fpp -auto -OMPCC = # -openmp -fpp -auto +OMP = # -qopenmp -fpp -auto +OMPCC = # -qopenmp -fpp -auto SFC = ifort SCC = icc CCOMP = icc @@ -461,8 +461,8 @@ CC_TOOLS = gcc DESCRIPTION = INTEL ($SFC/$SCC): SGI MPT DMPARALLEL = # 1 OMPCPP = # -D_OPENMP -OMP = # -openmp -fpp -auto -OMPCC = # -openmp -fpp -auto +OMP = # -qopenmp -fpp -auto +OMPCC = # -qopenmp -fpp -auto SFC = ifort SCC = icc CCOMP = icc @@ -510,8 +510,8 @@ CC_TOOLS = $(SCC) DESCRIPTION = INTEL ($SFC/$SCC): IBM POE DMPARALLEL = # 1 OMPCPP = # -D_OPENMP -OMP = # -openmp -fpp -auto -OMPCC = # -openmp -fpp -auto +OMP = # -qopenmp -fpp -auto +OMPCC = # -qopenmp -fpp -auto SFC = ifort SCC = icc CCOMP = icc @@ -589,8 +589,8 @@ CC_TOOLS = $(SCC) DESCRIPTION = INTEL ($SFC/$SCC): ia64 DMPARALLEL = # 1 OMPCPP = # -D_OPENMP -OMP = # -openmp -fpp -auto -OMPCC = # -openmp -fpp -auto +OMP = # -qopenmp -fpp -auto +OMPCC = # -qopenmp -fpp -auto SFC = ifort SCC = icc CCOMP = icc @@ -672,8 +672,8 @@ CC_TOOLS = $(SCC) DESCRIPTION = INTEL ($SFC/$SCC): SGI Altix DMPARALLEL = # 1 OMPCPP = # -D_OPENMP -OMP = # -openmp -fpp -auto -OMPCC = # -openmp -fpp -auto +OMP = # -qopenmp -fpp -auto +OMPCC = # -qopenmp -fpp -auto SFC = ifort SCC = icc CCOMP = icc @@ -847,8 +847,8 @@ CC_TOOLS = cc DESCRIPTION = INTEL ($SFC/$SCC) DMPARALLEL = # 1 OMPCPP = # -D_OPENMP -OMP = # -openmp -fpp -auto -OMPCC = # -openmp -fpp -auto +OMP = # -qopenmp -fpp -auto +OMPCC = # -qopenmp -fpp -auto SFC = ifort SCC = icc CCOMP = icc @@ -893,8 +893,8 @@ CC_TOOLS = cc DESCRIPTION = INTEL ($SFC/$SCC) DMPARALLEL = # 1 OMPCPP = # -D_OPENMP -OMP = # -openmp -fpp -auto -OMPCC = # -openmp +OMP = # -qopenmp -fpp -auto +OMPCC = # -qopenmp SFC = ifort SCC = clang CCOMP = clang @@ -1325,8 +1325,8 @@ CC_TOOLS = gcc DESCRIPTION = INTEL ($SFC/$SCC): Cray XC DMPARALLEL = # 1 OMPCPP = # -D_OPENMP -OMP = # -openmp -fpp -auto -OMPCC = # -openmp -fpp -auto +OMP = # -qopenmp -fpp -auto +OMPCC = # -qopenmp -fpp -auto SFC = ftn SCC = icc CCOMP = icc @@ -1702,8 +1702,8 @@ CC_TOOLS = cc DESCRIPTION = INTEL ($SFC/$SCC): Open MPI DMPARALLEL = # 1 OMPCPP = # -D_OPENMP -OMP = # -openmp -fpp -auto -OMPCC = # -openmp -fpp -auto +OMP = # -qopenmp -fpp -auto +OMPCC = # -qopenmp -fpp -auto SFC = ifort SCC = icc CCOMP = icc @@ -1834,8 +1834,8 @@ CC_TOOLS = $(SCC) DESCRIPTION = INTEL ($SFC/$SCC): HSW/BDW DMPARALLEL = # 1 OMPCPP = # -D_OPENMP -OMP = # -openmp -fpp -auto -OMPCC = # -openmp -fpp -auto +OMP = # -qopenmp -fpp -auto +OMPCC = # -qopenmp -fpp -auto SFC = ifort SCC = icc CCOMP = icc @@ -1878,8 +1878,8 @@ CC_TOOLS = $(SCC) DESCRIPTION = INTEL ($SFC/$SCC): KNL MIC DMPARALLEL = # 1 OMPCPP = # -D_OPENMP -OMP = # -openmp -fpp -auto -OMPCC = # -openmp -fpp -auto +OMP = # -qopenmp -fpp -auto +OMPCC = # -qopenmp -fpp -auto SFC = ifort SCC = icc CCOMP = icc From d497286b5b5a64b7323520ce9f565302577c832a Mon Sep 17 00:00:00 2001 From: Jamie Bresch Date: Fri, 7 Dec 2018 13:40:44 -0700 Subject: [PATCH 05/16] Fix DA warning message for cv_options=3 and cloud_cv_options>0 (#721) TYPE: bug fix KEYWORDS: WRFDA, warning print SOURCE: Jamie Bresch (NCAR) DESCRIPTION OF CHANGES: cloud_cv_options is reset to be 0 in var/da/da_main/da_solve.inc when cv_options = 3. The second line of the warning messages stating that the cloud_cv_options = 0 were not originally printed. LIST OF MODIFIED FILES: M var/da/da_main/da_solve.inc TESTS CONDUCTED: 1. After the fix, the intended full warning messages are printed. ``` --------------------------- WARNING --------------------------- WARNING FROM FILE: da_solve.inc LINE: 205 Cloud control variables are not implemented for cv_options = 3 Resetting cloud_cv_options = 0 for cv_options = 3 --------------------------------------------------------------- ``` RELEASE NOTE: (too minor to be mentioned) --- var/da/da_main/da_solve.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/da/da_main/da_solve.inc b/var/da/da_main/da_solve.inc index 99eb794ecd..423d31efdd 100644 --- a/var/da/da_main/da_solve.inc +++ b/var/da/da_main/da_solve.inc @@ -202,7 +202,7 @@ write(unit=message(2),fmt='(A)') & 'Resetting cloud_cv_options = 0 for cv_options = 3' cloud_cv_options = 0 - call da_warning(__FILE__,__LINE__,message(1:1)) + call da_warning(__FILE__,__LINE__,message(1:2)) end if if ( use_radarobs ) then From 9b587279c63d529a5f487a42e4b8ef73064e754d Mon Sep 17 00:00:00 2001 From: smileMchen Date: Mon, 10 Dec 2018 14:08:02 -0700 Subject: [PATCH 06/16] Correct Register settings for a few variables that are identically zero in fine-grid ndown run. (#717) TYPE: bug fix KEYWORDS: ndown, nesting run SOURCE: internal, problem discovered by researchers at Shanghai Typhoon Institute DESCRIPTION OF CHANGES: Problem: A few variables are identically zero in the fine-grid ndown run or nesting run with input_from_file = .false.. Solution: The particular variables are those static fields that go from geogrid -> metgrid -> real -> WRF. The fields must all be "i2" variables (static fields from geogrid that should be in the wrfinput file during ndown). These are also fields that need to be horizontally interpolated in case there is no fine grid input file (requiring a "d"). The Registry.EM_COMMON file is modified to ensure these variables are available for fine-grid. VAR_SSO and FRC_URB2D have "i2" added EROD and SNOALB have "d" added LIST OF MODIFIED FILES: M Registry/Registry.EM_COMMON To make sure that we have not overlooked any other similar variables, we follow the steps below to conduct a complete check: Run geogrid, and get a list of all of the fields in the geo_em* file. Identify all fields in the geo_em file (they are all passed out of metgrid unchanged) that ALSO have an "i01" setting in the WRF Registry (basically identifying fields that meet the criteria that the field came in from metgrid and that the field that MUST go into the WRF model). Make sure that those identified fields have two settings: "i2" (so that they are identified as static fields for the fine grid for ndown, for example) and the nested option "d" (to interpolate down to the fine grid from the coarse grid). TESTS CONDUCTED: Tests are conducted with and without the fix. Results indicate that these previously missing variables are available for fine-grid. Figures below show the differences in VAR_SSO between wrfinput_d02 with and without the bug fix. Similar differences can be found for other variables (i.e., EROD, SNOALB, FRC_URB2D) --- Registry/Registry.EM_COMMON | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Registry/Registry.EM_COMMON b/Registry/Registry.EM_COMMON index 6a69ea2d12..1ed40b92d7 100644 --- a/Registry/Registry.EM_COMMON +++ b/Registry/Registry.EM_COMMON @@ -90,7 +90,7 @@ state real prho_gc igj dyn_em 1 Z i1 "PRHO" "f state real xlat_gc ij dyn_em 1 - i1 "XLAT_M" "latitude, positive north" "degrees" state real xlong_gc ij dyn_em 1 - i1 "XLONG_M" "longitude, positive east" "degrees" state real ht_gc ij dyn_em 1 - i1 "HGT_M" "topography elevation" "m" -state real var_sso ij dyn_em 1 - i01hr "var_sso" "variance of subgrid-scale orography" "m2" +state real var_sso ij dyn_em 1 - i012hrd "var_sso" "variance of subgrid-scale orography" "m2" state real lap_hgt ij dyn_em 1 - r "lap_hgt" "Laplacian of orography" "m" state real tsk_gc ij dyn_em 1 - i1 "SKINTEMP" "skin temperature" "K" state real tavgsfc ij dyn_em 1 - i1 "TAVGSFC" "daily mean of surface air temperature" "K" @@ -172,7 +172,7 @@ state real umaxw ij dyn_em 1 X i1 "UMAXW" state real utrop ij dyn_em 1 X i1 "UTROP" "U-component of the tropopause wind" "m s-1" state real vmaxw ij dyn_em 1 Y i1 "VMAXW" "V-component of the max wind speed" "m s-1" state real vtrop ij dyn_em 1 Y i1 "VTROP" "V-component of the tropopause wind" "m s-1" -state real erod ij. misc 1 - i012r "EROD" "fraction of erodible surface in each grid cell (0-1)" "none" +state real erod ij. misc 1 - i012rd "EROD" "fraction of erodible surface in each grid cell (0-1)" "none" #----------------------------------------------------------------------------------------------------------------------------------------------------------------- # @@ -657,7 +657,7 @@ state real slope ij misc 1 - rdu "SLOP state real slp_azi ij misc 1 - rdu "SLP_AZI" "ELEVATION SLOPE AZIMUTH" "rad" state real shdmax ij misc 1 - i012rhd=(interp_mask_field:lu_index,iswater)u=(copy_fcnm) "SHDMAX" "ANNUAL MAX VEG FRACTION" "" state real shdmin ij misc 1 - i012rhd=(interp_mask_field:lu_index,iswater)u=(copy_fcnm) "SHDMIN" "ANNUAL MIN VEG FRACTION" "" -state real snoalb ij misc 1 - i012rh "SNOALB" "ANNUAL MAX SNOW ALBEDO IN FRACTION" "" +state real snoalb ij misc 1 - i012rhd "SNOALB" "ANNUAL MAX SNOW ALBEDO IN FRACTION" "" state real toposoil ij misc 1 - i12 "SOILHGT" "ELEVATION OF LSM DATA" "m" state real landusef iuj misc 1 Z i012rdu "LANDUSEF" "LANDUSE FRACTION BY CATEGORY" "" state real soilctop isj misc 1 Z i012rdu "SOILCTOP" "SOIL CAT FRACTION (TOP)" "" @@ -830,7 +830,7 @@ state real LH_URB2D ij misc 1 - rd=(interp_f state real G_URB2D ij misc 1 - rd=(interp_fcnm)u=(copy_fcnm) "G_URB" "GROUND HEAT FLUX INTO URBAN" "W m{-2}" state real RN_URB2D ij misc 1 - rd=(interp_fcnm)u=(copy_fcnm) "RN_URB" "NET RADIATION ON URBAN SFC" "W m{-2}" state real TS_URB2D ij misc 1 - rd=(interp_fcnm)u=(copy_fcnm) "TS_URB" "SKIN TEMPERATURE" "K" -state real FRC_URB2D ij misc 1 - i10rd=(interp_fcnm)u=(copy_fcnm) "FRC_URB2D" "URBAN FRACTION" "dimensionless" +state real FRC_URB2D ij misc 1 - i012rd=(interp_fcnm)u=(copy_fcnm) "FRC_URB2D" "URBAN FRACTION" "dimensionless" state integer UTYPE_URB2D ij misc 1 - rd=(interp_fcnm)u=(copy_fcnm) "UTYPE_URB" "URBAN TYPE" "dimensionless" state real TRB_URB4D i{ulay}j misc 1 Z r "TRB_URB4D" "ROOF LAYER TEMPERATURE" "K" state real TW1_URB4D i{ulay}j misc 1 Z r "TW1_URB4D" "WALL LAYER TEMPERATURE" "K" From cc5e11e1e03a387d68d9be5e6a5ad0d93408088b Mon Sep 17 00:00:00 2001 From: smileMchen Date: Tue, 11 Dec 2018 16:35:26 -0700 Subject: [PATCH 07/16] Remove hard-coded max number of tasks for obs nudging (#698) TYPE: bug fix KEYWORDS: obs nudging, max number of tasks SOURCE: internal DESCRIPTION OF CHANGES: Problem: The max number of processors, 1024, is hard coded in module_dm.F for observation nudging. If a user requests more MPI tasks than this max number, this leads to segmentation fault. Solution: In the routine where the dimension of the variables is defined as the maximum number of MPI tasks, those two variables are now declared as ALLOCATABLE, and then they are allocated based on the total number of MPI ranks. LIST OF MODIFIED FILES: M external/RSL_LITE/module_dm.F TESTS CONDUCTED: Applied new code to a user's case, which shows the code works as expected. No bit-wise diffs with smaller test case, before vs after mods: I built the code with ./configure -d option, and run a small test case with 1 processor and 36 processors, respectively. OBS nudging is turned on. Both runs cover a 3-hour period. Results are identical. Test case with > 1024 MPI tasks: A large case (derived from a user's case) is also tested. In this case, the code is built with ./configure -D option. Without the change, the case crashed immediately. The error message is: OBS NUDGING is requested on a total of 2 domain(s). ++++++CALL ERROB AT KTAU = 0 AND INEST = 1: NSTA = 0 ++++++ At line 5741 of file module_dm.f90 Fortran runtime error: Index '1025' of dimension 1 of array 'idisplacement' above upper bound of 1024 Error termination. Backtrace: #0 0x782093 in __module_dm_MOD_get_full_obs_vector at /glade/scratch/chenming/WRFHELP/WRFV3.9.1.1_intel_dmpar_large-file/frame/module_dm.f90:5741 #1 0xffffffffffffffff in ??? With the code change, the case can run successfully for 6 hours. RELEASE NOTE: After removing a hard-coded limit for an assumed maximum number of MPI tasks, the observation nudging code for WRF now supports more than 1024 MPI tasks. If users previously ran the obs nudging code with 1024 or fewer MPI tasks, the original code is OK. However, if users tried to run obs nudging with > 1024 MPI tasks, likely the code died from a segmentation fault, while trying to access an address for an array index that was not available. --- external/RSL_LITE/module_dm.F | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/external/RSL_LITE/module_dm.F b/external/RSL_LITE/module_dm.F index dcf72c0cbe..2bb0367817 100644 --- a/external/RSL_LITE/module_dm.F +++ b/external/RSL_LITE/module_dm.F @@ -2213,8 +2213,8 @@ SUBROUTINE get_full_obs_vector( nsta, nerrf, niobf, & INTEGER N_BUFFER(NIOBF) REAL FULL_BUFFER(NIOBF) INTEGER IFULL_BUFFER(NIOBF) - INTEGER IDISPLACEMENT(1024) ! HARD CODED MAX NUMBER OF PROCESSORS - INTEGER ICOUNT(1024) ! HARD CODED MAX NUMBER OF PROCESSORS + INTEGER, ALLOCATABLE , DIMENSION(:) :: IDISPLACEMENT + INTEGER, ALLOCATABLE , DIMENSION(:) :: ICOUNT INTEGER :: MPI_COMM_COMP ! MPI group communicator INTEGER :: NPROCS ! Number of processors @@ -2225,6 +2225,8 @@ SUBROUTINE get_full_obs_vector( nsta, nerrf, niobf, & ! Get rank of monitor processor and broadcast to others. CALL MPI_COMM_SIZE( MPI_COMM_COMP, NPROCS, IERR ) + ALLOCATE (IDISPLACEMENT(NPROCS)) + ALLOCATE (ICOUNT(NPROCS)) ! DO THE U FIELD NLOCAL_DOT = 0 @@ -2369,6 +2371,8 @@ SUBROUTINE get_full_obs_vector( nsta, nerrf, niobf, & ERRF(10,IFULL_BUFFER(N)) = FULL_BUFFER(N) END DO + DEALLOCATE (IDISPLACEMENT) + DEALLOCATE (ICOUNT) #endif END SUBROUTINE get_full_obs_vector From af11fc2b82449832c680ddbf58b9aa96dc1ccc45 Mon Sep 17 00:00:00 2001 From: weiwangncar Date: Mon, 17 Dec 2018 10:27:42 -0700 Subject: [PATCH 08/16] Bug fix for diff_6th_opt restart problem (#736) TYPE: bug fix KEYWORDS: diff_6th_opt, restart SOURCE: internal, reported by Jorge Navarro Instituto de Geociencias (UCM-CSIC) of Spain DESCRIPTION OF CHANGES: When diff_6th_opt is turned on, restart fails in producing bit-for-bit results in real-data (reported) as well as idealized cases. This is due to the start and end indices too close to the domain boundaries when doing 6th order horizontal diffusions. This is a bug since this option was put in in V3.1. Because of the loop indices are changed, the results from any run that uses this option will also change. LIST OF MODIFIED FILES: list of changed files: M dyn_em/module_big_step_utilities_em.F TESTS CONDUCTED: No regression test yet. But tested with real-data case, quarter_ss case with periodic and open boundary conditions, and b_wave case with symmetric boundary condition in y, the restart gives bit-for-bit results. RELEASE NOTE: Fixed a non bit-for-bit restart problem with diff_6th_opt option. The error was due to the start and end indices too close to the domain boundaries when doing 6th order horizontal diffusions. Because the loop indices are changed, the results from any run that uses this option will also change. This was a bug since this option was added to the model in V3.1. Thanks for Jorge Navarro for the initial report that let to the discovering of the bug. --- dyn_em/module_big_step_utilities_em.F | 77 ++++++++++++++++++++++++++- 1 file changed, 75 insertions(+), 2 deletions(-) diff --git a/dyn_em/module_big_step_utilities_em.F b/dyn_em/module_big_step_utilities_em.F index 7e2eba5dfa..985136f140 100644 --- a/dyn_em/module_big_step_utilities_em.F +++ b/dyn_em/module_big_step_utilities_em.F @@ -6301,8 +6301,9 @@ SUBROUTINE sixth_order_diffusion( name, field, tendency, MUT, dt, & !------------------------------------------------------------------------------ ! Begin: Assign limits of spatial loops depending on variable to be diffused. -! The halo regions are already filled with values by the time this subroutine -! is called, which allows the stencil to extend beyond the domains' edges. +! The halo regions outside the physical domain are not defined, hence the loop +! indices should start 3 rows and columns in for specified boundary conditions. +! Also modified to work with idealized boundary conditions. ktf = MIN( kte, kde-1 ) @@ -6312,6 +6313,24 @@ SUBROUTINE sixth_order_diffusion( name, field, tendency, MUT, dt, & i_end = ite j_start = jts j_end = MIN(jde-1,jte) + IF ( config_flags%open_xs ) THEN + i_start = MAX(its,ids+3) + END IF + IF ( config_flags%open_ys ) THEN + j_start = MAX(jts,jds+3) + END IF + IF ( config_flags%open_xe ) THEN + i_end = MIN(ite,ide-3) + END IF + IF ( config_flags%open_ye ) THEN + j_end = MIN(jte,jde-4) + END IF + IF ( specified ) THEN + i_start = MAX(its,ids+3) + i_end = MIN(ite,ide-3) + j_start = MAX(jts,jds+3) + j_end = MIN(jte,jde-4) + END IF k_start = kts k_end = ktf @@ -6321,6 +6340,24 @@ SUBROUTINE sixth_order_diffusion( name, field, tendency, MUT, dt, & i_end = MIN(ide-1,ite) j_start = jts j_end = jte + IF ( config_flags%open_xs ) THEN + i_start = MAX(its,ids+3) + END IF + IF ( config_flags%open_ys ) THEN + j_start = MAX(jts,jds+3) + END IF + IF ( config_flags%open_xe ) THEN + i_end = MIN(ite,ide-4) + END IF + IF ( config_flags%open_ye ) THEN + j_end = MIN(jte,jde-3) + END IF + IF ( config_flags%open_xs .or. specified ) THEN + i_start = MAX(its,ids+3) + i_end = MIN(ite,ide-4) + j_start = MAX(jts,jds+3) + j_end = MIN(jte,jde-3) + END IF k_start = kts k_end = ktf @@ -6330,6 +6367,24 @@ SUBROUTINE sixth_order_diffusion( name, field, tendency, MUT, dt, & i_end = MIN(ide-1,ite) j_start = jts j_end = MIN(jde-1,jte) + IF ( config_flags%open_xs ) THEN + i_start = MAX(its,ids+3) + END IF + IF ( config_flags%open_ys ) THEN + j_start = MAX(jts,jds+3) + END IF + IF ( config_flags%open_xe ) THEN + i_end = MIN(ite,ide-4) + END IF + IF ( config_flags%open_ye ) THEN + j_end = MIN(jte,jde-4) + END IF + IF ( specified ) THEN + i_start = MAX(its,ids+3) + i_end = MIN(ide-4,ite) + j_start = MAX(jts,jds+3) + j_end = MIN(jde-4,jte) + END IF k_start = kts+1 k_end = ktf @@ -6339,6 +6394,24 @@ SUBROUTINE sixth_order_diffusion( name, field, tendency, MUT, dt, & i_end = MIN(ide-1,ite) j_start = jts j_end = MIN(jde-1,jte) + IF ( config_flags%open_xs ) THEN + i_start = MAX(its,ids+3) + END IF + IF ( config_flags%open_ys ) THEN + j_start = MAX(jts,jds+3) + END IF + IF ( config_flags%open_xe ) THEN + i_end = MIN(ite,ide-4) + END IF + IF ( config_flags%open_ye ) THEN + j_end = MIN(jte,jde-4) + END IF + IF ( specified ) THEN + i_start = MAX(its,ids+3) + i_end = MIN(ide-4,ite) + j_start = MAX(jts,jds+3) + j_end = MIN(jde-4,jte) + END IF k_start = kts k_end = ktf From 2bd3f6c9f854e9e061a1dd1a3453e36e2b3ae5fc Mon Sep 17 00:00:00 2001 From: dudhia Date: Mon, 17 Dec 2018 10:35:53 -0700 Subject: [PATCH 09/16] LES fix for use_theta_m=1 (#732) TYPE: bug-fix KEYWORDS: LES option, use_theta_m=1, V4.0 bug in surface flux fixed, calculate_N2 minor change SOURCE: internal plus Xu Zhang (Shanghai Typhoon Institute) DESCRIPTION OF CHANGES: When use_theta_m was updated to V4.0, diffusion was also applied to theta_m. However the surface flux was not modified to include a QFX term. This leads to a cooler PBL than in V3.9 with use_theta_m=1 and is incorrect. The fix is to add a QFX term that restores temperatures to correct values. ISSUE: none posted LIST OF MODIFIED FILES: M dyn_em/module_diffusion_em.F M dyn_em/module_first_rk_step_part2.F TESTS CONDUCTED: No WTF yet. LES tests with fix have corrected the problem and give use_theta_m=1 results more like V3.9.1. Theta profile plots show the cool anomaly with the old use_theta_m=1 (green) code compared to both the fixed version (red) and and use_theta_m=0 (blue). The fixed code shows more similarity with V3.9 too (not shown). The U profile shows more difference in the fixed code from the use_theta_m=0 case. ![profile](https://user-images.githubusercontent.com/17932284/50034495-52072500-ffba-11e8-9fa4-ecfe51869f22.png) RELEASE NOTE: LES options in V4.0 with use_theta_m=1 (default) contained an error with surface fluxes leading to a cooler PBL. QFX term has been added to surface theta_m flux to correct this problem. --- dyn_em/module_diffusion_em.F | 10 ++++++++++ dyn_em/module_first_rk_step_part2.F | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/dyn_em/module_diffusion_em.F b/dyn_em/module_diffusion_em.F index d8419f9736..63ed6ee493 100644 --- a/dyn_em/module_diffusion_em.F +++ b/dyn_em/module_diffusion_em.F @@ -3418,6 +3418,7 @@ SUBROUTINE vertical_diffusion_2 ( ru_tendf, rv_tendf, rw_tendf, rt_tendf, & tracer_tendf, n_tracer, & u_2, v_2, & thp,u_base,v_base,t_base,qv_base,tke, & + theta, & config_flags,defor13,defor23,defor33, & nba_mij, n_nba_mij, & div, & @@ -3488,6 +3489,7 @@ SUBROUTINE vertical_diffusion_2 ( ru_tendf, rv_tendf, rw_tendf, rt_tendf, & xkhv, & xkmh, & tke, & + theta, & rdz, & u_2, & v_2, & @@ -3701,6 +3703,10 @@ SUBROUTINE vertical_diffusion_2 ( ru_tendf, rv_tendf, rw_tendf, rt_tendf, & hfx(i,j)=heat_flux*cpm*rho(i,kts,j) ! provided for output only rt_tendf(i,kts,j)=rt_tendf(i,kts,j) & -g*heat_flux*rho(i,kts,j)/dnw(kts) + if(config_flags%use_theta_m == 1)THEN + rt_tendf(i,kts,j)=rt_tendf(i,kts,j) & + -g*1.61*theta(i,kts,j)*qfx(i,j)/dnw(kts) + ENDIF ENDDO ENDDO @@ -3712,6 +3718,10 @@ SUBROUTINE vertical_diffusion_2 ( ru_tendf, rv_tendf, rw_tendf, rt_tendf, & heat_flux = hfx(i,j)/cpm rt_tendf(i,kts,j)=rt_tendf(i,kts,j) & -g*heat_flux/dnw(kts) + if(config_flags%use_theta_m == 1)THEN + rt_tendf(i,kts,j)=rt_tendf(i,kts,j) & + -g*1.61*theta(i,kts,j)*qfx(i,j)/dnw(kts) + ENDIF ENDDO ENDDO diff --git a/dyn_em/module_first_rk_step_part2.F b/dyn_em/module_first_rk_step_part2.F index 56f2079224..36dd6a606d 100644 --- a/dyn_em/module_first_rk_step_part2.F +++ b/dyn_em/module_first_rk_step_part2.F @@ -911,7 +911,7 @@ SUBROUTINE first_rk_step_part2 ( grid , config_flags & tracer_tend, num_tracer, & grid%u_2, grid%v_2, & grid%t_2,grid%u_base,grid%v_base,grid%t_base,grid%qv_base, & - grid%tke_2, config_flags, & + grid%tke_2, th_phy, config_flags, & grid%defor13,grid%defor23,grid%defor33, & nba_mij, num_nba_mij, & !JDM grid%div, moist, chem, scalar,tracer, & From a26f989c147026c7358daec1e8a902f77518df7d Mon Sep 17 00:00:00 2001 From: dudhia Date: Mon, 17 Dec 2018 10:40:37 -0700 Subject: [PATCH 10/16] separate N2 change (#737) TYPE: bug fix KEYWORDS: Stability N2 in LES SOURCE: internal DESCRIPTION OF CHANGES: calculate_N2 routine contains 1.61 instead of 0.61 when calculating moist version of N2. This has been since the beginning. Extremely small effect on results. Affects both use_theta_m=0 and 1. ISSUE: no issue reported LIST OF MODIFIED FILES: M dyn_em/module_diffusion_em.F TESTS CONDUCTED: No WTF. Compare use_theta_m=0 before and after (see fig of theta difference in LES case after 4 hours). screen shot 2018-12-17 at 9 32 13 am RELEASE NOTE: LES calculation of N2 slightly corrected. Very small effect. --- dyn_em/module_diffusion_em.F | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dyn_em/module_diffusion_em.F b/dyn_em/module_diffusion_em.F index 63ed6ee493..c04c23d126 100644 --- a/dyn_em/module_diffusion_em.F +++ b/dyn_em/module_diffusion_em.F @@ -1637,7 +1637,7 @@ SUBROUTINE calculate_N2( config_flags, BN2, moist, & ELSE BN2(i,k,j) = g * ( (theta(i,k+1,j) - theta(i,k-1,j) ) / & theta(i,k,j) / tmpdz + & - 1.61 * ( moist(i,k+1,j,P_QV) - moist(i,k-1,j,P_QV) ) / & + 0.61 * ( moist(i,k+1,j,P_QV) - moist(i,k-1,j,P_QV) ) / & tmpdz - & ( tmp1(i,k+1,j) - tmp1(i,k-1,j) ) / tmpdz ) ENDIF @@ -1670,7 +1670,7 @@ SUBROUTINE calculate_N2( config_flags, BN2, moist, & cf3 * moist(i,3,j,P_QV) ! BN2(i,k,j) = g * ( ( theta(i,k+1,j) - thetasfc ) / & ! theta(i,k,j) / tmpdz + & -! 1.61 * ( moist(i,k+1,j,P_QV) - qvsfc ) / & +! 0.61 * ( moist(i,k+1,j,P_QV) - qvsfc ) / & ! tmpdz - & ! ( tmp1(i,k+1,j) - tmp1sfc(i,j) ) / tmpdz ) !...... MARTA: change in computation of BN2 at the surface, WCS 040331 @@ -1678,7 +1678,7 @@ SUBROUTINE calculate_N2( config_flags, BN2, moist, & tmpdz= 1./rdzw(i,k,j) ! controlare come calcola rdzw BN2(i,k,j) = g * ( ( theta(i,k+1,j) - theta(i,k,j)) / & theta(i,k,j) / tmpdz + & - 1.61 * ( moist(i,k+1,j,P_QV) - qvsfc ) / & + 0.61 * ( moist(i,k+1,j,P_QV) - qvsfc ) / & tmpdz - & ( tmp1(i,k+1,j) - tmp1sfc(i,j) ) / tmpdz ) ! end of MARTA/WCS change From b1d217b012856ec15a71dbf4c04d03d41209766b Mon Sep 17 00:00:00 2001 From: dudhia Date: Mon, 17 Dec 2018 11:07:39 -0700 Subject: [PATCH 11/16] reduce lines to less than 150 characters for git (#735) TYPE: text only KEYWORDS: microphysics_driver, git compatibility SOURCE: internal DESCRIPTION OF CHANGES: Reduce lines over 150 characters to less than 150 characters (2 comment lines only). When git shows subroutines in its modification listing it is fooled by long lines. This always shows up with mods in the microphysics_driver (e.g. see recent Jensen PR). There may be others. ISSUE: none reported LIST OF MODIFIED FILES: M phys/module_microphysics_driver.F TESTS CONDUCTED: None RELEASE NOTE: None --- phys/module_microphysics_driver.F | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phys/module_microphysics_driver.F b/phys/module_microphysics_driver.F index 2f4d2e1c94..1483f3dc38 100644 --- a/phys/module_microphysics_driver.F +++ b/phys/module_microphysics_driver.F @@ -393,14 +393,14 @@ SUBROUTINE microphysics_driver( & REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), & INTENT(IN), OPTIONAL :: & dlf, & !Detraining cloud water tendendcy - dlf2, & !dq/dt due to export of cloud water into environment by shallow convection(kg/kg/s) + dlf2, & !dq/dt due to export of cloud water into env by shal conv (kg/kg/s) t_phy, & !Temprature at the mid points (K) p_hyd, & !Hydrostatic pressure(Pa) p8w_hyd, & !Hydrostatic Pressure at level interface (Pa) z_at_w, & !Height above sea level at layer interfaces (m) tke_pbl, & !Turbulence kinetic energy turbtype3d, & !Turbulent interface types [ no unit ] - smaw3d, & !Normalized Galperin instability function for momentum ( 0<= <=4.964 and 1 at neutral ) [no units] + smaw3d, & !Normalized Galperin instability function for momentum [no units] alt, & !inverse density(m3/kg) icwmrsh3d, & !Shallow cumulus in-cloud water mixing ratio (kg/m2) icwmrdp3d, & !Deep Convection in-cloud water mixing ratio (kg/m2) From a2447414b91df3ad5c09e0e37dabdb68165962ec Mon Sep 17 00:00:00 2001 From: dudhia Date: Mon, 17 Dec 2018 15:54:41 -0700 Subject: [PATCH 12/16] N2 fix 181217 (#739) TYPE: bug-fix revert KEYWORDS: calculate_N2 in LES option SOURCE: internal DESCRIPTION OF CHANGES: Turns out that 1.61qv is needed because later qv is subtracted as part of the calculation of N2. ISSUE: none reported LIST OF MODIFIED FILES: M dyn_em/module_diffusion_em.F TESTS CONDUCTED: This is a return to the previous code. No test needed. RELEASE NOTE: (remove reference to calculate_N2 fix). From 5d198d241804aad96fce2abeeab39ba0f771e476 Mon Sep 17 00:00:00 2001 From: dudhia Date: Tue, 18 Dec 2018 10:10:07 -0700 Subject: [PATCH 13/16] N2 fix revert (#740) TYPE: bug-fix revert KEYWORDS: calculate_N2 in LES option SOURCE: internal DESCRIPTION OF CHANGES: Turns out that 1.61qv is needed because later qv is subtracted as part of the calculation of N2. ISSUE: none reported LIST OF MODIFIED FILES: M dyn_em/module_diffusion_em.F TESTS CONDUCTED: This is a return to the previous code. No test needed. RELEASE NOTE: (remove reference to calculate_N2 fix). From 9dcf0b8a9384dba3b8cb005e3994b0db7c0dc7a6 Mon Sep 17 00:00:00 2001 From: Kelly Werner Date: Tue, 18 Dec 2018 10:16:59 -0700 Subject: [PATCH 14/16] Revert "N2 fix 181217 (#739)" (#741) This reverts commit a2447414b91df3ad5c09e0e37dabdb68165962ec. Reverts #739 merged to incorrect branch From 4724a00afea9dd93f624d52b8b9a33dad8323a15 Mon Sep 17 00:00:00 2001 From: Kelly Werner Date: Tue, 18 Dec 2018 10:28:32 -0700 Subject: [PATCH 15/16] reverting changes to previous merge --- dyn_em/module_diffusion_em.F | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dyn_em/module_diffusion_em.F b/dyn_em/module_diffusion_em.F index c04c23d126..63ed6ee493 100644 --- a/dyn_em/module_diffusion_em.F +++ b/dyn_em/module_diffusion_em.F @@ -1637,7 +1637,7 @@ SUBROUTINE calculate_N2( config_flags, BN2, moist, & ELSE BN2(i,k,j) = g * ( (theta(i,k+1,j) - theta(i,k-1,j) ) / & theta(i,k,j) / tmpdz + & - 0.61 * ( moist(i,k+1,j,P_QV) - moist(i,k-1,j,P_QV) ) / & + 1.61 * ( moist(i,k+1,j,P_QV) - moist(i,k-1,j,P_QV) ) / & tmpdz - & ( tmp1(i,k+1,j) - tmp1(i,k-1,j) ) / tmpdz ) ENDIF @@ -1670,7 +1670,7 @@ SUBROUTINE calculate_N2( config_flags, BN2, moist, & cf3 * moist(i,3,j,P_QV) ! BN2(i,k,j) = g * ( ( theta(i,k+1,j) - thetasfc ) / & ! theta(i,k,j) / tmpdz + & -! 0.61 * ( moist(i,k+1,j,P_QV) - qvsfc ) / & +! 1.61 * ( moist(i,k+1,j,P_QV) - qvsfc ) / & ! tmpdz - & ! ( tmp1(i,k+1,j) - tmp1sfc(i,j) ) / tmpdz ) !...... MARTA: change in computation of BN2 at the surface, WCS 040331 @@ -1678,7 +1678,7 @@ SUBROUTINE calculate_N2( config_flags, BN2, moist, & tmpdz= 1./rdzw(i,k,j) ! controlare come calcola rdzw BN2(i,k,j) = g * ( ( theta(i,k+1,j) - theta(i,k,j)) / & theta(i,k,j) / tmpdz + & - 0.61 * ( moist(i,k+1,j,P_QV) - qvsfc ) / & + 1.61 * ( moist(i,k+1,j,P_QV) - qvsfc ) / & tmpdz - & ( tmp1(i,k+1,j) - tmp1sfc(i,j) ) / tmpdz ) ! end of MARTA/WCS change From b9575a3e27dc92298787ae1d126c1700aa52b841 Mon Sep 17 00:00:00 2001 From: Kelly Werner Date: Tue, 18 Dec 2018 10:41:47 -0700 Subject: [PATCH 16/16] update README & inc/version_decl for release-v4.0.3 (#743) TYPE: text only KEYWORDS: README, version_decl, release-v4.0.3 SOURCE: internal DESCRIPTION OF CHANGES: Updated the README and inc/version_decl files to reflect the upcoming release version (4.0.3), and correct date (December 18, 2018) LIST OF MODIFIED FILES: M README M inc/version_decl TESTS CONDUCTED: None - text only --- README | 2 +- inc/version_decl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README b/README index 2627ed8a98..4aa8e4fe6f 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -WRF Model Version 4.0.2 (November 9, 2018) +WRF Model Version 4.0.3 (December 18, 2018) http://www2.mmm.ucar.edu/wrf/users/ diff --git a/inc/version_decl b/inc/version_decl index 323072b3ec..7d767c57ee 100644 --- a/inc/version_decl +++ b/inc/version_decl @@ -1 +1 @@ - CHARACTER (LEN=10) :: release_version = 'V4.0.2 ' + CHARACTER (LEN=10) :: release_version = 'V4.0.3 '