diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000000..43c1113ebe --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,32 @@ +--- +name: Bug report +about: 'Issues are typically for demonstrable errors in the software. User problems + with a build should be directed to the WRF Forum: forum.mmm.ucar.edu' +title: '' +labels: '' +assignees: davegill + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Use compiler and version '....' +2. Use namelist options '....' +3. Output is '....' + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Attachments** +If applicable, attach supporting files: namelist.input, rsl.* files, etc. + +**Additional context** +Add any other context about the problem here, such as: + - This used to work with a previous version. + - The documentation is different from the exhibited behavior. diff --git a/.github/PULL_REQUEST_TEMPLATE b/.github/PULL_REQUEST_TEMPLATE index 437b1b0130..52d0a77967 100644 --- a/.github/PULL_REQUEST_TEMPLATE +++ b/.github/PULL_REQUEST_TEMPLATE @@ -1,23 +1,25 @@ -Use this template to give a detailed message describing the change you want to make to the code. -If you are unclear on what should be written here, see https://github.com/wrf-model/WRF/wiki/Making-a-good-pull-request-message for more guidance - -The title of this pull request should be a brief "purpose" for this change. - ---- Delete this line and those above before hitting "Create pull request" --- +The first line should be a single-line "purpose" for this change TYPE: choose one of [bug fix, enhancement, new feature, feature removed, no impact, text only] -KEYWORDS: approximately 3 to 6 words (more is always better) related to your commit, separated by commas +KEYWORDS: 5 to 10 words related to commit, separated by commas SOURCE: Either "developer's name (affiliation)" .XOR. "internal" for a WRF Dev committee member -DESCRIPTION OF CHANGES: One or more paragraphs describing problem, solution, and required changes. +DESCRIPTION OF CHANGES: +Problem: +Generally or specifically, what was wrong and needed to be addressed? + +Solution: +What was down algorithmically and in the source code to address the problem? -ISSUE: For use when this PR closes an issue. For example, if this PR closes issue number 123 +ISSUE: For use when this PR closes an issue. Fixes #123 LIST OF MODIFIED FILES: list of changed files (use `git diff --name-status master` to get formatted list) -TESTS CONDUCTED: Explicitly state if a WTF and or other tests were run, or are pending. For more complicated changes please be explicit! +TESTS CONDUCTED: +1. Do mods fix problem? How can that be demonstrated, and was that test conducted? +2. Are the Jenkins tests all passing? RELEASE NOTE: Include a stand-alone message suitable for the inclusion in the minor and annual releases. A publication citation is appropriate. diff --git a/README b/README index 02cebe180c..d5b942d812 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -WRF Model Version 4.2 +WRF Model Version 4.2.1 http://www2.mmm.ucar.edu/wrf/users/ diff --git a/Registry/Registry.EM_COMMON b/Registry/Registry.EM_COMMON index b94f249016..869dff658c 100644 --- a/Registry/Registry.EM_COMMON +++ b/Registry/Registry.EM_COMMON @@ -872,7 +872,7 @@ state real G_URB2D ij misc 1 - rd=(interp_f 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 - 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 integer UTYPE_URB2D ij misc 1 - rd=(interp_fcni)u=(copy_fcni) "UTYPE_URB" "URBAN TYPE" "dimensionless" state real TRB_URB4D i{umap1}j misc 1 Z r "TRB_URB4D" "ROOF LAYER TEMPERATURE" "K" state real TW1_URB4D i{umap2}j misc 1 Z r "TW1_URB4D" "WALL LAYER TEMPERATURE" "K" state real TW2_URB4D i{umap2}j misc 1 Z r "TW2_URB4D" "WALL LAYER TEMPERATURE" "K" @@ -1763,7 +1763,7 @@ state real LH_URB2D_mosaic i{mocat}j misc 1 - r state real G_URB2D_mosaic i{mocat}j misc 1 - r "G_URB2D_mosaic" "GROUND HEAT FLUX AT THE SURFACE" "W m-2" state real RN_URB2D_mosaic i{mocat}j misc 1 - r "RN_URB2D_mosaic" "NET RADIATION" "W m-2" -state integer mosaic_cat_index iuj misc 1 Z i012rd=(interp_mask_land_field:lu_index)u=(copy_fcnm) "mosaic_cat_index" " " "" +state integer mosaic_cat_index iuj misc 1 Z i012rd=(interp_fcni)u=(copy_fcni) "mosaic_cat_index" " " "" state real landusef2 iuj misc 1 Z i012rdu "LANDUSEF2" "sorted landuse fraction" "" # State vector for etampnew microphysics. Must be declared state because it is not read-once and is needed for restarting. @@ -2782,6 +2782,7 @@ state integer nodyn_dummy - dyn_nodyn - - - "" "" "" # Turbine drag physics. rconfig integer windfarm_opt namelist,physics max_domains 0 rh "windfarm_opt" "" "" rconfig integer windfarm_ij namelist,physics 1 0 rh "windfarm_ij" "" "" +rconfig real windfarm_tke_factor namelist,physics 1 0.25 rh "windfarm_tke_factor" "" "" # # Ideal case selection rconfig integer ideal_case namelist,ideal 1 0 rh "ideal_case" "" "" @@ -3062,7 +3063,7 @@ package icedepth_one seaice_thickness_opt==1 - state:icedept #Time series options for text output package notseries process_time_series==0 - - package tseries process_time_series==1 - state:ts_hour,ts_u,ts_v,ts_q,ts_t,ts_psfc,ts_glw,ts_gsw,ts_hfx,ts_lh,ts_tsk,ts_tslb,ts_clw,ts_rainc,ts_rainnc,ts_u_profile,ts_v_profile,ts_gph_profile,ts_th_profile,ts_p_profile,ts_w_profile -package tseries_add_solar process_time_series==2 - state:ts_hour,ts_u,ts_v,ts_q,ts_t,ts_psfc,ts_glw,ts_gsw,ts_hfx,ts_lh,ts_tsk,ts_tslb,ts_clw,ts_rainc,ts_rainnc,ts_u_profile,ts_v_profile,ts_gph_profile,ts_th_profile,ts_cldfrac2d,ts_wvp,ts_lwp,ts_iwp,ts_swp,ts_lwp_tot,ts_iwp_tot,ts_swp_tot,ts_re_qc,ts_re_qi,ts_re_qs,ts_re_qc_tot,ts_re_qi_tot,ts_re_qs_tot,ts_tau_qc,ts_tau_qi,ts_tau_qs,ts_tau_qc_tot,ts_tau_qi_tot,ts_tau_qs_tot,ts_cbaseht,ts_ctopht,ts_cbaseht_tot,ts_ctopht_tot,ts_clrnidx +package tseries_add_solar process_time_series==2 - state:ts_hour,ts_u,ts_v,ts_q,ts_t,ts_psfc,ts_glw,ts_gsw,ts_hfx,ts_lh,ts_tsk,ts_tslb,ts_clw,ts_rainc,ts_rainnc,ts_u_profile,ts_v_profile,ts_gph_profile,ts_th_profile,ts_cldfrac2d,ts_wvp,ts_lwp,ts_iwp,ts_swp,ts_lwp_tot,ts_iwp_tot,ts_swp_tot,ts_re_qc,ts_re_qi,ts_re_qs,ts_re_qc_tot,ts_re_qi_tot,ts_re_qs_tot,ts_tau_qc,ts_tau_qi,ts_tau_qs,ts_tau_qc_tot,ts_tau_qi_tot,ts_tau_qs_tot,ts_cbaseht,ts_ctopht,ts_cbaseht_tot,ts_ctopht_tot,ts_clrnidx,ts_p_profile,ts_w_profile # WRF-HAILCAST state real HAILCAST_DHAIL1 ij misc 1 - r "HAILCAST_DHAIL1" "WRF-HAILCAST Hail Diameter, 1st rank order" "mm" diff --git a/Registry/Registry.NMM b/Registry/Registry.NMM index 43c33fe964..bd9849bc9c 100644 --- a/Registry/Registry.NMM +++ b/Registry/Registry.NMM @@ -1433,6 +1433,7 @@ rconfig integer ysu_topdown_pblmix namelist,physics max_domains 0 rconfig integer shinhong_tke_diag namelist,physics max_domains 0 rh "shinhong_tke_diag" "" "" rconfig integer windfarm_opt namelist,physics max_domains 0 rh "windfarm_opt" "" "" rconfig integer windfarm_ij namelist,physics 1 0 rh "windfarm_ij" "" "" +rconfig real windfarm_tke_factor namelist,physics 1 0.25 rh "windfarm_tke_factor" "" "" rconfig integer mfshconv namelist,physics max_domains 1 rh "mfshconv" "To activate mass flux scheme with qnse, 1=true; 0=false" "" rconfig real BLDT namelist,physics max_domains 0 h "BLDT" "" "" rconfig integer cu_physics namelist,physics max_domains 0 rh0123 "cu_physics" "" "" diff --git a/Registry/registry.clm b/Registry/registry.clm index ff42b1d52a..af7c5b737a 100644 --- a/Registry/registry.clm +++ b/Registry/registry.clm @@ -1,14 +1,14 @@ # CLM Variables -state integer NUMC ij misc 1 Z rd=(interp_mask_field:lu_index,iswater)u=(copy_fcnm) "NUMC" "NUMBER OF COLUMN SUBGRIDS" " " -state integer NUMP ij misc 1 Z rd=(interp_mask_field:lu_index,iswater)u=(copy_fcnm) "NUMP" "NUMBER OF PFT SUBGRIDS" " " +state integer NUMC ij misc 1 Z rd=(interp_fcni)u=(copy_fcni) "NUMC" "NUMBER OF COLUMN SUBGRIDS" " " +state integer NUMP ij misc 1 Z rd=(interp_fcni)u=(copy_fcni) "NUMP" "NUMBER OF PFT SUBGRIDS" " " state real SABV ij misc 1 Z h "SABV" "NET VEGETATION SOLAR RADIATION" "W m-2" state real SABG ij misc 1 Z h "SABG" "NET SOIL SOLAR RADIATION" "W m-2" state real LWUP ij misc 1 Z h "LWUP" "OUTGOING LONGWAVE RADIATION" "W m-2" state real LHSOI i4j misc 1 Z h "LHSOI" "LH from soil" "W/m^2" state real LHVEG i4j misc 1 Z h "LHVEG" "LH from vegetation" "W/m^2" state real LHTRAN i4j misc 1 Z h "LHTRAN" "LH from transpiration" "W/m^2" -state integer SNL i4j misc 1 Z rd=(interp_mask_field:lu_index,iswater)u=(copy_fcnm) "SNL" "NUMBER OF SNOW LAYERS" " " +state integer SNL i4j misc 1 Z rd=(interp_fcni)u=(copy_fcni) "SNL" "NUMBER OF SNOW LAYERS" " " state real SNOWDP i4j misc 1 Z rd=(interp_mask_field:lu_index,iswater)u=(copy_fcnm) "SNOWDP" "SUBGRID SNOW DEPTH" "m" state real WTC i4j misc 1 Z rd=(interp_mask_field:lu_index,iswater)u=(copy_fcnm) "WTC" "COLUMN WEIGHT" "fraction" state real WTP i4j misc 1 Z rd=(interp_mask_field:lu_index,iswater)u=(copy_fcnm) "WTP" "PFT WEIGHT" "fraction" diff --git a/Registry/registry.noahmp b/Registry/registry.noahmp index c760451e5f..daf0511f41 100644 --- a/Registry/registry.noahmp +++ b/Registry/registry.noahmp @@ -1,5 +1,5 @@ # For Noah-MP -state integer isnowxy ij - 1 - i02rhd=(interp_mask_field:lu_index,iswater)u=(copy_fcnm) "isnow" "no. of snow layer" "m3 m-3" +state integer isnowxy ij - 1 - i02rhd=(interp_fcni)u=(copy_fcni) "isnow" "no. of snow layer" "m3 m-3" state real tvxy ij - 1 - i02rhd=(interp_mask_field:lu_index,iswater)u=(copy_fcnm) "tv" "vegetation leaf temperature" "K" state real tgxy ij - 1 - i02rhd=(interp_mask_field:lu_index,iswater)u=(copy_fcnm) "tg" "bulk ground temperature" "K" state real canicexy ij - 1 - i02rhd=(interp_mask_field:lu_index,iswater)u=(copy_fcnm) "canice" "intercepted ice mass" "mm" diff --git a/chem/KPP/clean_kpp b/chem/KPP/clean_kpp index 24844be7b5..84a38455ef 100755 --- a/chem/KPP/clean_kpp +++ b/chem/KPP/clean_kpp @@ -9,7 +9,7 @@ echo "# DO NOT EDIT! Placeholder for automatically generated file" >& configu # remove the traces of KPP if (-e ../Makefile_org ) then cp -f ../Makefile_org ../Makefile -rm -f ../Makfile_org +rm -f ../Makefile_org endif diff --git a/chem/rxn.F b/chem/rxn.F index 604a0af2db..0e9eff5a78 100644 --- a/chem/rxn.F +++ b/chem/rxn.F @@ -157,10 +157,11 @@ SUBROUTINE rxn_init( nw, wl ) integer, intent(in) :: nw real, intent(in) :: wl(nw) - integer :: astat, m, n + integer :: astat, m, n, debug_level character(len=256) :: emsg call set_initialization( status=.true. ) + call get_wrf_debug_level( debug_level ) if( .not. allocated( xsqy_tab ) ) then allocate( xsqy_tab(kj),stat=astat ) @@ -200,7 +201,9 @@ SUBROUTINE rxn_init( nw, wl ) npht_tab = 2 call setup_sub_calls( the_subs,npht_tab ) - call diagnostics + IF ( 100 .LE. debug_level ) THEN + call diagnostics + ENDIF call rdxs_init( nw, wl ) diff --git a/dyn_em/module_advect_em.F b/dyn_em/module_advect_em.F index 112db8906e..bd0bce4876 100644 --- a/dyn_em/module_advect_em.F +++ b/dyn_em/module_advect_em.F @@ -2,7 +2,7 @@ !WRF:MODEL_LAYER:DYNAMICS ! #if ( defined(ADVECT_KERNEL) ) -! cpp -traditional -C -P -DADVECT_KERNEL module_advect_em.F > advection_kernel.f90 +! cpp -traditional-cpp -P -DADVECT_KERNEL module_advect_em.F > advection_kernel.f90 ! gfortran -ffree-form -ffree-line-length-none advection_kernel.f90 ! ./a.out MODULE advection_kernel @@ -10558,7 +10558,8 @@ PROGRAM feeder msfty REAL , DIMENSION( : ), ALLOCATABLE :: fzm, & fzp, & - rdzw, znw,dnw, rdnw, dn, rdn + rdzw, znw,dnw, rdnw, dn, rdn, & + c1, c2 REAL :: rdx, & rdy, & dt @@ -10607,6 +10608,8 @@ PROGRAM feeder ALLOCATE (rdnw( kms:kme ) ) ALLOCATE ( dn ( kms:kme ) ) ALLOCATE (rdn ( kms:kme ) ) + ALLOCATE ( c1 ( kms:kme ) ) + ALLOCATE ( c2 ( kms:kme ) ) PRINT *,'CALL init' CALL init ( config_flags) CALL tophat ( field , MAX_SCALARS ,& @@ -10649,6 +10652,10 @@ PROGRAM feeder fzp(k) = .5* dnw(k )/dn(k) fzm(k) = .5* dnw(k-1)/dn(k) ENDDO + DO k = kts,kte + c1(k) = 1. ! This is d(B)/d(eta), so assuming no hyb coord + c2(k) = 0. ! This (1 - c1)*(p00 - ptop) + ENDDO time_step = 5 dt = time_step @@ -10668,8 +10675,8 @@ PROGRAM feeder CALL advect_scalar ( field(ims,kms,jms,im), & field_old(ims,kms,jms,im), & tendency(ims,kms,jms), & - ru, rv, rom, & - mut, time_step/3, config_flags, & + ru, rv, rom, c1, c2, & + mut, time_step/3, config_flags,& msfux, msfuy, msfvx, msfvy, & msftx, msfty, & fzm, fzp, & @@ -10685,8 +10692,8 @@ PROGRAM feeder CALL advect_scalar ( field(ims,kms,jms,im), & field_old(ims,kms,jms,im), & tendency(ims,kms,jms), & - ru, rv, rom, & - mut, time_step/2, config_flags, & + ru, rv, rom, c1, c2, & + mut, time_step/2, config_flags,& msfux, msfuy, msfvx, msfvy, & msftx, msfty, & fzm, fzp, & @@ -10703,7 +10710,7 @@ PROGRAM feeder CALL advect_scalar ( field(ims,kms,jms,im), & field_old(ims,kms,jms,im), & tendency(ims,kms,jms), & - ru, rv, rom, & + ru, rv, rom, c1, c2, & mut, time_step, config_flags, & msfux, msfuy, msfvx, msfvy, & msftx, msfty, & @@ -10718,7 +10725,8 @@ PROGRAM feeder tendency(ims,kms,jms), & h_tendency(ims,kms,jms), & z_tendency(ims,kms,jms), & - ru, rv, rom, mut, mub, mu_old, & + ru, rv, rom, c1, c2, & + mut, mub, mu_old, & time_step, config_flags, tenddec, & msfux, msfuy, msfvx, msfvy, & msftx, msfty, fzm, fzp, & @@ -10732,7 +10740,8 @@ PROGRAM feeder tendency(ims,kms,jms), & h_tendency(ims,kms,jms), & z_tendency(ims,kms,jms), & - ru, rv, rom, mut, mub, mu_old, & + ru, rv, rom, c1, c2, & + mut, mub, mu_old, & config_flags, tenddec, & msfux, msfuy, msfvx, msfvy, & msftx, msfty, fzm, fzp, & @@ -10744,7 +10753,7 @@ PROGRAM feeder CALL advect_scalar_weno ( field(ims,kms,jms,im), & field_old(ims,kms,jms,im), & tendency(ims,kms,jms), & - ru, rv, rom, & + ru, rv, rom, c1, c2, & mut, time_step, config_flags, & msfux, msfuy, msfvx, msfvy, & msftx, msfty, & @@ -10757,7 +10766,7 @@ PROGRAM feeder CALL advect_scalar_wenopd ( field(ims,kms,jms,im), & field_old(ims,kms,jms,im), & tendency(ims,kms,jms), & - ru, rv, rom, & + ru, rv, rom, c1, c2, & mut, mub, mu_old, & time_step, config_flags, & msfux, msfuy, msfvx, msfvy, & @@ -10803,7 +10812,7 @@ PROGRAM feeder print *,' ' print *,'Lines to input to gnuplot' print *,' ' - print *,"set term x11" + print *,"set terminal x11" IF (config_flags%scalar_adv_opt .EQ. 0 ) THEN print *,'set title "Scalar Advection" font ",20"' ELSE IF (config_flags%scalar_adv_opt .EQ. 1 ) THEN @@ -10812,7 +10821,7 @@ PROGRAM feeder print *,'set title "Mono Advection" font ",20"' ELSE IF (config_flags%scalar_adv_opt .EQ. 3 ) THEN print *,'set title "WENO Advection" font ",20"' - ELSE IF (config_flags%scalar_adv_opt .EQ. 3 ) THEN + ELSE IF (config_flags%scalar_adv_opt .EQ. 4 ) THEN print *,'set title "WENO PD Advection" font ",20"' END IF print *,"set yrange[-20:120]" diff --git a/dyn_em/module_diffusion_em.F b/dyn_em/module_diffusion_em.F index 2fb33312a5..57fd621e7a 100644 --- a/dyn_em/module_diffusion_em.F +++ b/dyn_em/module_diffusion_em.F @@ -4165,8 +4165,8 @@ SUBROUTINE vertical_diffusion_2 ( ru_tendf, rv_tendf, rw_tendf, rt_tendf, & v_2(i-1,kts,j )+ & v_2(i-1,kts,j+1))/4)**2))+epsilon - tao_xz=cd0*V0_u*u_2(i,kts,j)*(rho(i,kts,j)+rho(i-1,kts,j))/2. - ru_tendf(i,kts,j)=ru_tendf(i,kts,j) + g*tao_xz/dnw(kts) + tao_xz=cd0*V0_u*u_2(i,kts,j) + ru_tendf(i,kts,j)=ru_tendf(i,kts,j) + g*tao_xz*0.5*(rho(i,kts,j)+rho(i-1,kts,j))/dnw(kts) IF ( (config_flags%m_opt .EQ. 1) .OR. (config_flags%sfs_opt .GT. 0) ) THEN nba_mij(i,kts,j,P_m13) = -tao_xz ENDIF @@ -4183,8 +4183,8 @@ SUBROUTINE vertical_diffusion_2 ( ru_tendf, rv_tendf, rw_tendf, rt_tendf, & u_2(i+1,kts,j )+ & u_2(i+1,kts,j-1))/4)**2))+epsilon - tao_yz=cd0*V0_v*v_2(i,kts,j)*(rho(i,kts,j)+rho(i,kts,j-1))/2. - rv_tendf(i,kts,j)=rv_tendf(i,kts,j) + g*tao_yz/dnw(kts) + tao_yz=cd0*V0_v*v_2(i,kts,j) + rv_tendf(i,kts,j)=rv_tendf(i,kts,j) + g*tao_yz*0.5*(rho(i,kts,j)+rho(i,kts,j-1))/dnw(kts) IF ( (config_flags%m_opt .EQ. 1) .OR. (config_flags%sfs_opt .GT. 0) ) THEN nba_mij(i,kts,j,P_m23) = -tao_yz ENDIF @@ -4203,8 +4203,8 @@ SUBROUTINE vertical_diffusion_2 ( ru_tendf, rv_tendf, rw_tendf, rt_tendf, & v_2(i-1,kts,j+1))/4)**2))+epsilon ustar=0.5*(ust(i,j)+ust(i-1,j)) - tao_xz=ustar*ustar*u_2(i,kts,j)*(rho(i,kts,j)+rho(i-1,kts,j))/(2.*V0_u) - ru_tendf(i,kts,j)=ru_tendf(i,kts,j) + g*tao_xz/dnw(kts) + tao_xz=ustar*ustar*u_2(i,kts,j)/V0_u + ru_tendf(i,kts,j)=ru_tendf(i,kts,j) + g*tao_xz*0.5*(rho(i,kts,j)+rho(i-1,kts,j))/dnw(kts) IF ( (config_flags%m_opt .EQ. 1) .OR. (config_flags%sfs_opt .GT. 0) ) THEN nba_mij(i,kts,j,P_m13) = -tao_xz ENDIF @@ -4222,8 +4222,8 @@ SUBROUTINE vertical_diffusion_2 ( ru_tendf, rv_tendf, rw_tendf, rt_tendf, & u_2(i+1,kts,j-1))/4)**2))+epsilon ustar=0.5*(ust(i,j)+ust(i,j-1)) - tao_yz=ustar*ustar*v_2(i,kts,j)*(rho(i,kts,j)+rho(i,kts,j-1))/(2.*V0_v) - rv_tendf(i,kts,j)=rv_tendf(i,kts,j) + g*tao_yz/dnw(kts) + tao_yz=ustar*ustar*v_2(i,kts,j)/V0_v + rv_tendf(i,kts,j)=rv_tendf(i,kts,j) + g*tao_yz*0.5*(rho(i,kts,j)+rho(i,kts,j-1))/dnw(kts) IF ( (config_flags%m_opt .EQ. 1) .OR. (config_flags%sfs_opt .GT. 0) ) THEN nba_mij(i,kts,j,P_m23) = -tao_yz ENDIF diff --git a/dyn_em/module_first_rk_step_part1.F b/dyn_em/module_first_rk_step_part1.F index 5db1aae525..bcd346f49b 100644 --- a/dyn_em/module_first_rk_step_part1.F +++ b/dyn_em/module_first_rk_step_part1.F @@ -779,7 +779,7 @@ SUBROUTINE first_rk_step_part1 ( grid , config_flags & & ,iopt_tbot=config_flags%opt_tbot, iopt_stc=config_flags%opt_stc & & ,iopt_gla=config_flags%opt_gla, iopt_rsf=config_flags%opt_rsf & & ,iopt_soil=config_flags%opt_soil, iopt_pedo=config_flags%opt_pedo & - & ,iopt_crop=config_flags%opt_crop + & ,iopt_crop=config_flags%opt_crop & & , isnowxy=grid%isnowxy , tvxy=grid%tvxy , tgxy=grid%tgxy & & ,canicexy=grid%canicexy ,canliqxy=grid%canliqxy, eahxy=grid%eahxy & & , tahxy=grid%tahxy , cmxy=grid%cmxy , chxy=grid%chxy & diff --git a/dyn_em/start_em.F b/dyn_em/start_em.F index 78766dcab3..08f6f39bbf 100644 --- a/dyn_em/start_em.F +++ b/dyn_em/start_em.F @@ -1514,10 +1514,21 @@ SUBROUTINE start_domain_em ( grid, allowed_to_read & ! DO j = jts,min(jte,jde-1) DO i = its, min(ite,ide-1) - im1 = max(i-1,ids) - ip1 = min(i+1,ide-1) - jm1 = max(j-1,jds) - jp1 = min(j+1,jde-1) + if (config_flags%periodic_x ) then + im1 = i-1 + ip1 = i+1 + else + im1 = max(i-1,ids) + ip1 = min(i+1,ide-1) + endif + + if (config_flags%periodic_y ) then + jm1 = j-1 + jp1 = j+1 + else + jm1 = max(j-1,jds) + jp1 = min(j+1,jde-1) + endif grid%toposlpx(i,j)=(grid%ht(ip1,j)-grid%ht(im1,j))*grid%msftx(i,j)*grid%rdx/(ip1-im1) grid%toposlpy(i,j)=(grid%ht(i,jp1)-grid%ht(i,jm1))*grid%msfty(i,j)*grid%rdy/(jp1-jm1) grid%lap_hgt(i,j)=(grid%ht(ip1,j)+grid%ht(im1,j)+grid%ht(i,jp1)+grid%ht(i,jm1)-grid%ht(i,j)*4.)/4. diff --git a/external/io_grib2/bacio-1.3/baciof.F b/external/io_grib2/bacio-1.3/baciof.F index e4c75bf2a3..271a34c782 100644 --- a/external/io_grib2/bacio-1.3/baciof.F +++ b/external/io_grib2/bacio-1.3/baciof.F @@ -89,7 +89,7 @@ SUBROUTINE BAOPEN(LU,CFN,IRET) USE BACIO_MODULE CHARACTER CFN*(*) CHARACTER(80) CMSG - INTEGER SIZE = 1 + INTEGER :: SIZE = 1 C - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IF(LU.LT.001.OR.LU.GT.999) THEN @@ -132,7 +132,7 @@ SUBROUTINE BAOPENR(LU,CFN,IRET) C$$$ USE BACIO_MODULE CHARACTER CFN*(*) - INTEGER SIZE = 1 + INTEGER :: SIZE = 1 C - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IF(LU.LT.001.OR.LU.GT.999) THEN IRET=6 @@ -174,7 +174,7 @@ SUBROUTINE BAOPENW(LU,CFN,IRET) C$$$ USE BACIO_MODULE CHARACTER CFN*(*) - INTEGER SIZE = 1 + INTEGER :: SIZE = 1 C - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IF(LU.LT.001.OR.LU.GT.999) THEN IRET=6 @@ -216,7 +216,7 @@ SUBROUTINE BAOPENWT(LU,CFN,IRET) C$$$ USE BACIO_MODULE CHARACTER CFN*(*) - INTEGER SIZE = 1 + INTEGER :: SIZE = 1 C - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IF(LU.LT.001.OR.LU.GT.999) THEN IRET=6 @@ -258,7 +258,7 @@ SUBROUTINE BAOPENWA(LU,CFN,IRET) C$$$ USE BACIO_MODULE CHARACTER CFN*(*) - INTEGER SIZE = 1 + INTEGER :: SIZE = 1 C - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IF(LU.LT.001.OR.LU.GT.999) THEN IRET=6 @@ -299,7 +299,7 @@ SUBROUTINE BACLOSE(LU,IRET) C C$$$ USE BACIO_MODULE - INTEGER SIZE = 1 + INTEGER :: SIZE = 1 C - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IF(LU.LT.001.OR.LU.GT.999) THEN IRET=6 @@ -356,8 +356,8 @@ SUBROUTINE BAREAD(LU,IB,NB,KA,A) CHARACTER Y(NY,MY) DATA LUX/0/ SAVE JY,NS,NN,Y,LUX - INTEGER SIZE=1 - INTEGER ZERO=0 + INTEGER :: SIZE=1 + INTEGER :: ZERO=0 C - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IF(FD(LU).LE.0) THEN KA=0 @@ -375,7 +375,7 @@ SUBROUTINE BAREAD(LU,IB,NB,KA,A) C UNBUFFERED I/O IF(BAOPTS(1).NE.1) THEN IF(IB.GE.0) THEN - + IRET=BACIO(BACIO_READ,IB,JB,SIZE,NB,KA,FD(LU),CFN,A) ELSE IRET=BACIO(BACIO_READ+BACIO_NOSEEK,ZERO,JB,SIZE,NB,KA, @@ -469,8 +469,8 @@ SUBROUTINE BAWRITE(LU,IB,NB,KA,A) USE BACIO_MODULE CHARACTER A(NB) CHARACTER CFN - INTEGER SIZE=1 - INTEGER ZERO=0 + INTEGER :: SIZE=1 + INTEGER :: ZERO=0 C - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IF(FD(LU).LE.0) THEN KA=0 @@ -524,8 +524,8 @@ SUBROUTINE WRYTE(LU,NB,A) USE BACIO_MODULE CHARACTER A(NB) CHARACTER CFN - INTEGER SIZE=1 - INTEGER ZERO=0 + INTEGER :: SIZE=1 + INTEGER :: ZERO=0 C - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IF(FD(LU).LE.0) THEN RETURN diff --git a/frame/Makefile b/frame/Makefile index 7bef8c25a1..a4e9153c2f 100644 --- a/frame/Makefile +++ b/frame/Makefile @@ -89,82 +89,66 @@ $(LIBTARGET) : $(MODULES) $(OBJS) $(SPECIAL) $(NLOBJS) $(ALOBJS) nl_set_0_routines.o : nl_access_routines.F module_configure.o $(CPP) -DNNN=0 -I../inc -DNL_set_ROUTINES nl_access_routines.F > xx0.f90 $(FC) -o $@ -c $(PROMOTION) $(FCNOOPT) $(FCBASEOPTS_NO_G) $(MODULE_DIRS) $(FCSUFFIX) xx0.f90 - $(RM) xx0.f90 nl_set_1_routines.o : nl_access_routines.F module_configure.o $(CPP) -DNNN=1 -I../inc -DNL_set_ROUTINES nl_access_routines.F > xx1.f90 $(FC) -o $@ -c $(PROMOTION) $(FCNOOPT) $(FCBASEOPTS_NO_G) $(MODULE_DIRS) $(FCSUFFIX) xx1.f90 - $(RM) xx1.f90 nl_set_2_routines.o : nl_access_routines.F module_configure.o $(CPP) -DNNN=2 -I../inc -DNL_set_ROUTINES nl_access_routines.F > xx2.f90 $(FC) -o $@ -c $(PROMOTION) $(FCNOOPT) $(FCBASEOPTS_NO_G) $(MODULE_DIRS) $(FCSUFFIX) xx2.f90 - $(RM) xx2.f90 nl_set_3_routines.o : nl_access_routines.F module_configure.o $(CPP) -DNNN=3 -I../inc -DNL_set_ROUTINES nl_access_routines.F > xx3.f90 $(FC) -o $@ -c $(PROMOTION) $(FCNOOPT) $(FCBASEOPTS_NO_G) $(MODULE_DIRS) $(FCSUFFIX) xx3.f90 - $(RM) xx3.f90 nl_set_4_routines.o : nl_access_routines.F module_configure.o $(CPP) -DNNN=4 -I../inc -DNL_set_ROUTINES nl_access_routines.F > xx4.f90 $(FC) -o $@ -c $(PROMOTION) $(FCNOOPT) $(FCBASEOPTS_NO_G) $(MODULE_DIRS) $(FCSUFFIX) xx4.f90 - $(RM) xx4.f90 nl_set_5_routines.o : nl_access_routines.F module_configure.o $(CPP) -DNNN=5 -I../inc -DNL_set_ROUTINES nl_access_routines.F > xx5.f90 $(FC) -o $@ -c $(PROMOTION) $(FCNOOPT) $(FCBASEOPTS_NO_G) $(MODULE_DIRS) $(FCSUFFIX) xx5.f90 - $(RM) xx5.f90 nl_set_6_routines.o : nl_access_routines.F module_configure.o $(CPP) -DNNN=6 -I../inc -DNL_set_ROUTINES nl_access_routines.F > xx6.f90 $(FC) -o $@ -c $(PROMOTION) $(FCNOOPT) $(FCBASEOPTS_NO_G) $(MODULE_DIRS) $(FCSUFFIX) xx6.f90 - $(RM) xx6.f90 nl_set_7_routines.o : nl_access_routines.F module_configure.o $(CPP) -DNNN=7 -I../inc -DNL_set_ROUTINES nl_access_routines.F > xx7.f90 $(FC) -o $@ -c $(PROMOTION) $(FCNOOPT) $(FCBASEOPTS_NO_G) $(MODULE_DIRS) $(FCSUFFIX) xx7.f90 - $(RM) xx7.f90 nl_get_0_routines.o : nl_access_routines.F module_configure.o $(CPP) -DNNN=0 -I../inc -DNL_get_ROUTINES nl_access_routines.F > yy0.f90 $(FC) -o $@ -c $(PROMOTION) $(FCNOOPT) $(FCBASEOPTS_NO_G) $(MODULE_DIRS) $(FCSUFFIX) yy0.f90 - $(RM) yy0.f90 nl_get_1_routines.o : nl_access_routines.F module_configure.o $(CPP) -DNNN=1 -I../inc -DNL_get_ROUTINES nl_access_routines.F > yy1.f90 $(FC) -o $@ -c $(PROMOTION) $(FCNOOPT) $(FCBASEOPTS_NO_G) $(MODULE_DIRS) $(FCSUFFIX) yy1.f90 - $(RM) yy1.f90 nl_get_2_routines.o : nl_access_routines.F module_configure.o $(CPP) -DNNN=2 -I../inc -DNL_get_ROUTINES nl_access_routines.F > yy2.f90 $(FC) -o $@ -c $(PROMOTION) $(FCNOOPT) $(FCBASEOPTS_NO_G) $(MODULE_DIRS) $(FCSUFFIX) yy2.f90 - $(RM) yy2.f90 nl_get_3_routines.o : nl_access_routines.F module_configure.o $(CPP) -DNNN=3 -I../inc -DNL_get_ROUTINES nl_access_routines.F > yy3.f90 $(FC) -o $@ -c $(PROMOTION) $(FCNOOPT) $(FCBASEOPTS_NO_G) $(MODULE_DIRS) $(FCSUFFIX) yy3.f90 - $(RM) yy3.f90 nl_get_4_routines.o : nl_access_routines.F module_configure.o $(CPP) -DNNN=4 -I../inc -DNL_get_ROUTINES nl_access_routines.F > yy4.f90 $(FC) -o $@ -c $(PROMOTION) $(FCNOOPT) $(FCBASEOPTS_NO_G) $(MODULE_DIRS) $(FCSUFFIX) yy4.f90 - $(RM) yy4.f90 nl_get_5_routines.o : nl_access_routines.F module_configure.o $(CPP) -DNNN=5 -I../inc -DNL_get_ROUTINES nl_access_routines.F > yy5.f90 $(FC) -o $@ -c $(PROMOTION) $(FCNOOPT) $(FCBASEOPTS_NO_G) $(MODULE_DIRS) $(FCSUFFIX) yy5.f90 - $(RM) yy5.f90 nl_get_6_routines.o : nl_access_routines.F module_configure.o $(CPP) -DNNN=6 -I../inc -DNL_get_ROUTINES nl_access_routines.F > yy6.f90 $(FC) -o $@ -c $(PROMOTION) $(FCNOOPT) $(FCBASEOPTS_NO_G) $(MODULE_DIRS) $(FCSUFFIX) yy6.f90 - $(RM) yy6.f90 nl_get_7_routines.o : nl_access_routines.F module_configure.o $(CPP) -DNNN=7 -I../inc -DNL_get_ROUTINES nl_access_routines.F > yy7.f90 $(FC) -o $@ -c $(PROMOTION) $(FCNOOPT) $(FCBASEOPTS_NO_G) $(MODULE_DIRS) $(FCSUFFIX) yy7.f90 - $(RM) yy7.f90 wrf_num_bytes_between.o : $(CC) -c $(CFLAGS) wrf_num_bytes_between.c diff --git a/inc/version_decl b/inc/version_decl index 157b5cfd52..fc13f34730 100644 --- a/inc/version_decl +++ b/inc/version_decl @@ -1 +1 @@ - CHARACTER (LEN=*), PARAMETER :: release_version = 'V4.2' + CHARACTER (LEN=*), PARAMETER :: release_version = 'V4.2.1' diff --git a/phys/module_bl_mynn.F b/phys/module_bl_mynn.F index 9497804b67..aef56bf5ce 100644 --- a/phys/module_bl_mynn.F +++ b/phys/module_bl_mynn.F @@ -3027,7 +3027,7 @@ SUBROUTINE mynn_tendencies(kts,kte, & & 0.5*dtz(k)*(s_aw(k)-s_aw(k+1)) c(k)= -dtz(k)*khdz(k+1)/rho(k) - 0.5*dtz(k)*s_aw(k+1) d(k)=thl(k) + tcd(k)*delt + dtz(k)*(s_awthl(k)-s_awthl(k+1)) + & - & + diss_heat(k)*delt*dheat_opt + & + & diss_heat(k)*delt*dheat_opt + & & sub_thl(k)*delt + det_thl(k)*delt ENDDO diff --git a/phys/module_bl_shinhong.F b/phys/module_bl_shinhong.F index cad43234d2..1cf3c265eb 100644 --- a/phys/module_bl_shinhong.F +++ b/phys/module_bl_shinhong.F @@ -840,9 +840,13 @@ subroutine shinhong2d(j,ux,vx,tx,qx,p2d,p2di,pi2d, & hpbl(i) = za(i,k-1)+brint*(za(i,k)-za(i,k-1)) if(hpbl(i).lt.zq(i,2)) kpbl(i) = 1 if(kpbl(i).le.1) pblflg(i) = .false. - uwst = abs(ust(i)/wstar(i)-0.5) - uwstx = -80.*uwst+14. - csfac = 0.5*(tanh(uwstx)+3.) + if (wstar(i) .ne. 0) then + uwst = abs(ust(i)/wstar(i)-0.5) + uwstx = -80.*uwst+14. + csfac = 0.5*(tanh(uwstx)+3.) + else + csfac = 1 + endif cslen(i) = csfac*hpbl(i) endif enddo @@ -962,7 +966,11 @@ subroutine shinhong2d(j,ux,vx,tx,qx,p2d,p2di,pi2d, & deltaoh(i) = d1*hpbl(i) + d2*wm2(i)/delb deltaoh(i) = max(ezfac*deltaoh(i),hpbl(i)-za(i,kpbl(i)-1)-1.) deltaoh(i) = min(deltaoh(i) ,hpbl(i)) - rigs(i) = govrth(i)*dthvx(i)*deltaoh(i)/(dux**2.+dvx**2.) + if ((dux .ne. 0) .or. (dvx .ne. 0)) then + rigs(i) = govrth(i)*dthvx(i)*deltaoh(i)/(dux**2.+dvx**2.) + else + rigs(i) = rigsmax + endif rigs(i) = max(min(rigs(i), rigsmax),rimin) enlfrac2(i) = max(min(wm3/wstar3(i)/(1.+cpent/rigs(i)),entfmax), entfmin) enlfrac2(i) = enlfrac2(i)*enlfrac @@ -1086,9 +1094,15 @@ subroutine shinhong2d(j,ux,vx,tx,qx,p2d,p2di,pi2d, & sflux0 = (a11+a12*sfcfracn)*sflux(i) snlflux0 = nlfrac*sflux0 amf1 = snlflux0/sfcfracn - amf2 = -snlflux0/(mlfrac-sfcfracn) - bmf2 = -mlfrac*amf2 - amf3 = snlflux0*enlfrac2(i)/deltaoh(i) + if (pblflg(i)) then + amf2 = -snlflux0/(mlfrac-sfcfracn) + bmf2 = -mlfrac*amf2 + endif + if ((deltaoh(i) .eq. 0) .and. (enlfrac2(i) .eq. 0)) then + amf3 = 0. + else + amf3 = snlflux0*enlfrac2(i)/deltaoh(i) + endif bmf3 = -amf3*mlfrac hfxpbl(i) = amf3+bmf3 pth1=pthnl(delxy,cslen(i)) @@ -2283,10 +2297,14 @@ function pu(d,h) real,parameter :: b1 = 2.0, b2 = 0.6666667 real :: d,h,doh,num,den ! - doh=d/h - num=a1*(doh)**b1+a2*(doh)**b2 - den=a3*(doh)**b1+a4*(doh)**b2+a5 - pu=num/den + if (h .ne. 0) then + doh=d/h + num=a1*(doh)**b1+a2*(doh)**b2 + den=a3*(doh)**b1+a4*(doh)**b2+a5 + pu=num/den + else + pu=1. + endif pu=max(pu,pmin) pu=min(pu,pmax) ! @@ -2305,10 +2323,14 @@ function pq(d,h) real,parameter :: b1 = 2.0 real :: d,h,doh,num,den ! - doh=d/h - num=a1*(doh)**b1+a2 - den=a3*(doh)**b1+a4 - pq=a5*num/den+(1.-a5) + if (h .ne. 0) then + doh=d/h + num=a1*(doh)**b1+a2 + den=a3*(doh)**b1+a4 + pq=a5*num/den+(1.-a5) + else + pq=1. + endif pq=max(pq,pmin) pq=min(pq,pmax) ! @@ -2328,10 +2350,14 @@ function pthnl(d,h) real,parameter :: b1 = 2.0, b2 = 0.875 real :: d,h,doh,num,den ! - doh=d/h - num=a1*(doh)**b1+a2*(doh)**b2+a3 - den=a4*(doh)**b1+a5*(doh)**b2+a6 - pthnl=a7*num/den+(1.-a7) + if (h .ne. 0) then + doh=d/h + num=a1*(doh)**b1+a2*(doh)**b2+a3 + den=a4*(doh)**b1+a5*(doh)**b2+a6 + pthnl=a7*num/den+(1.-a7) + else + pthnl=1. + endif pthnl=max(pthnl,pmin) pthnl=min(pthnl,pmax) ! @@ -2351,10 +2377,14 @@ function pthl(d,h) real,parameter :: b1 = 2.0, b2 = 0.5 real :: d,h,doh,num,den ! - doh=d/h - num=a1*(doh)**b1+a2*(doh)**b2+a3 - den=a4*(doh)**b1+a5*(doh)**b2+a6 - pthl=a7*num/den+(1.-a7) + if (h .ne. 0) then + doh=d/h + num=a1*(doh)**b1+a2*(doh)**b2+a3 + den=a4*(doh)**b1+a5*(doh)**b2+a6 + pthl=a7*num/den+(1.-a7) + else + pthl=1. + endif pthl=max(pthl,pmin) pthl=min(pthl,pmax) ! @@ -2374,10 +2404,14 @@ function ptke(d,h) real,parameter :: b1 = 2.0, b2 = 0.6666667 real :: d,h,doh,num,den ! - doh=d/h - num=a1*(doh)**b1+a2*(doh)**b2 - den=a3*(doh)**b1+a4*(doh)**b2+a5 - ptke=num/den + if (h .ne. 0) then + doh=d/h + num=a1*(doh)**b1+a2*(doh)**b2 + den=a3*(doh)**b1+a4*(doh)**b2+a5 + ptke=num/den + else + ptke=1. + endif ptke=max(ptke,pmin) ptke=min(ptke,pmax) ! diff --git a/phys/module_diag_cl.F b/phys/module_diag_cl.F index c7af49e212..7ae26700f2 100644 --- a/phys/module_diag_cl.F +++ b/phys/module_diag_cl.F @@ -185,6 +185,16 @@ SUBROUTINE clwrf_output_calc( & skintempclmax(i,j)=skintemp(i,j)-t273 skintempclmean(i,j)=skintemp(i,j)-t273 skintempclstd(i,j)=(skintemp(i,j)-t273)*(skintemp(i,j)-t273) + ! reinitialize times + tt2clmin(i,j) = xtime + dt/60. ! value at end of timestep + tt2clmax(i,j) = xtime + dt/60. + tq2clmin(i,j) = xtime + dt/60. + tq2clmax(i,j) = xtime + dt/60. + tspduv10clmax(i,j) = xtime + dt/60. + traincclmax(i,j) = xtime + dt/60. + trainncclmax(i,j) = xtime + dt/60. + tskintempclmin(i,j) = xtime + dt/60. + tskintempclmax(i,j) = xtime + dt/60. ENDDO ENDDO ENDDO diff --git a/phys/module_fr_fire_phys.F b/phys/module_fr_fire_phys.F index d1dc8b4fc1..89025331a8 100644 --- a/phys/module_fr_fire_phys.F +++ b/phys/module_fr_fire_phys.F @@ -752,7 +752,7 @@ subroutine read_namelist_fire(init_fuel_moisture) ENDIF -end +end subroutine read_namelist_fire subroutine init_fuel_cats(init_fuel_moisture) diff --git a/phys/module_mp_SBM_polar_radar.F b/phys/module_mp_SBM_polar_radar.F index 4ee029a45a..4f94129271 100644 --- a/phys/module_mp_SBM_polar_radar.F +++ b/phys/module_mp_SBM_polar_radar.F @@ -1534,7 +1534,7 @@ subroutine calc_dc_wet_snow & (1.0d0-(1.0d0-fract_volume_water)*ratc)) ! new change 18.01.09 (start) if(fract_volume_water.gt.1.0d-10) then - t=derf((1.0d0-fract_volume_water)/fract_volume_water-0.2d0) + t=erf((1.0d0-fract_volume_water)/fract_volume_water-0.2d0) else t=1.0d0 endif diff --git a/phys/module_mp_fast_sbm.F b/phys/module_mp_fast_sbm.F index 9ae7dba4ce..6a612f4b45 100644 --- a/phys/module_mp_fast_sbm.F +++ b/phys/module_mp_fast_sbm.F @@ -6052,25 +6052,25 @@ SUBROUTINE FAST_HUCMINIT(DT) ! ... (KS) - Broadcating Liquid drops #if (defined(DM_PARALLEL)) - DM_BCAST_MACRO_R16 ( FAF1 ) - DM_BCAST_MACRO_R16 ( FBF1 ) - DM_BCAST_MACRO_R16 ( FAB1 ) - DM_BCAST_MACRO_R16 ( FBB1 ) + DM_BCAST_MACRO_R16(FAF1) + DM_BCAST_MACRO_R16(FBF1) + DM_BCAST_MACRO_R16(FAB1) + DM_BCAST_MACRO_R16(FBB1) ! ... (KS) - Broadcating Snow - DM_BCAST_MACRO_R16 ( FAF3 ) - DM_BCAST_MACRO_R16 ( FBF3 ) - DM_BCAST_MACRO_R16 ( FAB3 ) - DM_BCAST_MACRO_R16 ( FBB3 ) + DM_BCAST_MACRO_R16(FAF3) + DM_BCAST_MACRO_R16(FBF3) + DM_BCAST_MACRO_R16(FAB3) + DM_BCAST_MACRO_R16(FBB3) ! ... (KS) - Broadcating Graupel - DM_BCAST_MACRO_R16 ( FAF4 ) - DM_BCAST_MACRO_R16 ( FBF4 ) - DM_BCAST_MACRO_R16 ( FAB4 ) - DM_BCAST_MACRO_R16 ( FBB4 ) + DM_BCAST_MACRO_R16(FAF4) + DM_BCAST_MACRO_R16(FBF4) + DM_BCAST_MACRO_R16(FAB4) + DM_BCAST_MACRO_R16(FBB4) ! ### (KS) - Broadcating Hail - DM_BCAST_MACRO_R16 ( FAF5 ) - DM_BCAST_MACRO_R16 ( FBF5 ) - DM_BCAST_MACRO_R16 ( FAB5 ) - DM_BCAST_MACRO_R16 ( FBB5 ) + DM_BCAST_MACRO_R16(FAF5) + DM_BCAST_MACRO_R16(FBF5) + DM_BCAST_MACRO_R16(FAB5) + DM_BCAST_MACRO_R16(FBB5) ! ### (KS) - Broadcating Usetables array CALL wrf_dm_bcast_integer ( usetables , size ( usetables ) * IWORDSIZE ) #endif diff --git a/phys/module_mp_nssl_2mom.F b/phys/module_mp_nssl_2mom.F index 7d995765cd..5d34e0067c 100644 --- a/phys/module_mp_nssl_2mom.F +++ b/phys/module_mp_nssl_2mom.F @@ -142,7 +142,7 @@ MODULE module_mp_nssl_2mom public nssl_2mom_driver public nssl_2mom_init private gamma_sp,gamxinf,GAML02, GAML02d300, GAML02d500, fqvs, fqis - private gamma_dp, gamxinfdp + private gamma_dp, gamxinfdp, gamma_dpr private delbk, delabk private gammadp @@ -675,7 +675,7 @@ MODULE module_mp_nssl_2mom real :: ciacrratio(0:nqiacrratio,0:nqiacralpha) real :: qiacrratio(0:nqiacrratio,0:nqiacralpha) real :: ziacrratio(0:nqiacrratio,0:nqiacralpha) - double precision :: gamxinflu(0:nqiacrratio,0:nqiacralpha,10,2) ! last index for graupel (1) or hail (2) + double precision :: gamxinflu(0:nqiacrratio,0:nqiacralpha,12,2) ! last index for graupel (1) or hail (2) integer, parameter :: ngdnmm = 9 real :: mmgraupvt(ngdnmm,3) ! Milbrandt and Morrison (2013) fall speed coefficients for graupel/hail @@ -885,7 +885,8 @@ SUBROUTINE nssl_2mom_init( & integer :: isub real :: bxh,bxhl - real :: alp,ratio,x,y,y7 + real :: alp,ratio !,x,y,y7 + double precision :: x,y,y2,y7 logical :: turn_on_ccna @@ -1012,45 +1013,48 @@ SUBROUTINE nssl_2mom_init( & DO j = 0,nqiacralpha alp = float(j)*dqiacralpha - y = gamma_sp(1.+alp) + y = gamma_dpr(1.+alp) + y2 = gamma_dpr(real(2.+alp)) DO i = 0,nqiacrratio ratio = float(i)*dqiacrratio - x = gamxinf( 1.+alp, ratio ) + x = gamxinfdp( 1.+alp, ratio ) ! write(0,*) 'i, x/y = ',i, x/y ciacrratio(i,j) = x/y ! graupel (.,.,.,1) gamxinflu(i,j,1,1) = x/y - gamxinflu(i,j,2,1) = gamxinf( 2.0+alp, ratio )/y - gamxinflu(i,j,3,1) = gamxinf( 2.5+alp+0.5*bxh, ratio )/y - gamxinflu(i,j,5,1) = (gamma_sp(5.0+alp) - gamxinf( 5.0+alp, ratio ))/y - gamxinflu(i,j,6,1) = (gamma_sp(5.5+alp+0.5*bxh) - gamxinf( 5.5+alp+0.5*bxh, ratio ))/y - gamxinflu(i,j,9,1) = gamxinf( 1.0+alp, ratio )/y - gamxinflu(i,j,10,1)= gamxinf( 4.0+alp, ratio )/y + gamxinflu(i,j,2,1) = gamxinfdp( 2.0+alp, ratio )/y + gamxinflu(i,j,3,1) = gamxinfdp( 2.5+alp+0.5*bxh, ratio )/y + gamxinflu(i,j,5,1) = (gamma_dpr(5.0+alp) - gamxinfdp( 5.0+alp, ratio ))/y + gamxinflu(i,j,6,1) = (gamma_dpr(5.5+alp+0.5*bxh) - gamxinfdp( 5.5+alp+0.5*bxh, ratio ))/y + gamxinflu(i,j,9,1) = gamxinfdp( 1.0+alp, ratio )/y + gamxinflu(i,j,10,1)= gamxinfdp( 4.0+alp, ratio )/y + + gamxinflu(i,j,12,1) = gamxinfdp( 2.0+alp, ratio )/y2 ! hail (.,.,.,2) gamxinflu(i,j,1,2) = gamxinflu(i,j,1,1) gamxinflu(i,j,2,2) = gamxinflu(i,j,2,1) - gamxinflu(i,j,3,2) = gamxinf( 2.5+alp+0.5*bxhl, ratio )/y + gamxinflu(i,j,3,2) = gamxinfdp( 2.5+alp+0.5*bxhl, ratio )/y gamxinflu(i,j,5,2) = gamxinflu(i,j,5,1) - gamxinflu(i,j,6,2) = (gamma_sp(5.5+alp+0.5*bxhl) - gamxinf( 5.5+alp+0.5*bxhl, ratio ))/y + gamxinflu(i,j,6,2) = (gamma_dpr(5.5+alp+0.5*bxhl) - gamxinfdp( 5.5+alp+0.5*bxhl, ratio ))/y gamxinflu(i,j,9,2) = gamxinflu(i,j,9,1) gamxinflu(i,j,10,2)= gamxinflu(i,j,10,1) IF ( alp > 1.1 ) THEN -! gamxinflu(i,j,7,1) = gamxinf( alp - 1., ratio )/y - gamxinflu(i,j,7,1) = (gamma_sp(alp - 1.) - gamxinf( alp - 1., ratio ))/y -! gamxinflu(i,j,8,1) = gamxinf( alp - 0.5 + 0.5*bxh, ratio )/y - gamxinflu(i,j,8,1) = (gamma_sp(alp - 0.5 + 0.5*bxh) - gamxinf( alp - 0.5 + 0.5*bxh, ratio ))/y -! gamxinflu(i,j,8,2) = gamxinf( alp - 0.5 + 0.5*bxhl, ratio )/y - gamxinflu(i,j,8,2) = (gamma_sp(alp - 0.5 + 0.5*bxhl) - gamxinf( alp - 0.5 + 0.5*bxhl, ratio ))/y +! gamxinflu(i,j,7,1) = gamxinfdp( alp - 1., ratio )/y + gamxinflu(i,j,7,1) = (gamma_dpr(alp - 1.) - gamxinfdp( alp - 1., ratio ))/y +! gamxinflu(i,j,8,1) = gamxinfdp( alp - 0.5 + 0.5*bxh, ratio )/y + gamxinflu(i,j,8,1) = (gamma_dpr(alp - 0.5 + 0.5*bxh) - gamxinfdp( alp - 0.5 + 0.5*bxh, ratio ))/y +! gamxinflu(i,j,8,2) = gamxinfdp( alp - 0.5 + 0.5*bxhl, ratio )/y + gamxinflu(i,j,8,2) = (gamma_dpr(alp - 0.5 + 0.5*bxhl) - gamxinfdp( alp - 0.5 + 0.5*bxhl, ratio ))/y ELSE -! gamxinflu(i,j,7,1) = gamxinf( .1, ratio )/y - gamxinflu(i,j,7,1) = (gamma_sp(0.1) - gamxinf( 0.1, ratio ) )/y -! gamxinflu(i,j,8,1) = gamxinf( 1.1 - 0.5 + 0.5*bxh, ratio )/y -! gamxinflu(i,j,8,2) = gamxinf( 1.1 - 0.5 + 0.5*bxhl, ratio )/y - gamxinflu(i,j,8,1) = (gamma_sp(1.1 - 0.5 + 0.5*bxh) - gamxinf( 1.1 - 0.5 + 0.5*bxh, ratio ) )/y - gamxinflu(i,j,8,2) = (gamma_sp(1.1 - 0.5 + 0.5*bxhl) - gamxinf( 1.1 - 0.5 + 0.5*bxhl, ratio ) )/y +! gamxinflu(i,j,7,1) = gamxinfdp( .1, ratio )/y + gamxinflu(i,j,7,1) = (gamma_dpr(0.1) - gamxinfdp( 0.1, ratio ) )/y +! gamxinflu(i,j,8,1) = gamxinfdp( 1.1 - 0.5 + 0.5*bxh, ratio )/y +! gamxinflu(i,j,8,2) = gamxinfdp( 1.1 - 0.5 + 0.5*bxhl, ratio )/y + gamxinflu(i,j,8,1) = (gamma_dpr(1.1 - 0.5 + 0.5*bxh) - gamxinfdp( 1.1 - 0.5 + 0.5*bxh, ratio ) )/y + gamxinflu(i,j,8,2) = (gamma_dpr(1.1 - 0.5 + 0.5*bxhl) - gamxinfdp( 1.1 - 0.5 + 0.5*bxhl, ratio ) )/y ENDIF gamxinflu(i,j,7,2) = gamxinflu(i,j,7,1) @@ -1065,14 +1069,19 @@ SUBROUTINE nssl_2mom_init( & y7 = gamma_sp(7.+alp) DO i = 0,nqiacrratio ratio = float(i)*dqiacrratio - x = gamxinf( 4.+alp, ratio ) + + ! mass fraction + x = gamxinfdp( 4.+alp, ratio ) ! write(0,*) 'i, x/y = ',i, x/y qiacrratio(i,j) = x/y gamxinflu(i,j,4,1) = x/y gamxinflu(i,j,4,2) = x/y - x = gamxinf( 7.+alp, ratio ) + ! reflectivity fraction + x = gamxinfdp( 7.+alp, ratio ) ziacrratio(i,j) = x/y7 + gamxinflu(i,j,11,1) = x/y7 + gamxinflu(i,j,11,2) = x/y7 ENDDO ENDDO @@ -2430,6 +2439,24 @@ REAL FUNCTION GAMMA_SP(xx) RETURN END FUNCTION GAMMA_SP +! ##################################################################### + + DOUBLE PRECISION FUNCTION GAMMA_DPR(x) + ! dp gamma with real input + implicit none + real :: x + double precision :: xx + + xx = x + + gamma_dpr = gamma_dp(xx) + + return + end FUNCTION GAMMA_DPR + + + + ! ##################################################################### real function GAMXINF(A1,X1) @@ -2452,6 +2479,10 @@ real function GAMXINF(A1,X1) a = a1 x = x1 + IF ( x1 <= 0.0 ) THEN + gamxinf = GAMMA_SP(A1) + return + ENDIF XAM=-X+A*DLOG(X) IF (XAM.GT.700.0.OR.A.GT.170.0) THEN WRITE(*,*)'a and/or x too large' @@ -2509,6 +2540,10 @@ double precision function GAMXINFDP(A1,X1) a = a1 x = x1 + IF ( x1 <= 0.0 ) THEN + gamxinfdp = GAMMA_DP(A) + return + ENDIF XAM=-X+A*DLOG(X) IF (XAM.GT.700.0.OR.A.GT.170.0) THEN WRITE(*,*)'a and/or x too large' diff --git a/phys/module_pbl_driver.F b/phys/module_pbl_driver.F index 7cea3f3435..9f6ab77c54 100644 --- a/phys/module_pbl_driver.F +++ b/phys/module_pbl_driver.F @@ -1992,6 +1992,11 @@ SUBROUTINE pbl_driver( & &,IMS=ims,IME=ime,JMS=jms,JME=jme,KMS=kms,KME=kme & &,ITS=its,ITE=ite,JTS=jts,JTE=jte,KTS=kts,KTE=kte & &) + + IF (bl_mynn_tkeadvect) THEN + qke_adv=qke + ENDIF + ELSE WRITE ( message , FMT = '(A,6(L1,1X))' ) & 'present: '// & diff --git a/phys/module_ra_aerosol.F b/phys/module_ra_aerosol.F index 456c504b8f..13b769e7dc 100644 --- a/phys/module_ra_aerosol.F +++ b/phys/module_ra_aerosol.F @@ -256,6 +256,12 @@ subroutine calc_aerosol_goddard_sw(ht,dz8w,p,t3d,qv3d,aer_type, end do end do + do j = jts, jte + do i = its, ite + aerssa2d(i, j) = aer_ssa_val + end do + end do + case(2) if (.not.(present(aerssa2d))) then write(wrf_err_message,*) & @@ -330,6 +336,12 @@ subroutine calc_aerosol_goddard_sw(ht,dz8w,p,t3d,qv3d,aer_type, end do end do + do j = jts, jte + do i = its, ite + aerasy2d(i, j) = aer_asy_val + end do + end do + case(2) if (.not.(present(aerasy2d))) then write(wrf_err_message,*) 'Expected gridded aerosol asymmetry parameter, but it is not in the radiation driver' diff --git a/phys/module_ra_rrtmg_swk.F b/phys/module_ra_rrtmg_swk.F index 4a7b122a01..46e5fbc694 100644 --- a/phys/module_ra_rrtmg_swk.F +++ b/phys/module_ra_rrtmg_swk.F @@ -10172,7 +10172,7 @@ module module_ra_rrtmg_swk ! !------------------------------------------------------------------------------- subroutine rad_rrtmg_driver( & - rthratensw,rthratenlw, & + rthratenlw,rthratensw, & lwupflx, lwupflxc, lwdnflx, lwdnflxc, & swupflx, swupflxc, swdnflx, swdnflxc, & lwupt, lwuptc, lwdnt, lwdntc, & diff --git a/phys/module_wind_fitch.F b/phys/module_wind_fitch.F index 3cb2dec5c3..e2b4bb3049 100644 --- a/phys/module_wind_fitch.F +++ b/phys/module_wind_fitch.F @@ -60,6 +60,7 @@ MODULE module_wind_fitch REAL, DIMENSION(:), ALLOCATABLE :: hubheight,diameter,stc,stc2,cutin,cutout,npower ! REAL :: turbws(maxvals,maxvals2),turbtc(maxvals,maxvals2),turbpw(maxvals,maxvals2) + REAL :: correction_factor ! CONTAINS @@ -327,6 +328,7 @@ SUBROUTINE dragcof(tkecof,powcof,thrcof,speed,cispeed,cospeed, & ! tke coefficient calculation tkecof=thrcof-powcof + tkecof = correction_factor * tkecof IF(tkecof .LT. 0.) tkecof=0. ! END SUBROUTINE dragcof @@ -350,6 +352,8 @@ SUBROUTINE init_module_wind_fitch(id,config_flags,xlong,xlat,windfarm_initialize LOGICAL, EXTERNAL :: wrf_dm_on_monitor ! + + correction_factor = config_flags%windfarm_tke_factor IF ( wrf_dm_on_monitor() ) THEN ! ! ... PAJ: Opens the file with the location of the wind turbines ... diff --git a/run/README.namelist b/run/README.namelist index 4d6e184107..397245df1e 100644 --- a/run/README.namelist +++ b/run/README.namelist @@ -1077,6 +1077,7 @@ Options for wind turbine drag parameterization: windfarm_ij = 0 ! whether to use lat-lon or i-j coordinate as wind turbine locations ! 0 = The coordinate of the turbines are defined in terms of lat-lon ! 1 = The coordinate of the turbines are defined in terms of grid points + windfarm_tke_factor = 0.25 ! Correction factor applied to the TKE coefficient (deafault is 0.25, Archer et al. 2020) Stochastic parameterization schemes: diff --git a/test/em_real/README.grid_fdda b/test/em_real/README.grid_fdda index d726942cf7..41694137c1 100644 --- a/test/em_real/README.grid_fdda +++ b/test/em_real/README.grid_fdda @@ -47,5 +47,5 @@ To run an fdda job guv_sfc (max_dom) = 0.0003 ; nudging coefficient for sfc u and v (sec-1) gt_sfc (max_dom) = 0.0003 ; nudging coefficient for sfc temp (sec-1) gq_sfc (max_dom) = 0.0003 ; nudging coefficient for sfc qvapor (sec-1) - rinblw = 250.0 ; radius + rinblw (max_dom) = 250.0 ; radius diff --git a/test/em_real/examples.namelist b/test/em_real/examples.namelist index 31b615102d..db55bd6e8c 100755 --- a/test/em_real/examples.namelist +++ b/test/em_real/examples.namelist @@ -169,7 +169,7 @@ Note, this is not a namelist.input file. Find what interests you, and cut and pa guv_sfc = 0.0003, 0.0003, 0.0003, gt_sfc = 0.0003, 0.0003, 0.0003, gq_sfc = 0.0003, 0.0003, 0.0003, - rinblw = 250., + rinblw = 250., 250., 250., ** Using observation nudging option (note &fdda is a separate namelist record): diff --git a/tools/commit_form.txt b/tools/commit_form.txt index cd6aba8676..bf09d3a585 100644 --- a/tools/commit_form.txt +++ b/tools/commit_form.txt @@ -6,16 +6,21 @@ KEYWORDS: 5 to 10 words related to commit, separated by commas SOURCE: Either "developer's name (affiliation)" .XOR. "internal" for a WRF Dev committee member -DESCRIPTION OF CHANGES: One or more paragraphs describing problem, solution, and required changes. +DESCRIPTION OF CHANGES: +Problem: +Generally or specifically, what was wrong and needed to be addressed? -ISSUE: For use when this PR closes an issue. For issue number 123 -``` -Fixes #123 +Solution: +What was down algorithmically and in the source code to address the problem? +ISSUE: For use when this PR closes an issue. +Fixes #123 LIST OF MODIFIED FILES: list of changed files (use `git diff --name-status master` to get formatted list) -TESTS CONDUCTED: Explicitly state if a WTF and or other tests were run, or are pending. For more complicated changes please be explicit! +TESTS CONDUCTED: +1. Do mods fix problem? How can that be demonstrated, and was that test conducted? +2. Are the Jenkins tests all passing? RELEASE NOTE: Include a stand-alone message suitable for the inclusion in the minor and annual releases. A publication citation is appropriate. diff --git a/var/da/da_minimisation/da_get_innov_vector.inc b/var/da/da_minimisation/da_get_innov_vector.inc index 92f9e808de..792c3856dd 100644 --- a/var/da/da_minimisation/da_get_innov_vector.inc +++ b/var/da/da_minimisation/da_get_innov_vector.inc @@ -26,6 +26,7 @@ subroutine da_get_innov_vector (it, num_qcstat_conv, ob, iv, grid, config_flags) real, dimension(:,:,:), allocatable :: hr_rainc, hr_rainnc real, dimension(:,:), allocatable :: savegridrainc, savegridrainnc integer :: fgat_rain + integer :: inst if (trace_use) call da_trace_entry("da_get_innov_vector") @@ -189,10 +190,40 @@ subroutine da_get_innov_vector (it, num_qcstat_conv, ob, iv, grid, config_flags) #if defined(RTTOV) || defined(CRTM) if (use_rad) then + iv%time = num_fgat_time + iv%instid(:)%info%n1 = 1 + iv%instid(:)%info%n2 = iv%instid(:)%info%plocal(num_fgat_time) + + !------------------------------------------------------------------------ + ! Perform (Variational) bias correction + !------------------------------------------------------------------------ if ( use_varbc .or. freeze_varbc ) then - if ( num_fgat_time > 1 ) call da_varbc_coldstart(iv) + call da_varbc_coldstart(iv) + call da_varbc_direct(iv) end if + + !------------------------------------------------------------------------ + ! Perform QC check + !------------------------------------------------------------------------ + if (qc_rad) call da_qc_rad(it, ob, iv) + + !------------------------------------------------------------------------ + ! Compute preconditioning for Variational bias correction + !------------------------------------------------------------------------ + !varbc preconditioning shoud be done after get_innov_vector is done for all time slots if ( use_varbc .and. it == 1 ) call da_varbc_precond(iv) + + !------------------------------------------------------------------------ + ! Prepare (QCed) bias statistics files + !------------------------------------------------------------------------ + if (biasprep) then + do inst = 1, iv%num_inst + write(unit=stdout,fmt='(A,A)') 'Preparing bias statistics files for ', & + trim(iv%instid(inst)%rttovid_string) + call da_biasprep(inst,ob,iv) + end do + end if + end if #endif diff --git a/var/da/da_minimisation/da_minimisation.f90 b/var/da/da_minimisation/da_minimisation.f90 index 33c8406e87..248cc5906e 100644 --- a/var/da/da_minimisation/da_minimisation.f90 +++ b/var/da/da_minimisation/da_minimisation.f90 @@ -47,7 +47,7 @@ module da_minimisation satem, radar, ssmi_rv, ssmi_tb, ssmt1, ssmt2, airsr, pilot, airep,tamdar, tamdar_sfc, rain, & bogus, buoy, qscat,pseudo, radiance, monitor_on, max_ext_its, use_rttov_kmatrix,& use_crtm_kmatrix,precondition_cg, precondition_factor, use_varbc, varbc_factor, & - num_procs, myproc, use_gpspwobs, use_rainobs, use_gpsztdobs, & + biasprep, qc_rad, num_procs, myproc, use_gpspwobs, use_rainobs, use_gpsztdobs, & use_radar_rf, radar_rf_opt,radar_rf_rscl,radar_rv_rscl,use_radar_rhv,use_radar_rqv,pseudo_var, num_pseudo, & num_ob_indexes, num_ob_vars, npres_print, pptop, ppbot, qcstat_conv_unit, gas_constant, & orthonorm_gradient, its, ite, jts, jte, kts, kte, ids, ide, jds, jde, kds, kde, cp, & @@ -120,7 +120,8 @@ module da_minimisation use da_radiance, only : da_calculate_grady_rad, da_write_filtered_rad, & da_get_innov_vector_radiance, satinfo use da_radiance1, only : da_ao_stats_rad,da_oi_stats_rad, & - da_write_iv_rad_ascii,da_residual_rad,da_jo_and_grady_rad + da_write_iv_rad_ascii,da_residual_rad,da_jo_and_grady_rad, & + da_biasprep, da_qc_rad #endif use da_radar, only : da_calculate_grady_radar, da_ao_stats_radar, & da_oi_stats_radar, da_get_innov_vector_radar, da_residual_radar, & @@ -161,7 +162,7 @@ module da_minimisation use da_transfer_model, only : da_transfer_wrftltoxa,da_transfer_xatowrftl, & da_transfer_xatowrftl_adj,da_transfer_wrftltoxa_adj #if defined(RTTOV) || defined(CRTM) - use da_varbc, only : da_varbc_tl,da_varbc_adj,da_varbc_precond,da_varbc_coldstart + use da_varbc, only : da_varbc_tl,da_varbc_adj,da_varbc_precond,da_varbc_coldstart, da_varbc_direct #endif use da_vtox_transforms, only : da_transform_vtox,da_transform_vtox_adj,da_transform_xtoxa,da_transform_xtoxa_adj use da_vtox_transforms, only : da_copy_xa, da_add_xa, da_transform_vpatox, da_transform_vpatox_adj diff --git a/var/da/da_radiance/da_get_innov_vector_radiance.inc b/var/da/da_radiance/da_get_innov_vector_radiance.inc index a3ab4688d2..7588471cb7 100644 --- a/var/da/da_radiance/da_get_innov_vector_radiance.inc +++ b/var/da/da_radiance/da_get_innov_vector_radiance.inc @@ -53,10 +53,7 @@ subroutine da_get_innov_vector_radiance (it, grid, ob, iv) if (use_varbc .or. freeze_varbc) then call da_varbc_pred(iv) !varbc coldstart can not be done here when num_fgat_time>1 - if ( num_fgat_time == 1 ) then - call da_varbc_coldstart(iv) - end if - call da_varbc_direct(iv) + !because da_varbc_coldstart uses all obs from all time slots else if (biascorr) then do inst = 1, iv%num_inst ! loop for sensor write(unit=stdout,fmt='(A,A)') 'Performing bias correction for ', & @@ -65,30 +62,6 @@ subroutine da_get_innov_vector_radiance (it, grid, ob, iv) end do ! end loop for sensor end if - !------------------------------------------------------------------------ - ! [3.0] Perform QC check - !------------------------------------------------------------------------ - if (qc_rad) then - call da_qc_rad(it, ob, iv) - end if - - !------------------------------------------------------------------------ - ! [4.0] Compute preconditioning for Variational bias correction - !------------------------------------------------------------------------ - !varbc preconditioning shoud be done after get_innov_vector is done for all time slots - !if (use_varbc .and. it == 1) call da_varbc_precond(iv) !moved to da_get_innov_vector.inc - - !------------------------------------------------------------------------ - ! [5.0] Prepare (QCed) bias statistics files - !------------------------------------------------------------------------ - if (biasprep) then - do inst = 1, iv%num_inst - write(unit=stdout,fmt='(A,A)') 'Preparing bias statistics files for ', & - trim(iv%instid(inst)%rttovid_string) - call da_biasprep(inst,ob,iv) - end do - end if - if(trace_use) call da_trace_exit("da_get_innov_vector_radiance") end subroutine da_get_innov_vector_radiance