Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
37 changes: 37 additions & 0 deletions ocean/convergence_global/QU120/cosine_bell/build_base_mesh.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/usr/bin/env python
import numpy as np
from mpas_tools.ocean import build_spherical_mesh


def cellWidthVsLatLon():
"""
Create cell width array for this mesh on a regular latitude-longitude grid.

Returns
-------
cellWidth : numpy.array
m x n array, entries are desired cell width in km
lat : numpy.array
latitude, vector of length m, with entries between -90 and 90, degrees
lon : numpy.array
longitude, vector of length n, with entries between -180 and 180,
degrees
"""

ddeg = 10
constantCellWidth = 120

lat = np.arange(-90, 90.01, ddeg)
lon = np.arange(-180, 180.01, ddeg)

cellWidth = constantCellWidth * np.ones((lat.size, lon.size))
return cellWidth, lon, lat


def main():
cellWidth, lon, lat = cellWidthVsLatLon()
build_spherical_mesh(cellWidth, lon, lat, out_filename='base_mesh.nc')


if __name__ == '__main__':
main()
23 changes: 23 additions & 0 deletions ocean/convergence_global/QU120/cosine_bell/config_forward.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0"?>
<config case="forward">
<add_link source="../initial_state/initial_state.nc" dest="init.nc"/>
<add_link source="../base_mesh/graph.info" dest="graph.info"/>

<add_executable source="model" dest="ocean_model"/>

<namelist name="namelist.ocean" mode="forward">
<template file="templates/template_forward_cosine_bell.xml" path_base="script_configuration_dir"/>
<option name="config_dt">'00:60:00'</option>
</namelist>

<streams name="streams.ocean" keep="immutable" mode="forward">
<template file="templates/template_forward_cosine_bell.xml" path_base="script_configuration_dir"/>
</streams>

<run_script name="run.py">
<step executable="gpmetis">
<argument flag="graph.info">144</argument>
</step>
<model_run procs="144" threads="1" namelist="namelist.ocean" streams="streams.ocean"/>
</run_script>
</config>
37 changes: 37 additions & 0 deletions ocean/convergence_global/QU150/cosine_bell/build_base_mesh.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/usr/bin/env python
import numpy as np
from mpas_tools.ocean import build_spherical_mesh


def cellWidthVsLatLon():
"""
Create cell width array for this mesh on a regular latitude-longitude grid.

Returns
-------
cellWidth : numpy.array
m x n array, entries are desired cell width in km
lat : numpy.array
latitude, vector of length m, with entries between -90 and 90, degrees
lon : numpy.array
longitude, vector of length n, with entries between -180 and 180,
degrees
"""

ddeg = 10
constantCellWidth = 150

lat = np.arange(-90, 90.01, ddeg)
lon = np.arange(-180, 180.01, ddeg)

cellWidth = constantCellWidth * np.ones((lat.size, lon.size))
return cellWidth, lon, lat


def main():
cellWidth, lon, lat = cellWidthVsLatLon()
build_spherical_mesh(cellWidth, lon, lat, out_filename='base_mesh.nc')


if __name__ == '__main__':
main()
23 changes: 23 additions & 0 deletions ocean/convergence_global/QU150/cosine_bell/config_forward.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0"?>
<config case="forward">
<add_link source="../initial_state/initial_state.nc" dest="init.nc"/>
<add_link source="../base_mesh/graph.info" dest="graph.info"/>

<add_executable source="model" dest="ocean_model"/>

<namelist name="namelist.ocean" mode="forward">
<template file="templates/template_forward_cosine_bell.xml" path_base="script_configuration_dir"/>
<option name="config_dt">'00:75:00'</option>
</namelist>

<streams name="streams.ocean" keep="immutable" mode="forward">
<template file="templates/template_forward_cosine_bell.xml" path_base="script_configuration_dir"/>
</streams>

<run_script name="run.py">
<step executable="gpmetis">
<argument flag="graph.info">72</argument>
</step>
<model_run procs="72" threads="1" namelist="namelist.ocean" streams="streams.ocean"/>
</run_script>
</config>
37 changes: 37 additions & 0 deletions ocean/convergence_global/QU180/cosine_bell/build_base_mesh.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/usr/bin/env python
import numpy as np
from mpas_tools.ocean import build_spherical_mesh


def cellWidthVsLatLon():
"""
Create cell width array for this mesh on a regular latitude-longitude grid.

Returns
-------
cellWidth : numpy.array
m x n array, entries are desired cell width in km
lat : numpy.array
latitude, vector of length m, with entries between -90 and 90, degrees
lon : numpy.array
longitude, vector of length n, with entries between -180 and 180,
degrees
"""

ddeg = 10
constantCellWidth = 180

lat = np.arange(-90, 90.01, ddeg)
lon = np.arange(-180, 180.01, ddeg)

cellWidth = constantCellWidth * np.ones((lat.size, lon.size))
return cellWidth, lon, lat


def main():
cellWidth, lon, lat = cellWidthVsLatLon()
build_spherical_mesh(cellWidth, lon, lat, out_filename='base_mesh.nc')


if __name__ == '__main__':
main()
23 changes: 23 additions & 0 deletions ocean/convergence_global/QU180/cosine_bell/config_forward.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0"?>
<config case="forward">
<add_link source="../initial_state/initial_state.nc" dest="init.nc"/>
<add_link source="../base_mesh/graph.info" dest="graph.info"/>

<add_executable source="model" dest="ocean_model"/>

<namelist name="namelist.ocean" mode="forward">
<template file="templates/template_forward_cosine_bell.xml" path_base="script_configuration_dir"/>
<option name="config_dt">'00:90:00'</option>
</namelist>

