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

Enable customizable idealized, doubly-periodic tests #909

Open
wants to merge 70 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
d3521d5
Updates to support NSSL microphysics in CCPP
MicroTed Oct 16, 2021
2a3a156
Switched atmos and ccpp modules to NSSL versions
MicroTed Oct 19, 2021
5564af5
Update to my atmos_cubed_sphere
LarissaReames-NOAA Oct 22, 2021
9b0c228
Update submodule
LarissaReames-NOAA Oct 22, 2021
99c9579
Bug fix for allocating/loading array2d
MicroTed Oct 28, 2021
c485881
Made setting of otsptflag more logical
MicroTed Oct 29, 2021
7655fc5
Fixed size and logic of otsptflag
MicroTed Nov 10, 2021
fa5bfc6
Merge branch 'feature/nsslmicro' of https://github.com/MicroTed/fv3at…
MicroTed Nov 10, 2021
4e524c8
Merge remote-tracking branch 'tedsrepo/feature/nsslmicro' into featur…
MicroTed Jan 20, 2022
81d33d9
Revert URL to default in .gitmodules
MicroTed Jan 20, 2022
40a3c66
Removed commented line and added whitespace
MicroTed Jan 20, 2022
3d721e8
Update to current version of atmos_cubed_sphere
LarissaReames-NOAA Nov 15, 2021
2e0abb7
Merge remote-tracking branch 'tedsrepo/develop' into feature/nsslmicr…
MicroTed Jan 27, 2022
2dfb094
Update GFS_diagnostics.F90 and submodules
MicroTed Jan 27, 2022
7901983
Add suite file
MicroTed Jan 28, 2022
59c2453
Update .gitmodules
MicroTed Jan 29, 2022
23287bd
change dimensions of flag_convective_tracer_transport_interstitial to…
grantfirl Jan 31, 2022
91daade
Merge branch 'feature/nsslmicro-merge' into feature/nsslmicro-merge_gjf
grantfirl Feb 1, 2022
09f57a2
Merge pull request #1 from grantfirl/feature/nsslmicro-merge_gjf
MicroTed Feb 1, 2022
bb1207f
ccpp/physics update
MicroTed Feb 2, 2022
6613a8c
Update submodule
MicroTed Feb 11, 2022
381f1c3
Update atmos_cubed_sphere
LarissaReames-NOAA Feb 14, 2022
dd3d27c
Switched to Ted's NSSL branch of ccpp
LarissaReames-NOAA Feb 14, 2022
574411a
Point to correct atmos_cubed_sphere
LarissaReames-NOAA Feb 14, 2022
6766fa0
Merge branch 'feature/nsslmicro-merge' of https://github.com/MicroTed…
LarissaReames-NOAA Feb 14, 2022
8e5e159
Merge branch 'feature/ideal-new' of https://github.com/LarissaReames-…
LarissaReames-NOAA Feb 14, 2022
aaea304
Minor text fix to gitmodules
LarissaReames-NOAA Feb 14, 2022
09dd2ff
Merge branch 'develop' of https://github.com/LarissaReames-NOAA/fv3at…
LarissaReames-NOAA Feb 14, 2022
157b1af
Updated atmos_cubed_sphere with new idealized sounding capabilities.
LarissaReames-NOAA Feb 16, 2022
5cecf83
Update atmos_cubed_sphere
LarissaReames-NOAA Feb 17, 2022
f85fad8
Add flags and code for 3-moment rain/graupel/hail in NSSL microphysi…
MicroTed Apr 10, 2023
864fb1b
Merge remote-tracking branch 'larissa/feature/ideal-new' into feature…
MicroTed Apr 10, 2023
77d250d
Update submodules and add suites for ideal
MicroTed Apr 11, 2023
9cdcb76
Added fix to re-implement ideal (doubly periodic) grid capability in …
LarissaReames-NOAA Apr 13, 2023
d90c372
Update to correct branch of atmos_cubed_sphere
LarissaReames-NOAA Apr 13, 2023
652c0bf
Update otsptflag for 3moment variables
MicroTed Apr 16, 2023
cae9c22
Fixed missing routine from ideal suite
MicroTed Apr 18, 2023
12b6b8e
Update submodule
MicroTed Apr 18, 2023
55d4b54
Merge commit 'bbc5bf8' into feature/ideal-new-nssl3m
MicroTed Sep 20, 2023
45de372
Submodule update
MicroTed Sep 23, 2023
da84b17
Submodule update
MicroTed Sep 23, 2023
d78bc9b
Merge branch 'develop' into ideal-periodic
MicroTed Nov 10, 2023
ba27e2b
Set correct submodules
MicroTed Nov 10, 2023
28a4346
Commented phys_tend in suite_FV3_RRFS_v1nssl_ideal.xml, but need to …
MicroTed Nov 10, 2023
d6b7416
Updated and renamed two suites for idealized model setup
MicroTed Nov 14, 2023
f03b664
Update commit for atmos_cubed_sphere
MicroTed Nov 14, 2023
e6a7a6c
Workaround to turn off radiation by adding a flag 'do_radiation' to …
MicroTed Nov 15, 2023
2cd4f2d
Updated atmos_cubed_sphere state
LarissaReames-NOAA Nov 29, 2023
0c8915a
Merge branch 'ideal-periodic' of https://github.com/MicroTed/fv3atm i…
LarissaReames-NOAA Nov 29, 2023
3a688e3
Added radiation block to ideal_mp_nssl suite. Changed atmos_cubed_sph…
LarissaReames-NOAA Dec 8, 2023
01bb3e2
Merge branch 'develop' of https://github.com/LarissaReames-NOAA/fv3at…
LarissaReames-NOAA Dec 8, 2023
589b7bd
updated atmos_cubed_sphere
LarissaReames-NOAA Dec 11, 2023
75abfcb
Updated atmos_cubed_sphere
LarissaReames-NOAA Jan 25, 2024
e8bc76b
Merge branch 'ideal-periodic' of https://github.com/LarissaReames-NOA…
LarissaReames-NOAA Jan 25, 2024
ac265df
Merge branch 'develop' of https://github.com/NOAA-EMC/fv3atm into ide…
LarissaReames-NOAA Jan 25, 2024
5df206d
Update atmos_cubed_sphere for ideal test changes
LarissaReames-NOAA Jan 2, 2025
e56385c
Merge branch 'develop' of https://github.com/NOAA-EMC/fv3atm into ide…
LarissaReames-NOAA Jan 2, 2025
ef1101d
Updated ccpp submodules
LarissaReames-NOAA Jan 2, 2025
a6d4260
Update CCPP submodules ... again
LarissaReames-NOAA Jan 2, 2025
bfa340a
Merge branch 'develop' of https://github.com/NOAA-EMC/fv3atm into ide…
LarissaReames-NOAA Jan 3, 2025
71e353d
Updates to ideal test code structure and CCPP suites.
LarissaReames-NOAA Jan 10, 2025
85e8507
Merge pull request #1 from NOAA-EMC/develop
LarissaReames-NOAA Jan 13, 2025
d5d075b
Remove do_radiation flag as ccpp can now properly handle empty sections
LarissaReames-NOAA Jan 14, 2025
6fd8966
Remove extranesous ccpp suites. Remove extraneous code used for debug…
LarissaReames-NOAA Jan 14, 2025
5fa7e69
Minor text fixes
LarissaReames-NOAA Jan 14, 2025
2b4130f
Add umove and vmove options
LarissaReames-NOAA Jan 14, 2025
2b6e9a8
Empty out radiation loop of ideal_mp ccpp suite
LarissaReames-NOAA Jan 14, 2025
406089e
Update atmos_cubed_sphere with NISE commentary upgrade
LarissaReames-NOAA Jan 14, 2025
3dac7b9
Update atmos_cubed_sphere with bug fixes for model crashes.
LarissaReames-NOAA Jan 16, 2025
f86afff
Update ideal ccpp suites
LarissaReames-NOAA Jan 16, 2025
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
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[submodule "atmos_cubed_sphere"]
path = atmos_cubed_sphere
url = https://github.com/NOAA-GFDL/GFDL_atmos_cubed_sphere
branch = dev/emc
url = https://github.com/LarissaReames-NOAA/GFDL_atmos_cubed_sphere.git
branch = ideal-periodic
[submodule "ccpp/framework"]
path = ccpp/framework
url = https://github.com/NCAR/ccpp-framework
Expand Down
3 changes: 2 additions & 1 deletion atmos_model.F90
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ module atmos_model_mod
! (they correspond to the x, y, pfull, phalf axes)
integer, pointer :: pelist(:) =>null() ! pelist where atmosphere is running.
integer :: layout(2) ! computer task laytout
integer :: grid_type
logical :: regional ! true if domain is regional
logical :: nested ! true if there is a nest
logical :: moving_nest_parent ! true if this grid has a moving nest child
Expand Down Expand Up @@ -577,7 +578,7 @@ subroutine atmos_model_init (Atmos, Time_init, Time, Time_step)
call atmosphere_resolution (mlon, mlat, global=.true.)
call atmosphere_domain (Atmos%domain, Atmos%domain_for_read, Atmos%layout, &
Atmos%regional, Atmos%nested, &
Atmos%ngrids, Atmos%mygrid, Atmos%pelist)
Atmos%ngrids, Atmos%mygrid, Atmos%pelist, Atmos%grid_type)
Atmos%moving_nest_parent = .false.
Atmos%is_moving_nest = .false.
#ifdef MOVING_NEST
Expand Down
39 changes: 39 additions & 0 deletions ccpp/suites/suite_FV3_ideal_mp_nssl.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>

