Update gsd/develop-chem from gsl/develop, bug fixes for uninitialized variables#84
Conversation
…elop_20201120 Update master from gsd/develop 2020/11/20
…tree/SM_Oct102020, to fix a crash from running GFDL MP with frac_Grid=T as well as restart reproducibility. Co-authored-with: Shrinivas Moorthi <shrinivas.moorthi@noaa.gov>
Bug fix in GFS_surface_composites.F90 from Moorthi
update with authoritative repo
…e_generic to the gmtb_scm_spec_sfc_flux scheme (fixes specified surface flux cases for SCM)
…date_thompson_mp_from_gsl_develop
…pp-physics into update_thompson_mp_from_gsl_develop
…l_develop Update Thompson MP and RUC LSM from gsl/develop
…ter_20210331 Update gsl/develop from master 2021/03/31
…into gsl_develop_chem_add_gocart
…m merge with gsl/develop
haiqinli
left a comment
There was a problem hiding this comment.
I agree with the bug fixes for uninitialized variables.
|
Why is there both a |
See NCAR#613 - good catch though! |
SamuelTrahanNOAA
left a comment
There was a problem hiding this comment.
The problems in this PR are all from upstream repositories, unrelated to the intent of this PR. Those problems should not hold up the PR, so I'm giving my approval.
| @@ -0,0 +1,354 @@ | |||
| module cires_orowam2017 | |||
There was a problem hiding this comment.
This file should be renamed so it differs from cires_orowam2017.f by more than just the fortran format extension (f vs. F90)
| ! initialization of selected | ||
| ! init gw-solvers (1,2,3,4) | ||
| ! initialization of ugwp_common_v0 | ||
| ! init gw-solvers (1,2) .. no UFS-funds for (3,4) tests |
There was a problem hiding this comment.
Do funding issues belong in source code comments?
| ! ####################################################################################### | ||
| #ifdef MPI | ||
| if (mpirank .eq. mpiroot) then | ||
| #endif | ||
| if (doGP_cldoptics_LUT) then | ||
| write (*,*) 'Reading RRTMGP shortwave cloud data (LUT) ... ' | ||
| status = nf90_inq_varid(ncid,'radliq_lwr',varID) |
There was a problem hiding this comment.
The code should check whether these call succeeded, and at least report that they failed. Otherwise, when a failure occurs, you'll get bad results without knowing why.
| ! Open file | ||
| status = nf90_open(trim(sw_gas_props_file), NF90_NOWRITE, ncid) | ||
|
|
||
| ! Read dimensions for k-distribution fields | ||
| status = nf90_inq_dimid(ncid, 'temperature', dimid) | ||
| status = nf90_inquire_dimension(ncid, dimid, len=ntemps) | ||
| status = nf90_inquire_dimension(ncid, dimid, len=ntempsSW) |
There was a problem hiding this comment.
The code should check the return status and report failures, not just ignore them.
| !>@brief These subroutines and modules execute the CIRES UGWP Version 0 | ||
| !>\defgroup ugwpv1_gsldrag_run Unified Gravity Wave Physics General Algorithm | ||
| !> @{ | ||
| !! The physics of NGWs in the UGWP framework (Yudin et al. 2018 \cite yudin_et_al_2018) is represented by four GW-solvers, which is introduced in Lindzen (1981) \cite lindzen_1981, Hines (1997) \cite hines_1997, Alexander and Dunkerton (1999) \cite alexander_and_dunkerton_1999, and Scinocca (2003) \cite scinocca_2003. The major modification of these GW solvers is represented by the addition of the background dissipation of temperature and winds to the saturation criteria for wave breaking. This feature is important in the mesosphere and thermosphere for WAM applications and it considers appropriate scale-dependent dissipation of waves near the model top lid providing the momentum and energy conservation in the vertical column physics (Shaw and Shepherd 2009 \cite shaw_and_shepherd_2009). In the UGWP-v0, the modification of Scinocca (2003) \cite scinocca_2003 scheme for NGWs with non-hydrostatic and rotational effects for GW propagations and background dissipation is represented by the subroutine \ref fv3_ugwp_solv2_v0. In the next release of UGWP, additional GW-solvers will be implemented along with physics-based triggering of waves and stochastic approaches for selection of GW modes characterized by horizontal phase velocities, azimuthal directions and magnitude of the vertical momentum flux (VMF). |
There was a problem hiding this comment.
Violates Fortran standard's line length limit of 132 characters. This will abort on some compilers (even for comments).
| !> @{ | ||
| !! The physics of NGWs in the UGWP framework (Yudin et al. 2018 \cite yudin_et_al_2018) is represented by four GW-solvers, which is introduced in Lindzen (1981) \cite lindzen_1981, Hines (1997) \cite hines_1997, Alexander and Dunkerton (1999) \cite alexander_and_dunkerton_1999, and Scinocca (2003) \cite scinocca_2003. The major modification of these GW solvers is represented by the addition of the background dissipation of temperature and winds to the saturation criteria for wave breaking. This feature is important in the mesosphere and thermosphere for WAM applications and it considers appropriate scale-dependent dissipation of waves near the model top lid providing the momentum and energy conservation in the vertical column physics (Shaw and Shepherd 2009 \cite shaw_and_shepherd_2009). In the UGWP-v0, the modification of Scinocca (2003) \cite scinocca_2003 scheme for NGWs with non-hydrostatic and rotational effects for GW propagations and background dissipation is represented by the subroutine \ref fv3_ugwp_solv2_v0. In the next release of UGWP, additional GW-solvers will be implemented along with physics-based triggering of waves and stochastic approaches for selection of GW modes characterized by horizontal phase velocities, azimuthal directions and magnitude of the vertical momentum flux (VMF). | ||
| !! | ||
| !! In UGWP-v0, the specification for the VMF function is adopted from the GEOS-5 global atmosphere model of GMAO NASA/GSFC, as described in Molod et al. (2015) \cite molod_et_al_2015 and employed in the MERRRA-2 reanalysis (Gelaro et al., 2017 \cite gelaro_et_al_2017). The Fortran subroutine \ref slat_geos5_tamp describes the latitudinal shape of VMF-function as displayed in Figure 3 of Molod et al. (2015) \cite molod_et_al_2015. It shows that the enhanced values of VMF in the equatorial region gives opportunity to simulate the QBO-like oscillations in the equatorial zonal winds and lead to more realistic simulations of the equatorial dynamics in GEOS-5 operational and MERRA-2 reanalysis products. For the first vertically extended version of FV3GFS in the stratosphere and mesosphere, this simplified function of VMF allows us to tune the model climate and to evaluate multi-year simulations of FV3GFS with the MERRA-2 and ERA-5 reanalysis products, along with temperature, ozone, and water vapor observations of current satellite missions. After delivery of the UGWP-code, the EMC group developed and tested approach to modulate the zonal mean NGW forcing by 3D-distributions of the total precipitation as a proxy for the excitation of NGWs by convection and the vertically-integrated (surface - tropopause) Turbulent Kinetic Energy (TKE). The verification scores with updated NGW forcing, as reported elsewhere by EMC researchers, display noticeable improvements in the forecast scores produced by FV3GFS configuration extended into the mesosphere. |
There was a problem hiding this comment.
Violates Fortran standard's line length limit of 132 characters. This will abort on some compilers (even for comments).
|
Thanks @SamuelTrahanNOAA - I will take note of the issues with the upstream code so that it will get fixed. |
Description
This PR updates gsd/develop-chem from gsl/develop (all commits except the ones listed in the following) and fixes a few bugs for uninitialized variables/weird logic in gsd/develop-chem that were discovered when adding debug regression tests to the existing chemistry tests (commits 59e8075, 6ac6272, 471a66a).
Following this PR, gsd/develop-chem will be renamed to gsl/develop-chem.
Associated PRs:
NOAA-GSL/GOCART#1
#84
NOAA-GSL/fv3atm#80
NOAA-GSL/ufs-weather-model#70
For regression testing, see NOAA-GSL/ufs-weather-model#70.