Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementation of CCPP timestep_init and timestep_final phases #217

Merged
merged 13 commits into from
Jan 8, 2021

Conversation

climbfuji
Copy link
Collaborator

@climbfuji climbfuji commented Dec 18, 2020

Description

This PR contains the following changes:

  • replace calls to CCPP step time_vary with timestep_init in atmos_model.F90, add call to CCPP step timestep_final
  • update ccpp/driver/CCPP_driver.F90 with calls to CCPP timestep_init and timestep_final
  • add h2o_def.f and ozne_def. to ccpp_prebuild_config.py
  • update of gfsphysics/GFS_layer/GFS_typedefs.F90: cleanup work for o3 and h2o physics (required by the updates to the CCPP time vary physics)
  • update metadata in gfsphysics/GFS_layer/GFS_typedefs.meta for the above changes, and clean up the index used for the surface wind enhancement due to convection in the phy_f2d array (use proper index, not just the last entrry in the array)

Issue(s) addressed

See ufs-community/ufs-weather-model#337.

Testing

See ufs-community/ufs-weather-model#337.

Dependencies

ufs-community/ufs-weather-model#337
#217
NCAR/ccpp-physics#534
NCAR/ccpp-framework#344
NOAA-EMC/GFDL_atmos_cubed_sphere#47

…atm; cleanup work in GFS_typedefs for o3 and h2o physics as a result of the changes to the time vary physics in CCPP
… ccpp-framework and ccpp-physics for code review and testing
@climbfuji climbfuji marked this pull request as ready for review December 28, 2020 17:34
@climbfuji
Copy link
Collaborator Author

I am opening this PR for review. I will have to pull in updates from NOAA-EMC develop before it is the turn for this PR (I am only aware of the "Remove IPD" PR). But the code changes itself should be final.

@climbfuji
Copy link
Collaborator Author

Should the changes below be better in the ccpp "time_vary" step rather than a separate section in atmos_model.F90?

I thought about it. Right now, the CCPP steps in ccpp_driver.F90 are as simple as possible, just call the physics with our without threading. On the other hand, there is already quite some logic around copying data from certain arrays to certain arrays in this part of atmos_model.F90. Therefore the newly added section fits better in atmos_model.F90.

We can think about moving more of this logic into ccpp_driver.F90 in the future, but just doing it for the few newly added lines doesn't seem to be appropriate to me. And this will be easier and cleaner once all the remaining IPD code fragments are gone.

@junwang-noaa
Copy link
Collaborator

junwang-noaa commented Dec 31, 2020 via email

@climbfuji
Copy link
Collaborator Author

I am sorry but I disagree. At the very moment when you put DDTs (e.g. Diag=GFS_diag_type) and DDT-specific routines (e.g. Diag%zero) into physics code (e.g. the time_vary steps), then you break the design of interoperable physics. Because other host models have not business with the DDTs, they don't know about it and they don't have to. It is up to the host model (which also handles the memory, when to write out stuff, etc), and not the physics to decide when to clear buckets! Whether the code stays in atmos_model.F90 or ccpp_driver.F90 doesn't matter (but it should be made consistent with all the other code, which currently sits in atmos_model.F90), but it needs to stay out of the physics to maintain interoperability.

@climbfuji
Copy link
Collaborator Author

I am sorry but I disagree. At the very moment when you put DDTs (e.g. Diag=GFS_diag_type) and DDT-specific routines (e.g. Diag%zero) into physics code (e.g. the time_vary steps), then you break the design of interoperable physics. Because other host models have not business with the DDTs, they don't know about it and they don't have to. It is up to the host model (which also handles the memory, when to write out stuff, etc), and not the physics to decide when to clear buckets! Whether the code stays in atmos_model.F90 or ccpp_driver.F90 doesn't matter (but it should be made consistent with all the other code, which currently sits in atmos_model.F90), but it needs to stay out of the physics to maintain interoperability.

By the way, all this is clearly spelled out in the CCPP design documents and requirements, it's not me making this up.

@junwang-noaa
Copy link
Collaborator

junwang-noaa commented Dec 31, 2020 via email

@climbfuji
Copy link
Collaborator Author

Well, it is the GFS physics that produces the GFS_diag_type fields, so GFS_time_vary subroutine should handle the pre/post GFS diag fields. So can you explain how putting GFS phsyics specific "GFS_diag_type" in GFS_time_vary breaks the interoperable physics? My understanding is that GFS_diag_type fields (e.g. total precip) are computed in GFS physics, not in atmos_model, let me know if this is not the case. It seems to me CCPP does allow diag fields in specific physics code, but it does not have the capability to handle bucket yet. I am a little surprised if CCPP is designed to be that, can you point me to the CCPP design document for physics diagnostic fields? thanks.

It's actually quite simple. DDTs that are entirely internal to the physics (e.g. the RRTMGP-internal types or the RRTMG-internal types sfcfsw_type etc) are supported. That's because the physics themselves know how to populate them and get data back to host-model supplied arrays (by doing the necessary data massaging in the interstitial schemes). And they are entirely defined in the physics themselves and don't require any knowledge about the host model. This is the definition of interoperability and host-model independence.

DDTs that are introduced by the host model are not supported. Why? Because every single model that wants to use the routines has to define these DDTs in their host model, which doesn't make sense. Why should someone introduce a GFS_intdiag_type DDT in their host model for storing data like total precip, if they already have a variable for it. They could store total precip as a standard Fortran array, or as a constituent of one of their own DDTs. Some models generate all their variables based on a host model registry and then use it through accessors. All of these can work with CCPP w/o problems as long as we stick to standard Fortran variables (character, integer, real, ...) that get passed from the host model to the physics.

So how does this work with the GFS DDTs, for example? Note that GFS_typedefs.meta has standard names for the individual constituents of the DDTs, for example geopotential_at_interface = constituent phii of the GFS_statein_type. The physics ask for geopotential_at_interface and because GFS_typedefs.meta has a full description of the GFS_statein_type DDT structure, the code generator can pass GFS_Data(nb)%Statein%phii to schemes in the radiation or physics groups that are looking for geopotential_at_interface with any local name. For the time_vary group, which runs over all blocks at once, the code generator creates a temporary variable phii_local in the cap, which gets assigned all the non-contiguous chunks of data in GFS_Data(:)%Statein%phii, then runs the time_vary physics with phii_local and updates GFS_Data(:)%Statein%phii after the call (if necessary, depending on the intent).

