-
Notifications
You must be signed in to change notification settings - Fork 27
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
Adding code to convert the 2-D Wave Height and Wind Gust fields between Extended Schimdt Gnomonic (ESG) grid and Rotated LatLon (RLL) grid for rrfs-based 3drtma #71
Merged
guoqing-noaa
merged 1 commit into
NOAA-GSL:develop
from
GangZhao-NOAA:feature/esg_conversion_rtma
Sep 13, 2024
+10,675
−0
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
list(APPEND src_rll2esg | ||
mod_rtma_regrid.F90 | ||
rtma_regrid_rll2esg.F90) | ||
|
||
add_executable(rtma_regrid_rll2esg.exe ${src_rll2esg}) | ||
target_link_libraries(rtma_regrid_rll2esg.exe PRIVATE ${PROJECT_NAME}::pesglib2 | ||
PRIVATE bacio::bacio_4 | ||
PRIVATE g2::g2_4 | ||
PRIVATE g2tmpl::g2tmpl | ||
PRIVATE ip::ip_d | ||
PRIVATE sp::sp_d | ||
PRIVATE w3emc::w3emc_4 | ||
PRIVATE NetCDF::NetCDF_Fortran | ||
PRIVATE MPI::MPI_Fortran) | ||
if(OpenMP_Fortran_FOUND) | ||
target_link_libraries(rtma_regrid_rll2esg.exe PRIVATE OpenMP::OpenMP_Fortran) | ||
endif() | ||
list(APPEND ESG_CONVERSION_Targets rtma_regrid_rll2esg.exe) | ||
|
||
list(APPEND src_esg2rll | ||
mod_rtma_regrid.F90 | ||
rtma_regrid_esg2rll.F90) | ||
|
||
add_executable(rtma_regrid_esg2rll.exe ${src_esg2rll}) | ||
target_link_libraries(rtma_regrid_esg2rll.exe PRIVATE ${PROJECT_NAME}::pesglib2 | ||
PRIVATE bacio::bacio_4 | ||
PRIVATE g2::g2_4 | ||
PRIVATE g2tmpl::g2tmpl | ||
PRIVATE ip::ip_d | ||
PRIVATE sp::sp_d | ||
PRIVATE w3emc::w3emc_4 | ||
PRIVATE NetCDF::NetCDF_Fortran | ||
PRIVATE MPI::MPI_Fortran) | ||
if(OpenMP_Fortran_FOUND) | ||
target_link_libraries(rtma_regrid_esg2rll.exe PRIVATE OpenMP::OpenMP_Fortran) | ||
endif() | ||
list(APPEND ESG_CONVERSION_Targets rtma_regrid_esg2rll.exe) | ||
|
||
# if(ip_VERSION GREATER_EQUAL 4.0.0) | ||
# set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -DIP_V4") | ||
# endif() | ||
if(ip_VERSION LESS 4.0.0) | ||
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -DIP_V3") | ||
endif() | ||
|
||
install( | ||
TARGETS ${ESG_CONVERSION_Targets} | ||
EXPORT ${PROJECT_NAME}Exports | ||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} | ||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
list(APPEND src_esg_lib | ||
pkind.f90 | ||
pietc.f90 | ||
pietc_s.f90 | ||
pmat.f90 | ||
pmat2.f90 | ||
pmat4.f90 | ||
pmat5.f90 | ||
pfun.f90 | ||
psym2.f90 | ||
pesg.f90 | ||
pbswi.f90) | ||
|
||
set(module_dir "${CMAKE_CURRENT_BINARY_DIR}/include") | ||
add_library(pesglib2 STATIC ${src_esg_lib}) | ||
add_library(${PROJECT_NAME}::pesglib2 ALIAS pesglib2) | ||
# target_link_libraries(pesglib2 PUBLIC ${PROJECT_NAME}::ncio) | ||
set_target_properties(pesglib2 PROPERTIES Fortran_MODULE_DIRECTORY "${module_dir}") | ||
target_include_directories(pesglib2 PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include> | ||
$<INSTALL_INTERFACE:include>) | ||
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include DESTINATION ${CMAKE_INSTALL_PREFIX}) | ||
|
||
install( | ||
TARGETS pesglib2 | ||
EXPORT ${PROJECT_NAME}Exports | ||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} | ||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@GangZhao-NOAA Is that ok to also put the add_subdirectory line to the following foreach loop as for other tools?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TingLei-NOAA
Hi Ting,
Technically I agree with you that, by adding a line as following,
list(APPEND SUBLIST "RTMA_ESG_CONVERSION.fd/ESG_LIB")
then the add_subdirectory line you mentioned -- "add_subdirectory(rtma_esg_conversion.fd/esg_lib.fd)" could be put into the following foreach loop.
However, as you also mentioned, that foreach loop is used to define each application tool (ie., the executables). As for the "rtma_esg_conversion.fd/esg_lib.fd", it is a library which some RRFS tools could depend on and link to , but not a application tool. So I would like to put this line "add_subdirectory(rtma_esg_conversion.fd/esg_lib.fd)" here together with the declarations of the other libraries (e.g., baselib, gsi lib, etc.).
Thank you!
-Gang
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gang, Thanks a lot for your explanation. I totally agree. This also follows the existing layout of this project.