diff --git a/GFDL_tools/fv_diag_column.F90 b/GFDL_tools/fv_diag_column.F90 index 7460a4a9f..7a76e27b3 100644 --- a/GFDL_tools/fv_diag_column.F90 +++ b/GFDL_tools/fv_diag_column.F90 @@ -50,7 +50,7 @@ module fv_diag_column_mod #include contains - + subroutine fv_diag_column_init(Atm, yr_init, mo_init, dy_init, hr_init, do_diag_debug_out, do_diag_sonde_out, sound_freq_out) type(fv_atmos_type), intent(inout), target :: Atm @@ -60,7 +60,7 @@ subroutine fv_diag_column_init(Atm, yr_init, mo_init, dy_init, hr_init, do_diag_ integer :: ios, nlunit logical :: exists - + call write_version_number ( 'FV_DIAG_COLUMN_MOD', version ) diag_debug_names(:) = '' @@ -99,7 +99,7 @@ subroutine fv_diag_column_init(Atm, yr_init, mo_init, dy_init, hr_init, do_diag_ endif if (do_diag_debug) then - allocate(diag_debug_units(num_diag_debug)) + allocate(diag_debug_units(num_diag_debug)) call find_diagnostic_column("DEBUG", diag_debug_names, diag_debug_i, diag_debug_j, diag_debug_tile, diag_debug_lat, diag_debug_lon, diag_debug_units, Atm%gridstruct%grid_64, Atm%gridstruct%agrid_64, num_diag_debug, Atm%gridstruct%ntiles_g, Atm%bd, Atm%global_tile, Atm%npx, Atm%npy) endif if (do_diag_sonde) then @@ -113,7 +113,7 @@ subroutine fv_diag_column_init(Atm, yr_init, mo_init, dy_init, hr_init, do_diag_ do_diag_debug_out = do_diag_debug do_diag_sonde_out = do_diag_sonde sound_freq_out = sound_freq - + end subroutine fv_diag_column_init @@ -142,7 +142,7 @@ subroutine read_column_table character(len=256) :: record character(len=10) :: dum1, dum2 - iunit = get_unit() + iunit = get_unit() open(iunit, file='column_table', action='READ', iostat=io) if(io/=0) call mpp_error(FATAL, ' find_diagnostic_column: Error in opening column_table') @@ -154,7 +154,7 @@ subroutine read_column_table read(iunit,'(a)',end=100) record if (record(1:1) == '#') cycle if (record(1:10) == ' ') cycle - + !Debug record with index point (index point not supported for sonde output) !if (is_master()) print*, index(lowercase(record), "debug"), index(lowercase(record), "index"), trim(record) if (index(lowercase(record), "debug") .ne. 0 .and. index(lowercase(record), "index") .ne. 0) then @@ -183,14 +183,14 @@ subroutine read_column_table call mpp_error(FATAL,'error in column_table format') endif endif - + endif - + enddo 100 continue - + end subroutine read_column_table - + !Note that output lat-lon are in degrees but input is in radians subroutine find_diagnostic_column(diag_class, diag_names, diag_i, diag_j, diag_tile, diag_lat, diag_lon, diag_units, grid, agrid, num_diag, ntiles, bd, tile, npx, npy) @@ -204,7 +204,7 @@ subroutine find_diagnostic_column(diag_class, diag_names, diag_i, diag_j, diag_t integer, dimension(num_diag), intent(OUT) :: diag_units real(kind=R_GRID), intent(IN) :: grid(bd%isd+1:bd%ied+1,bd%jsd+1:bd%jed+1,2) real(kind=R_GRID), intent(IN) :: agrid(bd%isd:bd%ied,bd%jsd:bd%jed,2) - + integer :: i,j,m,io character(80) :: filename real(kind=R_GRID), dimension(2):: pp @@ -213,7 +213,7 @@ subroutine find_diagnostic_column(diag_class, diag_names, diag_i, diag_j, diag_t integer :: isc, iec, jsc, jec integer :: isd, ied, jsd, jed logical :: point_found - + isd = bd%isd ied = bd%ied jsd = bd%jsd @@ -223,11 +223,11 @@ subroutine find_diagnostic_column(diag_class, diag_names, diag_i, diag_j, diag_t jsc = bd%jsc jec = bd%jec - + do m=1,num_diag point_found = .false. - + !Index specified if (diag_i(m) >= -10 .and. diag_j(m) >= -10) then @@ -241,7 +241,7 @@ subroutine find_diagnostic_column(diag_class, diag_names, diag_i, diag_j, diag_t i=diag_i(m) j=diag_j(m) - + if (diag_tile(m) == tile .and. i >= isc .and. i <= iec .and. & j >= jsc .and. j <= jec) then diag_lon(m) = agrid(i,j,1)*rad2deg @@ -281,7 +281,7 @@ subroutine find_diagnostic_column(diag_class, diag_names, diag_i, diag_j, diag_t enddo enddo !print*, 'lat-lon point:', mpp_pe(), dmin, diag_i(m), diag_j(m), isc, iec, jsc, jec - + if ( diag_i(m) < isc .or. diag_i(m) > iec .or. diag_j(m) < jsc .or. diag_j(m) > jec ) then diag_i(m) = -999 diag_j(m) = -999 @@ -295,11 +295,11 @@ subroutine find_diagnostic_column(diag_class, diag_names, diag_i, diag_j, diag_t diag_tile(m) = tile point_found = .true. endif - + endif if (point_found) then - + !Initialize output file diag_units(m) = get_unit() write(filename, 202) trim(diag_names(m)), trim(diag_class) @@ -312,7 +312,7 @@ subroutine find_diagnostic_column(diag_class, diag_names, diag_i, diag_j, diag_t endif enddo - + end subroutine find_diagnostic_column subroutine debug_column(pt, delp, delz, u, v, w, q, npz, ncnst, sphum, nwat, zvir, ptop, hydrostatic, bd, Time) @@ -353,7 +353,7 @@ subroutine debug_column(pt, delp, delz, u, v, w, q, npz, ncnst, sphum, nwat, zvi !< !< longitude = 271.354 latitude = 42.063 !< on processor # 162 : processor i = 2 , processor j = 30 - + write(unit, *) "DEBUG POINT ", diag_debug_names(n) write(unit, *) call get_date(Time, yr, mon, dd, hr, mn, seconds) @@ -362,7 +362,7 @@ subroutine debug_column(pt, delp, delz, u, v, w, q, npz, ncnst, sphum, nwat, zvi write(unit, '(A, F8.3, A, F8.3)') ' longitude = ', diag_debug_lon(n), ' latitude = ', diag_debug_lat(n) write(unit, '(A, I8, A, I6, A, I6, A, I3)') ' on processor # ', mpp_pe(), ' : local i = ', i, ', local j = ', j, ' tile = ', diag_debug_tile(n) write(unit, *) - + write(unit,500) 'k', 'T', 'delp', 'delz', 'u', 'v', 'w', 'sphum', 'cond', 'pres', 'NHprime'!, 'pdry', 'NHpdry' write(unit,500) ' ', 'K', 'mb', 'm', 'm/s', 'm/s', 'm/s', 'g/kg', 'g/kg', 'mb', 'mb'!, ! 'mb', 'mb' 500 format(A4, A7, A8, A6, A8, A8, A8, A8, A9, A9, A9) @@ -377,7 +377,7 @@ subroutine debug_column(pt, delp, delz, u, v, w, q, npz, ncnst, sphum, nwat, zvi !pehyddry(k+1) = pehyddry(k) + delp(i,j,k)*(1.-sum(q(i,j,k,1:nwat))) !preshyddry(k) = (pehyddry(k+1) - pehyddry(k))/log(pehyddry(k+1)/pehyddry(k)) enddo - + !do k=2*npz/3,npz do k=max(diag_debug_kbottom-diag_debug_nlevels,1),min(diag_debug_kbottom,npz) cond = 0. @@ -391,10 +391,10 @@ subroutine debug_column(pt, delp, delz, u, v, w, q, npz, ncnst, sphum, nwat, zvi q(i,j,k,sphum)*1000., cond*1000., pres*1.e-2, (pres-preshyd(k))*1.e-2!, presdry*1.e-2, (presdry-preshyddry(k))*1.e-2 enddo endif - + write(unit, *) '===================================================================' write(unit, *) - + call mpp_flush(unit) @@ -433,7 +433,7 @@ subroutine debug_column_dyn(pt, delp, delz, u, v, w, q, heat_source, cappa, akap i=diag_debug_i(n) j=diag_debug_j(n) unit=diag_debug_units(n) - + if (i < bd%is .or. i > bd%ie) cycle if (j < bd%js .or. j > bd%je) cycle @@ -446,7 +446,7 @@ subroutine debug_column_dyn(pt, delp, delz, u, v, w, q, heat_source, cappa, akap write(unit, '(A, F8.3, A, F8.3)') ' longitude = ', diag_debug_lon(n), ' latitude = ', diag_debug_lat(n) write(unit, '(A, I8, A, I6, A, I6)') ' on processor # ', mpp_pe(), ' : local i = ', i, ', local j = ', j write(unit, *) - + write(unit,500) 'k', 'T', 'delp', 'delz', 'u', 'v', 'w', 'sphum', 'cond', 'pres', 'NHprime', 'heat' write(unit,500) ' ', 'K', 'mb', 'm', 'm/s', 'm/s', 'm/s', 'g/kg', 'g/kg', 'mb', 'mb', 'K' 500 format(A4, A7, A8, A6, A8, A8, A8, A8, A9, A9, A9, A8) @@ -486,7 +486,7 @@ subroutine debug_column_dyn(pt, delp, delz, u, v, w, q, heat_source, cappa, akap write(unit, *) '===================================================================' write(unit, *) - + call mpp_flush(unit) enddo @@ -590,5 +590,5 @@ subroutine sounding_column( pt, delp, delz, u, v, q, peln, pkz, thetae, phis, & end subroutine sounding_column - + end module fv_diag_column_mod diff --git a/README.md b/README.md index 59e296809..19f1f8b4a 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ The GFDL Microphysics is also available via this repository. # Where to find information -Visit the [FV3 website](https://www.gfdl.noaa.gov/fv3/) for more information. Reference material is available at [FV3 documentation and references](https://www.gfdl.noaa.gov/fv3/fv3-documentation-and-references/). +Visit the [FV3 website](https://www.gfdl.noaa.gov/fv3/) for more information. Reference material is available at [FV3 documentation and references](https://www.gfdl.noaa.gov/fv3/fv3-documentation-and-references/). # Proper usage attribution diff --git a/driver/SHiELD/atmosphere.F90 b/driver/SHiELD/atmosphere.F90 index a815f6c30..3699357cb 100644 --- a/driver/SHiELD/atmosphere.F90 +++ b/driver/SHiELD/atmosphere.F90 @@ -197,7 +197,7 @@ subroutine atmosphere_init (Time_init, Time, Time_step, Grid_box, area) Atm(mygrid)%coarse_graining%strategy, & Atm(mygrid)%coarse_graining%domain) endif - + Atm(mygrid)%Time_init = Time_init !----- write version and namelist to log file ----- @@ -300,7 +300,7 @@ subroutine atmosphere_init (Time_init, Time, Time_step, Grid_box, area) Atm(mygrid)%coarse_graining%domain, & Atm(mygrid)%coarse_graining%restart) endif - + !---------- reference profile ----------- ps1 = 101325. ps2 = 81060. @@ -486,7 +486,7 @@ subroutine atmosphere_dynamics ( Time ) qv_dt(:,:,:) = Atm(n)%q (isc:iec,jsc:jec,:,sphum) rdt = 1./dt_atmos - + w_diff = get_tracer_index (MODEL_ATMOS, 'w_diff' ) if ( Atm(n)%flagstruct%fv_sg_adj > 0 ) then nt_dyn = nq diff --git a/model/fv_arrays.F90 b/model/fv_arrays.F90 index a0c2edd80..d21a1215a 100644 --- a/model/fv_arrays.F90 +++ b/model/fv_arrays.F90 @@ -227,26 +227,26 @@ module fv_arrays_mod !> Momentum (or KE) options: integer :: hord_mt = 9 !< Horizontal advection scheme for momentum fluxes. A !< complete list of kord options is given in the - !< corresponding table in Appendix A of the + !< corresponding table in Appendix A of the !< FV3 technical document. The default value is 9, which !< uses the third-order piecewise-parabolic method with the - !< monotonicity constraint of Huynh, which is less diffusive - !< but more expensive than other constraints. For hydrostatic simulation, 8 - !< (the L04 monotonicity constraint) or 10 are recommended; for - !< nonhydrostatic simulation, the completely unlimited (“linear” - !< or non-monotone) PPM scheme is recommended. If no monotonicity - !< constraint is applied, enabling the flux damping + !< monotonicity constraint of Huynh, which is less diffusive + !< but more expensive than other constraints. For hydrostatic simulation, 8 + !< (the L04 monotonicity constraint) or 10 are recommended; for + !< nonhydrostatic simulation, the completely unlimited (“linear” + !< or non-monotone) PPM scheme is recommended. If no monotonicity + !< constraint is applied, enabling the flux damping !< (do_vort_damp = .true.) is highly recommended to control grid-scale !< noise. It is also recommended that hord_mt, hord_vt, hord_tm, and - !< hord_dp use the same value, to ensure consistent transport of all + !< hord_dp use the same value, to ensure consistent transport of all !< dynamical fields, unless a positivity constraint on mass advection !< (hord_dp) is desired. - integer :: kord_mt = 8 !< Vertical remapping scheme for the winds. 8 by default; 9 is recommended as - !< the safest option, although 10, and 11 can also be useful. See + integer :: kord_mt = 8 !< Vertical remapping scheme for the winds. 8 by default; 9 is recommended as + !< the safest option, although 10, and 11 can also be useful. See !< corresponding table in Appendix A of the FV3 !< technical document for a complete list of kord options. integer :: kord_wz = 8 !< Vertical remapping scheme for vertical velocity in nonhydrostatic simulations. - !< 8 by default; 9 recommended. It is also recommended to use the same value + !< 8 by default; 9 recommended. It is also recommended to use the same value !< for 'kord_wz' as for 'kord_mt'. !> Vorticity & w transport options: @@ -257,29 +257,29 @@ module fv_arrays_mod integer :: hord_tm = 9 !< Horizontal advection scheme for potential temperature and !< layer thickness in nonhydrostatic simulations. 9 by default. integer :: hord_dp = 9 !< Horizontal advection scheme for mass. A positivity - !< constraint may be warranted for hord_dp but not strictly + !< constraint may be warranted for hord_dp but not strictly !< necessary. 9 by default. integer :: kord_tm =-8 !< Vertical remapping scheme for temperature. If positive - !< (not recommended), then vertical remapping is performed on - !< total energy instead of temperature (see 'remap_t'). + !< (not recommended), then vertical remapping is performed on + !< total energy instead of temperature (see 'remap_t'). !< The default value is -8. !> Tracer transport options: integer :: hord_tr = 12 !< Horizontal advection scheme for tracers. The default is 12. !< This value can differ from the other hord options since - !< tracers are subcycled (if inline_q == .false.) and require + !< tracers are subcycled (if inline_q == .false.) and require !< positive-definite advection to control the appearance of !< non-physical negative masses. 8 (fastest) or 10 (least diffusive) !< are typically recommended. integer :: kord_tr = 8 !< The vertical remapping scheme for tracers. The default is 8. - !< 9 or 11 recommended. It is often recommended to use the same + !< 9 or 11 recommended. It is often recommended to use the same !< value for 'kord_tr' as for 'kord_tm'. real :: scale_z = 0. !< diff_z = scale_z**2 * 0.25 (only used for Riemann solver) real :: w_max = 75. !< Not used. real :: z_min = 0.05 !< Not used. real :: lim_fac = 1.0 !< linear scheme limiting factor when using hord = 1. 1: hord = 5, 3: hord = 6 - integer :: nord=1 !< Order of divergence damping: 0 for second-order; 1 for fourth-order + integer :: nord=1 !< Order of divergence damping: 0 for second-order; 1 for fourth-order !< (default); 2 for sixth-order; 3 for eighth-order. Sixth-order generally !< yields the best balance of low diffusivity and better stability; eighth- !< order is effectively inviscid but may be unstable for some configurations. @@ -287,35 +287,35 @@ module fv_arrays_mod !< The default value is 0. Positivity not guaranteed for nord > 0. !< (We really don't recommend using tracer damping.) real :: dddmp = 0.0 !< Dimensionless coefficient for the second-order Smagorinsky-type - !< divergence damping. The default is value is 0.0. 0.2 + !< divergence damping. The default is value is 0.0. 0.2 !< (the Smagorinsky constant) is recommended if ICs are noisy. real :: d2_bg = 0.0 !< Coefficient for explicit second-order divergence damping. !< This option remains active even if nord is nonzero. The default !< value is 0.0. The proper range is 0 to 0.02, with 0 strongly recommended !< except for LES simulation. - real :: d4_bg = 0.16 !< Dimensionless coefficient for explicit higher-order divergence damping. - !< 0.0 by default. If no second-order divergence damping is used, then values + real :: d4_bg = 0.16 !< Dimensionless coefficient for explicit higher-order divergence damping. + !< 0.0 by default. If no second-order divergence damping is used, then values !< between 0.1 and 0.16 are recommended. Requires 'nord' > 0. Note that the !< scaling for 'd4_bg' differs from that of 'd2_bg'; 'nord' >= 1 and !< 'd4_bg' = 0.16 will be less diffusive than 'nord' = 0 and 'd2_bg' = 0.02. real :: vtdm4 = 0.0 !< Coefficient for explicit other-variable damping. The value of 'vtdm4' !< should be less than that of 'd4_bg'. A good first guess for 'vtdm4' is - !< about one-third the value of d4_bg. Requires 'do_vort_damp' + !< about one-third the value of d4_bg. Requires 'do_vort_damp' !< to be .true. Disabled for values less than 1.e-3. Other- !< variable damping should not be used if a monotonic horizontal advection !< scheme is used. The default value is 0.0. real :: trdm2 = 0.0 !< Coefficient for del-2 tracer damping real :: d2_bg_k1 = 4. !< Strength of second-order diffusion in the top sponge layer. - !< Value must be specified. This value, and d2_bg_k2, will be changed - !< appropriately in the model (depending on the height of model - !< top), so the actual damping may be very reduced. See + !< Value must be specified. This value, and d2_bg_k2, will be changed + !< appropriately in the model (depending on the height of model + !< top), so the actual damping may be very reduced. See !< atmos_cubed_sphere/model/dyncore.F90 for details. Recommended !< range is 0. to 0.2. Note that since diffusion is converted to !< heat if d_con > 0 larger amounts of sponge-layer diffusion may !< be less stable. real :: d2_bg_k2 = 2. !< Strength of second-order diffusion in the second sponge - !< layer from the model top. This value must be specified, and + !< layer from the model top. This value must be specified, and !< should be less than 'd2_bg_k1'. real :: d2_divg_max_k1 = 0.15 !< d2_divg max value (k=1) real :: d2_divg_max_k2 = 0.08 !< d2_divg max value (k=2) @@ -338,7 +338,7 @@ module fv_arrays_mod !< terrain filter, and SHOULD NOT BE USED FOR REGULAR RUNS. !< use del-2 (2) OR del-4 (4) logical :: full_zs_filter=.false.!< Whether to apply the on-line topography filter during - !< initialization. Only active if get_nggps_ic = .true. This is so + !< initialization. Only active if get_nggps_ic = .true. This is so !< topography filtering can be performed on the initial conditions output by the !< pre-processing tools, which currently do not support topography filter- !< ing for some configurations (such as the nested grid); this also allows @@ -348,21 +348,21 @@ module fv_arrays_mod !< during the initialization of the topography. The default value is .false. logical :: RF_fast =.false. !< Option controlling whether to apply Rayleigh damping (for tau > 0) !< on the dynamic/acoustic timestep rather than on the physics timestep. - !< This can help stabilize the model by applying the damping more weakly - !< more frequently, so the instantaneous amount of damping (and thereby + !< This can help stabilize the model by applying the damping more weakly + !< more frequently, so the instantaneous amount of damping (and thereby !< heat added) is reduced. The default is .false., which applies the Rayleigh !< drag every physics timestep. logical :: consv_am = .false. !< Whether to enable Angular momentum fixer. The default is .false. - logical :: do_sat_adj= .false. !< Controls split GFDL Microphysics. .false. by default. Must have the same + logical :: do_sat_adj= .false. !< Controls split GFDL Microphysics. .false. by default. Must have the same !< value as do_sat_adj in gfdl_mp_nml. Not compatible with other microphysics !< schemes. Also requires GFDL microphysics be installed within the physics driver. - logical :: do_inline_mp = .false.!< Controls Inline GFDL cloud microphysics, in which the full microphysics is - !< called entirely within FV3. If .true. disabling microphysics within the physics - !< is very strongly recommended. .false. by default. + logical :: do_inline_mp = .false.!< Controls Inline GFDL cloud microphysics, in which the full microphysics is + !< called entirely within FV3. If .true. disabling microphysics within the physics + !< is very strongly recommended. .false. by default. logical :: do_f3d = .false. ! logical :: no_dycore = .false. !< Disables execution of the dynamical core, only running !< the initialization, diagnostic, and I/O routines, and - !< any physics that may be enabled. Essentially turns the + !< any physics that may be enabled. Essentially turns the !< model into a column physics model. The default is .false. logical :: convert_ke = .false. !< If .true., adds energy dissipated through mechanical !< damping to heat throughout the entire depth of the domain; @@ -372,36 +372,36 @@ module fv_arrays_mod logical :: do_vort_damp = .false. !< Whether to apply flux damping (of strength governed by 'vtdm4') !< to the fluxes of vorticity, air mass, and nonhydrostatic !< vertical velocity (there is no dynamically correct way to add - !< explicit diffusion to the tracer fluxes). The form is the same + !< explicit diffusion to the tracer fluxes). The form is the same !< as is used for the divergence damping, including the same order !< (from 'nord') damping, unless 'nord' = 0, in which case this !< damping is fourth-order, or if 'nord' = 3,in which case this !< damping is sixth-order (instead of eighth-order). We recommend !< enabling this damping when the linear or non-monotonic - !< horizontal advection schemes are enabled, but is unnecessary and + !< horizontal advection schemes are enabled, but is unnecessary and !< not recommended when using monotonic advection. The default is .false. - logical :: use_old_omega = .true. + logical :: use_old_omega = .true. !> PG off centering: real :: beta = 0.0 !< Parameter specifying fraction of time-off-centering for backwards - !< evaluation of the pressure gradient force. The default is 0.0, which + !< evaluation of the pressure gradient force. The default is 0.0, which !< produces a fully backwards evaluation of the pressure gradient force - !< that is entirely evaluated using the updated (time n+1) dynamical fields. + !< that is entirely evaluated using the updated (time n+1) dynamical fields. !< A value of 0.5 will equally weight the PGF determined at times n and !< n+1, but may not be stable; values larger than 0.45 are not recommended. - !< A value of 0.4 is recommended for most hydrostatic simulations, which - !< allows an improved representation of inertia-gravity waves in the tropics. + !< A value of 0.4 is recommended for most hydrostatic simulations, which + !< allows an improved representation of inertia-gravity waves in the tropics. !< In non-hydrostatic simulations using the semi-implicit solver (a_imp > 0.5) !< the values of 'a_imp' and 'beta' should add to 1, so that the time-centering is - !< consistent between the PGF and the nonhydrostatic solver. + !< consistent between the PGF and the nonhydrostatic solver. !< The proper range is 0 to 0.45. #ifdef SW_DYNAMIC integer :: n_sponge = 0 !< Controls the number of layers at the upper boundary on !< which the 2Dx filter is applied. This does not control the sponge layer. !< The default value is 0. - real :: d_ext = 0. !< Coefficient for external (barotropic) mode damping. The - !< default value is 0.02. The proper range is 0 to 0.02. A value - !< of 0.01 or 0.02 may help improve the models maximum stable - !< time step in low-resolution (2-degree or lower) simulations; + real :: d_ext = 0. !< Coefficient for external (barotropic) mode damping. The + !< default value is 0.02. The proper range is 0 to 0.02. A value + !< of 0.01 or 0.02 may help improve the models maximum stable + !< time step in low-resolution (2-degree or lower) simulations; !< otherwise a value of 0 is recommended. integer :: nwat = 0 !< Number of water species to be included in condensate and !< water vapor loading. The masses of the first nwattracer species will be @@ -410,12 +410,12 @@ module fv_arrays_mod !< microphysics in the physics package you are using. For GFS physics !< with only a single condensate species, set to 2. For schemes with !< prognostic cloud water and cloud ice, such as GFDL AM2/AM3/AM4 - !< Rotsteyn-Klein or Morrison-Gettlean microphysics, set to 3. For + !< Rotsteyn-Klein or Morrison-Gettlean microphysics, set to 3. For !< warm-rain (Kessler) microphysics set to 4 (with an inactive ice tracer), !< which only handles three species but uses 4 to avoid interference with the - !< R-K physics. For schemes such as WSM5 or Ferrier that have prognostic rain + !< R-K physics. For schemes such as WSM5 or Ferrier that have prognostic rain !< and snow but not hail, set to 5 (not yet implemented). For six-category - !< schemes that also have prognostic hail or graupel, such as the GFDL, Thompson, + !< schemes that also have prognostic hail or graupel, such as the GFDL, Thompson, !< or WSM6 microphysics, set to 6. A value of 0 turns off condensate loading. !< The default value is 3. logical :: warm_start = .false. !< Whether to start from restart files, instead of cold-starting @@ -426,14 +426,14 @@ module fv_arrays_mod !< at the same time and on the same time step as is p and potential !< temperature. False by default; if true, q_split and z_tracer are ignored. logical :: adiabatic = .true. !< Whether to skip any physics. If true, the physics is not - !< called at all and there is no virtual temperature effect. + !< called at all and there is no virtual temperature effect. !< False by default; this option has no effect if not running solo_core. #else integer :: n_sponge = 1 !< Controls the number of layers at the upper boundary on which the 2Dx filter !< is applied. This does not control the sponge layer. The default value is 0. - real :: d_ext = 0.02 !< Coefficient for external (barotropic) mode damping. Proper range is 0 to 0.02. - !< A value of 0.01 or 0.02 may help improve the models maximum stable time - !< step in low-resolution (2-degree or lower) simulations; otherwise a + real :: d_ext = 0.02 !< Coefficient for external (barotropic) mode damping. Proper range is 0 to 0.02. + !< A value of 0.01 or 0.02 may help improve the models maximum stable time + !< step in low-resolution (2-degree or lower) simulations; otherwise a !< value of 0 is recommended. The default value is 0.02. integer :: nwat = 3 !< Number of water species to be included in condensate and !< water vapor loading. The masses of the first nwat tracer species will be @@ -442,12 +442,12 @@ module fv_arrays_mod !< microphysics in the physics package you are using. For GFS physics !< with only a single condensate species, set to 2. For schemes with !< prognostic cloud water and cloud ice, such as GFDL AM2/AM3/AM4 - !< Rotsteyn-Klein or Morrison-Gettlean microphysics, set to 3. For + !< Rotsteyn-Klein or Morrison-Gettlean microphysics, set to 3. For !< warm-rain (Kessler) microphysics set to 4 (with an inactive ice tracer), !< which only handles three species but uses 4 to avoid interference with the - !< R-K physics. For schemes such as WSM5 or Ferrier that have prognostic rain + !< R-K physics. For schemes such as WSM5 or Ferrier that have prognostic rain !< and snow but not hail, set to 5 (not yet implemented). For six-category - !< schemes that also have prognostic hail or graupel, such as the GFDL, Thompson, + !< schemes that also have prognostic hail or graupel, such as the GFDL, Thompson, !< or WSM6 microphysics, set to 6. A value of 0 turns off condensate loading. !< The default value is 3. logical :: warm_start = .true. !< Whether to start from restart files, instead of cold-starting @@ -468,28 +468,28 @@ module fv_arrays_mod !< does not move the poles. By default this is set to 18, shifting the grid !< westward 180/18=10 degrees, so that the edges of the cube do not run !< through the mountains of Japan; all standard CM2.x, AM3, CM3, and - !< HiRAM simulations use this orientation of the grid. + !< HiRAM simulations use this orientation of the grid. !< Requires do_schmidt = .false. ! Defaults for Schmidt transformation: logical :: do_schmidt = .false. !< Whether to enable grid stretching and rotation using - !< stretch_fac, target_lat, and target_lon. + !< stretch_fac, target_lat, and target_lon. !< The default value is .false. logical :: do_cube_transform = .false. !< alternate version of do_schmidt in which rotation is done from the north pole instead of the south pole. This ensures that the target face (tile 6) has the "conventional" orientation with North at the "top", as opposed to do_schmidt which rotates the south pole to the target and for which tile 6 has North at the "bottom". This will be ignored if do_schmidt = .true. real(kind=R_GRID) :: stretch_fac = 1. !< Stretching factor for the Schmidt transformation. This - !< is the factor by which tile 6 of the cubed sphere will - !< be shrunk, with the grid size shrinking accordingly. - !< The default value is 1, which performs no grid stretching. - !< Requires do_schmidt =.true. + !< is the factor by which tile 6 of the cubed sphere will + !< be shrunk, with the grid size shrinking accordingly. + !< The default value is 1, which performs no grid stretching. + !< Requires do_schmidt =.true. !< THE MODEL WILL CRASH IF stretch_fac IS SET TO ZERO. - !< Values of up to 40 have been found useful and stable + !< Values of up to 40 have been found useful and stable !< for short-term cloud-scale integrations. real(kind=R_GRID) :: target_lat = -90. !< Latitude (in degrees) to which the center of tile 6 will be - !< rotated; if stretching is done with stretch_fac the center of - !< the high-resolution part of the grid will be at this latitude. + !< rotated; if stretching is done with stretch_fac the center of + !< the high-resolution part of the grid will be at this latitude. !< -90 by default, which does no grid rotation (the Schmidt transformation !< rotates the south pole to the appropriate target). !< Requires do_schmidt = .true. - real(kind=R_GRID) :: target_lon = 0. !< Longitude to which the center of tile 6 will be rotated. + real(kind=R_GRID) :: target_lon = 0. !< Longitude to which the center of tile 6 will be rotated. !< 0 by default. Requires do_schmidt = .true. !----------------------------------------------------------------------------------------------- @@ -504,36 +504,36 @@ module fv_arrays_mod logical :: reset_eta = .false. real :: p_fac = 0.05 !< Safety factor for minimum nonhydrostatic pressures, which - !< will be limited so the full pressure is no less than p_fac - !< times the hydrostatic pressure. This is only of concern in mid-top - !< or high-top models with very low pressures near the model top, and - !< has no effect in most simulations. The pressure limiting activates - !< only when model is in danger of blowup due to unphysical negative - !< total pressures. Only used if 'hydrostatic' = .false.and the - !< semi-implicit solver is used. The proper range is 0 to 0.25. + !< will be limited so the full pressure is no less than p_fac + !< times the hydrostatic pressure. This is only of concern in mid-top + !< or high-top models with very low pressures near the model top, and + !< has no effect in most simulations. The pressure limiting activates + !< only when model is in danger of blowup due to unphysical negative + !< total pressures. Only used if 'hydrostatic' = .false.and the + !< semi-implicit solver is used. The proper range is 0 to 0.25. !< The default value is 0.05. real :: a_imp = 0.75 !< Controls behavior of the non-hydrostatic solver. Values > 0.5 - !< enable the semi-implicit solver, in which the value of 'a_imp' - !< controls the time-off-centering: use a_imp = 1.0 for a fully - !< backward time stepping. For consistency, the sum of 'beta' and - !< 'a_imp' should be 1 when the semi-implicit solver is used. The - !< semi-implicit algorithm is substantially more efficient except - !< at very high (km-scale) resolutions with an acoustic time step - !< of a few seconds or less. Proper values are 0, or between 0.5 - !< and 1. The default value is 0.75. Only used if + !< enable the semi-implicit solver, in which the value of 'a_imp' + !< controls the time-off-centering: use a_imp = 1.0 for a fully + !< backward time stepping. For consistency, the sum of 'beta' and + !< 'a_imp' should be 1 when the semi-implicit solver is used. The + !< semi-implicit algorithm is substantially more efficient except + !< at very high (km-scale) resolutions with an acoustic time step + !< of a few seconds or less. Proper values are 0, or between 0.5 + !< and 1. The default value is 0.75. Only used if !< 'hydrostatic' = .false. integer :: n_split = 0 !< The number of small dynamics (acoustic) time steps between - !< vertical remapping. 0 by default, in which case the model - !< produces a good first guess by examining the resolution, + !< vertical remapping. 0 by default, in which case the model + !< produces a good first guess by examining the resolution, !< dt_atmos, and k_split. integer :: m_split = 0 !< Number of time splits for Riemann solver integer :: k_split = 1 !< Number of vertical remappings per dt_atmos (physics timestep). !< 1 by default. - logical :: use_logp = .false. !< Enables a variant of the Lin pressure-gradient force - !< algorithm, which uses the logarithm of pressure instead - !< of the Exner function (as in \cite lin1997explicit). This yields - !< more accurate results for regions that are nearly isothermal. + logical :: use_logp = .false. !< Enables a variant of the Lin pressure-gradient force + !< algorithm, which uses the logarithm of pressure instead + !< of the Exner function (as in \cite lin1997explicit). This yields + !< more accurate results for regions that are nearly isothermal. !< Ignored if 'hydrostatic' = .true. The default is .false. ! For doubly periodic domain with sim_phys @@ -551,7 +551,7 @@ module fv_arrays_mod ! For a 1024 system: try 6 x 13 * 13 = 1014 CPUs integer :: q_split = 0 !< number of time steps for sub-cycled tracer advection. - !< The default value is 0 (recommended), in which case + !< The default value is 0 (recommended), in which case !< the model determines the number of time steps from the !< global maximum wind speed at each call to the tracer advection. @@ -560,22 +560,22 @@ module fv_arrays_mod !< never prints out any output; set to -1 to see output after every !< dt_at-mos. Computing these diagnostics requires some computational overhead - logical :: write_3d_diags = .true. !< whether to write out three-dimensional dynamical diagnostic + logical :: write_3d_diags = .true. !< whether to write out three-dimensional dynamical diagnostic !< fields (those defined in fv_diagnostics.F90). This is useful !< for runs with multiple grids if you only want very large 3D - !< diagnostics written out for (say) a nested grid, and not for + !< diagnostics written out for (say) a nested grid, and not for !< the global grid. False by default. !------------------------------------------ ! Model Domain parameters !------------------------------------------ - integer :: npx !< Number of grid corners in the x-direction on one tile of the domain; + integer :: npx !< Number of grid corners in the x-direction on one tile of the domain; !< so one more than the number of grid cells across a tile. On the cubed sphere !< this is one more than the number of cells across a cube face. Must be set. integer :: npy !< Number of grid corners in the y-direction on one tile of the !< domain. This value should be identical to npx on a cubed-sphere grid; !< doubly periodic or nested grids do not have this restriction. Must be set. integer :: npz !< Number of vertical levels. Each choice of npz comes with a - !< pre-defined set of hybrid sigma-pressure levels and model top + !< pre-defined set of hybrid sigma-pressure levels and model top !< (see fv_eta.F90). Must be set. #ifdef USE_GFSL63 character(24) :: npz_type = 'gfs' !< Option for selecting vertical level setup (gfs levels, when available, by default) @@ -586,17 +586,17 @@ module fv_arrays_mod !< levels, set npz_rst to be the number of levels in your restart file. !< The model will then remap the restart file data to the vertical coordinates !< specified by npz. 0 by default; if 0 or equal to npz no remapping is done. - integer :: ncnst = 0 !< Number of tracer species advected by fv_tracer in the dynamical core. - !< Typically this is set automatically by reading in values from field_table, - !< but ncnst can be set to a smaller value so only the first ncnst tracers - !< listed in field_table are not advected. 0 by default, which will use the value + integer :: ncnst = 0 !< Number of tracer species advected by fv_tracer in the dynamical core. + !< Typically this is set automatically by reading in values from field_table, + !< but ncnst can be set to a smaller value so only the first ncnst tracers + !< listed in field_table are not advected. 0 by default, which will use the value !< from field_table. integer :: pnats = 0 !< The number of tracers not to advect by the dynamical core. - !< Unlike dnats, these tracers are not seen by the dynamical core. - !< The last pnats entries in field_table are not advected. + !< Unlike dnats, these tracers are not seen by the dynamical core. + !< The last pnats entries in field_table are not advected. !< The default value is 0. integer :: dnats = 0 !< The number of tracers which are not to be advected by the dynamical core, - !< but still passed into the dynamical core; the last dnats+pnats tracers + !< but still passed into the dynamical core; the last dnats+pnats tracers !< in field_table are not advected. 0 by default. integer :: dnrts = -1 !< Number of non-remapped consituents. Only makes sense for dnrts <= dnats integer :: ntiles = 1 !< Number of tiles on the domain. For the cubed sphere, this @@ -607,11 +607,11 @@ module fv_arrays_mod integer :: nf_omega = 1 !< Number of times to apply second-order smoothing to the !< diagnosed omega. When 0 the filter is disabled. 1 by default. integer :: fv_sg_adj = -1 !< Timescale (in seconds) at which to remove two-delta-z - !< instability when the local (between two adjacent levels) - !< Richardson number is less than 1. This is achieved by local - !< mixing, which conserves mass, momentum, and total energy. - !< Values of 0 or smaller disable this feature. If n_sponge < 0 - !< then the mixing is applied only to the top n_sponge layers of the + !< instability when the local (between two adjacent levels) + !< Richardson number is less than 1. This is achieved by local + !< mixing, which conserves mass, momentum, and total energy. + !< Values of 0 or smaller disable this feature. If n_sponge < 0 + !< then the mixing is applied only to the top n_sponge layers of the !< domain. Set to -1 (inactive) by default. The proper range is 0 to 3600. real :: sg_cutoff = -1 !< cutoff level for fv_sg_adj (2dz filter; overrides n_sponge) integer :: na_init = 0 !< Number of forward-backward dynamics steps used to initialize @@ -626,9 +626,9 @@ module fv_arrays_mod !< virtual temperature effect, and may be more stable. .false.by default. real :: p_ref = 1.E5 !< Surface pressure used to construct a horizontally-uniform reference !< vertical pressure profile, used in some simple physics packages - !< in the solo_core and in the Rayleigh damping. This should not be + !< in the solo_core and in the Rayleigh damping. This should not be !< confused with the actual, horizontally-varying pressure levels used - !< for all other dynamical calculations. The default value is 1.e5. + !< for all other dynamical calculations. The default value is 1.e5. !< CHANGING THIS VALUE IS STRONGLY DISCOURAGED. real :: dry_mass = 98290. !< If adjust_dry_mass is .true., sets the global dry air mass, !< measured in the globally-averaged surface pressure (Pascals) by adding @@ -638,19 +638,19 @@ module fv_arrays_mod integer :: nt_phys = 0 real :: tau_h2o = 0. !< Time-scale (days) for simple methane chemistry to act as !< a source of water in the stratosphere. Can be useful if the - !< stratosphere dries out too quickly; consider a value between - !< 60 and 120 days if this is the case. The default value is 0., - !< which disables the methane chemistry. Values less than zero apply - !< the chemistry above 100 mb; else applied above 30 mb. + !< stratosphere dries out too quickly; consider a value between + !< 60 and 120 days if this is the case. The default value is 0., + !< which disables the methane chemistry. Values less than zero apply + !< the chemistry above 100 mb; else applied above 30 mb. !< Requires 'adiabatic' to be .false. - real :: delt_max = 1. !< Maximum allowed magnitude of the dissipative heating rate, K/s; + real :: delt_max = 1. !< Maximum allowed magnitude of the dissipative heating rate, K/s; !< larger magnitudes are clipped to this amount. This can help avoid - !< instability that can occur due to strong heating when d_con > 0. + !< instability that can occur due to strong heating when d_con > 0. !< A value of 0.008 (a rate equivalent to about 800 K/day) is - !< sufficient to stabilize the model at 3-km resolution. + !< sufficient to stabilize the model at 3-km resolution. !< Set to 1. by default, which effectively disables this limitation. - real :: d_con = 0. !< Fraction of kinetic energy lost to explicit damping to be - !< converted to heat. Acts as a dissipative heating mechanism in + real :: d_con = 0. !< Fraction of kinetic energy lost to explicit damping to be + !< converted to heat. Acts as a dissipative heating mechanism in !< the dynamical core. The default is 0. Proper range is 0 to 1. !< Note that this is a local, physically correct, energy fixer. real :: ke_bg = 0. !< background KE production (m^2/s^3) over a small step @@ -658,32 +658,32 @@ module fv_arrays_mod real :: consv_te = 0. !< Fraction of total energy lost during the adiabatic integration !< between calls of the physics, to be added backglobally as heat; !< essentially the strength of the energy fixer in the physics. - !< Note that this is a global energy fixer and cannot add back energy + !< Note that this is a global energy fixer and cannot add back energy !< locally. The default algorithm increments the potential temperature !< so the pressure gradients are unchanged. The default value is 0. !< Proper range is 0 to 1. 1 will restore the energy completely to its - !< original value before entering the physics; a value of 0.7 roughly + !< original value before entering the physics; a value of 0.7 roughly !< causes the energy fixer to compensate for the amount of energy changed !< by the physics in GFDL HiRAM or AM3. real :: tau = 0. !< Time scale (in days) for Rayleigh friction applied to horizontal !< and vertical winds; lost kinetic energy is converted to heat, except !< on nested grids. The default value is 0.0, which disables damping. - !< Larger values yield less damping. For models with tops at 1 mb or lower - !< values between 10 and 30 are useful for preventing overly-strong polar night - !< jets; for higher-top hydrostatic models values between 5 and 15 should be - !< considered; and for non-hydrostatic models values of 10 or less should be + !< Larger values yield less damping. For models with tops at 1 mb or lower + !< values between 10 and 30 are useful for preventing overly-strong polar night + !< jets; for higher-top hydrostatic models values between 5 and 15 should be + !< considered; and for non-hydrostatic models values of 10 or less should be !< considered, with smaller values for higher-resolution. real :: rf_cutoff = 30.E2 !< Pressure below which no Rayleigh damping is applied if tau > 0. logical :: filter_phys = .false. logical :: dwind_2d = .false. !< Whether to use a simpler & faster algorithm for interpolating - !< the A-grid (cell-centered) wind tendencies computed from the physics + !< the A-grid (cell-centered) wind tendencies computed from the physics !< to the D-grid. Typically, the A-grid wind tendencies are first !< converted in 3D cartesian coordinates and then interpolated before !< converting back to 2D local coordinates. When this option enabled, !< a much simpler but less accurate 2D interpolation is used. False by !< default. - logical :: breed_vortex_inline = .false. !< Whether to bogus tropical cyclones into the model, - !< which are specified by an external file. Options are set in + logical :: breed_vortex_inline = .false. !< Whether to bogus tropical cyclones into the model, + !< which are specified by an external file. Options are set in !< fv_nwp_nudge_nml. False by default. logical :: range_warn = .false. !< Checks whether the values of the prognostic variables !< are within a reasonable range at the end of a dynamics time @@ -694,9 +694,9 @@ module fv_arrays_mod !< the cells above and below. This option is useful when the physical !< parameterizations produced negatives. The default is .false. logical :: fill_dp = .false. !< Like 'fill' except for p, the hydrostatic pressure thickness. - !< When the filling occurs a diagnostic message is printed out, + !< When the filling occurs a diagnostic message is printed out, !< which is helpful for diagnosing where the problem may be occurring. - !< Typically, a crash is inevitable if the pressure filling is needed; + !< Typically, a crash is inevitable if the pressure filling is needed; !< thus, this option is often better for debugging than as a safety valve. !< The default is .false. logical :: fill_wz = .false. @@ -705,24 +705,24 @@ module fv_arrays_mod logical :: non_ortho = .true. logical :: moist_phys = .true. !< Run with moist physics logical :: do_Held_Suarez = .false. !< Whether to use Held-Suarez forcing. Requires adiabatic - !< to be false. The default is .false.; this option has no + !< to be false. The default is .false.; this option has no !< effect if not running solo_core. logical :: do_reed_physics = .false. logical :: reed_cond_only = .false. - logical :: reproduce_sum = .true. !< uses an exactly-reproducible global sum operation performed - !< when computing the global energy for consv_te. This is used + logical :: reproduce_sum = .true. !< uses an exactly-reproducible global sum operation performed + !< when computing the global energy for consv_te. This is used !< because the FMS routine mpp_sum() is not bit-wise reproducible - !< due to its handling of floating-point arithmetic, and so can - !< return different answers for (say) different processor layouts. + !< due to its handling of floating-point arithmetic, and so can + !< return different answers for (say) different processor layouts. !< The default is .true. logical :: adjust_dry_mass = .false. !< Whether to adjust the global dry-air mass to the - !< value set by dry_mass. This is only done in an initialization step, - !< particularly when using an initial condition from an external dataset, + !< value set by dry_mass. This is only done in an initialization step, + !< particularly when using an initial condition from an external dataset, !< interpolated from another resolution (either horizontal or vertical), or !< when changing the topography, so that the global mass of the atmosphere !< matches some estimate of observed value. False by default. It !< is recommended to only set this to .true. when initializing the model. - logical :: fv_debug = .false. !< Whether to turn on additional diagnostics in fv_dynamics. + logical :: fv_debug = .false. !< Whether to turn on additional diagnostics in fv_dynamics. !< The default is .false. logical :: srf_init = .false. logical :: mountain = .true. !< Takes topography into account when initializing the @@ -732,16 +732,16 @@ module fv_arrays_mod !< cold-start without any topography; this value is ignored for the aquaplanet !< test_case = 14. The default is .true. It is highly recommended TO NOT ALTER !< this value unless you know what you are doing. - logical :: remap_t = .true. !< Whether the vertical remapping is performed on (virtual) temperature - !< instead of (virtual) potential temperature. Since typically potential - !< temperature increases exponentially from layer to layer near the top - !< boundary, the cubic-spline interpolation in the vertical remapping + logical :: remap_t = .true. !< Whether the vertical remapping is performed on (virtual) temperature + !< instead of (virtual) potential temperature. Since typically potential + !< temperature increases exponentially from layer to layer near the top + !< boundary, the cubic-spline interpolation in the vertical remapping !< will have difficulty with the exponential profile. Temperature !< does not have this problem and will often yield a more accurate result. !< The default is .true. logical :: z_tracer = .false. !< Whether to transport sub-cycled tracers layer-by-layer, !< each with its own computed sub-cycling time step (if q_split = 0). - !< This may improve efficiency for very large numbers of tracers. + !< This may improve efficiency for very large numbers of tracers. !< The default value is .false.; currently not implemented. logical :: old_divg_damp = .false. !< parameter to revert damping parameters back to values @@ -766,14 +766,14 @@ module fv_arrays_mod !-------------------------------------------------------------------------------------- ! The following options are useful for NWP experiments using datasets on the lat-lon grid !-------------------------------------------------------------------------------------- - logical :: nudge = .false. !< Whether to use the nudging towards the state in some externally-supplied + logical :: nudge = .false. !< Whether to use the nudging towards the state in some externally-supplied !< file (such as from reanalysis or another simulation). Further !< nudging options are set in fv_nwp_nudge_nml. The default is .false. - logical :: nudge_ic = .false. !< Same as nudge, but works in adiabatic solo_core simulations to - !< nudge the field to a single external analysis file. + logical :: nudge_ic = .false. !< Same as nudge, but works in adiabatic solo_core simulations to + !< nudge the field to a single external analysis file. !< The default is .false. logical :: ncep_ic = .false. !< If external_ic = .true., this variable says whether the - !< file in res_latlon_dynamics is an NCEP analysis or reanalysis file. + !< file in res_latlon_dynamics is an NCEP analysis or reanalysis file. !< This option zeros out all tracer fields except specific humidity. !< The default is .false. logical :: nggps_ic = .false. !< If external_ic = .true., reads initial conditions from @@ -783,9 +783,9 @@ module fv_arrays_mod logical :: ecmwf_ic = .false. !< If external_ic = .true., reads initial conditions from ECMWF analyses. !< The default is .false. logical :: gfs_phil = .false. !< if .T., compute geopotential inside of GFS physics (not used?) - logical :: agrid_vel_rst = .false. !< Whether to write the unstaggered latitude-longitude winds - !< (ua and va) to the restart files. This is useful for data - !< assimilation cycling systems which do not handle staggered winds. + logical :: agrid_vel_rst = .false. !< Whether to write the unstaggered latitude-longitude winds + !< (ua and va) to the restart files. This is useful for data + !< assimilation cycling systems which do not handle staggered winds. !< The default is .false. logical :: use_new_ncep = .false. !< use the NCEP ICs created after 2014/10/22, if want to read CWAT (not used??) logical :: use_ncep_phy = .false. !< if .T., separate CWAT by weights of liq_wat and liq_ice in FV_IC (not used??) @@ -803,12 +803,12 @@ module fv_arrays_mod !< hard-coded levels in fv_eta. The default is .false. logical :: read_increment = .false. !< read in analysis increment and add to restart ! Default restart files from the "Memphis" latlon FV core: - character(len=128) :: res_latlon_dynamics = 'INPUT/fv_rst.res.nc' !< If external_ic =.true.gives the filename of the + character(len=128) :: res_latlon_dynamics = 'INPUT/fv_rst.res.nc' !< If external_ic =.true.gives the filename of the !< input IC file. The default is 'INPUT/fv_rst.res.nc'. character(len=128) :: res_latlon_tracers = 'INPUT/atmos_tracers.res.nc' !< If external_ic =.true.and both ncep_ic and fv_diag_ic !< are.false., this variable gives the filename of the - !< initial conditions for the tracers, assumed to be a - !< legacy lat-lon FV core restart file. + !< initial conditions for the tracers, assumed to be a + !< legacy lat-lon FV core restart file. !< The default is 'INPUT/atmos_tracers.res.nc'. ! The user also needs to copy the "cold start" cubed sphere restart files (fv_core.res.tile1-6) ! to the INPUT dir during runtime @@ -817,28 +817,28 @@ module fv_arrays_mod !------------------------------------------------ logical :: hydrostatic = .true. !< Whether to use the hydrostatic or nonhydrostatic solver. !< The default is .true. - logical :: phys_hydrostatic = .true. !< Option to enable hydrostatic application of heating from the physics - !< in a nonhydrostatic simulation: heating is applied in hydrostatic + logical :: phys_hydrostatic = .true. !< Option to enable hydrostatic application of heating from the physics + !< in a nonhydrostatic simulation: heating is applied in hydrostatic !< balance, causing the entire atmospheric column to expand instantaneously. !< If .false., heating from the physics is applied simply as a temperature !< tendency. The default value is .true.; ignored if hydrostatic = .true. - logical :: use_hydro_pressure = .false. !< Whether to compute hydrostatic pressure for input to the physics. + logical :: use_hydro_pressure = .false. !< Whether to compute hydrostatic pressure for input to the physics. !< Currently only enabled for the fvGFS model. !< Ignored in hydrostatic simulations. The default is .false. - logical :: do_uni_zfull = .false. !< Whether to compute z_full (the height of each modellayer, + logical :: do_uni_zfull = .false. !< Whether to compute z_full (the height of each modellayer, !< as opposed to z_half, the height of each model interface) - !< as the midpoint of the layer, as is done for the nonhydrostatic + !< as the midpoint of the layer, as is done for the nonhydrostatic !< solver, instead of the height of the location where p = p the mean - !< pressure in the layer. This option is not available for fvGFS or + !< pressure in the layer. This option is not available for fvGFS or !< the solo_core. The default is .false. logical :: hybrid_z = .false. !< Whether to use a hybrid-height coordinate, instead of - !< the usual sigma-p coordinate. The default value is .false. + !< the usual sigma-p coordinate. The default value is .false. !< (Not currently maintained.) logical :: Make_NH = .false. !< Whether to re-initialize the nonhydrostatic state, by recomputing - !< dz from hydrostatic balance and setting w to 0. The default is + !< dz from hydrostatic balance and setting w to 0. The default is !< false. - logical :: make_hybrid_z = .false. !< Converts the vertical coordinate to a hybrid-height coordinate, - !< instead of the usual sigma-p coordinate. Requires hybrid_z = .true. + logical :: make_hybrid_z = .false. !< Converts the vertical coordinate to a hybrid-height coordinate, + !< instead of the usual sigma-p coordinate. Requires hybrid_z = .true. !< The default value is .false. logical :: nudge_qv = .false. !< During the adiabatic initialization (na_init > 0), if set to .true., !< the water vapor profile is nudged to an analytic fit to the @@ -847,25 +847,25 @@ module fv_arrays_mod !< values can be several times higher than observed. This nudging is !< unnecessary for other ICs, especially the ECMWF initial conditions. !< The default is .false. - real :: add_noise = -1. !< Amplitude of random thermal noise (in K) to add upon startup. + real :: add_noise = -1. !< Amplitude of random thermal noise (in K) to add upon startup. !< Useful for perturbing initial conditions. -1 by default; !< disabled if 0 or negative. integer :: a2b_ord = 4 !< Order of interpolation used by the pressure gradient force - !< to interpolate cell-centered (A-grid) values to the grid corners. - !< The default value is 4 (recommended), which uses fourth-order + !< to interpolate cell-centered (A-grid) values to the grid corners. + !< The default value is 4 (recommended), which uses fourth-order !< interpolation; otherwise second-order interpolation is used. integer :: c2l_ord = 4 !< Order of interpolation from the solvers native D-grid winds !< to latitude-longitude A-grid winds, which are used as input to - !< the physics routines and for writing to history files. + !< the physics routines and for writing to history files. !< The default value is 4 (recommended); fourth-order interpolation !< is used unless c2l_ord = 2. real(kind=R_GRID) :: dx_const = 1000. !< Specifies the (uniform) grid-cell-width in the x-direction - !< on a doubly-periodic grid (grid_type = 4) in meters. + !< on a doubly-periodic grid (grid_type = 4) in meters. !< The default value is 1000. real(kind=R_GRID) :: dy_const = 1000. !< Specifies the (uniform) grid-cell-width in the y-direction - !< on a doubly-periodic grid (grid_type = 4) in meters. + !< on a doubly-periodic grid (grid_type = 4) in meters. !< The default value is 1000. real(kind=R_GRID) :: deglat=15. !< Latitude (in degrees) used to compute the uniform f-plane !< Coriolis parameter for doubly-periodic simulations @@ -928,17 +928,17 @@ module fv_arrays_mod !nested grid flags: integer :: refinement = 3 !< Refinement ratio of the nested grid. This is the number - !< of times that each coarse-grid cell face will be divided - !< into smaller segments on the nested grid. Required to be a - !< positive integer if nested = true. Nested grids are aligned - !< with the coarse grid, so non-integer refinements are not + !< of times that each coarse-grid cell face will be divided + !< into smaller segments on the nested grid. Required to be a + !< positive integer if nested = true. Nested grids are aligned + !< with the coarse grid, so non-integer refinements are not !< permitted. The default value is 3. integer :: parent_tile = 1 !< Number of the tile (ie. face) in which this nested grid !< is found in its parent. Required to be a positive value if nested = true. !< If the parent grid is not a cubed sphere, or itself is a nested grid, this !< should be set to 1. If the parent grid has been rotated (using do_schmidt) with - !< the intent of centering the nested grid at target_lat and target_lon, then + !< the intent of centering the nested grid at target_lat and target_lon, then !< parent_tile should be set to 6. The default value is 1. logical :: nested = .false. !< Whether this is a nested grid. The default value is .false. integer :: nestbctype = 1 @@ -946,7 +946,7 @@ module fv_arrays_mod integer :: nestupdate = 7 !< Type of nested-grid update to use; details are given in !< model/fv_nesting.F90. The default is 7. logical :: twowaynest = .true. !< Whether to use two-way nesting, the process by which - !< the nested-grid solution can feed back onto the + !< the nested-grid solution can feed back onto the !< coarse-grid solution. The default value is .false. integer :: ioffset, joffset !@brief 'allocate_fv_nest_BC_type' is an interface to subroutines !! that allocate the 'fv_nest_BC_type' structure that holds the nested-grid BCs. !>@details The subroutines can pass the array bounds explicitly or not. -!! The bounds in Atm%bd are used for the non-explicit case. +!! The bounds in Atm%bd are used for the non-explicit case. interface allocate_fv_nest_BC_type module procedure allocate_fv_nest_BC_type_3D module procedure allocate_fv_nest_BC_type_3D_Atm @@ -1247,14 +1247,14 @@ module fv_arrays_mod !global tile and tile_of_mosaic only have a meaning for the CURRENT pe integer :: num_contact, npes_per_tile, global_tile, tile_of_mosaic, npes_this_grid - integer :: layout(2), io_layout(2) = (/ 1,1 /) !< layout: Processor layout on each tile. - !< The number of PEs assigned to a domain must equal + integer :: layout(2), io_layout(2) = (/ 1,1 /) !< layout: Processor layout on each tile. + !< The number of PEs assigned to a domain must equal !< layout(1)*layout(2)*ntiles. Must be set. !< io_layout: Layout of output files on each tile. 1,1 by default, !< which combines all restart and history files on a tile into one file. !< For 0,0, every process writes out its own restart and history files. - !< If not equal to 1,1, you will have to use mppnccombine to combine these - !< output files prior to post-processing, or if you want to change the + !< If not equal to 1,1, you will have to use mppnccombine to combine these + !< output files prior to post-processing, or if you want to change the !< number of PEs. Both entries must divide the respective value in layout. #endif @@ -1300,7 +1300,7 @@ module fv_arrays_mod contains !>@brief The subroutine 'allocate_fv_atmos_type' allocates the fv_atmos_type -!>@details It includes an option to define dummy grids that have scalar and +!>@details It includes an option to define dummy grids that have scalar and !! small arrays defined as null 3D arrays. subroutine allocate_fv_atmos_type(Atm, isd_in, ied_in, jsd_in, jed_in, is_in, ie_in, js_in, je_in, & npx_in, npy_in, npz_in, ndims_in, ncnst_in, nq_in, dummy, alloc_2d, ngrids_in) diff --git a/model/fv_control.F90 b/model/fv_control.F90 index 971b5180c..6d076338a 100644 --- a/model/fv_control.F90 +++ b/model/fv_control.F90 @@ -320,7 +320,7 @@ subroutine fv_control_init(Atm, dt_atmos, this_grid, grids_on_this_pe, p_split) endif endif enddo - + ngrids = 1 do n=2,MAX_NNEST if (grid_coarse(n) <= 0) then @@ -966,7 +966,7 @@ subroutine read_namelist_fv_core_nml(Atm) write_coarse_diagnostics,& write_only_coarse_intermediate_restarts, & write_coarse_agrid_vel_rst, write_coarse_dgrid_vel_rst - + #ifdef INTERNAL_FILE_NML ! Read FVCORE namelist diff --git a/tools/coarse_grained_diagnostics.F90 b/tools/coarse_grained_diagnostics.F90 index 96e3ee35e..8f910abdd 100644 --- a/tools/coarse_grained_diagnostics.F90 +++ b/tools/coarse_grained_diagnostics.F90 @@ -14,10 +14,10 @@ module coarse_grained_diagnostics_mod block_edge_sum_x, block_edge_sum_y use time_manager_mod, only: time_type use tracer_manager_mod, only: get_tracer_index, get_tracer_names - + implicit none private - + type data_subtype real, dimension(:,:), pointer :: var2 => null() real, dimension(:,:,:), pointer :: var3 => null() @@ -124,7 +124,7 @@ subroutine populate_coarse_diag_type(Atm, coarse_diagnostics) coarse_diagnostics(index)%units = 'Pa' coarse_diagnostics(index)%reduction_method = AREA_WEIGHTED coarse_diagnostics(index)%data%var2 => Atm(tile_count)%ps(is:ie,js:je) - + if (.not. Atm(tile_count)%flagstruct%hydrostatic) then index = index + 1 coarse_diagnostics(index)%axes = 3 @@ -145,7 +145,7 @@ subroutine populate_coarse_diag_type(Atm, coarse_diagnostics) coarse_diagnostics(index)%reduction_method = MASS_WEIGHTED coarse_diagnostics(index)%data%var3 => Atm(tile_count)%w(is:ie,js:je,1:npz) endif - + do t = 1, n_tracers call get_tracer_names(MODEL_ATMOS, t, tracer_name, tracer_long_name, tracer_units) index = index + 1 @@ -171,7 +171,7 @@ subroutine populate_coarse_diag_type(Atm, coarse_diagnostics) coarse_diagnostics(index)%description = 'coarse-grained water vapor specific humidity tendency from physics' coarse_diagnostics(index)%units = 'kg/kg/s' coarse_diagnostics(index)%reduction_method = MASS_WEIGHTED - + index = index + 1 coarse_diagnostics(index)%axes = 3 coarse_diagnostics(index)%module_name = DYNAMICS @@ -292,7 +292,7 @@ subroutine populate_coarse_diag_type(Atm, coarse_diagnostics) coarse_diagnostics(index)%description = 'coarse-grained meridional wind tendency from nudging' coarse_diagnostics(index)%units = 'm/s/s' coarse_diagnostics(index)%reduction_method = MASS_WEIGHTED - + ! Vertically integrated diagnostics index = index + 1 coarse_diagnostics(index)%axes = 2 @@ -302,7 +302,7 @@ subroutine populate_coarse_diag_type(Atm, coarse_diagnostics) coarse_diagnostics(index)%units = 'kg/m**2/s' coarse_diagnostics(index)%vertically_integrated = .true. coarse_diagnostics(index)%reduction_method = AREA_WEIGHTED - + index = index + 1 coarse_diagnostics(index)%axes = 2 coarse_diagnostics(index)%module_name = DYNAMICS @@ -419,7 +419,7 @@ subroutine populate_coarse_diag_type(Atm, coarse_diagnostics) coarse_diagnostics(index)%units = 'kg/m s/s' coarse_diagnostics(index)%vertically_integrated = .true. coarse_diagnostics(index)%reduction_method = AREA_WEIGHTED - + ! iv =-1: winds ! iv = 0: positive definite scalars ! iv = 1: temperature @@ -471,7 +471,7 @@ subroutine populate_coarse_diag_type(Atm, coarse_diagnostics) coarse_diagnostics(index)%reduction_method = AREA_WEIGHTED coarse_diagnostics(index)%data%var3 => Atm(tile_count)%omga(is:ie,js:je,1:npz) coarse_diagnostics(index)%iv = -1 - + index = index + 1 coarse_diagnostics(index)%pressure_level = pressure_levels(p) coarse_diagnostics(index)%axes = 2 @@ -536,7 +536,7 @@ subroutine register_coarse_diagnostics(Atm, coarse_diagnostics, Time, & do index = 1, DIAG_SIZE if (trim(coarse_diagnostics(index)%name) == '') exit n_valid_diagnostics = index - enddo + enddo do index = 1, n_valid_diagnostics coarse_diagnostics(index)%id = register_diag_field( & @@ -553,7 +553,7 @@ subroutine register_coarse_diagnostics(Atm, coarse_diagnostics, Time, & call register_coarse_static_diagnostics(Atm, Time, axes_t, axes) end subroutine register_coarse_diagnostics - + ! Some diagnostics may only have memory allocated for them if they are requested subroutine maybe_allocate_reference_array(Atm, coarse_diagnostic) type(fv_atmos_type), target, intent(inout) :: Atm(:) @@ -656,7 +656,7 @@ subroutine maybe_allocate_reference_array(Atm, coarse_diagnostic) endif endif end subroutine maybe_allocate_reference_array - + subroutine fv_coarse_diag_init(Atm, Time, id_pfull, id_phalf, coarse_graining) type(fv_atmos_type), intent(inout) :: Atm(:) type(time_type), intent(in) :: Time @@ -670,7 +670,7 @@ subroutine fv_coarse_diag_init(Atm, Time, id_pfull, id_phalf, coarse_graining) call initialize_coarse_diagnostic_axes(coarse_graining%domain, coarse_graining%nx_coarse, & coarse_graining%id_x_coarse, coarse_graining%id_y_coarse, coarse_graining%id_xt_coarse, & coarse_graining%id_yt_coarse) - + coarse_graining%id_pfull = id_pfull coarse_graining%id_phalf = id_phalf @@ -698,7 +698,7 @@ subroutine initialize_coarse_diagnostic_axes(coarse_domain, & grid_y_coarse = (/ (j, j=1, nx_coarse + 1) /) grid_xt_coarse = (/ (i, i=1, nx_coarse) /) grid_yt_coarse = (/ (j, j=1, nx_coarse) /) - + id_xt_coarse = diag_axis_init('grid_xt_coarse', grid_xt_coarse, & 'index', 'x', 'x-index of cell center points', set_name='coarse_grid', & Domain2=coarse_domain, tile_count=tile_count) @@ -713,11 +713,11 @@ subroutine initialize_coarse_diagnostic_axes(coarse_domain, & 'index', 'y', 'y-index of cell corner points', set_name='coarse_grid', & Domain2=coarse_domain, tile_count=tile_count, domain_position=NORTH) end subroutine initialize_coarse_diagnostic_axes - + subroutine fv_coarse_diag(Atm, Time) type(fv_atmos_type), intent(in), target :: Atm(:) type(time_type), intent(in) :: Time - + real, allocatable :: work_2d(:,:), work_2d_coarse(:,:), work_3d_coarse(:,:,:) real, allocatable :: mass(:,:,:), height_on_interfaces(:,:,:), masked_area(:,:,:) real, allocatable :: phalf(:,:,:), upsampled_coarse_phalf(:,:,:) @@ -747,9 +747,9 @@ subroutine fv_coarse_diag(Atm, Time) endif if (need_3d_work_array) then - allocate(work_3d_coarse(is_coarse:ie_coarse,js_coarse:je_coarse,1:npz)) + allocate(work_3d_coarse(is_coarse:ie_coarse,js_coarse:je_coarse,1:npz)) if (trim(Atm(tile_count)%coarse_graining%strategy) .eq. PRESSURE_LEVEL) then - allocate(phalf(is:ie,js:je,1:npz+1)) + allocate(phalf(is:ie,js:je,1:npz+1)) allocate(upsampled_coarse_phalf(is:ie,js:je,1:npz+1)) call vertical_remapping_requirements( & @@ -835,7 +835,7 @@ subroutine fv_coarse_diag(Atm, Time) used = send_data(coarse_diagnostics(index)%id, work_3d_coarse, Time) endif endif - enddo + enddo end subroutine fv_coarse_diag subroutine coarse_grain_3D_field_on_model_levels(is, ie, js, je, is_coarse, ie_coarse, js_coarse, je_coarse, & @@ -920,7 +920,7 @@ subroutine coarse_grain_2D_field(is, ie, js, je, npz, is_coarse, ie_coarse, js_c real, allocatable :: work_2d(:,:) if (coarse_diag%pressure_level > 0 .or. coarse_diag%vertically_integrated & - .or. coarse_diag%scaled_by_specific_heat_and_vertically_integrated) then + .or. coarse_diag%scaled_by_specific_heat_and_vertically_integrated) then allocate(work_2d(is:ie,js:je)) endif @@ -1030,7 +1030,7 @@ subroutine get_need_mass_array(need_mass_array) need_mass_array = .false. do index = 1, DIAG_SIZE - if ((coarse_diagnostics(index)%axes == 3) .and. & + if ((coarse_diagnostics(index)%axes == 3) .and. & (trim(coarse_diagnostics(index)%reduction_method) .eq. MASS_WEIGHTED) .and. & (coarse_diagnostics(index)%id > 0)) then need_mass_array = .true. @@ -1048,7 +1048,7 @@ subroutine get_need_height_array(need_height_array) need_height_array = .false. do index = 1, DIAG_SIZE - if ((coarse_diagnostics(index)%axes == 2) .and. & + if ((coarse_diagnostics(index)%axes == 2) .and. & (coarse_diagnostics(index)%pressure_level > 0) .and. & (coarse_diagnostics(index)%id > 0)) then need_height_array = .true. @@ -1064,7 +1064,7 @@ subroutine get_need_masked_area_array(need_masked_area_array) need_masked_area_array = .false. do index = 1, DIAG_SIZE - if ((coarse_diagnostics(index)%axes == 3) .and. & + if ((coarse_diagnostics(index)%axes == 3) .and. & (trim(coarse_diagnostics(index)%reduction_method) .eq. AREA_WEIGHTED) .and. & (coarse_diagnostics(index)%id > 0)) then need_masked_area_array = .true. @@ -1181,7 +1181,7 @@ function ends_with(string, suffix) endif return end function ends_with - + subroutine vertically_integrate(is, ie, js, je, npz, delp, field, integrated_field) integer, intent(in) :: is, ie, js, je, npz real, intent(in) :: delp(is:ie,js:je,1:npz), field(is:ie,js:je,1:npz) @@ -1269,13 +1269,13 @@ subroutine register_coarse_static_diagnostics(Atm, Time, axes_t, axes) character(len=8) :: DYNAMICS = 'dynamics' real :: rad2deg = 180. / pi - + real, allocatable, dimension(:,:,:) :: grid_coarse, gridt_coarse real, allocatable, dimension(:,:) :: work_2d_coarse call get_fine_array_bounds(is, ie, js, je) call get_coarse_array_bounds(is_coarse, ie_coarse, js_coarse, je_coarse) - + id_grid_lon_coarse = register_static_field(DYNAMICS, 'grid_lon_coarse', & axes(1:2), 'longitude', 'degrees_E') id_grid_lat_coarse = register_static_field(DYNAMICS, 'grid_lat_coarse', & @@ -1292,7 +1292,7 @@ subroutine register_coarse_static_diagnostics(Atm, Time, axes_t, axes) axes_t(1:2), 'cell area', 'm**2') id_zsurf_coarse = register_static_field(DYNAMICS, 'zsurf_coarse', & axes_t(1:2), 'surface height', 'm') - + if (id_grid_lont_coarse .gt. 0 .or. id_grid_latt_coarse .gt. 0) then allocate(gridt_coarse(is_coarse:ie_coarse,js_coarse:je_coarse,1:2)) call compute_gridt_coarse(is, ie, js, je, is_coarse, ie_coarse, js_coarse, je_coarse, Atm, gridt_coarse) diff --git a/tools/coarse_grained_restart_files.F90 b/tools/coarse_grained_restart_files.F90 index fa3a318c7..c11bbdfe1 100644 --- a/tools/coarse_grained_restart_files.F90 +++ b/tools/coarse_grained_restart_files.F90 @@ -165,14 +165,14 @@ subroutine register_fv_core_coarse(tile_count, hydrostatic, hybrid_z, & filename, 'v', restart%v, domain=coarse_domain, position=EAST, & tile_count=tile_count) endif - + if (write_coarse_agrid_vel_rst) then id_restart = register_restart_field(restart%fv_core_coarse, & filename, 'ua', restart%ua, domain=coarse_domain, tile_count=tile_count) id_restart = register_restart_field(restart%fv_core_coarse, & filename, 'va', restart%va, domain=coarse_domain, tile_count=tile_count) endif - + if (.not. hydrostatic) then id_restart = register_restart_field(restart%fv_core_coarse, & filename, 'W', restart%w, domain=coarse_domain, mandatory=.false., tile_count=tile_count) @@ -281,7 +281,7 @@ subroutine coarse_grain_restart_data(Atm) call mpp_error(FATAL, error_message) endif end subroutine coarse_grain_restart_data - + subroutine coarse_grain_restart_data_on_model_levels(Atm) type(fv_atmos_type), intent(inout) :: Atm @@ -415,7 +415,7 @@ subroutine coarse_grain_fv_land_restart_data(Atm) Atm%oro(is:ie,js:je), Atm%coarse_graining%restart%oro) end subroutine coarse_grain_fv_land_restart_data - subroutine coarse_grain_fv_core_restart_data_on_pressure_levels(& + subroutine coarse_grain_fv_core_restart_data_on_pressure_levels(& Atm, phalf, coarse_phalf, coarse_phalf_on_fine, masked_mass_weights, masked_area_weights) type(fv_atmos_type), intent(inout) :: Atm real, intent(in) :: phalf(is-1:ie+1,js-1:je+1,1:npz+1) @@ -472,7 +472,7 @@ subroutine coarse_grain_fv_tracer_restart_data_on_pressure_levels( & real, allocatable :: remapped(:,:,:) character(len=64) :: tracer_name integer :: n_tracer - + allocate(remapped(is:ie,js:je,1:npz)) do n_tracer = 1, n_prognostic_tracers @@ -489,7 +489,7 @@ subroutine coarse_grain_fv_tracer_restart_data_on_pressure_levels( & Atm%coarse_graining%restart%q(is_coarse:ie_coarse,js_coarse:je_coarse,1:npz,n_tracer)) endif enddo - + do n_tracer = n_prognostic_tracers + 1, n_tracers call vertically_remap_field(phalf(is:ie,js:je,1:npz+1), & Atm%qdiag(is:ie,js:je,1:npz,n_tracer), coarse_phalf_on_fine, Atm%ptop, remapped) @@ -503,7 +503,7 @@ subroutine compute_top_height(delz, phis, top_height) real, intent(in) :: delz(is_coarse:ie_coarse,js_coarse:je_coarse,1:npz) real, intent(in) :: phis(is_coarse:ie_coarse,js_coarse:je_coarse) real, intent(out) :: top_height(is_coarse:ie_coarse,js_coarse:je_coarse) - + top_height = (phis / GRAV) - sum(delz, dim=3) end subroutine compute_top_height @@ -512,10 +512,10 @@ subroutine hydrostatic_delz(phalf, temp, sphum, delz) real, intent(in) :: temp(is_coarse:ie_coarse,js_coarse:je_coarse,1:npz) real, intent(in) :: sphum(is_coarse:ie_coarse,js_coarse:je_coarse,1:npz) real, intent(out) :: delz(is_coarse:ie_coarse,js_coarse:je_coarse,1:npz) - + real, allocatable :: virtual_temp(:,:,:), dlogp(:,:,:) integer :: k - + allocate(virtual_temp(is_coarse:ie_coarse,js_coarse:je_coarse,1:npz)) allocate(dlogp(is_coarse:ie_coarse,js_coarse:je_coarse,1:npz)) @@ -530,7 +530,7 @@ subroutine delz_and_top_height_to_phis(top_height, delz, phis) real, intent(in) :: top_height(is_coarse:ie_coarse,js_coarse:je_coarse) real, intent(in) :: delz(is_coarse:ie_coarse,js_coarse:je_coarse,1:npz) real, intent(out) :: phis(is_coarse:ie_coarse,js_coarse:je_coarse) - + phis = GRAV * (top_height + sum(delz, dim=3)) end subroutine delz_and_top_height_to_phis @@ -543,7 +543,7 @@ subroutine impose_hydrostatic_balance(Atm, coarse_phalf) allocate(top_height(is_coarse:ie_coarse,js_coarse:je_coarse)) sphum = get_tracer_index(MODEL_ATMOS, 'sphum') - + call compute_top_height(Atm%coarse_graining%restart%delz, Atm%coarse_graining%restart%phis, top_height) call hydrostatic_delz(coarse_phalf, Atm%coarse_graining%restart%pt, Atm%coarse_graining%restart%q(is_coarse:ie_coarse,js_coarse:je_coarse,1:npz,sphum), Atm%coarse_graining%restart%delz) call delz_and_top_height_to_phis(top_height, Atm%coarse_graining%restart%delz, Atm%coarse_graining%restart%phis) @@ -556,7 +556,7 @@ subroutine compute_pressure_level_coarse_graining_requirements( & real, intent(out) :: coarse_phalf(is_coarse:ie_coarse,js_coarse:je_coarse,1:npz+1) real, intent(out) :: coarse_phalf_on_fine(is:ie,js:je,1:npz+1) real, intent(out), dimension(is:ie,js:je,1:npz) :: masked_mass_weights, masked_area_weights - + ! Do a halo update on delp before proceeding here, because the remapping procedure ! for the winds requires interpolating across tile edges. call mpp_update_domains(Atm%delp, Atm%domain, complete=.true.) diff --git a/tools/coarse_graining.F90 b/tools/coarse_graining.F90 index ccf91d53e..347ef29a7 100644 --- a/tools/coarse_graining.F90 +++ b/tools/coarse_graining.F90 @@ -4,7 +4,7 @@ module coarse_graining_mod use mpp_domains_mod, only: domain2d, mpp_define_io_domain, mpp_define_mosaic, mpp_get_compute_domain use fv_mapz_mod, only: mappm use mpp_mod, only: FATAL, input_nml_file, mpp_error, mpp_npes - + implicit none private @@ -14,7 +14,7 @@ module coarse_graining_mod block_upsample, mask_area_weights, PRESSURE_LEVEL, vertical_remapping_requirements, & vertically_remap_field, mask_mass_weights, remap_edges_along_x, remap_edges_along_y, & block_edge_sum_x, block_edge_sum_y - + interface block_sum module procedure block_sum_2d end interface block_sum @@ -26,7 +26,7 @@ module coarse_graining_mod interface block_edge_sum_y module procedure block_edge_sum_y_2d_full_input end interface block_edge_sum_y - + interface weighted_block_average module procedure weighted_block_average_2d module procedure weighted_block_average_3d_field_2d_weights @@ -42,7 +42,7 @@ module coarse_graining_mod module procedure weighted_block_edge_average_y_2d module procedure weighted_block_edge_average_y_3d_field_2d_weights end interface weighted_block_edge_average_y - + interface block_upsample module procedure block_upsample_2d module procedure block_upsample_3d @@ -68,7 +68,7 @@ module coarse_graining_mod integer :: coarsening_factor = 8 !< factor the coarse grid is downsampled by (e.g. 8 if coarsening from C384 to C48 resolution) integer :: coarse_io_layout(2) = (/1, 1/) !< I/O layout for coarse-grid fields character(len=64) :: strategy = 'model_level' !< Valid values are 'model_level' and 'pressure_level' - + namelist /coarse_graining_nml/ coarsening_factor, coarse_io_layout, strategy contains @@ -110,7 +110,7 @@ subroutine compute_nx_coarse(npx, coarsening_factor, nx_coarse) character(len=256) :: error_message integer :: nx - + nx = npx - 1 if (coarsening_factor < 1) then @@ -134,7 +134,7 @@ subroutine assert_valid_domain_layout(nx_coarse, layout) layout_x = layout(1) layout_y = layout(2) - if (mod(nx_coarse, layout_x) > 0 .or. mod(nx_coarse, layout_y) > 0) then + if (mod(nx_coarse, layout_x) > 0 .or. mod(nx_coarse, layout_y) > 0) then write(error_message, *) 'coarse_graining_init: domain decomposition layout does not evenly divide the coarse grid.' call mpp_error(FATAL, error_message) endif @@ -189,7 +189,7 @@ subroutine compute_mass_weights(area, delp, mass) mass(:,:,k) = area * delp(:,:,k) enddo end subroutine compute_mass_weights - + subroutine block_sum_2d(fine, coarse) real, intent(in) :: fine(is:ie,js:je) real, intent(out) :: coarse(is_coarse:ie_coarse,js_coarse:je_coarse) @@ -205,7 +205,7 @@ subroutine block_sum_2d(fine, coarse) enddo enddo end subroutine - + subroutine weighted_block_average_2d(weights, fine, coarse) real, intent(in) :: weights(is:ie,js:je), fine(is:ie,js:je) real, intent(out) :: coarse(is_coarse:ie_coarse,js_coarse:je_coarse) @@ -258,7 +258,7 @@ subroutine block_edge_sum_x_2d(fine, coarse) enddo enddo end subroutine block_edge_sum_x_2d - + subroutine weighted_block_edge_average_x_2d(weights, fine, coarse) real, intent(in) :: weights(is:ie,js:je+1) real, intent(in) :: fine(is:ie,js:je+1) @@ -845,7 +845,7 @@ subroutine remap_edges_along_y(field, phalf, dy, ptop, result) ! 6. Coarsen the remapped field call weighted_block_edge_average_y_pre_downsampled(remapped, dy, result, mask, npz) end subroutine remap_edges_along_y - + subroutine block_edge_sum_x_2d_full_input(fine, coarse) real, intent(in) :: fine(is:ie,js:je+1) real, intent(out) :: coarse(is_coarse:ie_coarse,js_coarse:je_coarse+1) diff --git a/tools/fv_diagnostics.F90 b/tools/fv_diagnostics.F90 index 41caffca9..66266271b 100644 --- a/tools/fv_diagnostics.F90 +++ b/tools/fv_diagnostics.F90 @@ -48,11 +48,11 @@ module fv_diagnostics_mod use mpp_io_mod, only: mpp_flush use sat_vapor_pres_mod, only: compute_qs, lookup_es - use fv_arrays_mod, only: max_step + use fv_arrays_mod, only: max_step use gfdl_mp_mod, only: wqs1, qsmith_init, c_liq use fv_diag_column_mod, only: fv_diag_column_init, sounding_column, debug_column - + implicit none private @@ -84,8 +84,8 @@ module fv_diagnostics_mod real, parameter :: rad2deg = 180./pi logical :: do_diag_sonde, do_diag_debug integer :: sound_freq - logical :: prt_sounding = .false. - + logical :: prt_sounding = .false. + ! tracers character(len=128) :: tname character(len=256) :: tlongname, tunits @@ -96,9 +96,9 @@ module fv_diagnostics_mod public :: prt_mass, prt_minmax, ppme, fv_diag_init_gn, z_sum, sphum_ll_fix, eqv_pot, qcly0, gn public :: prt_height, prt_gb_nh_sh, interpolate_vertical, rh_calc, get_height_field, dbzcalc public :: max_vv, get_vorticity, max_uh - public :: max_vorticity, max_vorticity_hy1, bunkers_vector, helicity_relative_CAPS + public :: max_vorticity, max_vorticity_hy1, bunkers_vector, helicity_relative_CAPS public :: cs3_interpolator, get_height_given_pressure - + integer, parameter :: MAX_PLEVS = 31 #ifdef FEWER_PLEVS integer :: nplev = 11 !< # of levels in plev interpolated standard level output, with levels given by levs. 11 by default @@ -126,7 +126,7 @@ module fv_diagnostics_mod !Constants #include - + contains subroutine fv_diag_init(Atm, axes, Time, npx, npy, npz, p_ref) @@ -375,7 +375,7 @@ subroutine fv_diag_init(Atm, axes, Time, npx, npy, npz, p_ref) call mpp_error(NOTE, "fv_diag_plevs_nml: k500 set incorrectly, finding closest entry in plevs") k500 = minloc(abs(levs(1:nplev)-500),1) endif - + nplev_ave = 0 if (levs_ave(1) > 0 ) then do i=1,MAX_PLEVS-1 @@ -388,7 +388,7 @@ subroutine fv_diag_init(Atm, axes, Time, npx, npy, npz, p_ref) nplev_ave = nplev_ave + 1 enddo end if - + id_plev = diag_axis_init('plev', levs(1:nplev)*1.0, 'mb', 'z', & 'actual pressure level', direction=-1, set_name="dynamics") @@ -684,7 +684,7 @@ subroutine fv_diag_init(Atm, axes, Time, npx, npy, npz, p_ref) id_qs_dt_phys = register_diag_field ( trim(field), 'qs_dt_phys', axes(1:3), Time, & 'snow water tendency from physics', 'kg/kg/s', missing_value=missing_value ) if (id_qs_dt_phys > 0) allocate (Atm(n)%phys_diag%phys_qs_dt(isc:iec,jsc:jec,npz)) - + idiag%id_T_dt_sg = register_diag_field ( trim(field), 'T_dt_sg', axes(1:3), Time, & 'temperature tendency from 2dz subgrid mixing', 'K/s', missing_value=missing_value ) idiag%id_u_dt_sg = register_diag_field ( trim(field), 'u_dt_sg', axes(1:3), Time, & @@ -735,7 +735,7 @@ subroutine fv_diag_init(Atm, axes, Time, npx, npy, npz, p_ref) if ((id_v_dt_nudge > 0) .and. (.not. allocated(Atm(n)%nudge_diag%nudge_v_dt))) then allocate (Atm(n)%nudge_diag%nudge_v_dt(isc:iec,jsc:jec,npz)) Atm(n)%nudge_diag%nudge_v_dt(isc:iec,jsc:jec,1:npz) = 0.0 - endif + endif endif ! @@ -1321,7 +1321,7 @@ subroutine fv_diag_init(Atm, axes, Time, npx, npy, npz, p_ref) call fv_diag_column_init(Atm(n), yr_init, mo_init, dy_init, hr_init, do_diag_debug, do_diag_sonde, sound_freq) - + end subroutine fv_diag_init @@ -1677,7 +1677,7 @@ subroutine fv_diag(Atm, zvir, Time, print_freq) if (id_delp_dt_nudge > 0) used=send_data(id_delp_dt_nudge, Atm(n)%nudge_diag%nudge_delp_dt(isc:iec,jsc:jec,1:npz), Time) if (id_u_dt_nudge > 0) used=send_data(id_u_dt_nudge, Atm(n)%nudge_diag%nudge_u_dt(isc:iec,jsc:jec,1:npz), Time) if (id_v_dt_nudge > 0) used=send_data(id_v_dt_nudge, Atm(n)%nudge_diag%nudge_v_dt(isc:iec,jsc:jec,1:npz), Time) - + if(id_c15>0 .or. id_c25>0 .or. id_c35>0 .or. id_c45>0) then call wind_max(isc, iec, jsc, jec ,isd, ied, jsd, jed, Atm(n)%ua(isc:iec,jsc:jec,npz), & Atm(n)%va(isc:iec,jsc:jec,npz), ws_max, Atm(n)%domain) @@ -1878,7 +1878,7 @@ subroutine fv_diag(Atm, zvir, Time, print_freq) call interpolate_z(isc, iec, jsc, jec, npz, 550., a3, wk, a2) used = send_data( id_pv550K, a2, Time) endif - deallocate ( a3 ) + deallocate ( a3 ) if (prt_minmax) call prt_maxmin('PV', wk, isc, iec, jsc, jec, 0, 1, 1.) endif @@ -3281,7 +3281,7 @@ subroutine fv_diag(Atm, zvir, Time, print_freq) allocate(a3(isc:iec,jsc:jec,nplev_ave)) if (allocated(a2)) deallocate(a2) allocate(a2(isc:iec,nplev_ave+1)) - + !Use logp to interpolate temperature do k=1,nplev_ave+1 a2(:,k) = log(real(levs_ave(k))*100.) @@ -3332,7 +3332,7 @@ subroutine fv_diag(Atm, zvir, Time, print_freq) deallocate(a2) deallocate(a3) !!! END LAYER AVERAGED DIAGNOSTICS - + if (allocated(a2)) deallocate(a2) allocate ( a2(isc:iec,jsc:jec) ) @@ -5739,7 +5739,7 @@ subroutine max_vorticity(is, ie, js, je, ng, km, zvir, sphum, delz, q, hydrostat maxvort(i,j) = max(maxvort(i,j),vort(i,j,k)) else maxvort(i,j) = max(maxvort(i,j),vort(i,j,k)) - EXIT K_LOOP + EXIT K_LOOP endif enddo K_LOOP ! maxvorthy1(i,j)=max(maxvorthy1(i,j),vort(i,j,km)) @@ -5796,7 +5796,7 @@ subroutine max_uh(is, ie, js, je, ng, km, zvir, sphum, uphmax,uphmin, & if(w(i,j,k).lt.0)then uh(i,j) = 0. EXIT K_LOOP - endif + endif uh(i,j) = vort(i,j,k)*w(i,j,k)*(zh(i) - z_bot) below(i) = .false. ! Compute mean winds below z_top @@ -5815,15 +5815,15 @@ subroutine max_uh(is, ie, js, je, ng, km, zvir, sphum, uphmax,uphmin, & EXIT K_LOOP endif enddo K_LOOP - if (uh(i,j) > uphmax(i,j)) then + if (uh(i,j) > uphmax(i,j)) then uphmax(i,j) = uh(i,j) - elseif (uh(i,j) < uphmin(i,j)) then + elseif (uh(i,j) < uphmin(i,j)) then uphmin(i,j) = uh(i,j) - endif + endif enddo ! i-loop enddo ! j-loop - end subroutine max_uh + end subroutine max_uh subroutine max_vv(is,ie,js,je,npz,ng,up2,dn2,pe,w) ! !INPUT PARAMETERS: @@ -5835,14 +5835,14 @@ subroutine max_vv(is,ie,js,je,npz,ng,up2,dn2,pe,w) do j=js,je do i=is,ie do k=3,npz - if (pe(i,k,j) >= 100.e2) then + if (pe(i,k,j) >= 100.e2) then up2(i,j) = max(up2(i,j),w(i,j,k)) dn2(i,j) = min(dn2(i,j),w(i,j,k)) endif enddo enddo enddo - end subroutine max_vv + end subroutine max_vv !####################################################################### diff --git a/tools/fv_nggps_diag.F90 b/tools/fv_nggps_diag.F90 index 08e891f78..5456cb876 100644 --- a/tools/fv_nggps_diag.F90 +++ b/tools/fv_nggps_diag.F90 @@ -1,22 +1,22 @@ !*********************************************************************** -!* GNU Lesser General Public License +!* GNU Lesser General Public License !* !* This file is part of the FV3 dynamical core. !* -!* The FV3 dynamical core is free software: you can redistribute it +!* The FV3 dynamical core is free software: you can redistribute it !* and/or modify it under the terms of the !* GNU Lesser General Public License as published by the -!* Free Software Foundation, either version 3 of the License, or +!* Free Software Foundation, either version 3 of the License, or !* (at your option) any later version. !* -!* The FV3 dynamical core is distributed in the hope that it will be -!* useful, but WITHOUT ANYWARRANTY; without even the implied warranty -!* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +!* The FV3 dynamical core is distributed in the hope that it will be +!* useful, but WITHOUT ANYWARRANTY; without even the implied warranty +!* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. !* See the GNU General Public License for more details. !* !* You should have received a copy of the GNU Lesser General Public -!* License along with the FV3 dynamical core. +!* License along with the FV3 dynamical core. !* If not, see . !*********************************************************************** @@ -78,7 +78,7 @@ module fv_nggps_diags_mod use field_manager_mod, only: MODEL_ATMOS use fv_diagnostics_mod, only: range_check, dbzcalc,max_vv,get_vorticity, & max_uh,max_vorticity,bunkers_vector, & - helicity_relative_CAPS,max_vorticity_hy1 + helicity_relative_CAPS,max_vorticity_hy1 use fv_arrays_mod, only: fv_atmos_type use mpp_domains_mod, only: domain1d, domainUG #ifdef MULTI_GASES @@ -208,7 +208,7 @@ subroutine fv_nggps_diag_init(Atm, axes, Time) windvect = 0. endif - if( Atm(n)%flagstruct%hydrostatic ) then + if( Atm(n)%flagstruct%hydrostatic ) then id_pfhy = register_diag_field ( trim(file_name), 'pfhy', axes(1:3), Time, & 'hydrostatic pressure', 'pa', missing_value=missing_value ) if (id_pfhy>0) then @@ -351,7 +351,7 @@ subroutine fv_nggps_diag_init(Atm, axes, Time) if( id_wmaxup > 0) then allocate ( up2(isco:ieco,jsco:jeco) ) kstt_wup = nlevs+1; kend_wup = nlevs+1 - nlevs = nlevs + 1 + nlevs = nlevs + 1 endif id_wmaxdn = register_diag_field ( trim(file_name), 'wmaxdn',axes(1:2), Time, & 'Max hourly downdraft velocity', 'm/s', missing_value=missing_value ) @@ -468,7 +468,7 @@ subroutine fv_nggps_diag(Atm, zvir, Time) !--- A-GRID WINDS if ( .not. allocated(buffer_dyn)) allocate(buffer_dyn(isco:ieco,jsco:jeco,nlevs)) if(id_ua > 0) call store_data(id_ua, Atm(n)%ua(isco:ieco,jsco:jeco,:), Time, kstt_ua, kend_ua) - + if(id_va > 0) call store_data(id_va, Atm(n)%va(isco:ieco,jsco:jeco,:), Time, kstt_va, kend_va) !--- set up 3D wind vector @@ -525,7 +525,7 @@ subroutine fv_nggps_diag(Atm, zvir, Time) if( Atm(n)%flagstruct%hydrostatic .and. id_pfhy > 0 ) then do k=1,npzo do j=jsco,jeco - do i=isco,ieco + do i=isco,ieco wk(i,j,k) = 0.5 *(Atm(n)%pe(i,k,j)+Atm(n)%pe(i,k+1,j)) enddo enddo @@ -538,7 +538,7 @@ subroutine fv_nggps_diag(Atm, zvir, Time) if(id_delp > 0 .or. ((.not. Atm(n)%flagstruct%hydrostatic) .and. id_pfnh > 0)) then do k=1,npzo do j=jsco,jeco - do i=isco,ieco + do i=isco,ieco wk(i,j,k) = Atm(n)%delp(i,j,k)*(1.-sum(Atm(n)%q(i,j,k,2:Atm(n)%flagstruct%nwat))) enddo enddo @@ -634,7 +634,7 @@ subroutine fv_nggps_diag(Atm, zvir, Time) ! 'rdgas=',rdgas,'grav=',grav,'stndrd_atmos_lapse=',stndrd_atmos_lapse,rdgas/grav*stndrd_atmos_lapse call store_data(id_ps, wk, Time, kstt_ps, kend_ps) endif - + if( id_hs > 0) then do j=jsco,jeco do i=isco,ieco @@ -653,7 +653,7 @@ subroutine fv_nggps_diag(Atm, zvir, Time) endif deallocate ( wk ) - !---u and v comp of storm motion, 0-1, 0-3km SRH + !---u and v comp of storm motion, 0-1, 0-3km SRH if ( id_ustm > 0 .or. id_vstm > 0 .or. id_srh01 > 0 .or. id_srh03 > 0) then if ( id_ustm > 0 .and. id_vstm > 0 .and. id_srh01 > 0 .and. id_srh03 > 0) then call bunkers_vector(isco,ieco,jsco,jeco,ngc,npzo,zvir,sphum,ustm,vstm, & @@ -696,12 +696,12 @@ subroutine fv_nggps_diag(Atm, zvir, Time) if ( id_maxvort02 > 0) then call store_data(id_maxvort02, maxvort02, Time, kstt_maxvort02, kend_maxvort02) endif - !--- max hourly hybrid lev 1 vert. vorticity + !--- max hourly hybrid lev 1 vert. vorticity if ( id_maxvorthy1 > 0) then call store_data(id_maxvorthy1, maxvorthy1, Time, kstt_maxvorthy1, kend_maxvorthy1) endif -! - !--- max hourly updraft velocity +! + !--- max hourly updraft velocity if ( id_wmaxup > 0) then call store_data(id_wmaxup, up2, Time, kstt_wup, kend_wup) endif @@ -709,7 +709,7 @@ subroutine fv_nggps_diag(Atm, zvir, Time) if ( id_wmaxdn > 0) then call store_data(id_wmaxdn, dn2, Time, kstt_wdn, kend_wdn) endif - !--- max hourly max 0-3km updraft helicity + !--- max hourly max 0-3km updraft helicity if ( .not.Atm(n)%flagstruct%hydrostatic .and. id_uhmax03 > 0) then call store_data(id_uhmax03, uhmax03, Time, kstt_uhmax03, kend_uhmax03) endif @@ -718,7 +718,7 @@ subroutine fv_nggps_diag(Atm, zvir, Time) if ( .not.Atm(n)%flagstruct%hydrostatic .and. id_uhmin03 > 0) then call store_data(id_uhmin03, uhmin03, Time, kstt_uhmin03, kend_uhmin03) endif -! +! !--- max hourly max 2-5km updraft helicity if ( .not.Atm(n)%flagstruct%hydrostatic .and. id_uhmax25 > 0) then call store_data(id_uhmax25, uhmax25, Time, kstt_uhmax25, kend_uhmax25) @@ -743,7 +743,7 @@ subroutine fv_nggps_tavg(Atm, Time_step_atmos,avg_max_length,zvir) real, save :: first_time = 0. integer, save :: kdtt = 0 real :: avg_max_length - real,dimension(:,:,:),allocatable :: vort + real,dimension(:,:,:),allocatable :: vort n = 1 ngc = Atm(n)%ng nq = size (Atm(n)%q,4) @@ -757,7 +757,7 @@ subroutine fv_nggps_tavg(Atm, Time_step_atmos,avg_max_length,zvir) !abort ! if(id_wmaxup > 0 .and. id_wmaxdn > 0 .and. id_uhmax03 > 0 .and. id_uhmin03 > 0 & - .and. id_uhmax25 > 0 .and. id_uhmin25 > 0 .and. id_maxvort01 > 0 & + .and. id_uhmax25 > 0 .and. id_uhmin25 > 0 .and. id_maxvort01 > 0 & .and. id_maxvorthy1 > 0 .and. id_maxvort02 > 0) then allocate ( vort(isco:ieco,jsco:jeco,npzo) ) if (first_call) then @@ -1003,7 +1003,7 @@ subroutine fv_dyn_bundle_setup(axes, dyn_bundle, fcst_grid, quilting, rc) endif do id = 1,num_axes - axis_length = get_axis_global_length(axes(id)) + axis_length = get_axis_global_length(axes(id)) allocate(axis_data(axis_length)) call get_diag_axis( axes(id), axis_name(id), units, long_name, cart_name, & direction, edges, Domain, DomainU, axis_data, & @@ -1369,7 +1369,7 @@ subroutine add_field_to_bundle(var_name,long_name,units,cell_methods, axes,dyn_g real(4),dimension(:,:), pointer :: temp_r2d logical, save :: first=.true. ! -!*** create esmf field +!*** create esmf field if( present(l3Dvector) ) then temp_r4d => windvect(1:3,isco:ieco,jsco:jeco,kstt:kend) call ESMF_LogWrite('create winde vector esmf field', ESMF_LOGMSG_INFO, rc=rc) @@ -1377,7 +1377,7 @@ subroutine add_field_to_bundle(var_name,long_name,units,cell_methods, axes,dyn_g line=__LINE__, & file=__FILE__)) & return ! bail out -!jw field = ESMF_FieldCreate(dyn_grid, temp_r4d, datacopyflag=ESMF_DATACOPY_VALUE, +!jw field = ESMF_FieldCreate(dyn_grid, temp_r4d, datacopyflag=ESMF_DATACOPY_VALUE, field = ESMF_FieldCreate(dyn_grid, temp_r4d, datacopyflag=ESMF_DATACOPY_REFERENCE, & gridToFieldMap=(/2,3/), ungriddedLBound=(/1,kstt/), ungriddedUBound=(/3,kend/), & name="windvector", indexFlag=ESMF_INDEX_DELOCAL, rc=rc) diff --git a/tools/fv_nudge.F90 b/tools/fv_nudge.F90 index 912745b09..75a92bf5a 100644 --- a/tools/fv_nudge.F90 +++ b/tools/fv_nudge.F90 @@ -1366,7 +1366,7 @@ subroutine fv_nwp_nudge_init(time, axes, npz, zvir, ak, bk, ts, phis, gridstruct call close_ncfile( ncid ) ! Note: definition of NCEP hybrid is p(k) = a(k)*1.E5 + b(k)*ps - if ( .not. using_merra2) then + if ( .not. using_merra2) then ! This is not needed for MERRA2 data ak0(:) = ak0(:) * 1.E5 endif