Skip to content

Commit

Permalink
Merge pull request NOAA-EMC#43 from climbfuji/update_gsd_develop_from…
Browse files Browse the repository at this point in the history
…_develop

Update gsd/develop from NOAA-EMC develop
  • Loading branch information
DomHeinzeller authored Aug 7, 2020
2 parents 0db9261 + 8ad85d3 commit 1c64e70
Show file tree
Hide file tree
Showing 32 changed files with 793 additions and 238 deletions.
7 changes: 7 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# This is a comment.
# Each line is a file pattern followed by one or more owners.
# Order is important; the last matching pattern takes the most
# precedence.

# The components are owned by their respective teams
/FV3/ @noaa-emc/fv3atm-team
56 changes: 56 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
name: Bug report
about: Create a report to fix bugs
title: ''
labels: bug
assignees: ''

---

## Description
Provide a clear and concise description of what the bug is.
Also give a description of how to fix the bug.


### To Reproduce:
What compilers/machines are you seeing this with?
Give explicit steps to reproduce the behavior.
1. do this
2. then that
3. then, oops, look at the bug


## Additional context
Add any other context about the problem here.
Directly reference any issues or PRs in this or other repositories that this is related to, and describe how they are related. Example:
- needs to be fixed also in noaa-emc/nems/issues/<issue_number>
- needed for noaa-emc/fv3atm/pull/<pr_number>


## Output

**Screenshots**
If applicable, drag and drop screenshots to help explain your problem.

**output logs**
If applicable, include relevant output logs.
Either drag and drop the entire log file here (if a long log) or

```
paste the code here (if a short section of log)
```

## Testing:

1. Have you tested the code changes? On what platforms?

2. Have you run regression test in ufs-weather-model or ufs-s2s-model with code changes?
- Will the baseline results change?
- If the baseline results change, is it expected? Please give brief explanation.

## Dependent PRs:

Directly reference any issues or PRs in this or other repositories that this is related to, and describe how they are related. Example:
- required to support noaa-emc/GFDL_atmos_cubed_sphere/issues/<issue_number>
- ncar/ccpp-physics/pull/<pr_number>
- associated ufs-weather-model/pull/<pr_number>
32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''

---

## Description
Provide a clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

## Solution
Add a clear and concise description of what solution you provide.

## Alternatives
If applicable, add a description of any alternative solutions or features you've considered.

## Testing:

1. Have you tested the code changes? On what platforms?
2. Have you run regression test in ufs-weather-model or ufs-s2s-model with code changes?
- Will the baseline results change?
- If yes, please give brief explanation of your code updates on the regression test.

## Dependent PRs:

Directly reference any issues or PRs in this or other repositories that this is related to, and describe how they are related. Example:
- required to support noaa-emc/GFDL_atmos_cubed_sphere/issues/<issue_number>
- ncar/ccpp-physics/pull/<pr_number>
- associated ufs-weather-model/pull/<pr_number>

37 changes: 37 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
## Description

(Instructions: this, and all subsequent sections of text should be removed and filled in as appropriate.)
Provide a detailed description of what this PR does.
What bug does it fix, or what feature does it add?
Is a change of answers expected from this PR?



### Issue(s) addressed

Link the issues to be closed with this PR, whether in this repository, or in another repository.
(Remember, issues should always be created before starting work on a PR branch!)
- fixes #<issue_number>
- fixes noaa-emc/fv3atm/issues/<issue_number>



## Testing

How were these changes tested?
What compilers / HPCs was it tested with?
Are the changes covered by regression tests? (If not, why? Do new tests need to be added?)
Have the ufs-weather-model regression test been run? On what platform?
- Will the code updates change regression test baseline? If yes, why? Please show the baseline directory below.
- Please commit the regression test log files in your ufs-weather-model branch


## Dependencies

If testing this branch requires non-default branches in other repositories, list them.
Those branches should have matching names (ideally)

Do PRs in upstream repositories need to be merged first?
If so add the "waiting for other repos" label and list the upstream PRs
- waiting on noaa-emc/nems/pull/<pr_number>
- waiting on noaa-emc/fv3atm/pull/<pr_number>
111 changes: 73 additions & 38 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
if(CCPP)
add_definitions(-DCCPP)
add_definitions(-DCCPP)
endif()

add_subdirectory(cpl)
add_subdirectory(gfsphysics)
add_subdirectory(ipd)
add_subdirectory(io)

# fv3core library

###############################################################################
### fv3dycore
###############################################################################
if(NOT CCPP)
set(FAST_PHYSICS_SRCS_F90 atmos_cubed_sphere/model/fv_cmp.F90)
set(FAST_PHYSICS_SRCS_F90 atmos_cubed_sphere/model/fv_cmp.F90)
endif()

