-
Notifications
You must be signed in to change notification settings - Fork 161
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
base: develop
Are you sure you want to change the base?
Changes from 72 commits
d3521d5
2a3a156
5564af5
9b0c228
99c9579
c485881
7655fc5
fa5bfc6
4e524c8
81d33d9
40a3c66
3d721e8
2e0abb7
2dfb094
7901983
59c2453
23287bd
91daade
09f57a2
bb1207f
6613a8c
381f1c3
dd3d27c
574411a
6766fa0
8e5e159
aaea304
09dd2ff
157b1af
5cecf83
f85fad8
864fb1b
77d250d
9cdcb76
d90c372
652c0bf
cae9c22
12b6b8e
55d4b54
45de372
da84b17
d78bc9b
ba27e2b
28a4346
d6b7416
f03b664
e6a7a6c
2cd4f2d
0c8915a
3a688e3
01bb3e2
589b7bd
75abfcb
e8bc76b
ac265df
5df206d
e56385c
ef1101d
a6d4260
bfa340a
71e353d
85e8507
d5d075b
6fd8966
5fa7e69
2b4130f
2b6e9a8
406089e
3dac7b9
f86afff
09eb0f6
b21f6f0
bf9587b
3067624
69d16d0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
+81 −0 | docs/ideal_doc/README.md | |
+208 −0 | docs/ideal_doc/create_ideal_sfc_oro_input.py | |
+3 −1 | driver/UFS/atmosphere.F90 | |
+81 −0 | input_sounding | |
+6 −0 | model/fv_arrays.F90 | |
+5 −1 | model/fv_control.F90 | |
+4 −0 | model/fv_dynamics.F90 | |
+0 −1 | tools/fv_eta.F90 | |
+5 −5 | tools/fv_grid_tools.F90 | |
+1 −1 | tools/fv_restart.F90 | |
+840 −22 | tools/test_cases.F90 |
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> |
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> |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,7 +61,8 @@ 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 atmosphere_mod, only: atmosphere_control_data | ||
|
||
|
@@ -171,7 +172,8 @@ subroutine SetServicesNest(nest, rc) | |
character(3) :: myGridStr | ||
type(ESMF_DistGrid) :: distgrid | ||
type(ESMF_Array) :: array | ||
|
||
character(256) :: gridfile | ||
type(FmsNetcdfFile_t) :: fileobj | ||
rc = ESMF_SUCCESS | ||
|
||
call ESMF_GridCompSetEntryPoint(nest, ESMF_METHOD_INITIALIZE, userRoutine=init_dyn_fb, phase=1, rc=rc) | ||
|
@@ -201,7 +203,37 @@ 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 (open_file(fileobj, "INPUT/grid_spec.nc", "read")) then | ||
if (variable_exists(fileobj, "atm_mosaic_file")) then | ||
call read_data(fileobj, "atm_mosaic_file", gridfile) | ||
endif | ||
call close_file(fileobj) | ||
endif | ||
|
||
call ESMF_InfoGet(info, key="nx", value=nx, rc=rc) | ||
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return | ||
call ESMF_InfoGet(info, key="ny", value=ny, rc=rc) | ||
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return | ||
grid = ESMF_GridCreateNoPeriDim( regDecomp=(/layout(1),layout(2)/), & | ||
minIndex=(/1,1/), & | ||
maxIndex=(/nx,ny/), & | ||
gridAlign=(/-1,-1/), & | ||
coordSys=ESMF_COORDSYS_SPH_RAD, & | ||
coordTypeKind=grid_typekind, & | ||
decompflag=(/ESMF_DECOMP_SYMMEDGEMAX,ESMF_DECOMP_SYMMEDGEMAX/), & | ||
name="fcst_grid", & | ||
indexflag=ESMF_INDEX_DELOCAL, & | ||
rc=rc) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This block looks to be identical to the code in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Logic has been combined for the two cases. |
||
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU,line=__LINE__, file=__FILE__)) return | ||
call mpp_error(NOTE, 'after create fcst grid for doubly periodic with INPUT/'//trim(gridfile)) | ||
|
||
call addLsmask2grid(grid, rc=rc) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this call needed here? There is already the same call on line 306 below. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Call removed. |
||
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 | ||
|
@@ -239,6 +271,7 @@ subroutine SetServicesNest(nest, rc) | |
|
||
! - 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 | ||
|
||
|
@@ -821,7 +854,7 @@ subroutine fcst_initialize(fcst_comp, importState, exportState, clock, rc) | |
endif | ||
!----------------------------------------------------------------------- | ||
!---- open and close dummy file in restart dir to check if dir exists -- | ||
|
||
! | ||
if (mpp_pe() == 0 ) then | ||
open( newunit=unit, file='RESTART/file', iostat=stat ) | ||
if (stat == 0) then | ||
|
@@ -888,7 +921,8 @@ subroutine fcst_initialize(fcst_comp, importState, exportState, clock, rc) | |
call ESMF_InfoGetFromHost(fcstGridComp(n), info=info, rc=rc); ESMF_ERR_ABORT(rc) | ||
call ESMF_InfoSet(info, key="layout", values=layout, rc=rc); ESMF_ERR_ABORT(rc) | ||
call ESMF_InfoSet(info, key="tilesize", value=Atmos%mlon, rc=rc); ESMF_ERR_ABORT(rc) | ||
|
||
call ESMF_InfoSet(info, key="nx", value=nx, rc=rc); ESMF_ERR_ABORT(rc) | ||
call ESMF_InfoSet(info, key="ny", value=ny, rc=rc); ESMF_ERR_ABORT(rc) | ||
call ESMF_GridCompSetServices(fcstGridComp(n), SetServicesNest, userrc=urc, rc=rc) | ||
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return | ||
if (ESMF_LogFoundError(rcToCheck=urc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__, rcToReturn=rc)) return | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks to me
gridfile
is not used anymore, other than in the error message below. If it's not, it should be removed.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This block has been removed.