Bottom line is: you can pass each and every constituent of a GFS DDT to the physics as long as it is either a Fortran standard type or a derived data type that is defined by the physics themselves (e.g. sfcfsw_type). You can not pass DDTs that are defined by the host model (and not in the physics), because this breaks interoperability. If you want to populate diagnostic fields, that's fine, you can do that by passing GFS_Data(...)%Intdiag%totprcp to the physics by simply asking for variable accumulated_lwe_thickness_of_precipitation_amount in the physics metadata files.

Again, resetting diagnostic buckets - where the entire logic that controls the definition of the buckets, when they are supposed to be cleared and when they are supposed to be written out (or averaged or whatever), resides in the host model - is not the business of the physics.

And yes, the original time_vary group is a special group which contains code that doesn't belong into the physics and code that does belong there, and these PRs are an attempt to separate those.

@SMoorthi-emc
Copy link
Contributor

SMoorthi-emc commented Dec 31, 2020 via email

@climbfuji
Copy link
Collaborator Author

It appears that everything is getting too complicated and too confusing. Frustrating!

I encourage you to take a look at the updated physics routines, in particular gcycle.F90 to see how much cleaner and less confusing the code has become by removing the dependency on the GFS DDTs.

@junwang-noaa
Copy link
Collaborator

junwang-noaa commented Dec 31, 2020 via email

@climbfuji
Copy link
Collaborator Author

I am confused, the model physics interface GFS_time_vary is created by CCPP, and the DDT diag accumulation fields (e.g. total precip) are supported and computed in CCPP, which are accumulated from beginning of integration. I am saying that the bucket capability for physics accumulated fields should be added to the GFStime_vary as a variant accumulation fields. It should not be pushed to atmosphere where general dynamics, physics and coupled related subroutines stay. The bucket capability is not specific to host model GFS, any model can have an choice to get physics bucket accumulatin fields or instead of non bucket accumulation fields. it is just a variant of accumulation, I don't understand why CCPP only allows non bucket accumulation. Also I am not asking to call DDT%zero, you can have a subroutine in GFS*_time_vary with an argument list of accumulated fields so that these fields can have an opportunity to be zeroed out, it's physics' responsibility (should also be internal to physics), not atmosphere's to zero out physics output fields, unless CCPP will not handle any accumulated fields.

Well, that's not how it works. The bucket clearing is done by calling the Diag%zero routine, and currently we do not have a smart mechanism to instruct CCPP to handle diagnostics (this is currently worked on and should become available in 2021). I don't want to manually do this in the physics unless absolutely necessary, in particular because GFS developers are used to adding/modifying buckets in the %zero type-bound procedures in GFS_typedefs.F90.

So here is my suggestion: we move the code that I added to atmos_model.F90 into ccpp_driver.F90 so that atmos_model.F90 stays clean, and once we have the extended diagnostic capabilities in CCPP, we switch to those and remove the bucket clearing code in ccpp_driver.F90.

@climbfuji
Copy link
Collaborator Author

@junwang-noaa I moved the code to clear diagnostic buckets using GFS DDT-bound procedures from atmos_model.F90 to CCPP_driver.F90, as discussed in this PR and by email. Please have a look. Thanks!

@climbfuji
Copy link
Collaborator Author

Ready to merge.

@DusanJovic-NOAA
Copy link
Collaborator

@grantfirl @junwang-noaa @SMoorthi-emc please review/approve this PR