<suite name="FV3_ideal_mp_nssl" lib="ccppphys" ver="1">
<!-- <init></init> -->
<group name="time_vary">
<subcycle loop="1">
<scheme>GFS_time_vary_pre</scheme>
<scheme>GFS_phys_time_vary</scheme>
</subcycle>
</group>
<group name="radiation">
<subcycle loop="1">
</subcycle>
</group>

<group name="physics">
<!-- Surface iteration loop -->
<!-- End of surface iteration loop -->
<subcycle loop="1">
<scheme>GFS_suite_stateout_update</scheme>
<!-- <scheme>h2ophys</scheme> -->
<scheme>get_prs_fv3</scheme>
<scheme>get_phi_fv3</scheme>
<scheme>GFS_MP_generic_pre</scheme>
<scheme>mp_nssl</scheme>
<scheme>GFS_MP_generic_post</scheme>
<scheme>maximum_hourly_diagnostics</scheme>
<scheme>GFS_physics_post</scheme>
<!-- <scheme>phys_tend</scheme> -->
</subcycle>
</group>
<!--
<group name="stochastics">
<subcycle loop="1">
</subcycle>
</group>
-->
<!-- <finalize></finalize> -->
</suite>
62 changes: 62 additions & 0 deletions ccpp/suites/suite_FV3_ideal_pbl_mp_nssl.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<?xml version="1.0" encoding="UTF-8"?>

<suite name="FV3_ideal_pbl_mp_nssl" lib="ccppphys" ver="5">
<!-- <init></init> -->
<group name="time_vary">
<subcycle loop="1">
<scheme>GFS_time_vary_pre</scheme>
<scheme>GFS_rrtmg_setup</scheme>
<scheme>GFS_rad_time_vary</scheme>
<scheme>GFS_phys_time_vary</scheme>
</subcycle>
</group>
<group name="radiation">
<subcycle loop="1">
<scheme>GFS_suite_interstitial_rad_reset</scheme>
<scheme>sgscloud_radpre</scheme>
<scheme>GFS_rrtmg_pre</scheme>
<scheme>GFS_radiation_surface</scheme>
<scheme>rad_sw_pre</scheme>
<scheme>rrtmg_sw</scheme>
<scheme>rrtmg_sw_post</scheme>
<scheme>rrtmg_lw</scheme>
<scheme>sgscloud_radpost</scheme>
<scheme>rrtmg_lw_post</scheme>
<scheme>GFS_rrtmg_post</scheme>
</subcycle>
</group>
<group name="physics">
<subcycle loop="1">
<scheme>GFS_suite_interstitial_phys_reset</scheme>
<scheme>GFS_suite_stateout_reset</scheme>
<scheme>get_prs_fv3</scheme>
<scheme>GFS_suite_interstitial_1</scheme>
<scheme>GFS_surface_generic_pre</scheme>
<scheme>GFS_surface_composites_pre</scheme>
<scheme>dcyc2t3</scheme>
<scheme>GFS_surface_composites_inter</scheme>
<scheme>GFS_suite_interstitial_2</scheme>
</subcycle>
<!-- Surface iteration loop -->
<subcycle loop="2">
<scheme>mynnsfc_wrapper</scheme>
<scheme>GFS_surface_loop_control_part1</scheme>
<scheme>sfc_nst_pre</scheme>
<scheme>sfc_nst</scheme>
<scheme>sfc_nst_post</scheme>
<scheme>noahmpdrv</scheme>
<scheme>sfc_sice</scheme>
<scheme>GFS_surface_loop_control_part2</scheme>
</subcycle>
<!-- End of surface iteration loop -->
<subcycle loop="1">
<scheme>mynnedmf_wrapper</scheme>
<scheme>get_phi_fv3</scheme>
<scheme>GFS_MP_generic_pre</scheme>
<scheme>mp_nssl</scheme>
<scheme>GFS_MP_generic_post</scheme>
<scheme>maximum_hourly_diagnostics</scheme>
<scheme>GFS_physics_post</scheme>
</subcycle>
</group>
</suite>
103 changes: 65 additions & 38 deletions module_fcst_grid_comp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ module module_fcst_grid_comp
fv_srf_wnd_restart_bundle_setup, &
fv_tracer_restart_bundle_setup

