Skip to content
Merged
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ list(APPEND _fv3dycore_defs_private SPMD
GFS_TYPES
USE_GFSL63
MOIST_CAPPA
INTERNAL_FILE_NML
ENABLE_QUAD_PRECISION
USE_COND)

if(MULTI_GASES)
Expand Down
2 changes: 1 addition & 1 deletion atmos_cubed_sphere
Submodule atmos_cubed_sphere updated 74 files
+27 −0 .github/ISSUE_TEMPLATE/bug_report.md
+19 −0 .github/ISSUE_TEMPLATE/feature_request.md
+14 −0 .github/ISSUE_TEMPLATE/support_request.md
+127 −0 CODE_STYLE.md
+12 −4 README.md
+0 −19 docs/AdvectionOperators.md
+0 −36 docs/Chapter1.md
+0 −52 docs/Chapter2.md
+0 −6 docs/Chapter3.md
+0 −75 docs/Chapter4.md
+0 −42 docs/Chapter5.md
+0 −46 docs/Chapter6.md
+0 −112 docs/Chapter7.md
+0 −65 docs/Chapter8.md
+0 −67 docs/Chapter9.md
+0 −194 docs/DoxygenLayout.xml
+0 −148 docs/FV3_citations.bib
+0 −7 docs/Foreword.md
+0 −25 docs/Links.md
+0 −22 docs/Preface.md
+0 −2,436 docs/acs_fvGFS
+0 −73 docs/appendixB.md
+0 −25 docs/appendixB1.md
+0 −22 docs/appendixB2.md
+ docs/doc_source/CDgrid.pdf
+ docs/doc_source/FV3flowchart.pdf
+ docs/doc_source/GFDLLogo.png
+ docs/doc_source/KESpectra.pdf
+ docs/doc_source/PGF.pdf
+1 −0 docs/doc_source/README
+1,653 −0 docs/doc_source/fv3_technical_2021.tex
+ docs/doc_source/fv3logo.png
+1,289 −0 docs/doc_source/fv3references.bib
+ docs/doc_source/gridmetrics1D.pdf
+ docs/doc_source/gridmetricsCoordinates.pdf
+ docs/doc_source/gridmetricsReconstructions.pdf
+ docs/doc_source/phasespeedbad.pdf
+ docs/doc_source/phasespeedgood.pdf
+ docs/doc_source/twowayschematic.pdf
+0 −18 docs/documentation.dox
+464 −0 docs/examples/BCMoist.ipynb
+305 −0 docs/examples/BLvortex.ipynb
+402 −0 docs/examples/BTwave.ipynb
+757 −0 docs/examples/DPSupercell.ipynb
+28 −0 docs/examples/README.md
+279 −0 docs/examples/RHwave.ipynb
+2,280 −0 docs/examples/TC.ipynb
+532 −0 docs/examples/tp_core.ipynb
+ docs/fv3_technical_2021.pdf
+ docs/image/FV3flowchart.png
+ docs/image/UFSLogo.png
+15 −25 driver/fvGFS/atmosphere.F90
+1 −10 driver/fvGFS/fv_nggps_diag.F90
+0 −1 model/a2b_edge.F90
+7 −40 model/boundary.F90
+48 −46 model/fv_arrays.F90
+81 −446 model/fv_control.F90
+58 −124 model/fv_nesting.F90
+251 −137 model/fv_regional_bc.F90
+0 −20 model/sw_core.F90
+207 −102 tools/coarse_grained_restart_files.F90
+1 −1 tools/coarse_graining.F90
+2,123 −2,335 tools/external_ic.F90
+1 −21 tools/fv_diag_column.F90
+6 −125 tools/fv_diagnostics.F90
+66 −11 tools/fv_eta.F90
+154 −153 tools/fv_grid_tools.F90
+562 −287 tools/fv_io.F90
+1 −16 tools/fv_mp_mod.F90
+7 −13 tools/fv_nudge.F90
+77 −61 tools/fv_restart.F90
+3 −13 tools/fv_surf_map.F90
+4 −5 tools/fv_treat_da_inc.F90
+0 −44 tools/test_cases.F90
22 changes: 5 additions & 17 deletions atmos_model.F90
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,8 @@ module atmos_model_mod
use mpp_mod, only: FATAL, mpp_min, mpp_max, mpp_error, mpp_chksum
use mpp_domains_mod, only: domain2d
use mpp_mod, only: mpp_get_current_pelist_name
#ifdef INTERNAL_FILE_NML
use mpp_mod, only: input_nml_file
#else
use fms_mod, only: open_namelist_file
#endif
use fms_mod, only: file_exist, error_mesg
use fms2_io_mod, only: file_exists
use fms_mod, only: close_file, write_version_number, stdlog, stdout
use fms_mod, only: clock_flag_default
use fms_mod, only: check_nml_error
Expand Down Expand Up @@ -551,19 +547,9 @@ subroutine atmos_model_init (Atmos, Time_init, Time, Time_step)
!----------------------------------------------------------------------------------------------
! initialize atmospheric model - must happen AFTER atmosphere_init so that nests work correctly