<streams name="streams.ocean" keep="immutable" mode="forward">
<template file="templates/template_forward_cosine_bell.xml" path_base="script_configuration_dir"/>
</streams>

<run_script name="run.py">
<step executable="gpmetis">
<argument flag="graph.info">72</argument>
</step>
<model_run procs="72" threads="1" namelist="namelist.ocean" streams="streams.ocean"/>
</run_script>
</config>
37 changes: 37 additions & 0 deletions ocean/convergence_global/QU210/cosine_bell/build_base_mesh.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/usr/bin/env python
import numpy as np
from mpas_tools.ocean import build_spherical_mesh


def cellWidthVsLatLon():
"""
Create cell width array for this mesh on a regular latitude-longitude grid.

Returns
-------
cellWidth : numpy.array
m x n array, entries are desired cell width in km
lat : numpy.array
latitude, vector of length m, with entries between -90 and 90, degrees
lon : numpy.array
longitude, vector of length n, with entries between -180 and 180,
degrees
"""

ddeg = 10
constantCellWidth = 210

lat = np.arange(-90, 90.01, ddeg)
lon = np.arange(-180, 180.01, ddeg)

cellWidth = constantCellWidth * np.ones((lat.size, lon.size))
return cellWidth, lon, lat


def main():
cellWidth, lon, lat = cellWidthVsLatLon()
build_spherical_mesh(cellWidth, lon, lat, out_filename='base_mesh.nc')


if __name__ == '__main__':
main()
23 changes: 23 additions & 0 deletions ocean/convergence_global/QU210/cosine_bell/config_forward.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0"?>
<config case="forward">
<add_link source="../initial_state/initial_state.nc" dest="init.nc"/>
<add_link source="../base_mesh/graph.info" dest="graph.info"/>

<add_executable source="model" dest="ocean_model"/>

<namelist name="namelist.ocean" mode="forward">
<template file="templates/template_forward_cosine_bell.xml" path_base="script_configuration_dir"/>
<option name="config_dt">'00:105:00'</option>
</namelist>

<streams name="streams.ocean" keep="immutable" mode="forward">
<template file="templates/template_forward_cosine_bell.xml" path_base="script_configuration_dir"/>
</streams>

<run_script name="run.py">
<step executable="gpmetis">
<argument flag="graph.info">36</argument>
</step>
<model_run procs="36" threads="1" namelist="namelist.ocean" streams="streams.ocean"/>
</run_script>
</config>
37 changes: 37 additions & 0 deletions ocean/convergence_global/QU240/cosine_bell/build_base_mesh.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/usr/bin/env python
import numpy as np
from mpas_tools.ocean import build_spherical_mesh


def cellWidthVsLatLon():
"""
Create cell width array for this mesh on a regular latitude-longitude grid.

Returns
-------
cellWidth : numpy.array
m x n array, entries are desired cell width in km
lat : numpy.array
latitude, vector of length m, with entries between -90 and 90, degrees
lon : numpy.array
longitude, vector of length n, with entries between -180 and 180,
degrees
"""

ddeg = 10
constantCellWidth = 240

lat = np.arange(-90, 90.01, ddeg)
lon = np.arange(-180, 180.01, ddeg)

cellWidth = constantCellWidth * np.ones((lat.size, lon.size))
return cellWidth, lon, lat


def main():
cellWidth, lon, lat = cellWidthVsLatLon()
build_spherical_mesh(cellWidth, lon, lat, out_filename='base_mesh.nc')


if __name__ == '__main__':
main()
23 changes: 23 additions & 0 deletions ocean/convergence_global/QU240/cosine_bell/config_forward.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0"?>
<config case="forward">
<add_link source="../initial_state/initial_state.nc" dest="init.nc"/>
<add_link source="../base_mesh/graph.info" dest="graph.info"/>

<add_executable source="model" dest="ocean_model"/>

<namelist name="namelist.ocean" mode="forward">
<template file="templates/template_forward_cosine_bell.xml" path_base="script_configuration_dir"/>
<option name="config_dt">'00:120:00'</option>
</namelist>

<streams name="streams.ocean" keep="immutable" mode="forward">
<template file="templates/template_forward_cosine_bell.xml" path_base="script_configuration_dir"/>
</streams>

<run_script name="run.py">
<step executable="gpmetis">
<argument flag="graph.info">36</argument>
</step>
<model_run procs="36" threads="1" namelist="namelist.ocean" streams="streams.ocean"/>
</run_script>
</config>
37 changes: 37 additions & 0 deletions ocean/convergence_global/QU60/cosine_bell/build_base_mesh.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/usr/bin/env python
import numpy as np
from mpas_tools.ocean import build_spherical_mesh


def cellWidthVsLatLon():
"""
Create cell width array for this mesh on a regular latitude-longitude grid.

Returns
-------
cellWidth : numpy.array
m x n array, entries are desired cell width in km
lat : numpy.array
latitude, vector of length m, with entries between -90 and 90, degrees
lon : numpy.array
longitude, vector of length n, with entries between -180 and 180,
degrees
"""

ddeg = 10
constantCellWidth = 60

lat = np.arange(-90, 90.01, ddeg)
lon = np.arange(-180, 180.01, ddeg)

cellWidth = constantCellWidth * np.ones((lat.size, lon.size))
return cellWidth, lon, lat


def main():
cellWidth, lon, lat = cellWidthVsLatLon()
build_spherical_mesh(cellWidth, lon, lat, out_filename='base_mesh.nc')


if __name__ == '__main__':
main()
Loading