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

update #4

Merged
merged 17 commits into from
Jul 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
b4672ab
Merge GFDL FV3 dynamic core new (201912) version (#65)
XiaqiongZhou-NOAA Jun 10, 2020
02ce4ad
GFS.v16.0.4 physics update (#128)
junwang-noaa Jun 12, 2020
5ed88a7
Merge pull request #53 from panll/dtc/develop
climbfuji Jun 16, 2020
ea71b79
Update for GFDL_atmos_cubed_sphere (dycore GNU bugfix) (#131)
climbfuji Jun 22, 2020
6c217fc
Bugfix for regional runs when dycore is compiled in double precision …
climbfuji Jun 29, 2020
3c9b6b8
Merge branch 'develop' of https://github.com/NOAA-EMC/fv3atm into HEAD
climbfuji Jun 29, 2020
c19e7ef
Update .gitmodules and submodule pointers for GFDL_atmos_cubed_sphere…
climbfuji Jun 29, 2020
c0976ce
Revert change to .gitmodules and update submodule pointer for GFDL_at…
climbfuji Jun 30, 2020
d115c15
Merge pull request #56 from climbfuji/update_dtc_develop_from_develop…
climbfuji Jun 30, 2020
16e3615
Update develop from gsd/develop 2020/06/30 (#134)
climbfuji Jul 2, 2020
695b0b7
Update submodule pointer for GFDL_atmos_cubed_sphere
climbfuji Jul 2, 2020
5c43f7a
Merge pull request #57 from climbfuji/update_submodule_pointer_GFDL_a…
climbfuji Jul 2, 2020
d94cec8
Add regression tests with MULTI_GASES (#108)
XiaqiongZhou-NOAA Jul 7, 2020
bc5557b
Merge branch 'develop' of https://github.com/noaa-emc/fv3atm into HEAD
climbfuji Jul 7, 2020
b165630
Update .gitmodules for code review and testing
climbfuji Jul 7, 2020
37e7771
Revert change to .gitmodules and update submodule pointers for GFDL_a…
climbfuji Jul 8, 2020
5e82921
Merge pull request #58 from climbfuji/update_dtc_develop_from_emc_dev…
climbfuji Jul 8, 2020
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 @@ -65,7 +65,7 @@ target_link_libraries(fv3core PRIVATE fms)
target_link_libraries(fv3core PRIVATE gfsphysics)
target_link_libraries(fv3core PRIVATE ipd)

target_include_directories(fv3core PRIVATE ${ESMF_MOD})
target_include_directories(fv3core PRIVATE atmos_cubed_sphere ${ESMF_MOD})

# end of fv3core

Expand Down
71 changes: 53 additions & 18 deletions atmos_model.F90
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ module atmos_model_mod
use atmosphere_mod, only: atmosphere_scalar_field_halo
use atmosphere_mod, only: atmosphere_get_bottom_layer
use atmosphere_mod, only: set_atmosphere_pelist
use atmosphere_mod, only: Atm, mytile
use atmosphere_mod, only: Atm, mygrid
use block_control_mod, only: block_control_type, define_blocks_packed
use DYCORE_typedefs, only: DYCORE_data_type, DYCORE_diag_type
#ifdef CCPP
Expand Down Expand Up @@ -336,6 +336,28 @@ subroutine update_atmos_radiation_physics (Atmos)
! print *,'in atmos_model, after assign_importdata, rc=',rc
endif

! Calculate total non-physics tendencies by substracting old IPD Stateout
! variables from new/updated IPD Statein variables (gives the tendencies
! due to anything else than physics)
if (IPD_Control%ldiag3d) then
do nb = 1,Atm_block%nblks
IPD_Data(nb)%Intdiag%du3dt(:,:,8) = IPD_Data(nb)%Intdiag%du3dt(:,:,8) &
+ (IPD_Data(nb)%Statein%ugrs - IPD_Data(nb)%Stateout%gu0)
IPD_Data(nb)%Intdiag%dv3dt(:,:,8) = IPD_Data(nb)%Intdiag%dv3dt(:,:,8) &
+ (IPD_Data(nb)%Statein%vgrs - IPD_Data(nb)%Stateout%gv0)
IPD_Data(nb)%Intdiag%dt3dt(:,:,11) = IPD_Data(nb)%Intdiag%dt3dt(:,:,11) &
+ (IPD_Data(nb)%Statein%tgrs - IPD_Data(nb)%Stateout%gt0)
enddo
if (IPD_Control%qdiag3d) then
do nb = 1,Atm_block%nblks
IPD_Data(nb)%Intdiag%dq3dt(:,:,12) = IPD_Data(nb)%Intdiag%dq3dt(:,:,12) &
+ (IPD_Data(nb)%Statein%qgrs(:,:,IPD_Control%ntqv) - IPD_Data(nb)%Stateout%gq0(:,:,IPD_Control%ntqv))
IPD_Data(nb)%Intdiag%dq3dt(:,:,13) = IPD_Data(nb)%Intdiag%dq3dt(:,:,13) &
+ (IPD_Data(nb)%Statein%qgrs(:,:,IPD_Control%ntoz) - IPD_Data(nb)%Stateout%gq0(:,:,IPD_Control%ntoz))
enddo
endif
endif

call mpp_clock_end(setupClock)

if (mpp_pe() == mpp_root_pe() .and. debug) write(6,*) "radiation driver"
Expand Down Expand Up @@ -466,7 +488,7 @@ subroutine atmos_model_init (Atmos, Time_init, Time, Time_step)
integer :: bdat(8), cdat(8)
integer :: ntracers, maxhf, maxh
character(len=32), allocatable, target :: tracer_names(:)
integer :: nthrds
integer :: nthrds, nb

!-----------------------------------------------------------------------

Expand Down Expand Up @@ -604,8 +626,8 @@ subroutine atmos_model_init (Atmos, Time_init, Time, Time_step)
Init_parm%area => Atmos%area
Init_parm%tracer_names => tracer_names
#ifdef CCPP
Init_parm%restart = Atm(mytile)%flagstruct%warm_start
Init_parm%hydrostatic = Atm(mytile)%flagstruct%hydrostatic
Init_parm%restart = Atm(mygrid)%flagstruct%warm_start
Init_parm%hydrostatic = Atm(mygrid)%flagstruct%hydrostatic
#endif

#ifdef INTERNAL_FILE_NML
Expand Down Expand Up @@ -633,17 +655,6 @@ subroutine atmos_model_init (Atmos, Time_init, Time, Time_step)
if(IPD_Control%me == IPD_Control%master) print *,'do_skeb=',IPD_Control%do_skeb
end if

#ifdef CCPP
! Initialize the CCPP framework
call CCPP_step (step="init", nblks=Atm_block%nblks, ierr=ierr)
if (ierr/=0) call mpp_error(FATAL, 'Call to CCPP init step failed')
! Doing the init here requires logic in thompson aerosol init if no aerosol
! profiles are specified and internal profiles are calculated, because these
! require temperature/geopotential etc which are not yet set. Sim. for RUC LSM.
call CCPP_step (step="physics_init", nblks=Atm_block%nblks, ierr=ierr)
if (ierr/=0) call mpp_error(FATAL, 'Call to CCPP physics_init step failed')
#endif

Atmos%Diag => IPD_Diag

if (IPD_Control%do_sfcperts) then
Expand Down Expand Up @@ -677,7 +688,7 @@ subroutine atmos_model_init (Atmos, Time_init, Time, Time_step)
endif
endif

Atm(mytile)%flagstruct%do_skeb = IPD_Control%do_skeb
Atm(mygrid)%flagstruct%do_skeb = IPD_Control%do_skeb

! initialize the IAU module
call iau_initialize (IPD_Control,IAU_data,Init_parm)
Expand All @@ -698,11 +709,35 @@ subroutine atmos_model_init (Atmos, Time_init, Time, Time_step)
call FV3GFS_diag_register (IPD_Diag, Time, Atm_block, IPD_Control, Atmos%lon, Atmos%lat, Atmos%axes)
call IPD_initialize_rst (IPD_Control, IPD_Data, IPD_Diag, IPD_Restart, Init_parm)
#ifdef CCPP
call FV3GFS_restart_read (IPD_Data, IPD_Restart, Atm_block, IPD_Control, Atmos%domain, Atm(mytile)%flagstruct%warm_start)
call FV3GFS_restart_read (IPD_Data, IPD_Restart, Atm_block, IPD_Control, Atmos%domain, Atm(mygrid)%flagstruct%warm_start)
#else
call FV3GFS_restart_read (IPD_Data, IPD_Restart, Atm_block, IPD_Control, Atmos%domain)
#endif

! Populate the IPD_Data%Statein container with the prognostic state
! in Atm_block, which contains the initial conditions/restart data.
call atmos_phys_driver_statein (IPD_data, Atm_block, flip_vc)

! When asked to calculate 3-dim. tendencies, set Stateout variables to
! Statein variables here in order to capture the first call to dycore
if (IPD_Control%ldiag3d) then
do nb = 1,Atm_block%nblks
IPD_Data(nb)%Stateout%gu0 = IPD_Data(nb)%Statein%ugrs
IPD_Data(nb)%Stateout%gv0 = IPD_Data(nb)%Statein%vgrs
IPD_Data(nb)%Stateout%gt0 = IPD_Data(nb)%Statein%tgrs
IPD_Data(nb)%Stateout%gq0 = IPD_Data(nb)%Statein%qgrs
enddo
endif

#ifdef CCPP
! Initialize the CCPP framework
call CCPP_step (step="init", nblks=Atm_block%nblks, ierr=ierr)
if (ierr/=0) call mpp_error(FATAL, 'Call to CCPP init step failed')
! Initialize the CCPP physics
call CCPP_step (step="physics_init", nblks=Atm_block%nblks, ierr=ierr)
if (ierr/=0) call mpp_error(FATAL, 'Call to CCPP physics_init step failed')
#endif

!--- set the initial diagnostic timestamp
diag_time = Time
if (output_1st_tstep_rst) then
Expand Down Expand Up @@ -1456,7 +1491,7 @@ subroutine update_atmos_chemistry(state, rc)
ib = i + Atm_block%isc - 1
nb = Atm_block%blkno(ib,jb)
ix = Atm_block%ixp(ib,jb)
hpbl(i,j) = IPD_Data(nb)%IntDiag%hpbl(ix)
hpbl(i,j) = IPD_Data(nb)%Tbd%hpbl(ix)
area(i,j) = IPD_Data(nb)%Grid%area(ix)
stype(i,j) = IPD_Data(nb)%Sfcprop%stype(ix)
rainc(i,j) = IPD_Data(nb)%Coupling%rainc_cpl(ix)
Expand Down
Loading