Skip to content

NSSL merge#18

Merged
jderrico-noaa merged 157 commits intoufs-community:gsl/developfrom
jderrico-noaa:nssl_merge
May 17, 2024
Merged

NSSL merge#18
jderrico-noaa merged 157 commits intoufs-community:gsl/developfrom
jderrico-noaa:nssl_merge

Conversation

@jderrico-noaa
Copy link
Collaborator

Merge code from NSSL's realtime branch into gsl/develop

Merge conflicts have been resolved, but no compiling/testing has been done yet.

mgduda and others added 30 commits September 21, 2020 17:49
This commit adds a copy of the SMIOL library source code in src/external/SMIOL,
and it updates recipes in Makefiles to build the SMIOL library and link it with
MPAS executables. At present, however, the SMIOL library is not actually used.
In order to isolate all code that is specific to the PIO library, this commit
adds pre-processing directives to include PIO-specific code only if
MPAS_PIO_SUPPORT is defined at build time. The top-level Makefile defines
MPAS_PIO_SUPPORT only if the PIO environment variable is defined.

Although it is now possible to compile MPAS without any reference to the PIO
library, doing so does not result in a useful model executable, since, e.g.,
no mesh information can be read during model bootstrapping.

Besides the obvious additions of #idef MPAS_PIO_SUPPORT directives, there are
several other aspects of the changes in this commit worth noting:

1) The optional 'io_system' argument to mpas_framework_init_phase2 and
   mpas_framework_finalize is an integer when MPAS_PIO_SUPPORT is not defined.

2) When MPAS_PIO_SUPPORT is not defined, MPAS_IO_OFFSET_KIND is defined as
   an I8KIND integer in mpas_io_types.inc.

3) The MPAS_*_FILLVAL constants have been provided with alternate defininitions
   when MPAS_PIO_SUPPORT is not defined.
If the PIO environment variable is not defined, the top-level Makefile defines
the pre-processing macro MPAS_SMIOL_SUPPORT; otherwise, MPAS_PIO_SUPPORT is
defined as before.
Still to do:
1) Ensure that all cores compile
2) Remove debugging print statements from mpas_io.F
* framework/smiol-iocomm:
  Update SMIOL to 36e0f0e on io_comm branch
  WIP: Implement SMIOL
  If PIO is not available, define MPAS_SMIOL_SUPPORT in top-level Makefile
  Wrap all PIO-specific code in MPAS_PIO_SUPPORT preprocessing directives
  Add SMIOL library code in src/external/SMIOL, and add Makefile hooks
(Add back the io_comm changes on top of aggregation changes)

This reverts commit 18b7b91.
…icrophysics (adds refl. moment variables for rain, graupel, hail: zrw, zgw, zhw).

 Also added code to compute the composite and 1-km reflectivity for NSSL2M (not actually tested yet)
On case-insensitive filesystems, having the name of a build target the same as
a directory -- specifically, 'smiol' and 'SMIOL', respectively -- leads make
to infer that the target is already up to date. This is problematic in the case
of SMIOL, since the library will never be compiled.
  mpas_io_streams.F : pass ioformat to def_var
  mpas_io.F : add conditional to set deflate on variables if ioformat is netcdf4 (needs netcdf-4.7.4 or later)
MPAS Version 7.3

This minor release addresses one issue in the MPAS-Atmosphere model.

MPAS-Atmosphere:
----------------

* Update the checkout_data_files.sh script to use HTTPS rather than the
  unencrypted Git protocol when obtaining the MPAS-Data repository from GitHub.

