-
Notifications
You must be signed in to change notification settings - Fork 115
Realistic lfric2lfric configs #660
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
Open
cjohnson-pi
wants to merge
19
commits into
MetOffice:main
Choose a base branch
from
cjohnson-pi:realistic
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
2b2bd4e
From #530
cjohnson-pi 65fbef9
correction
cjohnson-pi 86a642b
correction
cjohnson-pi 4316da9
correction
cjohnson-pi 1e0527f
memory
cjohnson-pi 23b3f80
config names correction
cjohnson-pi facae21
correct mesh name
cjohnson-pi d4c94fd
corrections
cjohnson-pi 2e91da4
rose config dump
cjohnson-pi ce114b4
tidy
cjohnson-pi dfae217
tidy
cjohnson-pi 19d0371
Move output to share
cjohnson-pi 80fc84e
correction
cjohnson-pi d53ed8e
correction
cjohnson-pi c7dd68d
missing comma
cjohnson-pi d2be4dc
test before mv
cjohnson-pi 8eb3214
Response to science review
cjohnson-pi da89ca5
whitespace
cjohnson-pi e6298af
Merge branch 'main' into realistic
mo-lucy-gordon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| <!-- iodef file for source files that have originated from lfric_atm output (lfric_diag) files --> | ||
| <!-- This uses grid_ref=full_level_face grid instead of domain_ref=checkpoint_Wtheta --> | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <simulation> | ||
|
|
||
| <!-- File definition for read (Source file) --> | ||
| <context id = "lfric2lfric_source"> | ||
|
|
||
| <!-- Include axis and grid definitions --> | ||
| <axis_definition src="./axis_def_main.xml"/> | ||
| <axis_definition src="./axis_def_urban1t.xml"/> | ||
| <grid_definition src="./grid_def_main.xml"/> | ||
|
|
||
| <!-- Local file definitions --> | ||
| <file_definition type="one_file" par_access="collective" time_counter="none"> | ||
|
|
||
| <!-- File definition for LFRic diagnostic file read --> | ||
| <file id="lfric_checkpoint_read" name="lfric_checkpoint_read" mode="read" output_freq="1ts" convention="UGRID" cyclic="true" enabled=".TRUE."> | ||
| <!-- Atmosphere fields --> | ||
| <field id="restart_theta" name="theta" long_name="air_potential_temperature" standard_name="air_potential_temperature" unit="K" grid_ref="full_level_face_grid" operation="once" /> | ||
| <field id="restart_rho" name="rho" long_name="air_density" standard_name="air_density" unit="kg m-3" grid_ref="half_level_face_grid" operation="once" /> | ||
| </file> | ||
|
|
||
| </file_definition> | ||
| </context> | ||
|
|
||
| <!-- File definition for write (Destination file) --> | ||
| <context id = "lfric2lfric_destination"> | ||
|
|
||
| <!-- Include axis and grid definitions --> | ||
| <axis_definition src="./axis_def_main.xml"/> | ||
| <axis_definition src="./axis_def_urban1t.xml"/> | ||
| <grid_definition src="./grid_def_main.xml"/> | ||
|
|
||
| <!-- Local file definitions --> | ||
| <file_definition type="one_file" par_access="collective" time_counter="none"> | ||
|
|
||
| <!-- File definition for LFRic checkpoint --> | ||
| <file id="lfric_checkpoint_write" name="lfric_checkpoint_write" mode="write" output_freq="1ts" convention="UGRID" enabled=".TRUE."> | ||
|
|
||
| <!-- Atmosphere fields --> | ||
| <field id="checkpoint_theta" name="theta" long_name="air_potential_temperature" standard_name="air_potential_temperature" unit="K" prec="8" domain_ref="checkpoint_Wtheta" operation="once" /> | ||
| <field id="checkpoint_rho" name="rho" long_name="air_density" standard_name="air_density" unit="kg m-3" prec="8" domain_ref="checkpoint_W3" operation="once" /> | ||
| </file> | ||
|
|
||
| </file_definition> | ||
|
|
||
| </context> | ||
|
|
||
| <context id = "xios"> | ||
| <variable_definition> | ||
| <variable_group id = "buffer"> | ||
| <variable id = "optimal_buffer_size" type = "string" >performance</variable> | ||
| <variable id = "buffer_size_factor" type = "double" >1.0</variable> | ||
| </variable_group> | ||
|
|
||
| <variable_group id = "parameters" > | ||
| <variable id = "using_server" type = "bool" >false</variable> | ||
| <variable id = "using_oasis" type = "bool">false</variable> | ||
| <variable id = "info_level" type = "int" >50</variable> | ||
| <variable id = "print_file" type="bool">true</variable> | ||
| <variable id = "oasis_codes_id" type="string" >lfric2lfric lfric2lfric</variable> | ||
| </variable_group> | ||
| </variable_definition> | ||
| </context> | ||
|
|
||
| </simulation> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| [namelist:lfric2lfric] | ||
| destination_mesh_name='melbourne' | ||
| destination_meshfile_prefix='${MESH_DIR}/melbourne/mesh_melbourne' | ||
| destination_topology='non_periodic' | ||
| dst_ancil_directory='$BIG_DATA_DIR/ancils/proto-ral/Ticket255/Melbourne' | ||
| dst_orography_mean_ancil_path='' | ||
| target_domain='LAM' | ||
|
|
||
| [namelist:partitioning(destination)] | ||
| partitioner='planar' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| [namelist:lfric2lfric] | ||
| destination_mesh_name='ukv' | ||
| destination_meshfile_prefix='${MESH_DIR}/ukv/mesh_ukv' | ||
| destination_topology='non_periodic' | ||
| dst_ancil_directory='' | ||
| dst_orography_mean_ancil_path='' | ||
| target_domain='LAM' | ||
|
|
||
| [namelist:partitioning(destination)] | ||
| partitioner='planar' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| [file:iodef.xml] | ||
| source=$ROSE_SUITE_DIR/app/lfric2lfric/file/iodef_orography.xml | ||
|
|
||
| [file:source_data_C224.nc] | ||
| mode=symlink | ||
| source="/data/users/christine.johnson/lfric_data/lfric2lfric/startdump_C224.nc" | ||
|
|
||
| [namelist:extrusion] | ||
| domain_height=80000.0 | ||
| method='um_L70_50t_20s_80km' | ||
| number_of_layers=70 | ||
| stretching_height=17507.0 | ||
| stretching_method='smooth' | ||
|
|
||
| [namelist:files] | ||
| start_dump_filename='source_data_C224' | ||
|
|
||
| [namelist:lfric2lfric] | ||
| source_mesh_name='dynamics' | ||
| source_meshfile_prefix='${MESH_DIR}/C224_MG/mesh_C224_MG' | ||
| src_ancil_directory='$BIG_DATA_DIR/ancils/basic-gal/yak/C224' | ||
| src_orography_mean_ancil_path='orography/gmted_ramp2/qrparm.orog.ugrid' | ||
|
|
||
| [namelist:orography] | ||
| orog_init_option='none' | ||
|
|
||
| [namelist:partitioning(source)] | ||
| panel_decomposition='custom' | ||
| panel_xproc=6 | ||
| panel_yproc=6 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| [file:iodef.xml] | ||
| source=$ROSE_SUITE_DIR/app/lfric2lfric/file/iodef_diag_file.xml | ||
|
|
||
| [file:source_data_C896.nc] | ||
| mode=symlink | ||
| source="/data/users/christine.johnson/lfric_data/lfric2lfric/rho_theta_C896_t1.nc" | ||
|
|
||
| [namelist:extrusion] | ||
| domain_height=80000.0 | ||
| method='um_L70_50t_20s_80km' | ||
| number_of_layers=70 | ||
| stretching_height=17507.0 | ||
| stretching_method='smooth' | ||
|
|
||
| [namelist:files] | ||
| start_dump_filename='source_data_C896' | ||
|
|
||
| [namelist:lfric2lfric] | ||
| source_mesh_name='dynamics' | ||
| source_meshfile_prefix='${MESH_DIR}/C896_MG/mesh_C896_MG' | ||
| src_ancil_directory='' | ||
| src_orography_mean_ancil_path='' | ||
|
|
||
| [namelist:orography] | ||
| orog_init_option='none' | ||
|
|
||
| [namelist:partitioning(source)] | ||
| panel_decomposition='custom' | ||
| panel_xproc=16 | ||
| panel_yproc=8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| [command] | ||
| default=mkdir -p $MESH_DIR ; mpiexec -n 1 $BIN_DIR/planar_mesh_generator mesh_generation.nml | ||
|
|
||
| [env] | ||
| mesh_generator=Planar | ||
|
|
||
| [!!namelist:cubedsphere_mesh] | ||
|
|
||
| [namelist:mesh] | ||
| mesh_names='melbourne' | ||
| rotate_mesh=.true. | ||
| topology='non_periodic' | ||
|
|
||
| [namelist:planar_mesh] | ||
| domain_centre=144.578,-37.472 | ||
| domain_size=3.456,3.456 | ||
| edge_cells_x=256 | ||
| edge_cells_y=256 | ||
| periodic_x=.false. | ||
| periodic_y=.false. | ||
|
|
||
| [namelist:rotation] | ||
| target_north_pole=180.0,90.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| [command] | ||
| default=mkdir -p $MESH_DIR ; mpiexec -n 1 $BIN_DIR/planar_mesh_generator mesh_generation.nml | ||
|
|
||
| [env] | ||
| mesh_generator=Planar | ||
|
|
||
| [!!namelist:cubedsphere_mesh] | ||
|
|
||
| [namelist:mesh] | ||
| mesh_names='ukv' | ||
| rotate_mesh=.true. | ||
| topology='non_periodic' | ||
|
|
||
| [namelist:planar_mesh] | ||
| domain_centre=-0.872500,1.6968 | ||
| domain_size=1,1 | ||
| edge_cells_x=960 | ||
| edge_cells_y=1024 | ||
| periodic_x=.false. | ||
| periodic_y=.false. | ||
| stretch_function='inflation' | ||
|
|
||
| [namelist:rotation] | ||
| target_north_pole=177.5,37.5 | ||
|
|
||
| [namelist:stretch_transform] | ||
| cell_size_inner=0.0135,0.0135 | ||
| cell_size_outer=0.036,0.036 | ||
| n_cells_outer=140,85 | ||
| n_cells_stretch=21,21 | ||
| stretching_on='p_points' | ||
| transform_mesh='ukv' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I guess this line is here because the global mesh is not needed by lfric2lfric. Why is it not the case when the source and destination meshes are read from the same file? Shouldn't be this line outside the if sentence?
A comment in the PR indicating that this change is taking place, apart from the addition of the new tests, would be useful.
I could not find an associated issue where the details of the PR are discussed, although I know this is part of larger work.
Uh oh!
There was an error while loading. Please reload this page.
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.
Issue is #440 - now also added above.
Uh oh!
There was an error while loading. Please reload this page.
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.
I've adjusted the code to also clear the global mesh for the case when the source and destination mesh are from the same file.
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.
What I meant is that the clear global mesh could be done outside the
if (mesh_file(dst) == mesh_file(src)) thencondition, but it is also possible to do it like you did.
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.
Thanks Juan. Sorry I didn't explain this. Yes I did consider putting the clear_global_mesh outside the
ifas you had suggested. But the reason I didn't is that when the dst is not the same as src, 2 clear_global_meshes are required - one after each create_local_mesh. So it seemed a better code structure to me to add the clear_global_mesh immediately after the create_local_mesh or create_local_maps. i.e. read global, create local_from_global, clear global. Repeat.