IF ( file_exist('input.nml')) THEN
#ifdef INTERNAL_FILE_NML
IF ( file_exists('input.nml')) THEN
read(input_nml_file, nml=atmos_model_nml, iostat=io)
ierr = check_nml_error(io, 'atmos_model_nml')
#else
unit = open_namelist_file ( )
ierr=1
do while (ierr /= 0)
read (unit, nml=atmos_model_nml, iostat=io, end=10)
ierr = check_nml_error(io,'atmos_model_nml')
enddo
10 call close_file (unit)
#endif
endif

!-----------------------------------------------------------------------
Expand Down Expand Up @@ -650,6 +636,8 @@ subroutine atmos_model_init (Atmos, Time_init, Time, Time_step)
Init_parm%hydrostatic = Atm(mygrid)%flagstruct%hydrostatic

#ifdef INTERNAL_FILE_NML
! allocate required to work around GNU compiler bug 100886 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100886
allocate(Init_parm%input_nml_file, mold=input_nml_file)
Init_parm%input_nml_file => input_nml_file
Init_parm%fn_nml='using internal file'
#else
Expand Down Expand Up @@ -1785,7 +1773,7 @@ subroutine assign_importdata(jdat, rc)
fldname = 'sea_surface_temperature'
if (trim(impfield_name) == trim(fldname)) then
findex = queryImportFields(fldname)
if (importFieldsValid(findex)) then
if (importFieldsValid(findex) .and. GFS_control%cplocn2atm) then
!$omp parallel do default(shared) private(i,j,nb,ix)
do j=jsc,jec
do i=isc,iec
Expand Down
18 changes: 3 additions & 15 deletions ccpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ project(CCPP-FV3
LANGUAGES C CXX Fortran)
set(PROJECT "CCPP-FV3")

# Attempt to add link library "NetCDF::NetCDF_Fortran" to target "ccppphys"
# which is not built in this directory.
cmake_policy(SET CMP0079 NEW)

#------------------------------------------------------------------------------
# Set a default build type if none was specified
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
Expand Down Expand Up @@ -94,12 +90,8 @@ endif()
# Build CCPP framework and physics

add_subdirectory(framework)

add_subdirectory(physics)
add_dependencies(ccppphys ccpp)
target_link_libraries(ccppphys PUBLIC w3nco::w3nco_d NetCDF::NetCDF_Fortran)
# This should not be necessary once framework and physics targets define BUILD_INTERFACE
target_include_directories(ccppphys PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/framework/src)
add_dependencies(ccpp_physics ccpp_framework)