* tag 'v7.3': (26 commits)
  Switch from unencrypted Git protocol to HTTPS when obtaining MPAS-Data repo
  Increment version number to 7.3
  Correct units and descriptions for GWDO fields var2d, con, oa[1-4], ol[1-4]
  Halo exchange inTropo in flood fill to find DT.
  Fix parallel reproducibility error in 'smstav' field
  Correct check on availability of dtheta_dt_mix when computing depv_dt_mix
  Fix bug in vertical interp of r.h. and s.h. when levels are given top-to-bottom
  Initialize qvb to zero before its first use in init_atm_case_squall_line
  Remove redundant mpas_pool_get_array calls for dtheta_dt_mp computation
  Use dt_dyn rather than dt_microp when computing dtheta_dt_mp
  Remove trailing whitespace and adjust indentation of dtheta_dt_mp computation
  Obtain 'rvord' from mpas_constants for computation of dtheta_dt_mp
  Increment version number to 7.2
  Calculate dtheta_dt_mp by finite difference around microphysics call.
  Update test for libpio to skip libpio.settings
  When calculating mosit air density, should use virtual T instead of T 	modified:   src/core_init_atmosphere/mpas_init_atm_cases.F
  Enable all runtime checks when DEBUG=true in gfortran build target
  Remove -m64 from all compiler flag sets in gfortran build target
  Change -O3 to -g in CXXFLAGS_DEBUG for gfortran build target
  Fix non-standard BOZ-literal integer constant in module_ra_cam_support
  ...
In order to enable the use of regional first-guess datasets given on
a Lambert conformal conic projection for regional MPAS-A ICs (including
terrain blending), LBCs, surface updates, several places in the init_atmosphere
core have been updated with code to set up Lambert conformal projections.

This commit also adds 'else' cases in the map projection set-up to catch
future uses of unsupported map projections.
…ecast/MPAS-Model into atmosphere/nssl_v7.3_smiol_lcc
! 'qg: ', qg_max, '(', imax_qg, ',', jmax_qg, ',', kmax_qg, ')', &
! 'ni: ', ni_max, '(', imax_ni, ',', jmax_ni, ',', kmax_ni, ')', &
! 'nr: ', nr_max, '(', imax_nr, ',', jmax_nr, ',', kmax_nr, ')'
! CALL wrf_debug(150, mp_debug)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Anders, I had this commented out in my runs too, due to crashes in debug mode.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@joeolson42 We don't use this, since we use the submodule (I commented out these lines there too). This change is fine.

! enddo
! ze_graupel(k) = SNGL(lamda4 / (pi5 * K_w) * eta)
! endif

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose none of these changes are really relevant if you remove this file and replace it with the submodule...

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exactly. Theses changes are also very specific to Ted's way of calculating reflectivity stats for MPAS, like max 1-hr 1-km DBZ. We'll leave them since they will just be deleted later.

Copy link
Collaborator

@joeolson42 joeolson42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve but I left many comments/requests for change.

Copy link

@tanyasmirnova tanyasmirnova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can merge and start testing after some small changes proposed in the comments.


do j = jts,jte
do i = its,ite
do k = 17,17
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jderrico-noaa and @joeolson42 Someone is try to sabotage the Thompson reflectivity statistics by only calculating reflectivity using the 17th model level.
@jderrico-noaa, if you want to fix this, please copy what is used by case ("mp_nssl2m") to be used by case ("mp_thompson") but change the two instances of -10._RKIND to -35._RKIND.

! 'qg: ', qg_max, '(', imax_qg, ',', jmax_qg, ',', kmax_qg, ')', &
! 'ni: ', ni_max, '(', imax_ni, ',', jmax_ni, ',', kmax_ni, ')', &
! 'nr: ', nr_max, '(', imax_nr, ',', jmax_nr, ',', kmax_nr, ')'
! CALL wrf_debug(150, mp_debug)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@joeolson42 We don't use this, since we use the submodule (I commented out these lines there too). This change is fine.

! enddo
! ze_graupel(k) = SNGL(lamda4 / (pi5 * K_w) * eta)
! endif

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exactly. Theses changes are also very specific to Ted's way of calculating reflectivity stats for MPAS, like max 1-hr 1-km DBZ. We'll leave them since they will just be deleted later.

@jderrico-noaa jderrico-noaa merged commit 5437ba6 into ufs-community:gsl/develop May 17, 2024
AndersJensen-NOAA pushed a commit to AndersJensen-NOAA/MPAS-Model that referenced this pull request Sep 16, 2024
guoqing-noaa added a commit to guoqing-noaa/MPAS-Model that referenced this pull request Mar 17, 2026
* add the capability to output at flexible time levels
* parse once and store the results for future use
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants