Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
532d04c
Point to sing_prec_from_main branch of ccpp/physics
SamuelTrahanNOAA May 2, 2022
c756e16
Point to sing_prec_from_main branch of ccpp/physics
SamuelTrahanNOAA May 2, 2022
b5b4ae0
support 32-bit real input in module_block_data
SamuelTrahanNOAA May 4, 2022
4077e79
Pass CCPP_32BIT to ccpp
SamuelTrahanNOAA May 4, 2022
076f154
Correct datatypes for kind_phys=4
SamuelTrahanNOAA May 4, 2022
20e912b
Point to Sam's branches of atmos_cubed_sphere and ccpp/physics
SamuelTrahanNOAA May 4, 2022
db230f1
Correct the 32-bit physics gnu flags
SamuelTrahanNOAA May 4, 2022
879800a
merge latest develop
SamuelTrahanNOAA May 4, 2022
92ed087
Revise ccpp-physics changes to pass 64-bit gnu regression tests (inte…
SamuelTrahanNOAA May 5, 2022
ca36376
switch ssh -> https
SamuelTrahanNOAA May 24, 2022
058e68f
Set correct kind of coordinate arrays when constructing fcst grids
DusanJovic-NOAA May 26, 2022
f599ef9
point at sam's fork
SamuelTrahanNOAA May 27, 2022
9caaf80
All suites can compile 32-bit.
SamuelTrahanNOAA May 27, 2022
07419f8
Merge commit '6ee539593e2a866ac8da263a4c47cb1243113e4f' into working_…
SamuelTrahanNOAA Jun 21, 2022
4e9bb33
Merge commit 'c5d7221e7d2ad6ccd35e5b2891869d56e9e49561' into working_…
SamuelTrahanNOAA Jun 21, 2022
371332b
merge 5301b65ec07ac93ababaf6e7bf8a44fe403bd04c
SamuelTrahanNOAA Jun 22, 2022
421ba7f
merge 1e9c3da5e0cc9efcc434cb3a2ea08a9f521939d2 (gsl fork)
SamuelTrahanNOAA Jun 22, 2022
48fac99
merge a41a3de27a2d968ea4c5b0ee4a1f8ab1f7a23361 (ccppv6 bug fixes)
SamuelTrahanNOAA Jun 22, 2022
3763873
merge 515a39d5f43c297d7d56546fb92289e9b653f7f4 (neptune 32-bit changes)
SamuelTrahanNOAA Jun 22, 2022
d648c81
Clean up machine.F and get rid of kind_evod & kind_rad
SamuelTrahanNOAA Jun 22, 2022
35146aa
merge 61f060f3c09192c0c53e867a1b14edea83b872fd (Add prognostic cumulu…
SamuelTrahanNOAA Jun 22, 2022
f20d080
merge 5117434a991168ca758f1071b06ec7d2f1849043 ("Enable receiving at…
SamuelTrahanNOAA Jun 22, 2022
1b1c9c4
Merge commit 'd2ae56038321d8208886705f0bd73e107cd5a83c' into working_…
SamuelTrahanNOAA Jun 22, 2022
a6c69c1
merge 9771e5417af138287bd9c1628063106656347d65
SamuelTrahanNOAA Jun 23, 2022
ecb3d49
in ccpp/physics merge a35dfda1, and make similar updates to FV3 (hope…
SamuelTrahanNOAA Jun 23, 2022
4236b3a
FV3GFS_io store_data changes are CCPP_32BIT-only
SamuelTrahanNOAA Jun 23, 2022
5470136
Point to working_32bit ccpp/physics branch
SamuelTrahanNOAA Jun 23, 2022
584a333
use default real kind only for CCPP_32BIT in FV3GFS_io.F90
SamuelTrahanNOAA Jun 23, 2022
8ee5ebc
Merge branch 'working_32bit' of ssh://github.com/SamuelTrahanNOAA/fv3…
SamuelTrahanNOAA Jun 23, 2022
8432639
merge working_32bit
SamuelTrahanNOAA Jun 23, 2022
e0fbc7a
Merge remote-tracking branch 'community/develop' into sing_prec_from_…
SamuelTrahanNOAA Jun 27, 2022
34a96d9
update atmos_cubed_sphere hash
SamuelTrahanNOAA Jun 27, 2022
41c4c0f
point to authoritative repository for rte-rrtmgp
SamuelTrahanNOAA Jun 27, 2022
fabe6b7
revert to an earlier atmos_cubed_sphere because the community version…
SamuelTrahanNOAA Jun 27, 2022
ac38c6d
merge develop
SamuelTrahanNOAA Jul 1, 2022
47ffc33
correct a type mismatch in a call in module_sf_noahmplsm
SamuelTrahanNOAA Jul 1, 2022
e6f31b4
better names for new variables in ccpp/physics/physics/module_sf_noah…
SamuelTrahanNOAA Jul 5, 2022
0cc6eab
merge develop
SamuelTrahanNOAA Jul 5, 2022
d726383
Merge remote-tracking branch 'community/develop' into sing_prec_from_…
SamuelTrahanNOAA Jul 15, 2022
a0b362f
point to NCAR main ccpp-physics
SamuelTrahanNOAA Jul 19, 2022
d3c97a4
point to NCAR main ccpp-physics
SamuelTrahanNOAA Jul 19, 2022
3ec781a
point to dev/emc atmos_cubed_sphere
SamuelTrahanNOAA Jul 19, 2022
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
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ else()
list(APPEND _fv3atm_defs_private NO_INLINE_POST)
endif()

if(CCPP_32BIT)
add_definitions(-DCCPP_32BIT)
else()
remove_definitions(-DCCPP_32BIT)
endif()

if(NOT PARALLEL_NETCDF)
list(APPEND _fv3atm_defs_private NO_PARALLEL_NETCDF)
endif()
Expand Down
2 changes: 1 addition & 1 deletion atmos_cubed_sphere
13 changes: 7 additions & 6 deletions atmos_model.F90
Original file line number Diff line number Diff line change
Expand Up @@ -137,14 +137,14 @@ module atmos_model_mod
integer :: mlon, mlat
integer :: iau_offset ! iau running window length
logical :: pe ! current pe.
real(kind=8), pointer, dimension(:) :: ak, bk
real(kind=GFS_kind_phys), pointer, dimension(:) :: ak, bk
real(kind=GFS_kind_phys), pointer, dimension(:,:) :: lon_bnd => null() ! local longitude axis grid box corners in radians.
real(kind=GFS_kind_phys), pointer, dimension(:,:) :: lat_bnd => null() ! local latitude axis grid box corners in radians.
real(kind=GFS_kind_phys), pointer, dimension(:,:) :: lon => null() ! local longitude axis grid box centers in radians.
real(kind=GFS_kind_phys), pointer, dimension(:,:) :: lat => null() ! local latitude axis grid box centers in radians.
real(kind=GFS_kind_phys), pointer, dimension(:,:) :: dx, dy
real(kind=8), pointer, dimension(:,:) :: area
real(kind=8), pointer, dimension(:,:,:) :: layer_hgt, level_hgt
real(kind=GFS_kind_phys), pointer, dimension(:,:) :: area
real(kind=GFS_kind_phys), pointer, dimension(:,:,:) :: layer_hgt, level_hgt
type(domain2d) :: domain ! domain decomposition
type(domain2d) :: domain_for_read ! domain decomposition
type(time_type) :: Time ! current time
Expand Down Expand Up @@ -467,9 +467,9 @@ subroutine atmos_timestep_diagnostics(Atmos)
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), &
GFS_data(nb)%Grid%xlat(i), GFS_data(nb)%Grid%xlon(i) /)
pmaxloc(2:3) = (/ dble(ATM_block%index(nb)%ii(i)), dble(ATM_block%index(nb)%jj(i)) /)
pmaxloc(4:7) = (/ dble(pdiff), dble(GFS_data(nb)%Statein%pgr(i)), &
dble(GFS_data(nb)%Grid%xlat(i)), dble(GFS_data(nb)%Grid%xlon(i)) /)
endif
enddo
pcount = pcount+count
Expand Down Expand Up @@ -2883,6 +2883,7 @@ subroutine setup_exportdata(rc)
! Instantaneous u wind (m/s) 10 m above ground
case ('inst_zonal_wind_height10m')
call block_data_copy(datar82d, GFS_data(nb)%coupling%u10mi_cpl, Atm_block, nb, rc=localrc)
!call block_data_copy(datar82d, GFS_data(nb)%coupling%u10mi_cpl, Atm_block, nb, rc=localrc)
! Instantaneous v wind (m/s) 10 m above ground
case ('inst_merid_wind_height10m')
call block_data_copy(datar82d, GFS_data(nb)%coupling%v10mi_cpl, Atm_block, nb, rc=localrc)
Expand Down
31 changes: 22 additions & 9 deletions ccpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,22 +53,35 @@ endif()
#------------------------------------------------------------------------------
# Set flag for 32bit dynamics build
if(32BIT)
message(STATUS "Compile CCPP slow physics with 64-bit precision, fast physics with 32-bit precision")
message(STATUS "Compile CCPP fast physics with 32-bit precision")
add_definitions(-DOVERLOAD_R4)
if(CMAKE_Fortran_COMPILER_ID MATCHES "Intel")
set(CMAKE_Fortran_FLAGS_PHYSICS "-real-size 64")
elseif(CMAKE_Fortran_COMPILER_ID MATCHES "GNU")
set(CMAKE_Fortran_FLAGS_PHYSICS "-fdefault-real-8 -fdefault-double-8")
endif()
set(CMAKE_Fortran_FLAGS_DYNAMICS "")
else()
message(STATUS "Compile CCPP physics with 64-bit precision")
message(STATUS "Compile CCPP fast physics with 64-bit precision")
remove_definitions(-DOVERLOAD_R8)
remove_definitions(-DOVERLOAD_R4)
set(CMAKE_Fortran_FLAGS_PHYSICS "")
set(CMAKE_Fortran_FLAGS_DYNAMICS "")
endif()

if(CCPP_32BIT)
message(STATUS "Compile CCPP slow physics with 32-bit precision")
add_definitions(-DSINGLE_PREC)
add_definitions(-DRTE_USE_SP)
if(CMAKE_Fortran_COMPILER_ID MATCHES "Intel")
set(CMAKE_Fortran_FLAGS_PHYSICS "-real-size 32")
elseif(CMAKE_Fortran_COMPILER_ID MATCHES "GNU")
set(CMAKE_Fortran_FLAGS_PHYSICS "-fno-default-real-8 -fdefault-double-8")
endif()
else(CCPP_32BIT)
message(STATUS "Compile CCPP slow physics with 64-bit precision")
remove_definitions(-DSINGLE_PREC)
remove_definitions(-DRTE_USE_SP)
if(CMAKE_Fortran_COMPILER_ID MATCHES "Intel")
set(CMAKE_Fortran_FLAGS_PHYSICS "-real-size 64")
elseif(CMAKE_Fortran_COMPILER_ID MATCHES "GNU")
set(CMAKE_Fortran_FLAGS_PHYSICS "-fdefault-real-8 -fdefault-double-8")
endif()
endif(CCPP_32BIT)

#------------------------------------------------------------------------------
# Add model-specific flags for C/C++/Fortran preprocessor
add_definitions(-DMOIST_CAPPA -DUSE_COND -DNEMS_GSM)
Expand Down
23 changes: 21 additions & 2 deletions ccpp/data/GFS_typedefs.F90
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module GFS_typedefs

use machine, only: kind_phys, kind_dbl_prec
use machine, only: kind_phys, kind_dbl_prec, kind_sngl_prec
use physcons, only: con_cp, con_fvirt, con_g, &
con_hvap, con_hfus, con_pi, con_rd, con_rv, &
con_t0c, con_cvap, con_cliq, con_eps, con_epsq, &
Expand Down Expand Up @@ -2895,6 +2895,8 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
logical :: exists
real(kind=kind_phys) :: tem
real(kind=kind_phys) :: rinc(5)
real(kind=kind_sngl_prec) :: rinc4(5)
real(kind=kind_dbl_prec) :: rinc8(5)
real(kind=kind_phys) :: wrk(1)
real(kind=kind_phys), parameter :: con_hr = 3600.

Expand Down Expand Up @@ -3385,7 +3387,11 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
! max and min lon and lat for critical relative humidity
integer :: max_lon=5000, max_lat=2000, min_lon=192, min_lat=94
real(kind=kind_phys) :: rhcmax = 0.9999999 !< max critical rel. hum.
#ifdef SINGLE_PREC
real(kind=kind_phys) :: huge = 9.9692099683868690E30 ! NetCDF float FillValue
#else
real(kind=kind_phys) :: huge = 9.9692099683868690E36 ! NetCDF float FillValue
#endif


!--- stochastic physics control parameters
Expand Down Expand Up @@ -3429,6 +3435,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &

real(kind=kind_phys) :: radar_tten_limits(2) = (/ limit_unspecified, limit_unspecified /)
integer :: itime
integer :: w3kindreal,w3kindint

!--- END NAMELIST VARIABLES

Expand Down Expand Up @@ -4874,7 +4881,19 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
Model%cdec = -9999.
Model%clstp = -9999
rinc(1:5) = 0
call w3difdat(jdat,idat,4,rinc)
call w3kind(w3kindreal,w3kindint)
if (w3kindreal == 8) then
rinc8(1:5) = 0
call w3difdat(jdat,idat,4,rinc8)
rinc = rinc8
else if (w3kindreal == 4) then
rinc4(1:5) = 0
call w3difdat(jdat,idat,4,rinc4)
rinc = rinc4
else
write(0,*)' FATAL ERROR: Invalid w3kindreal'
call abort
endif
Model%phour = rinc(4)/con_hr
Model%fhour = (rinc(4) + Model%dtp)/con_hr
Model%zhour = mod(Model%phour,Model%fhzero)
Expand Down
Loading