#------------------------------------------------------------------------------
# Build fv3ccpp
Expand All @@ -124,16 +116,12 @@ add_library(
set_property(SOURCE driver/GFS_diagnostics.F90 APPEND_STRING PROPERTY COMPILE_FLAGS "-O0")


target_link_libraries(fv3ccpp PUBLIC ccpp)
target_link_libraries(fv3ccpp PUBLIC ccppphys)
target_link_libraries(fv3ccpp PUBLIC ccpp_framework)
target_link_libraries(fv3ccpp PUBLIC ccpp_physics)

if(OPENMP)
target_link_libraries(fv3ccpp PUBLIC OpenMP::OpenMP_Fortran)
endif()

# This should not be necessary once framework and physics targets define BUILD_INTERFACE
target_include_directories(fv3ccpp PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/framework/src
${CMAKE_CURRENT_BINARY_DIR}/physics)

set_target_properties(fv3ccpp PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/mod)
target_include_directories(fv3ccpp PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/mod>)
20 changes: 13 additions & 7 deletions ccpp/data/GFS_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,9 @@ module GFS_typedefs
character(len=32), pointer :: tracer_names(:) !< tracers names to dereference tracer id
integer, pointer :: tracer_types(:) !< tracers types: 0=generic, 1=chem,prog, 2=chem,diag
character(len=64) :: fn_nml !< namelist filename
character(len=256), pointer :: input_nml_file(:) !< character string containing full namelist
!< for use with internal file reads
end type GFS_init_type
character(len=:), pointer, dimension(:) :: input_nml_file => null() !< character string containing full namelist
!< for use with internal file reads
end type GFS_init_type


!----------------------------------------------------------------
Expand Down Expand Up @@ -587,8 +587,8 @@ module GFS_typedefs
integer :: nthreads !< OpenMP threads available for physics
integer :: nlunit !< unit for namelist
character(len=64) :: fn_nml !< namelist filename for surface data cycling
character(len=256), pointer :: input_nml_file(:) !< character string containing full namelist
!< for use with internal file reads
character(len=:), pointer, dimension(:) :: input_nml_file => null() !< character string containing full namelist
!< for use with internal file reads
integer :: input_nml_file_length !< length (number of lines) in namelist for internal reads
integer :: logunit
real(kind=kind_phys) :: fhzero !< hours between clearing of diagnostic buckets
Expand Down Expand Up @@ -632,6 +632,7 @@ module GFS_typedefs
!--- coupling parameters
logical :: cplflx !< default no cplflx collection
logical :: cplice !< default yes cplice collection (used together with cplflx)
logical :: cplocn2atm !< default yes ocn->atm coupling
logical :: cplwav !< default no cplwav collection
logical :: cplwav2atm !< default no wav->atm coupling
logical :: cplchm !< default no cplchm collection
Expand Down Expand Up @@ -3091,7 +3092,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
integer, intent(in) :: nwat
character(len=32), intent(in) :: tracer_names(:)
integer, intent(in) :: tracer_types(:)
character(len=256), intent(in), pointer :: input_nml_file(:)
character(len=:), intent(in), dimension(:), pointer :: input_nml_file
integer, intent(in) :: blksz(:)
real(kind=kind_phys), dimension(:), intent(in) :: ak
real(kind=kind_phys), dimension(:), intent(in) :: bk
Expand Down Expand Up @@ -3130,6 +3131,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
!--- coupling parameters
logical :: cplflx = .false. !< default no cplflx collection
logical :: cplice = .true. !< default yes cplice collection (used together with cplflx)
logical :: cplocn2atm = .true. !< default yes cplocn2atm coupling (turn on the feedback from ocn to atm)
logical :: cplwav = .false. !< default no cplwav collection
logical :: cplwav2atm = .false. !< default no cplwav2atm coupling
logical :: cplchm = .false. !< default no cplchm collection
Expand Down Expand Up @@ -3598,7 +3600,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
naux3d, aux2d_time_avg, aux3d_time_avg, fhcyc, &
thermodyn_id, sfcpress_id, &
!--- coupling parameters
cplflx, cplice, cplwav, cplwav2atm, cplchm, &
cplflx, cplice, cplocn2atm, cplwav, cplwav2atm, cplchm, &
cpl_imp_mrg, cpl_imp_dbg, &
use_cice_alb, lsidea, &
!--- radiation parameters
Expand Down Expand Up @@ -3728,6 +3730,8 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &

!--- read in the namelist
#ifdef INTERNAL_FILE_NML
! allocate required to work around GNU compiler bug 100886 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100886
allocate(Model%input_nml_file, mold=input_nml_file)
Model%input_nml_file => input_nml_file
read(Model%input_nml_file, nml=gfs_physics_nml)
! Set length (number of lines) in namelist for internal reads
Expand Down Expand Up @@ -3876,6 +3880,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
!--- coupling parameters
Model%cplflx = cplflx
Model%cplice = cplice
Model%cplocn2atm = cplocn2atm
Model%cplwav = cplwav
Model%cplwav2atm = cplwav2atm
Model%cplchm = cplchm
Expand Down Expand Up @@ -5468,6 +5473,7 @@ subroutine control_print(Model)
print *, 'coupling parameters'
print *, ' cplflx : ', Model%cplflx
print *, ' cplice : ', Model%cplice
print *, ' cplocn2atm : ', Model%cplocn2atm
print *, ' cplwav : ', Model%cplwav
print *, ' cplwav2atm : ', Model%cplwav2atm
print *, ' cplchm : ', Model%cplchm
Expand Down
10 changes: 8 additions & 2 deletions ccpp/data/GFS_typedefs.meta
Original file line number Diff line number Diff line change
Expand Up @@ -2563,6 +2563,12 @@
units = flag
dimensions = ()
type = logical
[cplocn2atm]
standard_name = flag_for_one_way_ocean_coupling_to_atmosphere
long_name = flag controlling ocean coupling to the atmosphere (default on)
units = flag
dimensions = ()
type = logical
[cplwav]
standard_name = flag_for_ocean_wave_coupling
long_name = flag controlling cplwav collection (default off)
Expand Down Expand Up @@ -10127,7 +10133,7 @@
standard_name = saturation_vapor_pressure
long_name = saturation vapor pressure
units = Pa
dimensions = (horizontal_dimension,vertical_layer_dimension)
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
type = real
kind = kind_phys
optional = F
Expand All @@ -10136,7 +10142,7 @@
standard_name = water_vapor_mixing_ratio
long_name = water vaport mixing ratio
units = kg/kg
dimensions = (horizontal_dimension,vertical_layer_dimension)
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
type = real
kind = kind_phys
optional = F
Expand Down
2 changes: 1 addition & 1 deletion ccpp/framework
Submodule framework updated 2 files
+6 −30 CMakeLists.txt
+11 −11 src/CMakeLists.txt
Loading