@climbfuji climbfuji removed the request for review from grantfirl January 8, 2021 18:29
@DusanJovic-NOAA DusanJovic-NOAA merged commit ae4c8bf into NOAA-EMC:develop Jan 8, 2021
DomHeinzeller pushed a commit to NOAA-GSL/fv3atm that referenced this pull request Feb 23, 2021
* Fix for updating stochastic physics on separate time-step. (NOAA-EMC#199)

This bug fix allows the random patterns in the stochastic physics persist the for a period of time (defined as SKEBINT,SPPTINT, etc.) before calculating new patterns.
The fix is to move the allocation of the saved variables into the init section of stochastic_physics_wrapper, and remove the deallocates in the run section.

* Bug fixes in (1) running with frac_grid=T and GFDL MP and (2) restarting with frac_grid=T (NOAA-EMC#204)

* -- Pointing to Moorthi's modifications in ccpp/physics, which fixed the crash when running GFDL MP with frac_grid=T;
-- Not setting fice to zero in order to leave lake ice untouched;
-- Restart in the coupled model with the default physics is reproducible, if bad water temperature is only filtered at initial time;
Co-authored-with: Shrinivas Moorthi <shrinivas.moorthi@noaa.gov>
Co-authored-with: Denise Worthen <Denise.Worthen@noaa.gov>

* jedi-ufs with ccpp-physics submodule update (contains NOAA-EMC#201) (NOAA-EMC#211)

* updated CMakeLists.txt
* Changes for JEDI linking/control
* Update .gitmodules and submodule pointer for ccpp-physics for code review and testing
* Revert change to .gitmodules and update submodule pointer for ccpp-physics

Co-authored-by: Mark Potts <Mark.Potts@noaa.gov>

* Final-final GFS v16 updates / restart reproducibility bugfixes (NOAA-EMC#212)

* updates the submodule pointer for ccpp-physics for the final-final (!) GFS v16 physics updates
* fixes a bug in io/FV3GFS_io.F90 to obtain restart reproducibility for uncoupled and coupled runs - contributed by @SMoorthi-emc

Co-authored-by: Shrinivas.Moorthi <Shrinivas.Moorthi@noaa.gov>

* RRTMGP coupling to Thompson MP in ccpp-physics (NOAA-EMC#208)

* Updated physics. Added infrastructure to FV3 to handle new GP capabilities. Thompson MP, LW scattering, Use of LW-jacobian to update surface tendencies.
* Some small changes to work with physics improvements to RRTMGP.
* RRTMGP working with Thompson MP.
* Updated .gitmodules.
* Updated physics. New interstitials.
* Synced with NCAR/master
* Updated ccpp-physics
* Updated physics submodule.
* Cleanup
* Update physics
* Updated physics submodule pointer.
* Updated physics submodule hash.

* Minor bug fixes to CCPP UGWP (update submodule pointer for ccpp-physics) (NOAA-EMC#216)

Update the submodule pointer for ccpp-physics for minor bugfixes in CCPP's Unified Gravity Wave Drag parameterization.

* Remove IPD (step 1) (NOAA-EMC#215)

Remove all IPD source files that are not needed to compile with CCPP. Update gfsphysics/CMakeLists.txt and gfsphysics/GFS_layer/GFS_driver.F90 so that the code compiles after removing IPD sources.

Also: update submodule pointer for GFDL_atmos_cubed_sphere to include PR NOAA-EMC/GFDL_atmos_cubed_sphere#48 ("Removed use of mpp_node for use with FMS 2020.04").

* Update submodule pointers for ccpp-framework (ccpp_prebuild bugfix) and ccpp-physics (RRTMGP GFDL-MP bugfix) (NOAA-EMC#218)

Update the submodule pointers for ccpp-framework and ccpp-physics for the changes described in
NCAR/ccpp-framework#343 and NCAR/ccpp-physics#536.

* Remove unnecessary SIMD instruction sets from ccpp/CMakeLists.txt (NOAA-EMC#220)

* Remove additional/unnecessary SIMD instruction sets from ccpp/CMakeLists.txt

* Implementation of CCPP timestep_init and timestep_final phases (NOAA-EMC#217)

- replace calls to CCPP step `time_vary` with `timestep_init` in `atmos_model.F90`, add call to CCPP step `timestep_final` 
- update `ccpp/driver/CCPP_driver.F90` with calls to CCPP `timestep_init` and `timestep_final`
- add `h2o_def.f` and `ozne_def.` to `ccpp_prebuild_config.py`
- update of `gfsphysics/GFS_layer/GFS_typedefs.F90`: cleanup work for o3 and h2o physics (required by the updates to the CCPP time vary physics)
- update metadata in `gfsphysics/GFS_layer/GFS_typedefs.meta` for the above changes, and clean up the index used for the surface wind enhancement due to convection in the `phy_f2d` array (use proper index, not just the last entry in the array)

* add radiation_clouds_thompson_dependency in ccpp physics  (NOAA-EMC#225)

* using radiation_clouds_thompson_dependency ccpp physics branch
* point to ccpp master branch

* Remove IPD steps 3 and 5 (NOAA-EMC#224)

* Implementation of CCPP timestep_init and timestep_final phases in fv3atm; cleanup work in GFS_typedefs for o3 and h2o physics as a result of the changes to the time vary physics in CCPP
* Use proper index variable for surface wind enhancement due to convection in phy_f2d array in GFS_typedefs.{F90,meta}, move code to clear diagnostic buckets using GFS DDT bound procedures from atmos_model.F90 to CCPP_driver.F90
* First step of cleanup process: remove CCPP preprocessor directives, remove parts of unused IPD code, update cmake build system, Delete IPD source code, Replace IPD DDTs with GFS DDTs, Bugfix in atmos_model.F90; add missing call to GFS_externaldiag_populate, Move contents of gfsphysics/{CCPP_layer,GFS_layer} to ccpp/{data,driver}, entirely deleted IPD typedefs, Rename module GFS_driver to GFS_init
* Fix indentation in ccpp/data/CMakeLists.txt and ccpp/driver/CMakeLists.txt
* Add logic to set DYN32 depending on 32BIT setting
* Pass preprocessor directive GFS_TYPES to dycore to enable use of GFS data types
* Compile GFS_diagnostics.F90 without optimization, this leads to out of memory errors on wcoss_dell_p3

* Add CCPP rrtmgp fix (NOAA-EMC#237)

* ccpp physics merged with top of master
* point back to ccpp master branch

* Update develop from NOAA-GSL: RUC ice, MYNN sfclay, stochastic land perturbations (NOAA-EMC#239)

* Update .gitmodules and submodule pointers for ccpp-framework and ccpp-physics for gsl/develop branch
* RUC ice for gsl/develop (replaces #54 and #56) (#60) Implementation of RUC LSM ice model in CCPP
* Fix bug in gfsphysics/GFS_layer/GFS_typedefs.F90 from merge
* Remove lsm_ruc_sfc_sice from suite FV3_GSD_v0_unified_ugwp_suite and update submodule pointer for ccpp-physics
* Remove sfc_sice from ccpp/suites/suite_FV3_GSD_v0_unified_ugwp_suite.xml
* Update gsl/develop from develop 2020/12/08 (#61)
* Fix for updating stochastic physics on separate time-step. (NOAA-EMC#199)
This bug fix allows the random patterns in the stochastic physics persist the for a period of time (defined as SKEBINT,SPPTINT, etc.) before calculating new patterns.
The fix is to move the allocation of the saved variables into the init section of stochastic_physics_wrapper, and remove the deallocates in the run section.
* Bug fixes in (1) running with frac_grid=T and GFDL MP and (2) restarting with frac_grid=T (NOAA-EMC#204)
* -- Pointing to Moorthi's modifications in ccpp/physics, which fixed the crash when running GFDL MP with frac_grid=T;
-- Not setting fice to zero in order to leave lake ice untouched;
-- Restart in the coupled model with the default physics is reproducible, if bad water temperature is only filtered at initial time;
Co-authored-with: Shrinivas Moorthi <shrinivas.moorthi@noaa.gov>
Co-authored-with: Denise Worthen <Denise.Worthen@noaa.gov>
* Revert change to .gitmodules and update submodule pointer for ccpp-physics
* Update submodule pointer for ccpp-physics - MYNN surface layer updates and bugfixes (#63)
* Land stochastic perturbations (wrapper PR for #65) (#68)
* Move initialization of stochastic physics after the physics
initialization in CCPP.
* Add albedo variables to land perturbations with lndp_type=2 option. Change to accommodate soil perturbations with RUC LSM.
* Max/min soil moisture variables are introduced via GFS_Control_type
variables instead of through the use of namelist_soilveg*. This is a
more flexible way for different LSMs.
* Added pores and resid variables for max/min soil moisture to GFS_typedefs.f90.
* Remove tracer_sanitizer from all suites and from CCPP prebuild config
* Add namelist option to apply land surface perturbations at every time step, clean up stochastic_physics/stochastic_physics_wrapper.F90
* Stochastic land perturbations: add roughness length over land to the perturbed variables (#70)
* Added roughness length over land to the perturbed variables.
* Bugfix in gfsphysics/GFS_layer/GFS_typedefs.F90: remove Diag%cldcov, in particular the reset call because the variable is not allocated
* Update .gitmodules and submodule pointer for GFDL_atmos_cubed_sphere for code review and testing
* Revert change to .gitmodules for ccpp-physics, update submodule pointer for ccpp-physics
* Revert change to .gitmodules and update submodule pointer for GFDL_atmos_cubed_sphere
Co-authored-by: DomHeinzeller <58610420+DomHeinzeller@users.noreply.github.com>
Co-authored-by: Phil Pegion <38869668+pjpegion@users.noreply.github.com>
Co-authored-by: shansun6 <48043606+shansun6@users.noreply.github.com>
Co-authored-by: tanyasmirnova <tanya.smirnova@noaa.gov>

* Dycore change to add an option to zero-gradient BC for height advection and change dz_min as a namelist input (NOAA-EMC#232)

* Point dycore to a personal branch
* Point to new version of dycore
* Update the dycore version
* Update the dycore version
* Point to NOAA-EMC dev/emc dycore branch

* Remove gnumake build remnants, change v16beta to v16 (NOAA-EMC#234)

* Remove gnumake files
* Replace v16beta with v16 for all CCPP suites
* Remove unused CCPP_INCLUDE_DIRS/CCPP_LIB_DIRS from ccpp/CMakeLists.txt

* Move LSM vegetation lookup tables into CCPP, clean up RUC snow cover on ice initialization  (remove IPD step 2) (NOAA-EMC#244)

* Move LSM vegetation lookup tables into CCPP, clean up RUC snow cover on ice initialization
* Revert change to .gitmodules and update submodule pointer for ccpp-physics

* UGWP v0 v1 combined (NOAA-EMC#241)

* .gitmodules/gsl atmos-cubed cccp-fram cccp/physics
* update fv3atm from NOAA-EMC Jan 9
* new suite_FV3_GFS_v16b_ugwpv1.xml and modifications Jan 11/2021
* Added new logical flag do_ugwp_v0_nst_only which allows non-stationary drag from ugwp_v0 to be run with GSL drag suite
* Fix formatting in ccpp/data/GFS_typedefs.*
* Clean up allocation of arrays in ccpp/data/GFS_typedefs.F90, add active attribute (pass 1) to ccpp/data/GFS_typedefs.meta, strip trailing whitespaces from both
* Update and cleanup of metadata for UGWPv0, UGWPv1, drag suite
* Reorganize UGWP diagnostic variables in data/GFS_typedefs.{F90,meta}
* Bugfix for uninitialized data in ccpp/data/GFS_typedefs.F90
* Update submodule pointer for ccpp-physics
* Allocate 3d diagnostic arrays as dummy arrays if not used

Co-authored-by: valery.yudin <valery.yudin@noaa.gov>
Co-authored-by: Michael Toy <michael.toy@noaa.gov>

* SDF for GFSv16 with Thompson (NOAA-EMC#238)

* SDF for GFSv16 with Thompson
* Delete suite_FV3_GFS_v16beta_thompson.xml
* update to new commit of Thompson MP in ccpp physics

Co-authored-by: Phil Pegion <38869668+pjpegion@users.noreply.github.com>
Co-authored-by: shansun6 <48043606+shansun6@users.noreply.github.com>
Co-authored-by: Mark Potts <Mark.Potts@noaa.gov>
Co-authored-by: Shrinivas.Moorthi <Shrinivas.Moorthi@noaa.gov>
Co-authored-by: dustinswales <dustin.swales@noaa.gov>
Co-authored-by: Jun Wang <37633869+junwang-noaa@users.noreply.github.com>
Co-authored-by: XiaqiongZhou-NOAA <48254930+XiaqiongZhou-NOAA@users.noreply.github.com>
Co-authored-by: valery.yudin <valery.yudin@noaa.gov>
Co-authored-by: Michael Toy <michael.toy@noaa.gov>
Co-authored-by: XiaSun-NOAA <58949533+XiaSun-NOAA@users.noreply.github.com>
junwang-noaa added a commit that referenced this pull request Dec 13, 2021
* Update .gitmodules and submodule pointers for ccpp-framework and ccpp-physics for gsl/develop branch

* RUC ice for gsl/develop (replaces #54 and #56) (#60)

Implementation of RUC LSM ice model in CCPP

* Squash-merge climbfuji:rucice_gfsv16dzmin into gsl/develop

* Fix bug in gfsphysics/GFS_layer/GFS_typedefs.F90 from merge

* Remove lsm_ruc_sfc_sice from suite FV3_GSD_v0_unified_ugwp_suite and update submodule pointer for ccpp-physics

* Remove sfc_sice from ccpp/suites/suite_FV3_GSD_v0_unified_ugwp_suite.xml

* Update submodule pointer for ccpp-physics

* Revert change to .gitmodules and update submodule pointer for ccpp-physics

Co-authored-by: Dom Heinzeller <climbfuji@ymail.com>

* Update gsl/develop from develop 2020/12/08 (#61)

* Fix for updating stochastic physics on separate time-step. (#199)

This bug fix allows the random patterns in the stochastic physics persist the for a period of time (defined as SKEBINT,SPPTINT, etc.) before calculating new patterns.
The fix is to move the allocation of the saved variables into the init section of stochastic_physics_wrapper, and remove the deallocates in the run section.

* Bug fixes in (1) running with frac_grid=T and GFDL MP and (2) restarting with frac_grid=T (#204)

* -- Pointing to Moorthi's modifications in ccpp/physics, which fixed the crash when running GFDL MP with frac_grid=T;
-- Not setting fice to zero in order to leave lake ice untouched;
-- Restart in the coupled model with the default physics is reproducible, if bad water temperature is only filtered at initial time;
Co-authored-with: Shrinivas Moorthi <shrinivas.moorthi@noaa.gov>
Co-authored-with: Denise Worthen <Denise.Worthen@noaa.gov>

* Revert change to .gitmodules and update submodule pointer for ccpp-physics

Co-authored-by: Phil Pegion <38869668+pjpegion@users.noreply.github.com>
Co-authored-by: shansun6 <48043606+shansun6@users.noreply.github.com>

* Update submodule pointer for ccpp-physics - MYNN surface layer updates and bugfixes (#63)

* Land stochastic perturbations (wrapper PR for #65) (#68)

* Move initialization of stochastic physics after the physics
initialization in CCPP.
* Add albedo variables to land perturbations with lndp_type=2 option. Change to accommodate soil perturbations with RUC LSM.

* Max/min soil moisture variables are introduced via GFS_Control_type
variables instead of through the use of namelist_soilveg*. This is a
more flexible way for different LSMs.

* Added pores and resid variables for max/min soil moisture to GFS_typedefs.f90.

* Remove tracer_sanitizer from all suites and from CCPP prebuild config

* Add namelist option to apply land surface perturbations at every time step, clean up stochastic_physics/stochastic_physics_wrapper.F90

Co-authored-by: tanyasmirnova <tanya.smirnova@noaa.gov>

* Stochastic land perturbations: add roughness length over land to the perturbed variables (#70)

* Added roughness length over land to the perturbed variables.
* Bugfix in gfsphysics/GFS_layer/GFS_typedefs.F90: remove Diag%cldcov, in particular the reset call because the variable is not allocated

Co-authored-by: Dom Heinzeller <climbfuji@ymail.com>

* Update gsl/develop from develop 2021/02/22 (#73)

* Fix for updating stochastic physics on separate time-step. (#199)

This bug fix allows the random patterns in the stochastic physics persist the for a period of time (defined as SKEBINT,SPPTINT, etc.) before calculating new patterns.
The fix is to move the allocation of the saved variables into the init section of stochastic_physics_wrapper, and remove the deallocates in the run section.

* Bug fixes in (1) running with frac_grid=T and GFDL MP and (2) restarting with frac_grid=T (#204)

* -- Pointing to Moorthi's modifications in ccpp/physics, which fixed the crash when running GFDL MP with frac_grid=T;
-- Not setting fice to zero in order to leave lake ice untouched;
-- Restart in the coupled model with the default physics is reproducible, if bad water temperature is only filtered at initial time;
Co-authored-with: Shrinivas Moorthi <shrinivas.moorthi@noaa.gov>
Co-authored-with: Denise Worthen <Denise.Worthen@noaa.gov>

* jedi-ufs with ccpp-physics submodule update (contains #201) (#211)

* updated CMakeLists.txt
* Changes for JEDI linking/control
* Update .gitmodules and submodule pointer for ccpp-physics for code review and testing
* Revert change to .gitmodules and update submodule pointer for ccpp-physics

Co-authored-by: Mark Potts <Mark.Potts@noaa.gov>

* Final-final GFS v16 updates / restart reproducibility bugfixes (#212)

* updates the submodule pointer for ccpp-physics for the final-final (!) GFS v16 physics updates
* fixes a bug in io/FV3GFS_io.F90 to obtain restart reproducibility for uncoupled and coupled runs - contributed by @SMoorthi-emc

Co-authored-by: Shrinivas.Moorthi <Shrinivas.Moorthi@noaa.gov>

* RRTMGP coupling to Thompson MP in ccpp-physics (#208)

* Updated physics. Added infrastructure to FV3 to handle new GP capabilities. Thompson MP, LW scattering, Use of LW-jacobian to update surface tendencies.
* Some small changes to work with physics improvements to RRTMGP.
* RRTMGP working with Thompson MP.
* Updated .gitmodules.
* Updated physics. New interstitials.
* Synced with NCAR/master
* Updated ccpp-physics
* Updated physics submodule.
* Cleanup
* Update physics
* Updated physics submodule pointer.
* Updated physics submodule hash.

* Minor bug fixes to CCPP UGWP (update submodule pointer for ccpp-physics) (#216)

Update the submodule pointer for ccpp-physics for minor bugfixes in CCPP's Unified Gravity Wave Drag parameterization.

* Remove IPD (step 1) (#215)

Remove all IPD source files that are not needed to compile with CCPP. Update gfsphysics/CMakeLists.txt and gfsphysics/GFS_layer/GFS_driver.F90 so that the code compiles after removing IPD sources.

Also: update submodule pointer for GFDL_atmos_cubed_sphere to include PR NOAA-EMC/GFDL_atmos_cubed_sphere#48 ("Removed use of mpp_node for use with FMS 2020.04").

* Update submodule pointers for ccpp-framework (ccpp_prebuild bugfix) and ccpp-physics (RRTMGP GFDL-MP bugfix) (#218)

Update the submodule pointers for ccpp-framework and ccpp-physics for the changes described in
NCAR/ccpp-framework#343 and NCAR/ccpp-physics#536.

* Remove unnecessary SIMD instruction sets from ccpp/CMakeLists.txt (#220)

* Remove additional/unnecessary SIMD instruction sets from ccpp/CMakeLists.txt

* Implementation of CCPP timestep_init and timestep_final phases (#217)

- replace calls to CCPP step `time_vary` with `timestep_init` in `atmos_model.F90`, add call to CCPP step `timestep_final` 
- update `ccpp/driver/CCPP_driver.F90` with calls to CCPP `timestep_init` and `timestep_final`
- add `h2o_def.f` and `ozne_def.` to `ccpp_prebuild_config.py`
- update of `gfsphysics/GFS_layer/GFS_typedefs.F90`: cleanup work for o3 and h2o physics (required by the updates to the CCPP time vary physics)
- update metadata in `gfsphysics/GFS_layer/GFS_typedefs.meta` for the above changes, and clean up the index used for the surface wind enhancement due to convection in the `phy_f2d` array (use proper index, not just the last entry in the array)

* add radiation_clouds_thompson_dependency in ccpp physics  (#225)

* using radiation_clouds_thompson_dependency ccpp physics branch
* point to ccpp master branch

* Remove IPD steps 3 and 5 (#224)

* Implementation of CCPP timestep_init and timestep_final phases in fv3atm; cleanup work in GFS_typedefs for o3 and h2o physics as a result of the changes to the time vary physics in CCPP
* Use proper index variable for surface wind enhancement due to convection in phy_f2d array in GFS_typedefs.{F90,meta}, move code to clear diagnostic buckets using GFS DDT bound procedures from atmos_model.F90 to CCPP_driver.F90
* First step of cleanup process: remove CCPP preprocessor directives, remove parts of unused IPD code, update cmake build system, Delete IPD source code, Replace IPD DDTs with GFS DDTs, Bugfix in atmos_model.F90; add missing call to GFS_externaldiag_populate, Move contents of gfsphysics/{CCPP_layer,GFS_layer} to ccpp/{data,driver}, entirely deleted IPD typedefs, Rename module GFS_driver to GFS_init
* Fix indentation in ccpp/data/CMakeLists.txt and ccpp/driver/CMakeLists.txt
* Add logic to set DYN32 depending on 32BIT setting
* Pass preprocessor directive GFS_TYPES to dycore to enable use of GFS data types
* Compile GFS_diagnostics.F90 without optimization, this leads to out of memory errors on wcoss_dell_p3

* Add CCPP rrtmgp fix (#237)

* ccpp physics merged with top of master
* point back to ccpp master branch

* Update develop from NOAA-GSL: RUC ice, MYNN sfclay, stochastic land perturbations (#239)

* Update .gitmodules and submodule pointers for ccpp-framework and ccpp-physics for gsl/develop branch
* RUC ice for gsl/develop (replaces #54 and #56) (#60) Implementation of RUC LSM ice model in CCPP
* Fix bug in gfsphysics/GFS_layer/GFS_typedefs.F90 from merge
* Remove lsm_ruc_sfc_sice from suite FV3_GSD_v0_unified_ugwp_suite and update submodule pointer for ccpp-physics
* Remove sfc_sice from ccpp/suites/suite_FV3_GSD_v0_unified_ugwp_suite.xml
* Update gsl/develop from develop 2020/12/08 (#61)
* Fix for updating stochastic physics on separate time-step. (#199)
This bug fix allows the random patterns in the stochastic physics persist the for a period of time (defined as SKEBINT,SPPTINT, etc.) before calculating new patterns.
The fix is to move the allocation of the saved variables into the init section of stochastic_physics_wrapper, and remove the deallocates in the run section.
* Bug fixes in (1) running with frac_grid=T and GFDL MP and (2) restarting with frac_grid=T (#204)
* -- Pointing to Moorthi's modifications in ccpp/physics, which fixed the crash when running GFDL MP with frac_grid=T;
-- Not setting fice to zero in order to leave lake ice untouched;
-- Restart in the coupled model with the default physics is reproducible, if bad water temperature is only filtered at initial time;
Co-authored-with: Shrinivas Moorthi <shrinivas.moorthi@noaa.gov>
Co-authored-with: Denise Worthen <Denise.Worthen@noaa.gov>
* Revert change to .gitmodules and update submodule pointer for ccpp-physics
* Update submodule pointer for ccpp-physics - MYNN surface layer updates and bugfixes (#63)
* Land stochastic perturbations (wrapper PR for #65) (#68)
* Move initialization of stochastic physics after the physics
initialization in CCPP.
* Add albedo variables to land perturbations with lndp_type=2 option. Change to accommodate soil perturbations with RUC LSM.
* Max/min soil moisture variables are introduced via GFS_Control_type
variables instead of through the use of namelist_soilveg*. This is a
more flexible way for different LSMs.
* Added pores and resid variables for max/min soil moisture to GFS_typedefs.f90.
* Remove tracer_sanitizer from all suites and from CCPP prebuild config
* Add namelist option to apply land surface perturbations at every time step, clean up stochastic_physics/stochastic_physics_wrapper.F90
* Stochastic land perturbations: add roughness length over land to the perturbed variables (#70)
* Added roughness length over land to the perturbed variables.
* Bugfix in gfsphysics/GFS_layer/GFS_typedefs.F90: remove Diag%cldcov, in particular the reset call because the variable is not allocated
* Update .gitmodules and submodule pointer for GFDL_atmos_cubed_sphere for code review and testing
* Revert change to .gitmodules for ccpp-physics, update submodule pointer for ccpp-physics
* Revert change to .gitmodules and update submodule pointer for GFDL_atmos_cubed_sphere
Co-authored-by: DomHeinzeller <58610420+DomHeinzeller@users.noreply.github.com>
Co-authored-by: Phil Pegion <38869668+pjpegion@users.noreply.github.com>
Co-authored-by: shansun6 <48043606+shansun6@users.noreply.github.com>
Co-authored-by: tanyasmirnova <tanya.smirnova@noaa.gov>

* Dycore change to add an option to zero-gradient BC for height advection and change dz_min as a namelist input (#232)

* Point dycore to a personal branch
* Point to new version of dycore
* Update the dycore version
* Update the dycore version
* Point to NOAA-EMC dev/emc dycore branch

* Remove gnumake build remnants, change v16beta to v16 (#234)

* Remove gnumake files
* Replace v16beta with v16 for all CCPP suites
* Remove unused CCPP_INCLUDE_DIRS/CCPP_LIB_DIRS from ccpp/CMakeLists.txt

* Move LSM vegetation lookup tables into CCPP, clean up RUC snow cover on ice initialization  (remove IPD step 2) (#244)

* Move LSM vegetation lookup tables into CCPP, clean up RUC snow cover on ice initialization
* Revert change to .gitmodules and update submodule pointer for ccpp-physics

* UGWP v0 v1 combined (#241)

* .gitmodules/gsl atmos-cubed cccp-fram cccp/physics
* update fv3atm from NOAA-EMC Jan 9
* new suite_FV3_GFS_v16b_ugwpv1.xml and modifications Jan 11/2021
* Added new logical flag do_ugwp_v0_nst_only which allows non-stationary drag from ugwp_v0 to be run with GSL drag suite
* Fix formatting in ccpp/data/GFS_typedefs.*
* Clean up allocation of arrays in ccpp/data/GFS_typedefs.F90, add active attribute (pass 1) to ccpp/data/GFS_typedefs.meta, strip trailing whitespaces from both
* Update and cleanup of metadata for UGWPv0, UGWPv1, drag suite
* Reorganize UGWP diagnostic variables in data/GFS_typedefs.{F90,meta}
* Bugfix for uninitialized data in ccpp/data/GFS_typedefs.F90
* Update submodule pointer for ccpp-physics
* Allocate 3d diagnostic arrays as dummy arrays if not used

Co-authored-by: valery.yudin <valery.yudin@noaa.gov>
Co-authored-by: Michael Toy <michael.toy@noaa.gov>

* SDF for GFSv16 with Thompson (#238)

* SDF for GFSv16 with Thompson
* Delete suite_FV3_GFS_v16beta_thompson.xml
* update to new commit of Thompson MP in ccpp physics

Co-authored-by: Phil Pegion <38869668+pjpegion@users.noreply.github.com>
Co-authored-by: shansun6 <48043606+shansun6@users.noreply.github.com>
Co-authored-by: Mark Potts <Mark.Potts@noaa.gov>
Co-authored-by: Shrinivas.Moorthi <Shrinivas.Moorthi@noaa.gov>
Co-authored-by: dustinswales <dustin.swales@noaa.gov>
Co-authored-by: Jun Wang <37633869+junwang-noaa@users.noreply.github.com>
Co-authored-by: XiaqiongZhou-NOAA <48254930+XiaqiongZhou-NOAA@users.noreply.github.com>
Co-authored-by: valery.yudin <valery.yudin@noaa.gov>
Co-authored-by: Michael Toy <michael.toy@noaa.gov>
Co-authored-by: XiaSun-NOAA <58949533+XiaSun-NOAA@users.noreply.github.com>

* Remove inconsistencies in computation of air density with Thompson MP (#74)

* Update .gitmodules and submodule pointer for ccpp-physics for code review and testing

* Revert change to .gitmodules and update submodule pointer for ccpp-physics

* Update thompson mp 20210213 (#567) for gsl/develop (#75)

* Add logical convert_dry_rho for Thompson MP, hardcoded to false
* Initialize all variables to NaN in ccpp-physics in DEBUG mode
* Update submodule pointer for ccpp-physics

* Revert change to .gitmodules and update submodule pointer for ccpp-framework and ccpp-physics

* &gfs_physics_nml print_diff_pgr=.true. will print per-timestep pgr change stats

* point to sam's repository for atmos_cubed_sphere

* Add units and lat/lon to per-timestep pgr stats

* Rebase atmos_cubed_sphere to NOAA-GFDL dev/emc branch

* Print mean pgr change as hPa/hr and other pgr data as bars.

* Remove changes from atmos_cubed_sphere and simplify atmos_model.F90 changes.

* print mean abs change instead of mean change in pgr

* Update .gitmodules and submodule pointers for ccpp-framework and ccpp-physics for code review and testing

* Revert change to .gitmodules and update submodule pointers for ccpp-framework and ccpp-physics

* clarify one print

* More 3D diagnostic tendencies (#76)

Add diagnostic tendencies for all tracers. Move all d*3dt variables into a 4D sparse array stored as `dtend(i,k,dtidx(tracer,process))` to reduce memory usage.

* Fix incorrect units in dtend metadata (#82)

* Fix incorrect units in dtend metadata

* Make the tracer tendency units mandatory.

* Add SO2 tendency units (#86)

* Update .gitmodules and submodule pointers for ccpp-framework and ccpp-physics

* Update submodule pointer for ccpp-physics

* Revert change to .gitmodules and update submodule pointer for ccpp-framework and ccpp-physics

* dtend: add missing tendencies and fix bugs in convection tendencies (#92)

* Fix incorrect units in dtend metadata

* Point to corresponding ccpp/physics branch

* fixes to dtend support:

1. Store rtg (AKA clw AKA qtr) instead of gq0 in DCNV and SCNV
pre/post for schemes that use convective transport. Tracers handled
solely by convective transport (ones not in rtg) are reported as
convective transport tendencies. Tendencies for variables in rtg are
reported as dcnv and scnv tendencies.

2. Report TKE tendencies from gfs v16 PBL.

3. Add diagnostic tendencies to drag_suite

4. Only report rayleigh damping tendencies if rayleigh damping is enabled

5. List all possible diagnostic tendencies, even if they are not
enabled. In the output, label them "selected" or "disabled."

6. Add phys_tend to the fv3_rap suite.

* Merge gsl/develop into ccpp/physics

* Add phys_tend to suite_FV3_GSD_SAR and remove some debug prints

* Remove some debug prints and commented-out code.

* Correct error in dtend variable availability list print.

* Enable convtrans diagnostic tendencies for number concentrations and qrimef.

* Disable cnvtrans diagnostic tendencies for schemes that do their own diagnostic tendency reporting.

* Point to gsl repositories

* Update .gitmodules for code review and regression testing

* Formatting changes in ccpp/data/GFS_typedefs.F90

* Update submodule pointer for ccpp-physics

* Update submodule pointer for ccpp-physics

* Point update_gsl_develop_from_develop_20210531 to NOAA-GSL branches of ccpp/physics and ccpp/framework

* GF aerosols updates and tunings

* GF aerosol updates and tunings from physics

* Update .gitmodules and submodule pointer for ccpp-physics for code review and testing

* Update submodule pointer for ccpp-physics

* Update submodule pointer for ccpp-physics

* Update submodule pointer for ccpp-physics

* Make aod_gf and cactiv_m work appriopriately for restarts
Minor code cleanup

* Add missing metadata for new GF arrays

* Bug fix in ccpp/driver/GFS_restart.F90 for GF

* Update submodule pointer for ccpp-physics

* Revert change to .gitmodules and update submodule pointer for ccpp-physics

* Add missing active attribute for aod_gf in ccpp/data/GFS_typedefs.meta

* Update submodule pointer for ccpp-physics

* Update submodule pointer for ccpp-physocs

* Change name of sfc_name2(39) from 'weasd' to 'weasdl' in io/FV3GFS_io.F90

* Revert change to .gitmodules and update submodule pointers for ccpp-framework and ccpp-physics

* Update .gitmodules and submodule pointer for ccpp-physics for code review and testing

* Update .gitmodules and submodule pointer for ccpp-physics for code review and testing

* Revert change to .gitmodules and update submodule pointer for ccpp-physics

* Changed dimensions of variables tsnow_land and sncovr_ice from
horizontal_dimension to horizontal_loop_extent

* Added Flake to two suites: FV3_GSD_v0 and FV3_HRRR.

* Update .gitmodules and submodule pointer for ccpp-physics for code review and testing

* Update submodule pointer for ccpp-physics

* Revert change to .gitmodules and update submodule pointer for ccpp-physics

* Update to ccpp/data/GFS_typedefs.meta following CCPP standard names update

* Update submodule pointer for ccpp-physics

* Revert change to .gitmodules and update submodule pointer for ccpp-physics

* Revert change to .gitmodules and update submodule pointers for ccpp-physics and ccpp-framework

* Revert change to .gitmodules and update submodule pointers for ccpp-framework and ccpp-physics

* Turn on GF aerosol-awareness
Tune clwdet (cloud water detrainment)
Make evfact (evaporation factor) and radiation factor scale-aware

* Update .gitmodules and submodule pointers for ccpp-framework and ccpp-physics for code review and testing

* Switch back to NCAR ccpp-framework main, abandon NOAA-GSL fork

* Update submodule pointer for ccpp-physics

* Update submodule pointer for ccpp/physics

* Update .gitmodules and submodule pointer for ccpp-physics for code review and testing

* Update submodule pointer for ccpp-physics

* Revert change to .gitmodules and update submodule pointer for ccpp-physics

* Update submodule pointer for ccpp-physics

* Revert change to .gitmodules and update submodule pointer for ccpp-physics

* Update .gitmodules and submodule pointer for ccpp-physics for code review aand testing

* Update submodule pointer for ccpp-physics

* Revert change to .gitmodules and update submodule pointer for ccpp-physics

* Update .gitmodules and submodule pointer for ccpp-physics for code review and testing

* Update submodule pointer for ccpp-physics

* Revert .gitmodules and update submodule pointer for ccpp-physics

* Revert change to .gitmodules and update submodule pointer for ccpp-physics

* Update .gitmodules and submodule pointer for ccpp-physics for code review and testing

* Revert .gitmodules and update submodule pointer for ccpp-physics

* Update CCPP metadata and several suite defiition files for new GSL regression tests

* Bug fix for compiling with Intel on macOS, remove clutter from stdout in io/FV3GFS_io.F90

* Update .gitmodules and submodule pointer for ccpp-physics for code review and testing

* Rename GSL suites to RAP suites, add new RAP suites

* rename suite FV3_GSD_v0 to FV3_RAP_noah_sfcdiff_cires_ugwp, delete suite FV3_SAR

* Update submodule pointer for ccpp-physics

* Address reviewer comments

* Update submodule pointer for ccpp-physics

* Revert .gitmodules and update submodule pointer for ccpp-physics

Co-authored-by: DomHeinzeller <58610420+DomHeinzeller@users.noreply.github.com>
Co-authored-by: Phil Pegion <38869668+pjpegion@users.noreply.github.com>
Co-authored-by: shansun6 <48043606+shansun6@users.noreply.github.com>
Co-authored-by: tanyasmirnova <tanya.smirnova@noaa.gov>
Co-authored-by: tanyasmirnova <38667904+tanyasmirnova@users.noreply.github.com>
Co-authored-by: Mark Potts <Mark.Potts@noaa.gov>
Co-authored-by: Shrinivas.Moorthi <Shrinivas.Moorthi@noaa.gov>
Co-authored-by: dustinswales <dustin.swales@noaa.gov>
Co-authored-by: Jun Wang <37633869+junwang-noaa@users.noreply.github.com>
Co-authored-by: XiaqiongZhou-NOAA <48254930+XiaqiongZhou-NOAA@users.noreply.github.com>
Co-authored-by: valery.yudin <valery.yudin@noaa.gov>
Co-authored-by: Michael Toy <michael.toy@noaa.gov>
Co-authored-by: XiaSun-NOAA <58949533+XiaSun-NOAA@users.noreply.github.com>
Co-authored-by: samuel.trahan <Samuel.Trahan@noaa.gov>
Co-authored-by: Samuel Trahan (NOAA contractor) <39415369+SamuelTrahanNOAA@users.noreply.github.com>
Co-authored-by: hannah barnes <hannah.barnes@noaa.gov>
Co-authored-by: Hannah C Barnes <38660891+hannahcbarnes@users.noreply.github.com>
SamuelTrahanNOAA pushed a commit to SamuelTrahanNOAA/fv3atm that referenced this pull request Jun 13, 2022
* Option to build coupled model
* fix in build.sh
* update modulefiles for orion, hera and wcoss to load pio.  Make PIO optional in CMakeLists.txt if not building S2S
* FMS needs to be linked in MOM6 objects. Add 32BIT and S2S check
* add S2S option to MAKE_OPT
* Add standard s2s tests
* add CICE_IO option (default: NetCDF). Add MOM6 solo executable option (default: OFF) MOM6 library and NUOPC cap are 2 separate entities.
* add debug flags for MOM6 and CICE from @MinsukJi-NOAA
* add debug modulefiles for hera, orion and wcoss_dell_p3
* enable VERBOSE on build only when requested.  Remove -warn flags from CMEPS and MOM6 as they drown out any error messages.  The warnings should be resolved at the upstream repos.  When building with -DDEBUG=ON, set CMAKE_BUILD_TYPE=Debug.

Co-authored-by: Dusan Jovic <dusan.jovic@noaa.gov>
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.

4 participants