Skip to content

Commit

Permalink
Merge pull request NOAA-EMC#113 from climbfuji/gsl_develop_update_fro…
Browse files Browse the repository at this point in the history
…m_develop_20211025

Update gsl/develop from develop 2021/10/25
  • Loading branch information
DomHeinzeller authored Oct 27, 2021
2 parents cf009f2 + 89c1f50 commit fd66c77
Show file tree
Hide file tree
Showing 14 changed files with 778 additions and 401 deletions.
24 changes: 17 additions & 7 deletions atmos_model.F90
Original file line number Diff line number Diff line change
Expand Up @@ -423,9 +423,9 @@ subroutine atmos_timestep_diagnostics(Atmos)
if(.not. GFS_control%first_time_step) then
pmaxloc = 0.0d0
recvbuf = 0.0d0
psum = 0.0d0
pcount = 0.0d0
maxabs = 0.0d0
psum = 0.0d0
pcount = 0.0d0
maxabs = 0.0d0

! Put pgr stats in pmaxloc, psum, and pcount:
pmaxloc(1) = GFS_Control%tile_num
Expand All @@ -434,11 +434,11 @@ subroutine atmos_timestep_diagnostics(Atmos)
do i=1,count
pdiff = GFS_data(nb)%Statein%pgr(i)-GFS_data(nb)%Intdiag%old_pgr(i)
adiff = abs(pdiff)
psum = psum+adiff
psum = psum + adiff
if(adiff>=maxabs) then
maxabs=adiff
pmaxloc(2:3)=(/ ATM_block%index(nb)%ii(i), ATM_block%index(nb)%jj(i) /)
pmaxloc(4:7)=(/ pdiff, GFS_data(nb)%Statein%pgr(i), &
pmaxloc(2:3) = (/ ATM_block%index(nb)%ii(i), ATM_block%index(nb)%jj(i) /)
pmaxloc(4:7) = (/ pdiff, GFS_data(nb)%Statein%pgr(i), &
GFS_data(nb)%Grid%xlat(i), GFS_data(nb)%Grid%xlon(i) /)
endif
enddo
Expand Down Expand Up @@ -1642,6 +1642,7 @@ subroutine assign_importdata(jdat, rc)
! real(kind=GFS_kind_phys), parameter :: hsmax = 100.0 !< maximum snow depth (m) allowed
real(kind=GFS_kind_phys), parameter :: himax = 1.0e12 !< maximum ice thickness allowed
real(kind=GFS_kind_phys), parameter :: hsmax = 1.0e12 !< maximum snow depth (m) allowed
real(kind=GFS_kind_phys), parameter :: con_sbc = 5.670400e-8_GFS_kind_phys !< stefan-boltzmann
!
!------------------------------------------------------------------------------
!
Expand Down Expand Up @@ -2479,7 +2480,7 @@ subroutine assign_importdata(jdat, rc)

! update sea ice related fields:
if( lcpl_fice ) then
!$omp parallel do default(shared) private(i,j,nb,ix)
!$omp parallel do default(shared) private(i,j,nb,ix,tem)
do j=jsc,jec
do i=isc,iec
nb = Atm_block%blkno(i,j)
Expand All @@ -2490,6 +2491,15 @@ subroutine assign_importdata(jdat, rc)
GFS_data(nb)%Coupling%hsnoin_cpl(ix) = min(hsmax, GFS_data(nb)%Coupling%hsnoin_cpl(ix) &
/ (GFS_data(nb)%Sfcprop%fice(ix)*GFS_data(nb)%Sfcprop%oceanfrac(ix)))
GFS_data(nb)%Sfcprop%zorli(ix) = z0ice
tem = GFS_data(nb)%Sfcprop%tisfc(ix) * GFS_data(nb)%Sfcprop%tisfc(ix)
tem = con_sbc * tem * tem
if (GFS_data(nb)%Coupling%ulwsfcin_cpl(ix) > zero) then
GFS_data(nb)%Sfcprop%emis_ice(ix) = GFS_data(nb)%Coupling%ulwsfcin_cpl(ix) / tem
GFS_data(nb)%Sfcprop%emis_ice(ix) = max(0.9, min(one, GFS_data(nb)%Sfcprop%emis_ice(ix)))
else
GFS_data(nb)%Sfcprop%emis_ice(ix) = 0.96
endif
GFS_data(nb)%Coupling%ulwsfcin_cpl(ix) = tem * GFS_data(nb)%Sfcprop%emis_ice(ix)
else
GFS_data(nb)%Sfcprop%tisfc(ix) = GFS_data(nb)%Sfcprop%tsfco(ix)
GFS_data(nb)%Sfcprop%fice(ix) = zero
Expand Down
5 changes: 4 additions & 1 deletion ccpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/framework/cmake")
#------------------------------------------------------------------------------
# Call to CCPP code generator
if(DEBUG)
# Enable debugging features in auto-generated physics caps
set(_ccpp_debug_arg "--debug")
# Enable verbose output from ccpp_prebuild.py
set(_ccpp_verbose_arg "--verbose")
endif()
if(DEFINED CCPP_SUITES)
set(_ccpp_suites_arg "--suites=${CCPP_SUITES}")
Expand All @@ -31,7 +34,7 @@ endif()
execute_process(COMMAND ${Python_EXECUTABLE}
"framework/scripts/ccpp_prebuild.py"
"--config=config/ccpp_prebuild_config.py"
"--builddir=${CMAKE_CURRENT_BINARY_DIR}" ${_ccpp_suites_arg} ${_ccpp_debug_arg}
"--builddir=${CMAKE_CURRENT_BINARY_DIR}" ${_ccpp_suites_arg} ${_ccpp_debug_arg} ${_ccpp_verbose_arg}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_FILE ${CMAKE_CURRENT_BINARY_DIR}/ccpp_prebuild.out
ERROR_FILE ${CMAKE_CURRENT_BINARY_DIR}/ccpp_prebuild.err
Expand Down
12 changes: 6 additions & 6 deletions ccpp/data/CCPP_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -219,18 +219,18 @@ subroutine interstitial_create (Interstitial, is, ie, isd, ied, js, je, jsd, jed
! For multi-gases physics
Interstitial%nwat = nwat
! If ngas, rilist and cpilist are present, then
! multi-gases physics are used. If not, set ngas=1
! multi-gases physics are used. If not, set ngas=0
! (safe value), allocate rilist/cpilist and set to zero
if(present(ngas)) then
Interstitial%ngas = ngas
else
Interstitial%ngas = 1
Interstitial%ngas = 0
end if
allocate(Interstitial%rilist(1:Interstitial%ngas))
allocate(Interstitial%cpilist(1:Interstitial%ngas))
allocate(Interstitial%rilist(0:Interstitial%ngas))
allocate(Interstitial%cpilist(0:Interstitial%ngas))
if (present(rilist)) then
Interstitial%rilist = rilist(1:Interstitial%ngas)
Interstitial%cpilist = cpilist(1:Interstitial%ngas)
Interstitial%rilist = rilist(0:Interstitial%ngas)
Interstitial%cpilist = cpilist(0:Interstitial%ngas)
else
Interstitial%rilist = 0.0
Interstitial%cpilist = 0.0
Expand Down
3 changes: 2 additions & 1 deletion ccpp/data/CCPP_typedefs.meta
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,10 @@
standard_name = gas_tracers_for_multi_gas_physics_at_Lagrangian_surface
long_name = gas tracers for multi gas physics at Lagrangian surface
units = kg kg-1
dimensions = (starting_x_direction_index_domain:ending_x_direction_index_domain,starting_y_direction_index_domain:ending_y_direction_index_domain,1:vertical_dimension_for_fast_physics,1:number_of_gases_for_multi_gases_physics)
dimensions = (starting_x_direction_index_domain:ending_x_direction_index_domain,starting_y_direction_index_domain:ending_y_direction_index_domain,1:vertical_dimension_for_fast_physics,0:number_of_gases_for_multi_gases_physics)
type = real
kind = kind_dyn
active = (number_of_gases_for_multi_gases_physics > 0)
[qv]
standard_name = water_vapor_specific_humidity_at_Lagrangian_surface
long_name = water vapor specific humidity updated by fast physics at Lagrangian surface
Expand Down
Loading

0 comments on commit fd66c77

Please sign in to comment.