add_library(
fv3core
fv3dycore

atmos_cubed_sphere/model/a2b_edge.F90
atmos_cubed_sphere/model/multi_gases.F90
Expand Down Expand Up @@ -61,37 +62,46 @@ add_library(
set_property(SOURCE atmos_cubed_sphere/model/nh_utils.F90 APPEND_STRING PROPERTY COMPILE_FLAGS "${FAST}")
set_property(SOURCE atmos_cubed_sphere/model/fv_mapz.F90 APPEND_STRING PROPERTY COMPILE_FLAGS "${FAST}")

target_link_libraries(fv3core PRIVATE fms)
target_link_libraries(fv3core PRIVATE gfsphysics)
target_link_libraries(fv3core PRIVATE ipd)
set_target_properties(fv3dycore PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/mod)
target_include_directories(fv3dycore PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/mod>)

target_include_directories(fv3core PRIVATE atmos_cubed_sphere ${ESMF_MOD})
target_link_libraries(fv3dycore PRIVATE fms)
target_link_libraries(fv3dycore PRIVATE gfsphysics)
target_link_libraries(fv3dycore PRIVATE ipd)
target_link_libraries(fv3dycore PRIVATE esmf)

# end of fv3core
target_include_directories(fv3dycore PRIVATE atmos_cubed_sphere ${ESMF_MOD})

###############################################################################
### ccpp
###############################################################################
if(CCPP)
add_subdirectory(ccpp)
add_subdirectory(ccpp/driver)
add_dependencies(gfsphysics ccpp ccppphys)
add_dependencies(ccppdriver ccpp ccppphys)
add_dependencies(ccppphys ccpp)

target_include_directories(fv3core PRIVATE ${CMAKE_BINARY_DIR}/FV3/ccpp/framework/src)
target_include_directories(fv3core PRIVATE ${CMAKE_BINARY_DIR}/FV3/ccpp/driver)
endif()
add_subdirectory(ccpp)
add_subdirectory(ccpp/driver)

add_dependencies(gfsphysics ccpp ccppphys)
add_dependencies(ccppdriver ccpp ccppphys)
add_dependencies(ccppphys ccpp)

set_target_properties(fv3core PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/mod)
target_include_directories(fv3core PUBLIC ${CMAKE_CURRENT_BINARY_DIR}/mod)
target_include_directories(fv3dycore PRIVATE ${CMAKE_BINARY_DIR}/FV3/ccpp/framework/src)
target_include_directories(fv3dycore PRIVATE ${CMAKE_BINARY_DIR}/FV3/ccpp/driver)

target_link_libraries(ccppphys PRIVATE sp::sp_d)
target_link_libraries(ccppphys PRIVATE w3nco::w3nco_d)
endif()

###############################################################################
### stochastic_physics
###############################################################################
# When specifying an out-of-tree source a binary directory must be explicitly specified.
#add_subdirectory(../stochastic_physics stochastic_physics)
add_subdirectory(stochastic_physics)

###############################################################################
### fv3atm
###############################################################################
add_library(
fv3cap
fv3atm

atmos_model.F90
fv3_cap.F90
Expand All @@ -100,21 +110,46 @@ add_library(
time_utils.F90
)

set_target_properties(fv3atm PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/mod)
target_include_directories(fv3atm PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/mod>)

if(CCPP)
target_include_directories(fv3cap PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/ccpp/driver/mod)
add_dependencies(fv3cap ccppdriver ccppphys)
target_include_directories(fv3atm PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/ccpp/driver/mod)
set(CCPP_LIBRARIES ccppdriver ccppphys ccpp)
add_dependencies(fv3atm ccppdriver ccppphys ccpp)
target_link_libraries(fv3atm PUBLIC ccppdriver ccppphys ccpp)
endif()
target_include_directories(fv3atm PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/stochastic_physics)
target_compile_definitions(fv3atm PRIVATE -DESMF_VERSION_MAJOR=${ESMF_VERSION_MAJOR})

target_link_libraries(fv3atm PUBLIC fms)
target_link_libraries(fv3atm PUBLIC cpl)
target_link_libraries(fv3atm PUBLIC gfsphysics)
target_link_libraries(fv3atm PUBLIC ipd)
target_link_libraries(fv3atm PUBLIC io)
target_link_libraries(fv3atm PUBLIC fv3dycore)
target_link_libraries(fv3atm PUBLIC stochastic_physics)
target_link_libraries(fv3atm PUBLIC stochastic_physics_wrapper)

target_link_libraries(fv3atm PUBLIC
nemsio::nemsio w3emc::w3emc_d w3nco::w3nco_d sp::sp_d bacio::bacio_4)
if(INLINE_POST)
target_link_libraries(fv3atm PUBLIC nceppost::nceppost)
endif()
target_include_directories(fv3cap PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/stochastic_physics)
target_compile_definitions(fv3cap PRIVATE -DESMF_VERSION_MAJOR=${ESMF_VERSION_MAJOR})
target_include_directories(fv3cap PRIVATE ${ESMF_MOD})

target_link_libraries(fv3cap PRIVATE fms)
target_link_libraries(fv3cap PRIVATE fv3cpl)
target_link_libraries(fv3cap PRIVATE gfsphysics)
target_link_libraries(fv3cap PRIVATE ipd)
target_link_libraries(fv3cap PRIVATE io)
target_link_libraries(fv3cap PRIVATE fv3core)
target_link_libraries(fv3cap PRIVATE stochastic_physics)

set_target_properties(fv3cap PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/mod)
target_include_directories(fv3cap PUBLIC ${CMAKE_CURRENT_BINARY_DIR}/mod)

target_link_libraries(fv3atm PUBLIC esmf)

###############################################################################
### Install
###############################################################################
install(
TARGETS fv3atm fv3dycore io ipd gfsphysics ${CCPP_LIBRARIES} cpl stochastic_physics stochastic_physics_wrapper
EXPORT fv3atm-config
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib)
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/mod DESTINATION ${CMAKE_INSTALL_PREFIX})

install(EXPORT fv3atm-config
DESTINATION lib/cmake
)

2 changes: 1 addition & 1 deletion atmos_cubed_sphere
Loading

0 comments on commit 1c64e70

Please sign in to comment.