Skip to content

Commit

Permalink
Use FVCOM lake surface conditions
Browse files Browse the repository at this point in the history
New program fvcom_to_FV3 takes lake surface data generated by FVCOM
and replaces the corresponding variables in the surface file created by chgres_cube.

Input data to fvcom_to_FV3 needs to be in netcdf format and already horizontally 
interpolated to the model grid.  Some QC is done within the code to create a 
minimum lake ice value of 15%.

The code is strongly based upon work done by Eric James (GSL)
and Ming Hu (GSL) to get FVCOM surface conditions into HRRRv4.

PR #158.
  • Loading branch information
dmwright526 authored Sep 29, 2020
1 parent dbcad06 commit 8bef319
Show file tree
Hide file tree
Showing 8 changed files with 3,093 additions and 0 deletions.
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

0 comments on commit 8bef319

Please sign in to comment.