Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions sorc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ add_subdirectory(chgres_cube.fd)
add_subdirectory(orog_mask_tools.fd)
add_subdirectory(sfc_climo_gen.fd)
add_subdirectory(vcoord_gen.fd)
add_subdirectory(fvcom_tools.fd)
22 changes: 22 additions & 0 deletions sorc/fvcom_tools.fd/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
set(fortran_src
kinds.f90
module_ncio.f90
module_nwp_base.f90
module_nwp.f90
process_FVCOM.f90)


if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel)$")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -r8 -convert big_endian")
elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(GNU|Clang|AppleClang)$")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -ffree-line-length-0 -fdefault-real-8 -fconvert=big-endian")
endif()

set(exe_name fvcom_to_FV3)
add_executable(${exe_name} ${fortran_src})
target_link_libraries(
${exe_name}
MPI::MPI_Fortran
NetCDF::NetCDF_Fortran)

install(TARGETS ${exe_name} RUNTIME DESTINATION ${exec_dir})
48 changes: 48 additions & 0 deletions sorc/fvcom_tools.fd/kinds.f90
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
module kinds
!$$$ module documentation block
! . . . .
! module: kinds
! abstract: Module to hold specification kinds for variable declaration.
! This module is based on (copied from) Paul vanDelst's
! type_kinds module found in the community radiative transfer
! model
!
! module history log:
!
! Subroutines Included:
!
! Functions Included:
!
! remarks:
! The numerical data types defined in this module are:
! r_single - specification kind for single precision (4-byte) real variable
! i_kind - generic specification kind for default integer
! r_kind - generic specification kind for default floating point
!
!
! attributes:
! language: f90
!
!$$$ end documentation block
implicit none
private
!
! for name string
integer, parameter, public :: len_sta_name = 8

! Integer type definitions below

! Integer types
integer, parameter, public :: i_kind = 4
integer, parameter, public :: i_short = 2
integer, parameter, public :: i_byte = 1
! Real types
integer, parameter, public :: r_single = 4 ! single precision
integer, parameter, public :: r_kind = 8

!
real(r_single),parameter,public :: rmissing=-99999.0
real(i_kind),parameter,public :: imissing=-99999
real(r_kind),parameter,public :: drmissing=-99999.0

end module kinds
Loading