From 977e5b7052244b9b17feb212e1aef56b83925055 Mon Sep 17 00:00:00 2001 From: zyj <1165600785@qq.com> Date: Mon, 20 Oct 2025 16:48:20 +0800 Subject: [PATCH 1/2] Modify the method of obtaining time seconds to adapt to Windows system --- PyFVCOM/utilities/time.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/PyFVCOM/utilities/time.py b/PyFVCOM/utilities/time.py index 675fe61f..331d6e96 100644 --- a/PyFVCOM/utilities/time.py +++ b/PyFVCOM/utilities/time.py @@ -170,8 +170,10 @@ def date_range(start_date, end_date, inc=1): """ - start_seconds = int(start_date.replace(tzinfo=pytz.UTC).strftime('%s')) - end_seconds = int(end_date.replace(tzinfo=pytz.UTC).strftime('%s')) + # start_seconds = int(start_date.replace(tzinfo=pytz.UTC).strftime('%s')) + start_seconds = int(start_date.replace(tzinfo=pytz.UTC).timestamp()) + # end_seconds = int(end_date.replace(tzinfo=pytz.UTC).strftime('%s')) + end_seconds = int(end_date.replace(tzinfo=pytz.UTC).timestamp()) inc *= 86400 # seconds dates = np.arange(start_seconds, end_seconds, inc) From 129b2c7cfb539ba3ec7a1a41e009e6fe8b2f1cb3 Mon Sep 17 00:00:00 2001 From: zyj <1165600785@qq.com> Date: Tue, 21 Oct 2025 11:39:26 +0800 Subject: [PATCH 2/2] Change UNIFORM from lowercase to uppercase --- examples/pyfvcom_preprocessing_example.ipynb | 2 +- examples/pyfvcom_preprocessing_example.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/pyfvcom_preprocessing_example.ipynb b/examples/pyfvcom_preprocessing_example.ipynb index d89da325..982187d3 100644 --- a/examples/pyfvcom_preprocessing_example.ipynb +++ b/examples/pyfvcom_preprocessing_example.ipynb @@ -90,7 +90,7 @@ "outputs": [], "source": [ "# Make a vertical grid with 21 uniform levels\n", - "model.sigma.type = 'uniform'\n", + "model.sigma.type = 'UNIFORM'\n", "model.dims.levels = 21" ] }, diff --git a/examples/pyfvcom_preprocessing_example.py b/examples/pyfvcom_preprocessing_example.py index d2792d8e..4b8e8407 100644 --- a/examples/pyfvcom_preprocessing_example.py +++ b/examples/pyfvcom_preprocessing_example.py @@ -57,7 +57,7 @@ # In[6]: # Make a vertical grid with 21 uniform levels -model.sigma.type = 'uniform' +model.sigma.type = 'UNIFORM' model.dims.levels = 21