summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-05-10 08:04:02 +0000
committerCoprDistGit <infra@openeuler.org>2023-05-10 08:04:02 +0000
commitaf908f8edf9ea86b5954ade0bf0baacd33cd1cc6 (patch)
tree745b61031aeea05268dbe679d0eb7e39b0d26420
parent4a263e3b5cd64b463a4666158899119832cdf853 (diff)
automatic import of python-nemspy
-rw-r--r--.gitignore1
-rw-r--r--python-nemspy.spec601
-rw-r--r--sources1
3 files changed, 603 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..8d2831d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/nemspy-1.0.8.tar.gz
diff --git a/python-nemspy.spec b/python-nemspy.spec
new file mode 100644
index 0000000..7fdd995
--- /dev/null
+++ b/python-nemspy.spec
@@ -0,0 +1,601 @@
+%global _empty_manifest_terminate_build 0
+Name: python-nemspy
+Version: 1.0.8
+Release: 1
+Summary: NEMS configuration generation
+License: CC0
+URL: https://github.com/noaa-ocs-modeling/nemspy.git
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/94/df/ce4a2867fbb92d3aa783ddb82d8e1330e13eb1de1b148b274f7d5eedabff/nemspy-1.0.8.tar.gz
+BuildArch: noarch
+
+Requires: python3-flake8
+Requires: python3-isort
+Requires: python3-oitnb
+Requires: python3-dunamai
+Requires: python3-m2r2
+Requires: python3-sphinx
+Requires: python3-sphinx-rtd-theme
+Requires: python3-pytest
+Requires: python3-pytest-cov
+Requires: python3-pytest-xdist
+
+%description
+# NEMSpy
+
+[![tests](https://github.com/noaa-ocs-modeling/NEMSpy/workflows/tests/badge.svg)](https://github.com/noaa-ocs-modeling/NEMSpy/actions?query=workflow%3Atests)
+[![codecov](https://codecov.io/gh/noaa-ocs-modeling/nemspy/branch/master/graph/badge.svg?token=uyeRvhmBtD)](https://codecov.io/gh/noaa-ocs-modeling/nemspy)
+[![build](https://github.com/noaa-ocs-modeling/NEMSpy/workflows/build/badge.svg)](https://github.com/noaa-ocs-modeling/NEMSpy/actions?query=workflow%3Abuild)
+[![version](https://img.shields.io/pypi/v/nemspy)](https://pypi.org/project/nemspy)
+[![license](https://img.shields.io/github/license/noaa-ocs-modeling/nemspy)](https://creativecommons.org/share-your-work/public-domain/cc0)
+[![style](https://sourceforge.net/p/oitnb/code/ci/default/tree/_doc/_static/oitnb.svg?format=raw)](https://sourceforge.net/p/oitnb/code)
+[![documentation](https://readthedocs.org/projects/nemspy/badge/?version=latest)](https://nemspy.readthedocs.io/en/latest/?badge=latest)
+
+NEMSpy generates configuration files (`nems.configure`, `config.rc`, `model_configure`, `atm_namelist.rc`)
+for coupled modeling applications run with a compiled NEMS binary (not included).
+
+```shell
+pip install nemspy
+```
+
+NEMS implements
+the [National Unified Operational Prediction Capability (NUOPC)](https://www.earthsystemcog.org/projects/nuopc/), and
+configuration files built for NEMS will also work for most NUOPC applications.
+
+Documentation can be found at https://nemspy.readthedocs.io
+
+## organization / responsibility
+
+NEMSpy is developed by the [Coastal Marine Modeling Branch (CMMB)](https://coastaloceanmodels.noaa.gov) of the Office of Coast Survey (OCS), a part of the [National Oceanic and Atmospheric Administration (NOAA)](https://www.noaa.gov), an agency of the United States federal government.
+
+- Zachary Burnett (**lead**) - zachary.burnett@noaa.gov
+- Saeed Moghimi - saeed.moghimi@noaa.gov
+- Jaime Calzada (past)
+
+## usage
+
+```python
+from datetime import datetime, timedelta
+from pathlib import Path
+
+from nemspy import ModelingSystem
+from nemspy.model import ADCIRCEntry, AtmosphericForcingEntry, WaveWatch3ForcingEntry
+
+# directory to which configuration files should be written
+output_directory = Path(__file__).parent / 'nems_configuration'
+
+# directory containing forcings
+forcings_directory = Path(__file__).parent / 'forcings'
+
+# model run time
+start_time = datetime(2020, 6, 1)
+duration = timedelta(days=1)
+end_time = start_time + duration
+
+# returning interval of main run sequence
+interval = timedelta(hours=1)
+
+# model entries
+ocean_model = ADCIRCEntry(processors=11, Verbosity='max', DumpFields=False)
+atmospheric_mesh = AtmosphericForcingEntry(
+ filename=forcings_directory / 'wind_atm_fin_ch_time_vec.nc', processors=1
+)
+wave_mesh = WaveWatch3ForcingEntry(
+ filename=forcings_directory / 'ww3.Constant.20151214_sxy_ike_date.nc', processors=1
+)
+
+# instantiate model system with model entries
+nems = ModelingSystem(
+ start_time=start_time,
+ end_time=end_time,
+ interval=interval,
+ ocn=ocean_model,
+ atm=atmospheric_mesh,
+ wav=wave_mesh,
+)
+
+# form connections between models
+nems.connect('ATM', 'OCN')
+nems.connect('WAV', 'OCN')
+
+# define execution order
+nems.sequence = [
+ 'ATM -> OCN',
+ 'WAV -> OCN',
+ 'ATM',
+ 'WAV',
+ 'OCN',
+]
+
+# write configuration files to the given directory
+nems.write(directory=output_directory, overwrite=True, include_version=True)
+
+```
+
+## output
+
+### `nems.configure`
+
+```fortran
+# `nems.configure` generated with NEMSpy 1.0.0
+# EARTH #
+EARTH_component_list: ATM WAV OCN
+EARTH_attributes::
+ Verbosity = off
+::
+
+# ATM #
+ATM_model: atmesh
+ATM_petlist_bounds: 0 0
+ATM_attributes::
+ Verbosity = off
+::
+
+# WAV #
+WAV_model: ww3data
+WAV_petlist_bounds: 1 1
+WAV_attributes::
+ Verbosity = off
+::
+
+# OCN #
+OCN_model: adcirc
+OCN_petlist_bounds: 2 12
+OCN_attributes::
+ Verbosity = max
+ DumpFields = false
+::
+
+# Run Sequence #
+runSeq::
+ @3600
+ ATM -> OCN :remapMethod=redist
+ WAV -> OCN :remapMethod=redist
+ ATM
+ WAV
+ OCN
+ @
+::
+```
+
+### `model_configure`
+
+```fortran
+# `model_configure` generated with NEMSpy 1.0.0
+total_member: 1
+print_esmf: .true.
+namelist: atm_namelist.rc
+PE_MEMBER01: 13
+start_year: 2020
+start_month: 6
+start_day: 1
+start_hour: 0
+start_minute: 0
+start_second: 0
+nhours_fcst: 24
+RUN_CONTINUE: .false.
+ENS_SPS: .false.
+```
+
+### `config.rc`
+
+```fortran
+# `config.rc` generated with NEMSpy 1.0.0
+ atm_dir: ~/forcings
+ atm_nam: wind_atm_fin_ch_time_vec.nc
+ wav_dir: ~/forcings
+ wav_nam: ww3.Constant.20151214_sxy_ike_date.nc
+```
+
+## related projects
+
+- [NOAA-EMC/NEMS](https://github.com/NOAA-EMC/NEMS)
+- [esmf-org/esmf](https://github.com/esmf-org/esmf)
+- [noaa-ocs-modeling/ADC-WW3-NWM-NEMS](https://github.com/noaa-ocs-modeling/ADC-WW3-NWM-NEMS)
+
+
+
+
+%package -n python3-nemspy
+Summary: NEMS configuration generation
+Provides: python-nemspy
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-nemspy
+# NEMSpy
+
+[![tests](https://github.com/noaa-ocs-modeling/NEMSpy/workflows/tests/badge.svg)](https://github.com/noaa-ocs-modeling/NEMSpy/actions?query=workflow%3Atests)
+[![codecov](https://codecov.io/gh/noaa-ocs-modeling/nemspy/branch/master/graph/badge.svg?token=uyeRvhmBtD)](https://codecov.io/gh/noaa-ocs-modeling/nemspy)
+[![build](https://github.com/noaa-ocs-modeling/NEMSpy/workflows/build/badge.svg)](https://github.com/noaa-ocs-modeling/NEMSpy/actions?query=workflow%3Abuild)
+[![version](https://img.shields.io/pypi/v/nemspy)](https://pypi.org/project/nemspy)
+[![license](https://img.shields.io/github/license/noaa-ocs-modeling/nemspy)](https://creativecommons.org/share-your-work/public-domain/cc0)
+[![style](https://sourceforge.net/p/oitnb/code/ci/default/tree/_doc/_static/oitnb.svg?format=raw)](https://sourceforge.net/p/oitnb/code)
+[![documentation](https://readthedocs.org/projects/nemspy/badge/?version=latest)](https://nemspy.readthedocs.io/en/latest/?badge=latest)
+
+NEMSpy generates configuration files (`nems.configure`, `config.rc`, `model_configure`, `atm_namelist.rc`)
+for coupled modeling applications run with a compiled NEMS binary (not included).
+
+```shell
+pip install nemspy
+```
+
+NEMS implements
+the [National Unified Operational Prediction Capability (NUOPC)](https://www.earthsystemcog.org/projects/nuopc/), and
+configuration files built for NEMS will also work for most NUOPC applications.
+
+Documentation can be found at https://nemspy.readthedocs.io
+
+## organization / responsibility
+
+NEMSpy is developed by the [Coastal Marine Modeling Branch (CMMB)](https://coastaloceanmodels.noaa.gov) of the Office of Coast Survey (OCS), a part of the [National Oceanic and Atmospheric Administration (NOAA)](https://www.noaa.gov), an agency of the United States federal government.
+
+- Zachary Burnett (**lead**) - zachary.burnett@noaa.gov
+- Saeed Moghimi - saeed.moghimi@noaa.gov
+- Jaime Calzada (past)
+
+## usage
+
+```python
+from datetime import datetime, timedelta
+from pathlib import Path
+
+from nemspy import ModelingSystem
+from nemspy.model import ADCIRCEntry, AtmosphericForcingEntry, WaveWatch3ForcingEntry
+
+# directory to which configuration files should be written
+output_directory = Path(__file__).parent / 'nems_configuration'
+
+# directory containing forcings
+forcings_directory = Path(__file__).parent / 'forcings'
+
+# model run time
+start_time = datetime(2020, 6, 1)
+duration = timedelta(days=1)
+end_time = start_time + duration
+
+# returning interval of main run sequence
+interval = timedelta(hours=1)
+
+# model entries
+ocean_model = ADCIRCEntry(processors=11, Verbosity='max', DumpFields=False)
+atmospheric_mesh = AtmosphericForcingEntry(
+ filename=forcings_directory / 'wind_atm_fin_ch_time_vec.nc', processors=1
+)
+wave_mesh = WaveWatch3ForcingEntry(
+ filename=forcings_directory / 'ww3.Constant.20151214_sxy_ike_date.nc', processors=1
+)
+
+# instantiate model system with model entries
+nems = ModelingSystem(
+ start_time=start_time,
+ end_time=end_time,
+ interval=interval,
+ ocn=ocean_model,
+ atm=atmospheric_mesh,
+ wav=wave_mesh,
+)
+
+# form connections between models
+nems.connect('ATM', 'OCN')
+nems.connect('WAV', 'OCN')
+
+# define execution order
+nems.sequence = [
+ 'ATM -> OCN',
+ 'WAV -> OCN',
+ 'ATM',
+ 'WAV',
+ 'OCN',
+]
+
+# write configuration files to the given directory
+nems.write(directory=output_directory, overwrite=True, include_version=True)
+
+```
+
+## output
+
+### `nems.configure`
+
+```fortran
+# `nems.configure` generated with NEMSpy 1.0.0
+# EARTH #
+EARTH_component_list: ATM WAV OCN
+EARTH_attributes::
+ Verbosity = off
+::
+
+# ATM #
+ATM_model: atmesh
+ATM_petlist_bounds: 0 0
+ATM_attributes::
+ Verbosity = off
+::
+
+# WAV #
+WAV_model: ww3data
+WAV_petlist_bounds: 1 1
+WAV_attributes::
+ Verbosity = off
+::
+
+# OCN #
+OCN_model: adcirc
+OCN_petlist_bounds: 2 12
+OCN_attributes::
+ Verbosity = max
+ DumpFields = false
+::
+
+# Run Sequence #
+runSeq::
+ @3600
+ ATM -> OCN :remapMethod=redist
+ WAV -> OCN :remapMethod=redist
+ ATM
+ WAV
+ OCN
+ @
+::
+```
+
+### `model_configure`
+
+```fortran
+# `model_configure` generated with NEMSpy 1.0.0
+total_member: 1
+print_esmf: .true.
+namelist: atm_namelist.rc
+PE_MEMBER01: 13
+start_year: 2020
+start_month: 6
+start_day: 1
+start_hour: 0
+start_minute: 0
+start_second: 0
+nhours_fcst: 24
+RUN_CONTINUE: .false.
+ENS_SPS: .false.
+```
+
+### `config.rc`
+
+```fortran
+# `config.rc` generated with NEMSpy 1.0.0
+ atm_dir: ~/forcings
+ atm_nam: wind_atm_fin_ch_time_vec.nc
+ wav_dir: ~/forcings
+ wav_nam: ww3.Constant.20151214_sxy_ike_date.nc
+```
+
+## related projects
+
+- [NOAA-EMC/NEMS](https://github.com/NOAA-EMC/NEMS)
+- [esmf-org/esmf](https://github.com/esmf-org/esmf)
+- [noaa-ocs-modeling/ADC-WW3-NWM-NEMS](https://github.com/noaa-ocs-modeling/ADC-WW3-NWM-NEMS)
+
+
+
+
+%package help
+Summary: Development documents and examples for nemspy
+Provides: python3-nemspy-doc
+%description help
+# NEMSpy
+
+[![tests](https://github.com/noaa-ocs-modeling/NEMSpy/workflows/tests/badge.svg)](https://github.com/noaa-ocs-modeling/NEMSpy/actions?query=workflow%3Atests)
+[![codecov](https://codecov.io/gh/noaa-ocs-modeling/nemspy/branch/master/graph/badge.svg?token=uyeRvhmBtD)](https://codecov.io/gh/noaa-ocs-modeling/nemspy)
+[![build](https://github.com/noaa-ocs-modeling/NEMSpy/workflows/build/badge.svg)](https://github.com/noaa-ocs-modeling/NEMSpy/actions?query=workflow%3Abuild)
+[![version](https://img.shields.io/pypi/v/nemspy)](https://pypi.org/project/nemspy)
+[![license](https://img.shields.io/github/license/noaa-ocs-modeling/nemspy)](https://creativecommons.org/share-your-work/public-domain/cc0)
+[![style](https://sourceforge.net/p/oitnb/code/ci/default/tree/_doc/_static/oitnb.svg?format=raw)](https://sourceforge.net/p/oitnb/code)
+[![documentation](https://readthedocs.org/projects/nemspy/badge/?version=latest)](https://nemspy.readthedocs.io/en/latest/?badge=latest)
+
+NEMSpy generates configuration files (`nems.configure`, `config.rc`, `model_configure`, `atm_namelist.rc`)
+for coupled modeling applications run with a compiled NEMS binary (not included).
+
+```shell
+pip install nemspy
+```
+
+NEMS implements
+the [National Unified Operational Prediction Capability (NUOPC)](https://www.earthsystemcog.org/projects/nuopc/), and
+configuration files built for NEMS will also work for most NUOPC applications.
+
+Documentation can be found at https://nemspy.readthedocs.io
+
+## organization / responsibility
+
+NEMSpy is developed by the [Coastal Marine Modeling Branch (CMMB)](https://coastaloceanmodels.noaa.gov) of the Office of Coast Survey (OCS), a part of the [National Oceanic and Atmospheric Administration (NOAA)](https://www.noaa.gov), an agency of the United States federal government.
+
+- Zachary Burnett (**lead**) - zachary.burnett@noaa.gov
+- Saeed Moghimi - saeed.moghimi@noaa.gov
+- Jaime Calzada (past)
+
+## usage
+
+```python
+from datetime import datetime, timedelta
+from pathlib import Path
+
+from nemspy import ModelingSystem
+from nemspy.model import ADCIRCEntry, AtmosphericForcingEntry, WaveWatch3ForcingEntry
+
+# directory to which configuration files should be written
+output_directory = Path(__file__).parent / 'nems_configuration'
+
+# directory containing forcings
+forcings_directory = Path(__file__).parent / 'forcings'
+
+# model run time
+start_time = datetime(2020, 6, 1)
+duration = timedelta(days=1)
+end_time = start_time + duration
+
+# returning interval of main run sequence
+interval = timedelta(hours=1)
+
+# model entries
+ocean_model = ADCIRCEntry(processors=11, Verbosity='max', DumpFields=False)
+atmospheric_mesh = AtmosphericForcingEntry(
+ filename=forcings_directory / 'wind_atm_fin_ch_time_vec.nc', processors=1
+)
+wave_mesh = WaveWatch3ForcingEntry(
+ filename=forcings_directory / 'ww3.Constant.20151214_sxy_ike_date.nc', processors=1
+)
+
+# instantiate model system with model entries
+nems = ModelingSystem(
+ start_time=start_time,
+ end_time=end_time,
+ interval=interval,
+ ocn=ocean_model,
+ atm=atmospheric_mesh,
+ wav=wave_mesh,
+)
+
+# form connections between models
+nems.connect('ATM', 'OCN')
+nems.connect('WAV', 'OCN')
+
+# define execution order
+nems.sequence = [
+ 'ATM -> OCN',
+ 'WAV -> OCN',
+ 'ATM',
+ 'WAV',
+ 'OCN',
+]
+
+# write configuration files to the given directory
+nems.write(directory=output_directory, overwrite=True, include_version=True)
+
+```
+
+## output
+
+### `nems.configure`
+
+```fortran
+# `nems.configure` generated with NEMSpy 1.0.0
+# EARTH #
+EARTH_component_list: ATM WAV OCN
+EARTH_attributes::
+ Verbosity = off
+::
+
+# ATM #
+ATM_model: atmesh
+ATM_petlist_bounds: 0 0
+ATM_attributes::
+ Verbosity = off
+::
+
+# WAV #
+WAV_model: ww3data
+WAV_petlist_bounds: 1 1
+WAV_attributes::
+ Verbosity = off
+::
+
+# OCN #
+OCN_model: adcirc
+OCN_petlist_bounds: 2 12
+OCN_attributes::
+ Verbosity = max
+ DumpFields = false
+::
+
+# Run Sequence #
+runSeq::
+ @3600
+ ATM -> OCN :remapMethod=redist
+ WAV -> OCN :remapMethod=redist
+ ATM
+ WAV
+ OCN
+ @
+::
+```
+
+### `model_configure`
+
+```fortran
+# `model_configure` generated with NEMSpy 1.0.0
+total_member: 1
+print_esmf: .true.
+namelist: atm_namelist.rc
+PE_MEMBER01: 13
+start_year: 2020
+start_month: 6
+start_day: 1
+start_hour: 0
+start_minute: 0
+start_second: 0
+nhours_fcst: 24
+RUN_CONTINUE: .false.
+ENS_SPS: .false.
+```
+
+### `config.rc`
+
+```fortran
+# `config.rc` generated with NEMSpy 1.0.0
+ atm_dir: ~/forcings
+ atm_nam: wind_atm_fin_ch_time_vec.nc
+ wav_dir: ~/forcings
+ wav_nam: ww3.Constant.20151214_sxy_ike_date.nc
+```
+
+## related projects
+
+- [NOAA-EMC/NEMS](https://github.com/NOAA-EMC/NEMS)
+- [esmf-org/esmf](https://github.com/esmf-org/esmf)
+- [noaa-ocs-modeling/ADC-WW3-NWM-NEMS](https://github.com/noaa-ocs-modeling/ADC-WW3-NWM-NEMS)
+
+
+
+
+%prep
+%autosetup -n nemspy-1.0.8
+
+%build
+%py3_build
+
+%install
+%py3_install
+install -d -m755 %{buildroot}/%{_pkgdocdir}
+if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
+if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
+if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
+if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
+pushd %{buildroot}
+if [ -d usr/lib ]; then
+ find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/lib64 ]; then
+ find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/bin ]; then
+ find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/sbin ]; then
+ find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+touch doclist.lst
+if [ -d usr/share/man ]; then
+ find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
+fi
+popd
+mv %{buildroot}/filelist.lst .
+mv %{buildroot}/doclist.lst .
+
+%files -n python3-nemspy -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Wed May 10 2023 Python_Bot <Python_Bot@openeuler.org> - 1.0.8-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..f457cb7
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+0691612042eb4f96830b5717ff46f18f nemspy-1.0.8.tar.gz