use fms2_io_mod, only: FmsNetcdfFile_t, open_file, close_file, variable_exists, read_data
use fms2_io_mod, only: FmsNetcdfFile_t, open_file, close_file, variable_exists, &
read_data
use fms_io_mod, only: field_exist, read_data_old=>read_data

use atmosphere_mod, only: atmosphere_control_data

Expand Down Expand Up @@ -171,7 +173,7 @@ subroutine SetServicesNest(nest, rc)
character(3) :: myGridStr
type(ESMF_DistGrid) :: distgrid
type(ESMF_Array) :: array

character(256) :: gridfile
rc = ESMF_SUCCESS

call ESMF_GridCompSetEntryPoint(nest, ESMF_METHOD_INITIALIZE, userRoutine=init_dyn_fb, phase=1, rc=rc)
Expand Down Expand Up @@ -201,7 +203,30 @@ subroutine SetServicesNest(nest, rc)
grid_typekind = ESMF_TYPEKIND_R8
endif

if (trim(name)=="global") then
if (Atmos%grid_type==4) then
gridfile = "grid_spec.nc" ! default

if (field_exist("INPUT/grid_spec.nc", "atm_mosaic_file")) then
call read_data_old("INPUT/grid_spec.nc", "atm_mosaic_file", gridfile)
endif

do tl=1,6
decomptile(1,tl) = layout(1)
decomptile(2,tl) = layout(2)
decompflagPTile(:,tl) = (/ESMF_DECOMP_SYMMEDGEMAX,ESMF_DECOMP_SYMMEDGEMAX/)
enddo
grid = ESMF_GridCreateMosaic(filename="INPUT/"//trim(gridfile),&
regDecompPTile=decomptile,tileFilePath="INPUT/",&
decompflagPTile=decompflagPTile,&
staggerlocList=(/ESMF_STAGGERLOC_CENTER,ESMF_STAGGERLOC_CORNER/), &
name='fcst_grid', rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU,line=__LINE__, file=__FILE__)) return
call mpp_error(NOTE, 'after create fcst grid for global-only with INPUT/'//trim(gridfile))

call addLsmask2grid(grid, rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU,line=__LINE__, file=__FILE__)) return

