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

Expose remap_scalar and remap_dwinds to fv3-jedi #199

Merged
merged 9 commits into from
Aug 29, 2022
Merged
Show file tree
Hide file tree
Changes from 6 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
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ set_property(SOURCE model/fv_mapz.F90 APPEND_STRING PROPERTY COMPILE_FLAGS "${F
set_property(SOURCE tools/fv_diagnostics.F90 APPEND_STRING PROPERTY COMPILE_FLAGS "-O0")

set_target_properties(fv3 PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/fv3)
target_include_directories(fv3 INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include/fv3>
target_include_directories(fv3 PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include/fv3>
$<INSTALL_INTERFACE:include/fv3>)

target_include_directories(fv3 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
Expand Down
2 changes: 1 addition & 1 deletion tools/external_ic.F90
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ module external_ic_mod
! Include variable "version" to be written to log file.
#include<file_version.h>

public get_external_ic, get_cubed_sphere_terrain
public get_external_ic, get_cubed_sphere_terrain, remap_scalar, remap_dwinds

contains

Expand Down
16 changes: 8 additions & 8 deletions tools/fv_io.F90
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ subroutine fv_io_read_restart(fv_domain,Atm)
Atm(1)%Fv_restart_tile_is_open = open_file(Atm(1)%Fv_restart_tile, fname, "read", fv_domain, is_restart=.true.)
if (Atm(1)%Fv_restart_tile_is_open) then
call fv_io_register_restart(Atm(1))
call read_restart(Atm(1)%Fv_restart_tile, ignore_checksum=Atm(1)%flagstruct%ignore_rst_cksum)
call read_restart(Atm(1)%Fv_restart_tile)
call close_file(Atm(1)%Fv_restart_tile)
Atm(1)%Fv_restart_tile_is_open = .false.
endif
Expand All @@ -429,7 +429,7 @@ subroutine fv_io_read_restart(fv_domain,Atm)
Atm(1)%Tra_restart_is_open = open_file(Atm(1)%Tra_restart, fname, "read", fv_domain, is_restart=.true.)
if (Atm(1)%Tra_restart_is_open) then
call fv_io_register_restart(Atm(1))
call read_restart(Atm(1)%Tra_restart, ignore_checksum=Atm(1)%flagstruct%ignore_rst_cksum)
call read_restart(Atm(1)%Tra_restart)
call close_file(Atm(1)%Tra_restart)
Atm(1)%Tra_restart_is_open = .false.
else
Expand All @@ -442,7 +442,7 @@ subroutine fv_io_read_restart(fv_domain,Atm)
if (Atm(1)%Rsf_restart_is_open) then
Atm(1)%flagstruct%srf_init = .true.
call fv_io_register_restart(Atm(1))
call read_restart(Atm(1)%Rsf_restart, ignore_checksum=Atm(1)%flagstruct%ignore_rst_cksum)
call read_restart(Atm(1)%Rsf_restart)
call close_file(Atm(1)%Rsf_restart)
Atm(1)%Rsf_restart_is_open = .false.
else
Expand All @@ -456,7 +456,7 @@ subroutine fv_io_read_restart(fv_domain,Atm)
Atm(1)%Mg_restart_is_open = open_file(Atm(1)%Mg_restart, fname, "read", fv_domain, is_restart=.true.)
if (Atm(1)%Mg_restart_is_open) then
call fv_io_register_restart(Atm(1))
call read_restart(Atm(1)%Mg_restart, ignore_checksum=Atm(1)%flagstruct%ignore_rst_cksum)
call read_restart(Atm(1)%Mg_restart)
call close_file(Atm(1)%Mg_restart)
Atm(1)%Mg_restart_is_open = .false.
else
Expand All @@ -467,7 +467,7 @@ subroutine fv_io_read_restart(fv_domain,Atm)
Atm(1)%Lnd_restart_is_open = open_file(Atm(1)%Lnd_restart, fname, "read", fv_domain, is_restart=.true.)
if (Atm(1)%Lnd_restart_is_open) then
call fv_io_register_restart(Atm(1))
call read_restart(Atm(1)%Lnd_restart, ignore_checksum=Atm(1)%flagstruct%ignore_rst_cksum)
call read_restart(Atm(1)%Lnd_restart)
call close_file(Atm(1)%Lnd_restart)
Atm(1)%Lnd_restart_is_open = .false.
else
Expand Down Expand Up @@ -640,7 +640,7 @@ subroutine remap_restart(Atm)
if (Atm(1)%Rsf_restart_is_open) then
Atm%flagstruct%srf_init = .true.
call fv_io_register_restart(Atm(1))
call read_restart(Atm(1)%Rsf_restart, ignore_checksum=Atm(1)%flagstruct%ignore_rst_cksum)
call read_restart(Atm(1)%Rsf_restart)
call close_file(Atm(1)%Rsf_restart)
Atm(1)%Rsf_restart_is_open = .false.
call mpp_error(NOTE,'==> Warning from remap_restart: Expected file '//trim(fname)//' does not exist')
Expand Down Expand Up @@ -1279,12 +1279,12 @@ subroutine fv_io_read_BCs(Atm)
call fv_io_register_restart_BCs(Atm)

if (Atm%neststruct%BCfile_sw_is_open) then
call read_restart_bc(Atm%neststruct%BCfile_sw, ignore_checksum=Atm%flagstruct%ignore_rst_cksum)
call read_restart_bc(Atm%neststruct%BCfile_sw)
call close_file(Atm%neststruct%BCfile_sw)
endif

if (Atm%neststruct%BCfile_ne_is_open) then
call read_restart_bc(Atm%neststruct%BCfile_ne, ignore_checksum=Atm%flagstruct%ignore_rst_cksum)
call read_restart_bc(Atm%neststruct%BCfile_ne)
call close_file(Atm%neststruct%BCfile_ne)
endif

Expand Down