forked from NOAA-EMC/fv3atm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2a8b981
commit e8fc934
Showing
9 changed files
with
271 additions
and
5 deletions.
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 |
---|---|---|
|
@@ -418,7 +418,11 @@ subroutine get_nggps_ic (Atm, fv_domain) | |
!> Q - prognostic tracer fields | ||
!> Namelist variables | ||
!> filtered_terrain - use orography maker filtered terrain mapping | ||
#ifdef __PGI | ||
use GFS_restart, only : GFS_restart_type | ||
|
||
implicit none | ||
#endif | ||
|
||
type(fv_atmos_type), intent(inout) :: Atm(:) | ||
type(domain2d), intent(inout) :: fv_domain | ||
|
@@ -1269,6 +1273,13 @@ end subroutine get_ncep_ic | |
!! (EXPERIMENTAL: contact Jan-Huey Chen [email protected] for support) | ||
!>@authors Jan-Huey Chen, Xi Chen, Shian-Jiann Lin | ||
subroutine get_ecmwf_ic( Atm, fv_domain ) | ||
|
||
#ifdef __PGI | ||
use GFS_restart, only : GFS_restart_type | ||
|
||
implicit none | ||
#endif | ||
|
||
type(fv_atmos_type), intent(inout) :: Atm(:) | ||
type(domain2d), intent(inout) :: fv_domain | ||
! local: | ||
|
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
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
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,126 @@ | ||
module IPD_CCPP_driver | ||
|
||
use IPD_typedefs, only: IPD_control_type, IPD_fastphys_type | ||
|
||
use ccpp_api, only: ccpp_t, & | ||
ccpp_init, & | ||
ccpp_finalize, & | ||
ccpp_physics_init, & | ||
ccpp_physics_run, & | ||
ccpp_physics_finalize, & | ||
ccpp_field_add | ||
|
||
! Begin include auto-generated list of modules for ccpp | ||
#include "ccpp_modules.inc" | ||
! End include auto-generated list of modules for ccpp | ||
|
||
use iso_c_binding, only: c_loc | ||
|
||
implicit none | ||
|
||
!------------------------------------------------------! | ||
! CCPP container ! | ||
!------------------------------------------------------! | ||
type(ccpp_t), save, target :: cdata | ||
|
||
!---------------- | ||
! Public Entities | ||
!---------------- | ||
! functions | ||
public IPD_CCPP_step | ||
|
||
CONTAINS | ||
!******************************************************************************************* | ||
|
||
!------------------------------- | ||
! IPD step generalized for CCPP | ||
!------------------------------- | ||
subroutine IPD_CCPP_step (step, IPD_Control, IPD_Fastphys, ccpp_suite, ierr) | ||
|
||
#ifdef OPENMP | ||
use omp_lib | ||
#endif | ||
|
||
implicit none | ||
|
||
character(len=*), intent(in) :: step | ||
type(IPD_control_type), target, intent(inout), optional :: IPD_Control | ||
type(IPD_fastphys_type), target, intent(inout), optional :: IPD_Fastphys | ||
character(len=*), intent(in), optional :: ccpp_suite | ||
integer, intent(out) :: ierr | ||
|
||
ierr = 0 | ||
|
||
if (trim(step)=="init") then | ||
|
||
if (.not.present(IPD_Control)) then | ||
write(0,*) 'Optional argument IPD_Control required for IPD-CCPP init step' | ||
ierr = 1 | ||
return | ||
end if | ||
|
||
if (.not.present(IPD_Fastphys)) then | ||
write(0,*) 'Optional argument IPD_Fastphys required for IPD-CCPP init step' | ||
ierr = 1 | ||
return | ||
end if | ||
|
||
if (.not.present(ccpp_suite)) then | ||
write(0,*) 'Optional argument ccpp_suite required for IPD-CCPP init step' | ||
ierr = 1 | ||
return | ||
end if | ||
|
||
!--- Initialize CCPP framework | ||
call ccpp_init(trim(ccpp_suite), cdata, ierr) | ||
if (ierr/=0) then | ||
write(0,*) 'An error occurred in ccpp_init' | ||
return | ||
end if | ||
|
||
! Begin include auto-generated list of calls to ccpp_field_add | ||
#include "ccpp_fields.inc" | ||
! End include auto-generated list of calls to ccpp_field_add | ||
|
||
!--- Initialize CCPP physics | ||
call ccpp_physics_init(cdata, ierr) | ||
if (ierr/=0) then | ||
write(0,*) 'An error occurred in ccpp_physics_init' | ||
return | ||
end if | ||
|
||
else if (trim(step)=="fast_physics") then | ||
|
||
call ccpp_physics_run(cdata, group_name='fast_physics', ierr=ierr) | ||
if (ierr/=0) then | ||
write(0,'(a)') "An error occurred in ccpp_physics_run for group fast_physics" | ||
return | ||
end if | ||
|
||
! Finalize | ||
else if (trim(step)=="finalize") then | ||
|
||
!--- Finalize CCPP physics | ||
call ccpp_physics_finalize(cdata, ierr) | ||
if (ierr/=0) then | ||
write(0,'(a)') "An error occurred in ccpp_physics_finalize" | ||
return | ||
end if | ||
!--- Finalize CCPP framework | ||
call ccpp_finalize(cdata, ierr) | ||
if (ierr/=0) then | ||
write(0,'(a)') "An error occurred in ccpp_finalize" | ||
return | ||
end if | ||
|
||
else | ||
|
||
write(0,'(2a)') 'Error, undefined IPD step ', trim(step) | ||
ierr = 1 | ||
return | ||
|
||
end if | ||
|
||
end subroutine IPD_CCPP_step | ||
|
||
end module IPD_CCPP_driver |
Oops, something went wrong.