elseif (trim(name)=="global") then
! global domain
call ESMF_InfoGet(info, key="tilesize", value=tilesize, rc=rc); ESMF_ERR_ABORT(rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return
Expand Down Expand Up @@ -237,41 +262,43 @@ subroutine SetServicesNest(nest, rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return
endif

! - Create coordinate arrays around allocations held within Atmos data structure and set in Grid

call ESMF_GridGet(grid, staggerloc=ESMF_STAGGERLOC_CENTER, distgrid=distgrid, rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return

array = ESMF_ArrayCreate(distgrid, farray=Atmos%lon, indexflag=ESMF_INDEX_DELOCAL, rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return

call ESMF_GridSetCoord(grid, coordDim=1, staggerLoc=ESMF_STAGGERLOC_CENTER, array=array, rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return

array = ESMF_ArrayCreate(distgrid, farray=Atmos%lat, indexflag=ESMF_INDEX_DELOCAL, rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return

call ESMF_GridSetCoord(grid, coordDim=2, staggerLoc=ESMF_STAGGERLOC_CENTER, array=array, rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return

call ESMF_GridGet(grid, staggerloc=ESMF_STAGGERLOC_CORNER, distgrid=distgrid, rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return

array = ESMF_ArrayCreate(distgrid, farray=Atmos%lon_bnd, indexflag=ESMF_INDEX_DELOCAL, rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return

call ESMF_GridSetCoord(grid, coordDim=1, staggerLoc=ESMF_STAGGERLOC_CORNER, array=array, rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return

array = ESMF_ArrayCreate(distgrid, farray=Atmos%lat_bnd, indexflag=ESMF_INDEX_DELOCAL, rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return

call ESMF_GridSetCoord(grid, coordDim=2, staggerLoc=ESMF_STAGGERLOC_CORNER, array=array, rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return

!TODO: Consider aligning mask treatment with coordinates... especially if it requires updates for moving
call addLsmask2grid(grid, rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return
if (.not. (Atmos%grid_type==4)) then
! - Create coordinate arrays around allocations held within Atmos data structure and set in Grid

call ESMF_GridGet(grid, staggerloc=ESMF_STAGGERLOC_CENTER, distgrid=distgrid, rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return

array = ESMF_ArrayCreate(distgrid, farray=Atmos%lon, indexflag=ESMF_INDEX_DELOCAL, rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return

call ESMF_GridSetCoord(grid, coordDim=1, staggerLoc=ESMF_STAGGERLOC_CENTER, array=array, rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return

array = ESMF_ArrayCreate(distgrid, farray=Atmos%lat, indexflag=ESMF_INDEX_DELOCAL, rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return

call ESMF_GridSetCoord(grid, coordDim=2, staggerLoc=ESMF_STAGGERLOC_CENTER, array=array, rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return

call ESMF_GridGet(grid, staggerloc=ESMF_STAGGERLOC_CORNER, distgrid=distgrid, rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return

array = ESMF_ArrayCreate(distgrid, farray=Atmos%lon_bnd, indexflag=ESMF_INDEX_DELOCAL, rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return

call ESMF_GridSetCoord(grid, coordDim=1, staggerLoc=ESMF_STAGGERLOC_CORNER, array=array, rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return

array = ESMF_ArrayCreate(distgrid, farray=Atmos%lat_bnd, indexflag=ESMF_INDEX_DELOCAL, rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return

call ESMF_GridSetCoord(grid, coordDim=2, staggerLoc=ESMF_STAGGERLOC_CORNER, array=array, rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return

!TODO: Consider aligning mask treatment with coordinates... especially if it requires updates for moving
call addLsmask2grid(grid, rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return
endif

! - Add Attributes used by output

Expand Down
Loading