Data preprocessing device and method for homemade ocean model earth coupling system

The data preprocessing device with automated generation and detection functions solves the problems of low efficiency and error susceptibility in the CESM+LICOM3 coupled system, achieving efficient and accurate data processing, and improving user experience and system reliability.

CN120297004BActive Publication Date: 2025-12-05青岛国实科技集团有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510779134.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-12
Publication Date
2025-12-05
Estimated Expiration
2045-06-12

AI Technical Summary

Technical Problem

Existing technologies are inefficient, error-prone, lack automatic detection functions, and provide a poor user experience in the data preprocessing process for generating CESM+LICOM3 coupled systems. They also fail to meet the specific requirements of the LICOM3 mode, resulting in low processing efficiency and poor repeatability for complex three-level mesh structures.

Method used

A data preprocessing device is provided, including an automatic generation module for marine model input files, an automatic generation module for grid-coupled infrastructure files, and an automatic detection module. It generates the initial temperature and salinity field and forcing field files required for the LICOM3 model through automated scripts, and generates the weight mapping and domain files required for the CESM system. It has an automatic detection function to ensure the integrity and consistency of the files.

Benefits of technology

It improves the automation of data preprocessing, enhances the operating efficiency and user experience of the CESM+LICOM3 coupled system, ensures the accuracy and consistency of files, and reduces the incidence of human error.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120297004B_ABST
    Figure CN120297004B_ABST
Patent Text Reader

Abstract

The application discloses a data preprocessing device and method for a domestic ocean mode-earth coupling system, and aims at data preprocessing between an LICOM3 ocean mode and a CESM earth coupling system.The data preprocessing device comprises an ocean mode input file automatic generation module, a grid coupling infrastructure file automatic generation module and an automatic detection module.The ocean mode input file automatic generation module generates an ocean mode input file based on an original data file after receiving a first user instruction.The grid coupling infrastructure file automatic generation module generates a grid coupling infrastructure file based on the original data file after receiving a second user instruction.The automatic detection module detects whether the original data file and the ocean mode input file and the grid coupling infrastructure file are abnormal, and outputs a termination instruction if the original data file and the ocean mode input file and the grid coupling infrastructure file are abnormal.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of Earth system numerical simulation and data preprocessing technology, and more specifically, it relates to a data preprocessing device and method for the domestic ocean numerical model Earth Coupled System CESM+LICOM3. Background Technology

[0002] The Earth Coupled System Scheme CESM+LICOM3 replaces the original ocean component POP2 in the Common Earth System Model (CESM) with the LASG / IAP Climate System Ocean Model Version 3 (LICOM3) to enhance LICOM3's ability to perform high-resolution simulations and model tuning.

[0003] LICOM is an ocean circulation model independently developed by the Ocean Model Team of the State Key Laboratory of Numerical Simulation of Atmospheric Sciences and Geophysical Fluid Dynamics (LASG) at the Institute of Atmospheric Physics (IAP), Chinese Academy of Sciences (CAS). It is widely used in ocean dynamics research and ocean environment prediction. Because the LICOM3 model adopts a three-level grid structure, including horizontal grids and vertical layers, it can simulate the evolution of physical variables such as temperature, salinity, and current fields in the ocean. Therefore, its grid, topographic field, initial field, forcing field, and other input data all need to be recreated specifically for the LICOM3 model.

[0004] As an ocean model in the CESM coupled system, in order to exchange data with atmospheric, runoff, and other models, it is also necessary to create mapping files (storing the mapping weights from the source model grid to the target model grid) and domain files (describing the geometric properties and boundary conditions of the grid) between grids of different model resolutions. This is to enable a fully coupled experiment of atmosphere-land-runoff-ocean-sea ice, simulating the entire process from atmospheric precipitation to land runoff, then to river flow into the sea, and the energy and material exchange between the ocean and sea ice. This is used to study complex issues such as global climate change, water resource management, and ecosystem changes.

[0005] Currently, in the simulation application of the Earth Coupled System scheme CESM+LICOM3, data preprocessing generally requires the following steps:

[0006] (1) Generate LICOM3 mode horizontal mesh file: Researchers used a custom Fortran script to generate the original files of the horizontal and vertical meshes of the orthogonal curve mesh introduced for LICOM3, i.e., the third-level mesh, and converted the horizontal mesh file into a remap file in SCRIP format required for mapping.

[0007] (2) Generating initial temperature and salinity fields and LICOM model forced field files: Researchers manually generated the initial temperature and salinity fields of the LICOM three-level grid using the CDO tool, including horizontal and vertical stratification, according to the requirements of different resolution grids of the LICOM model. In addition, the forced field files required for the operation of the LICOM model (mainly including internal wave energy, chlorophyll concentration distribution, and reference sea surface salinity) also need to be manually generated using the NCO and CDO tools respectively.

[0008] (3) Creating mapping and domain files: When the correspondence between the atmospheric grid and the LICOM ocean grid is clear, researchers need to manually write SCRIP program scripts to generate the mapping and domain files required by the CESM system based on the atmospheric grid and the LICOM three-level grids of different resolutions.

[0009] (4) Verification of the correctness of the mapping file: Currently, researchers do not have an effective method to directly verify the validity of the generated mapping file. Generally, as long as the mapping file can be generated normally through the SCRIP script, it is considered to be usable directly. Often, it is only when an anomaly occurs during the actual simulation of the CESM system that the problem is identified as a problem with the generated mapping file or the original mesh file. At this time, it is necessary to recreate the original mesh and generate the mapping file according to the anomaly prompt. The same applies to the initial temperature and salinity field file. After it is generated, it cannot be effectively verified. It is only when anomalies such as NaN values ​​appear in the integration results during the actual simulation of the CESM system that it is realized that the initial field file may be incorrect and needs to be recreated.

[0010] Existing data preprocessing tools typically lack specific optimizations for particular domestic ocean numerical models (such as LICOM3). Generating initial temperature and salinity (TTC) and forcing field files often requires significant manual intervention, which is not only inefficient but also prone to introducing human error. Currently, researchers using the LICOM3 model primarily use custom Fortran scripts to generate LICOM3 model grids and topographic field files, CDO and NCO tools to generate initial fields and the forcing field files required by the LICOM3 model, and SCRIP tools to generate mapping and domain files between the LICOM3 ocean model grid and atmospheric model grids required for the CESM+LICOM3 coupled system. However, the combined use of these tools is cumbersome and complex, resulting in low efficiency and error-proneness in building the CESM+LICOM3 coupled system. The main drawbacks are summarized below:

[0011] (1) Inefficient and poor reproducibility: Manually writing scripts to generate files is time-consuming and laborious, especially for complex three-level grid structures, which require a lot of manual intervention; and it is easy to introduce human error, resulting in poor reproducibility of results and affecting the reliability of scientific research.

[0012] (2) Lack of automatic detection: The existing technology lacks the function of automatic detection of generated files, which makes it impossible to detect abnormalities in the files in time, which can easily lead to the failure of the coupled system.

[0013] (3) Poor user experience: Users need to have high programming skills and a deep understanding of patterns to complete data preprocessing. This increases the barrier to entry and limits the widespread application of the LICOM and CESM coupled system.

[0014] Therefore, there is an urgent need to develop a data preprocessing device and method for a domestically produced marine model Earth coupling system that overcomes the above-mentioned defects. Summary of the Invention

[0015] To address the above problems, this invention provides a data preprocessing device for a domestically produced ocean model geocoupled system. Specifically, for data preprocessing between the LICOM3 ocean model and the CESM geocoupled system, the data preprocessing device includes:

[0016] The ocean model input file automatic generation module generates an ocean model input file based on the original data file after receiving the first user instruction.

[0017] The automatic generation module for mesh-coupled infrastructure files generates mesh-coupled infrastructure files based on the original data files after receiving instructions from the second user.

[0018] The automatic detection module detects whether there are any anomalies in the original data file, the ocean model input file, and the grid-coupled infrastructure file. If any anomalies are found, a termination command is output.

[0019] The aforementioned data preprocessing apparatus, wherein the ocean model input file automatic generation module includes:

[0020] The first reading and parsing unit reads and parses the user-set LICOM3 horizontal grid file input parameters, and then fills the LICOM3 horizontal grid file with land points to form a new horizontal grid file.

[0021] The interpolation unit performs interpolation processing on the original data file to obtain multiple first temporary files, and performs interpolation processing on the temperature temporary file and salinity temporary file in the multiple first temporary files to obtain two second temporary files;

[0022] The merging unit merges the two second temporary files to obtain a third temporary file;

[0023] The transpose unit transposes the third temporary file and the remaining first temporary files to obtain the ocean model input file, which includes an initial temperature and salinity field file and a forced field file.

[0024] The deletion unit deletes all remaining temporary files and then outputs the initial temperature-salinity field file and the forced field file.

[0025] In the aforementioned data preprocessing apparatus, the interpolation unit performs horizontal bilinear interpolation on the original data file and remaps it to the horizontal grid specified by the new horizontal grid file to obtain multiple first temporary files;

[0026] The interpolation unit performs vertical interpolation on the temporary temperature file and the temporary salinity file respectively to a specified vertical level to obtain the corresponding second temporary file.

[0027] The aforementioned data preprocessing apparatus, wherein the mesh-coupled infrastructure file includes a weight mapping file and a domain file, and the mesh-coupled infrastructure file automatic generation module includes:

[0028] The second reading and parsing unit reads and parses the user-set CESM horizontal grid file input parameters to obtain the atmospheric horizontal grid file, the ocean horizontal grid file, the atmospheric horizontal grid name, and the ocean horizontal grid name.

[0029] The weight mapping file creation unit constructs the weight mapping file based on the atmospheric horizontal grid file, the ocean horizontal grid file, the atmospheric horizontal grid name, and the ocean horizontal grid name using the ESMF_RegridWeightGen tool;

[0030] The domain file creation unit generates the domain file with the corresponding horizontal resolution based on the weight mapping file using the gen_domain tool.

[0031] The aforementioned data preprocessing apparatus, wherein the weight mapping file creation unit includes:

[0032] a) Define the latitude and longitude coordinates, cell area, and mask in the input source and target grids;

[0033] b) Calculate the spatial intersection of the source and target grids according to the input interpolation method. For each target, traverse all overlapping source grids and calculate the weight matrix.

[0034] c) Store the calculated weight matrix in a sparse format;

[0035] d) Generate a weight mapping file containing the coordinates, area, mask, index of the sparse matrix, and weight values ​​of the source / target mesh based on the weight matrix stored in sparse format.

[0036] The aforementioned data preprocessing apparatus, wherein the domain file creation unit includes:

[0037] a) Parse the weight mapping file and mesh information to extract the weight matrix and the coordinates, cell boundaries, masks, and cell areas of the ocean and atmospheric meshes;

[0038] b) Copy the ocean grid mask, read or calculate the area of ​​the ocean cells from the weight mapping file, and record the latitude and longitude coordinates of the ocean cell boundaries to obtain an independent domain file of the pure ocean grid;

[0039] c) Map the ocean mask from the ocean grid to the atmospheric grid by conserving interpolation weights, and mark the regions in the atmospheric grid that need to exchange data with the ocean model, so as to obtain the ocean model's mask and region information file on the atmospheric grid for the coupler in the CESM3 system to determine the ocean-atmosphere exchange region;

[0040] d) Read the non-exchangeable regions from the weight mapping file and adjust the area of ​​the non-exchangeable region cells to obtain the mask and region information file of the land model on the atmospheric grid.

[0041] The aforementioned data preprocessing apparatus, wherein the automatic detection module includes:

[0042] The first detection unit detects the correctness of the ocean and atmospheric horizontal grid files input to the ocean model input file automatic generation module and the grid coupling infrastructure file automatic generation module, including confirming whether the coordinate variables exist or exceed the limits and whether the dimensions are reasonable, and verifying whether they are in a valid SCRIP or ESMF format.

[0043] The second detection unit performs anomaly detection on each step of the ocean model input file automatic generation module and performs data integrity detection on the ocean model input file, including confirming whether the data file variables, units and time ranges meet expectations, whether they are damaged or whether metadata is missing, and whether the variable dimensions are consistent.

[0044] The third detection unit performs anomaly detection on each step of the automatic generation module of the mesh-coupled infrastructure file and checks and verifies the mesh-coupled infrastructure file, including weight matrix checking, mesh consistency analysis and consistency verification. When an anomaly is detected, it outputs an anomaly prompt and the output termination command, and terminates the automated execution program.

[0045] In the aforementioned data preprocessing device, the second detection unit is built into the ocean model input file automatic generation module; and / or the third detection unit is built into the grid-coupled infrastructure file automatic generation module.

[0046] The aforementioned data preprocessing apparatus, wherein the weight mapping file includes:

[0047] Atmosphere-to-ocean conservation interpolation mapping file, atmosphere-to-ocean bilinear interpolation mapping file, atmosphere-to-ocean polar correction interpolation mapping file, ocean-to-atmosphere conservation interpolation mapping file, ocean-to-atmosphere bilinear interpolation mapping file;

[0048] The domain file creation unit constructs an independent domain file for the pure ocean grid, a mask and region information file for the ocean model on the atmospheric grid, and a mask and region information file for the land model on the atmospheric grid, based on the ocean-to-atmosphere conservation interpolation mapping file.

[0049] This invention also provides a data preprocessing method for a domestically developed ocean model geocoupled system, wherein, for data preprocessing between the LICOM3 ocean model and the CESM geocoupled system, the data preprocessing method includes:

[0050] The steps for automatically generating the ocean model input file are as follows: After receiving the first user's instruction, the ocean model input file is generated based on the original data file;

[0051] Automatic generation steps of mesh-coupled infrastructure file: After receiving instructions from the second user, generate a mesh-coupled infrastructure file based on the original data file;

[0052] Automatic detection steps: Detect whether there are any anomalies in the original data file, the ocean model input file, and the grid-coupled infrastructure file. If any anomalies are found, output a termination command.

[0053] In summary, the advantages of this invention over the prior art are as follows:

[0054] This invention addresses the data preprocessing requirements of the LICOM3 (LASG IAP Ocean Model) ocean model and the CESM (Community Earth System Model) Earth coupling system by providing an automated and intelligent data preprocessing solution. It can automatically generate the initial temperature and salinity field and forcing field files required by the LICOM3 ocean model, as well as the weight mapping file and domain file required by the CESM system. Furthermore, it features automatic detection capabilities, performing quality checks on the generated files to ensure data integrity and consistency. The aim is to improve the automation level of data preprocessing, enhance the operational efficiency of the coupling system, and improve the user experience.

[0055] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures pointed out in the description, claims and drawings. Attached Figure Description

[0056] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0057] Figure 1 This is a schematic diagram of the data preprocessing apparatus of the present invention;

[0058] Figure 2 for Figure 1 Workflow diagram of the automatic generation module for input files in the ocean mode;

[0059] Figure 3 for Figure 1 Workflow diagram of the automatic generation module for medium-grid coupled infrastructure documents;

[0060] Figure 4 for Figure 1 Functional block diagram of the automatic detection module;

[0061] Figure 5 This is a flowchart of the data preprocessing method of the present invention;

[0062] Figure 6 Code structure diagram of the module that automatically generates input files for ocean mode. Detailed Implementation

[0063] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0064] The illustrative embodiments and descriptions of the present invention are used to explain the invention, but are not intended to limit the invention. Furthermore, elements / components using the same or similar reference numerals in the drawings and embodiments are used to represent the same or similar parts.

[0065] The terms "first," "second," "S1," "S2," etc., used in this document do not specifically refer to any order or sequence, nor are they intended to limit the invention. They are merely used to distinguish elements or operations described using the same technical terms.

[0066] The directional terms used in this article, such as up, down, left, right, front, or back, are for reference only when referring to the accompanying drawings. Therefore, the use of directional terms is for illustrative purposes and not to limit this work.

[0067] The terms “include,” “including,” “have,” “contain,” etc., used in this article are all open-ended terms, meaning that they include but are not limited to.

[0068] The term "and / or" as used herein includes any or all of the things mentioned.

[0069] The term "multiple" in this article includes "two" and "more than two"; the term "multiple groups" in this article includes "two groups" and "more than two groups".

[0070] The terms "approximately," "about," etc., used herein are intended to modify any quantity or error that may vary slightly, but these slight variations or errors do not change the essence of the quantity or error. Generally, the range of slight variations or errors modified by such terms may be 20% in some embodiments, 10% in others, 5% in still others, or other values. Those skilled in the art should understand that the aforementioned values ​​can be adjusted according to actual needs and are not limited thereto.

[0071] Certain terms used to describe this application will be discussed below or elsewhere in this specification to provide additional guidance to those skilled in the art in describing the application.

[0072] Please refer to Figure 1 , Figure 1 This is a schematic diagram of the data preprocessing apparatus of the present invention. Figure 1As shown, this invention discloses a data preprocessing device for a domestically produced ocean model-Earth coupling system. Specifically, for data preprocessing between the LICOM3 ocean model and the CESM Earth coupling system, the data preprocessing device includes: an ocean model input file automatic generation module 11, a grid coupling infrastructure file automatic generation module 12, and an automatic detection module 13. The ocean model input file automatic generation module 11 generates an ocean model input file based on the original data file after receiving a first user instruction. The grid coupling infrastructure file automatic generation module 12 generates a grid coupling infrastructure file based on the original data file after receiving a second user instruction. The grid coupling infrastructure file includes a weight mapping file and a domain file. The automatic detection module 13 detects whether there are any anomalies in the original data file, the ocean model input file, and the grid coupling infrastructure file; if an anomaly is found, a termination instruction is output.

[0073] The data preprocessing device of this invention mainly includes three modules: an automatic generation module 11 for ocean model input files, an automatic generation module 12 for grid-coupled infrastructure files, and an automatic detection module 13. The automatic ocean model input file generation module 11 uses an automated script to generate the ocean model input file for the LICOM3 model with one click, based on the user's requirements for different resolution grids. This includes the initial and forced field files for the ocean model input file (Oc-K-T-S-H). The automatic grid coupling infrastructure file generation module 12 generates the grid coupling infrastructure file required for the CESM coupling system with one click, based on the horizontal grid files of different resolutions specified by the user for different models. This grid coupling infrastructure file includes weight mapping files and domain files. In this embodiment, the automatic grid coupling infrastructure file generation module 12 generates the weight mapping files (mapping files) corresponding to different interpolation methods (such as conserve|bilinear|patch) required by the CESM coupling system with one click. Simultaneously, it automatically generates three domain files based on the previously generated OCN-to-ATM direction weight mapping file (mapping file). The automatic detection module's function is actually integrated within the previous two modules. It includes correctness checks on the input grid file, data integrity checks on the generated initial temperature and salinity field file, validity checks on the generated weight mapping file (mapping file), and anomaly detection and processing at each step of the automatic generation process.

[0074] Please refer to Figure 2 and Figure 6 , Figure 2 for Figure 1 Workflow diagram of the automatic generation module for input files in the ocean mode; Figure 6 The code structure diagram of the module is automatically generated for the input file of the ocean mode. For example... Figure 2 and Figure 6 As shown and please refer to Figure 1 The ocean mode input file automatic generation module 11 includes:

[0075] The first reading and parsing unit 111 reads and parses the user-set LICOM3 horizontal grid file input parameters, and then fills the LICOM3 horizontal grid file with land points to form a new horizontal grid file.

[0076] Interpolation unit 112 performs interpolation processing on the original data file to obtain multiple first temporary files, and performs interpolation processing on the temperature temporary file and salinity temporary file in the multiple first temporary files to obtain two second temporary files; wherein, the interpolation unit 112 performs horizontal bilinear interpolation on the original data file to remap it to the horizontal grid specified by the new horizontal grid file to obtain multiple first temporary files;

[0077] The interpolation unit performs vertical interpolation on the temporary temperature file and the temporary salinity file respectively to a specified vertical level to obtain the corresponding second temporary file.

[0078] Merging unit 113 merges the two second temporary files to obtain a third temporary file;

[0079] The transpose unit 114 transposes the third temporary file and the remaining first temporary files to obtain the ocean model input file, which includes a temperature and salinity initial field file and a forced field file.

[0080] Deletion unit 115 deletes all remaining temporary files and then outputs the initial temperature-salinity field file and the forced field file.

[0081] Specifically, the initial field is the initial description of the ocean state when the model starts, mainly including the temperature-salinity field and the velocity field. The initial velocity field is usually set to a static state (zero velocity field) or based on the stable state output after the model spin-up operation. Therefore, this invention mainly deals with the initial temperature-salinity field of the LICOM3 model.

[0082] The initial temperature and salinity (TTS) file, `initialTS_{gridname}.nc`, used in the LICOM model is obtained by interpolation and format conversion of the original TTS datasets from PHC3 or CMEMS GLORYS for different horizontal resolution grids and vertical layer distributions in LICOM. It is used to initialize the TTS variables in the LICOM model. PHC3 (Polar Science Center Hydrographic Climatology 3.0) is a global ocean TTS climatology dataset developed by the Polar Science Center at the University of Washington. It covers the global ocean, including polar and high-latitude regions, with a horizontal resolution of 1°×1° and 33 vertical layers (from sea surface to seabed), containing monthly and annual average climatological data for temperature and salinity. GLORYS is an important global ocean reanalysis and forecasting product under CMEMS (Copernicus Marine Environment Monitoring Service). It covers the global ocean area, providing relatively high horizontal resolution (e.g., the common version is 1 / 12°, about 8-9 kilometers), and 50 vertical layers. It includes a wealth of ocean physical variables such as three-dimensional temperature, three-dimensional salinity, three-dimensional zonal velocity (U), three-dimensional meridional velocity (V), sea surface height (SSH), and mixed layer depth (MLD). The time span is a long-term time series from the early 1990s (usually 1993) to the present, and it is continuously updated, providing near real-time data.

[0083] The forcing field typically refers to the external input data driving the operation of an ocean model, mainly including wind stress, heat flux, and freshwater flux. These data generally come from atmospheric reanalysis datasets or the atmospheric component output of coupled models. Since this invention primarily targets the preprocessing equipment of the Earth Coupled System scheme CESM+LICOM3, the conventional forcing field data for the LICOM model is output from the atmospheric component or other model components such as sea ice in the CESM system. The forcing field files referred to in this invention mainly refer to the input data required by the internal parameterization scheme of the LICOM3 model, including the chlorophyll concentration distribution data file chl_monthly_{gridname}.nc required in the chlorophyll concentration-dependent shortwave radiation penetration scheme (Ohlmann, 2003), the tidal-related energy data file tidal_energy_{gridname}.nc required in the internal tidal mixing parameterization scheme, and the reference sea surface salinity data file sss_phc3_monthly_{gridname}.nc required for sea surface salinity recovery forcing.

[0084] The ocean model input file automatic generation module 11 of the present invention can generate four files in one click based on the user-input command bash gen_cesm_maps.sh -scripgrid_file remap_licom_tripole_*.nc -res{gridname}, including the initial temperature and salinity field initialTS_{gridname}.nc, the chlorophyll concentration distribution data file chl_monthly_{gridname}.nc, the tidal energy data file tidal_energy_{gridname}.nc, and the reference sea surface salinity data file sss_phc3_monthly_{gridname}.nc. This automation script requires the SCRIP format LICOM3 horizontal grid remap_licom_tripole_{grid_size}.nc file as input, and needs to prepare the raw global ocean data in advance after offline download and format conversion. For example, the raw temperature data file temp_jan_phc3.nc can be obtained from the binary format single-time-point PHC3 temperature dataset temp.ctl; the raw salinity data file salt_jan_phc3.nc can be obtained from the binary format single-time-point PHC3 salinity dataset salt.ctl; and the raw sea surface salinity data file sss_month_phc3.nc can be obtained from the binary format 12-month time-point PHC3 salinity dataset salt_month_phc3.ctl. This data can also be obtained from NASA's GSFC (Goddard Space) database. The original chlorophyll concentration distribution data file smooth_chl_clim_monthly_licomgrid.nc, obtained by bilinear interpolation of chlorophyll concentration distribution data at 12 time points downloaded from the FlightCenter website, was converted into tidal_mixing_energy_{create_date}.nc from tidal dissipation data estimated using the internal wave energy conversion parameterization method based on the barotropic tidal model.

[0085] The automated script code structure of the ocean mode input file automatic generation module 11 Figure 6As shown, the root directory includes the automation script file generate_licom_foring.sh, the raw data file subdirectory raw_data (including raw salinity data files, raw temperature data files, raw sea surface salinity data files, raw chlorophyll concentration distribution data files, raw tide-related energy data files, etc.), and the SCRIP format horizontal grid file subdirectory scripgrids (including global horizontal grid files with resolutions of 100km, 10km, 5km, 3km, 2km, and 1km).

[0086] The processing flow of the automated script generate_licom_foring.sh in the ocean mode input file automatic generation module 11 is as follows: Figure 2 As shown, it mainly includes the following steps:

[0087] 1. The first reading and parsing unit 111 reads and parses the user-set LICOM3 horizontal grid file input parameters, namely the grid file path - scripgrid_file scripgrids / remap_licom_tripole_*.nc and the grid file name - res {gridname}, provided that the file actually exists in the corresponding path;

[0088] 2. The first detection unit 131 of the automatic detection module 13 detects whether the global horizontal grid file is valid. If it is valid, it fills the horizontal grid file with land points to form a new fill_grid.nc file. Otherwise, it gives an error message A and exits the automatic execution program.

[0089] 3. Interpolation unit 112 remaps all original data files (including temperature, salinity, sea surface salinity, chlorophyll concentration, and tidal energy) onto the horizontal grid specified in fill_grid.nc using bilinear interpolation, and saves them sequentially as temporary files in a new efficient storage format (such as NetCDF4): temp1_temperature.nc, temp1_salinity.nc, temp1_sss.nc, temp1_chl.nc, and temp1_tidal.nc.

[0090] 4. The second detection unit 132 of the automatic detection module 13 judges each operation in the third step. If the execution is successful, the interpolation unit 112 performs vertical interpolation on the temperature and salinity temporary file data temp1_temperature.nc and temp1_salinity.nc after horizontal interpolation in the third step, converts them to the specified vertical level (e.g., 80 levels), and saves them in sequence as new high-efficiency storage format temporary files temp2_temperature.nc and temp2_salinity.nc, while deleting temp1_temperature.nc and temp1_salinity.nc. If the execution fails, an exception message B is given and the automatic execution program is exited.

[0091] 5. The automatic detection module 13 judges each operation in step four. If the execution is successful, the merging unit 113 merges the temporary files temp2_temperature.nc and temp2_salinity.nc after horizontal and vertical interpolation in step four into a temporary temperature and salinity initial field file temp_initialTS_{gridname}.nc, and deletes temp2_temperature.nc and temp2_salinity.nc. If the execution fails, an exception message C is given and the automatic execution program exits.

[0092] 6. The second detection unit 132 of the automatic detection module 13 judges the operation in the fifth step. If the execution is successful, the transposition unit 114 transposes the temporary files temp1_sss.nc, temp1_chl.nc, temp1_tidal.nc in the third step and the temporary file temp_initialTS_{gridname}.nc in the fifth step to the north and south poles in sequence. If the execution fails, an exception message D is given and the automatic execution program is exited.

[0093] 7. The second detection unit 132 of the automatic detection module 13 judges each operation in step 6. If the execution is successful, it generates four files required by the LICOM mode: initialTS_{gridname}.nc (initial temperature and salinity initial field), chl_monthly_{gridname}.nc (chlorophyll concentration distribution data file), tidal energy data file tidal_energy_{gridname}.nc (tidal energy data file), and reference sea surface salinity data file sss_phc3_monthly_{gridname}.nc (reference sea surface salinity data file). The deletion unit 115 deletes all remaining temporary files temp*.nc. If the execution fails, it gives an error message E and exits the automatic execution program.

[0094] Please refer to Figure 3 , Figure 3 for Figure 1 Workflow diagram of the automatic generation module for grid-coupled infrastructure documents. (e.g.) Figure 3 As shown and please refer to Figure 1 The automatic generation module 12 for mesh-coupled infrastructure files includes:

[0095] The second reading and parsing unit 121 reads and parses the CESM horizontal grid file input parameters set by the user to obtain the atmospheric horizontal grid file, the ocean horizontal grid file, the atmospheric horizontal grid name, and the ocean horizontal grid name;

[0096] The weight mapping file creation unit 122 constructs the weight mapping file based on the atmospheric horizontal grid file, the ocean horizontal grid file, the atmospheric horizontal grid name, and the ocean horizontal grid name using the ESMF_RegridWeightGen tool;

[0097] The domain file creation unit 123 generates the domain file with the corresponding horizontal resolution based on the weight mapping file using the gen_domain tool.

[0098] The weight mapping file creation unit 122 includes:

[0099] a) Define the latitude and longitude coordinates, cell area, and mask in the input source and target grids;

[0100] b) Calculate the spatial intersection of the source and target grids according to the input interpolation method. For each target, traverse all overlapping source grids and calculate the weight matrix.

[0101] c) Store the calculated weight matrix in a sparse format;

[0102] d) Generate a weight mapping file containing the coordinates, area, mask, index of the sparse matrix, and weight values ​​of the source / target mesh based on the weight matrix stored in sparse format.

[0103] The domain file creation unit 123 includes:

[0104] a) Parse the weight mapping file and mesh information to extract the weight matrix and the coordinates, cell boundaries, masks, and cell areas of the ocean and atmospheric meshes;

[0105] b) Copy the ocean grid mask, read or calculate the area of ​​the ocean cells from the weight mapping file, and record the latitude and longitude coordinates of the ocean cell boundaries to obtain an independent domain file of the pure ocean grid;

[0106] c) Map the ocean mask from the ocean grid to the atmospheric grid by conserving interpolation weights, and mark the regions in the atmospheric grid that need to exchange data with the ocean model, so as to obtain the ocean model's mask and region information file on the atmospheric grid for the coupler in the CESM3 system to determine the ocean-atmosphere exchange region;

[0107] d) Read the non-exchangeable regions from the weight mapping file and adjust the area of ​​the non-exchangeable region cells to obtain the mask and region information file of the land model on the atmospheric grid.

[0108] Specifically, in Earth system coupled models (such as CESM), mapping files and domain files are crucial for defining grid properties and data interpolation relationships, playing a key role in coupling different subsystems such as the atmosphere and ocean. Mapping files define the data mapping relationships between different grids, providing interpolation weights from one grid to another to ensure data accuracy during transformation. In the CESM coupled system, atmospheric and oceanic models typically use different grid resolutions and structures; therefore, mapping files are needed to interpolate the output data of one model onto the grid of another to achieve seamless data transfer. Domain files describe the geometric properties and boundary conditions of the grid, providing detailed information about the grid for the coupled system, including the grid's horizontal and vertical resolution (i.e., grid size and hierarchical structure), specifying the grid's boundary extent (e.g., the land boundary of an ocean grid), and grid weights used to calculate regional averages or other statistics.

[0109] In CESM, different types of physical quantities (such as state variables and fluxes) have different physical properties, so different interpolation methods are needed to ensure the accuracy of the simulation and the conservation of physical properties. State variables (such as temperature and humidity) usually represent the system state. Spatial continuity and accuracy are emphasized during interpolation. Commonly used interpolation methods include bilinear interpolation or nearest neighbor interpolation to minimize errors.

[0110] Fluxes (such as heat flux, momentum flux, water flux, etc.) represent the flow of energy or matter. Interpolation requires emphasizing conservation to avoid introducing artificial sources / sinks. Therefore, conservative interpolation is generally used to ensure that the total flux remains unchanged during grid transformation. Vector variables of specific types (such as wind speed, flow velocity, etc.) typically represent physical fields with direction and magnitude, such as wind fields in the atmosphere or water currents in the ocean. Interpolation requires emphasizing the accuracy of direction and magnitude to avoid introducing artificial errors or directional distortion. Therefore, patch interpolation is commonly used. This method considers the topology of the grid, ensuring that the physical properties of the vector (such as direction conservation and magnitude continuity) are correctly preserved during grid transformation.

[0111] The automatic generation module 12 for mesh-coupled infrastructure files in this invention can generate files based on user input.

[0112] The command `generate_mapping_domain.sh -fatm {atm_gridname}*.nc -focn {ocn_gridname}*.nc -nocn {ocn_gridname} -natm {atm_gridname}` extracts the horizontal grid files and names of the atmosphere and ocean from the input parameters to generate five mapping files in one click. These include: an atmosphere-to-ocean conservation interpolation mapping file (map_{atm_gridname}_TO_{ocn_gridname}_aave.nc), an atmosphere-to-ocean bilinear interpolation mapping file (map_{atm_gridname}_TO_{ocn_gridname}_blin.nc), an atmosphere-to-ocean polar correction interpolation mapping file (map_{atm_gridname}_TO_{ocn_gridname}_patc.nc), and an ocean-to-atmosphere conservation interpolation mapping file (map_{ocn_gridname}_...). The system contains three domain files: TO_{atm_gridname}_aave.nc, a mapping file for the ocean-to-atmosphere bilinear interpolation method (map_{ocn_gridname}_TO_{atm_gridname}_blin.nc), and three domain files: domain.lnd.{atm_gridname}_{ocn_gridname}.nc (mask and region information for the land model on the atmospheric grid), domain.ocn.{atm_gridname}_{ocn_gridname}.nc (mask and region information for the ocean model on the atmospheric grid), and domain.ocn.{ocn_gridname}.nc (independent domain for the pure ocean grid).

[0113] This module, through the tools / mapping program, compiles and adapts the underlying ESMF library (mainly including the ESMF_RegridWeightGen tool) and the internal gen_domain program, and adds an automated script generate_mapping_domain.sh at the outermost layer for one-click processing. The specific processing flow is as follows: Figure 3 As shown, it mainly includes the following steps:

[0114] 1. The second reading and parsing unit 121 reads and parses the parameters input by the user, namely the atmospheric horizontal grid file -fatm {atm_gridname}*.nc, the ocean horizontal grid file -focn {ocn_gridname}*.nc, the atmospheric horizontal grid name -nocn {ocn_gridname}, and the ocean horizontal grid name -natm {atm_gridname}, provided that the two grid files actually exist in the corresponding paths;

[0115] 2. The first detection unit 131 of the automatic detection module 13 checks the correctness of the atmospheric horizontal grid file {atm_gridname}*.nc and the ocean horizontal grid file {ocn_gridname}*.nc, including confirming the existence or out-of-bounds existence of their coordinate variables (such as grid_corner_lon, grid_corner_lat, grid_dims) and verifying that the dimensions are reasonable, and verifying whether they are in a valid SCRIP or ESMF format. If correct, it continues to execute; otherwise, it gives an error message A and exits the automated execution program.

[0116] 3. The weight mapping file creation unit 122 uses the ESMF_RegridWeightGen tool to create a set of mapping weight files for the CESM system, namely, five mappins: map_{atm_gridname}_TO_{ocn_gridname}_aave.nc, map_{atm_gridname}_TO_{ocn_gridname}_blin.nc, map_{atm_gridname}_TO_{ocn_gridname}_patc.nc, map_{ocn_gridname}_TO_{atm_gridname}_aave.nc, and map_{ocn_gridname}_TO_{atm_gridname}_blin.nc. The ESMF_RegridWeightGen tool in the g file includes the following steps: a) defining the latitude and longitude coordinates, cell area, and mask in the input source and target grids; b) calculating the spatial intersection of the source and target grid cells according to the input interpolation method, and for each target cell, traversing all overlapping source cells and calculating the weight value (such as the area ratio of conserved interpolation); c) storing the calculated weight matrix in a sparse format, recording the rows (target cells), columns (source cells), and weight values; d) generating a NetCDF format mapping weight mapping file containing the coordinates, area, mask, index of the sparse matrix, weight values, and other metadata (interpolation method, version, etc.) of the source / target grids.

[0117] 4. The third detection unit 133 of the automatic detection module 13 checks and verifies the five mapping files generated above, including weight matrix checking (verifying the range of weight values, sparsity, and distribution of non-zero elements), mesh consistency analysis (checking the mask, coverage, and area statistics of the source and target meshes), conservation and consistency verification (ensuring that the total error of conservation interpolation (such as area weighting) meets expectations), and metadata integrity check (confirming whether auxiliary information such as mesh coordinates and area is complete). If no abnormalities are detected, execution continues; otherwise, an error message B is given and the automated execution program exits.

[0118] 5. The third detection unit 133 of the domain file creation unit 123 generates three domain files corresponding to the horizontal resolution based on the ocean-to-atmosphere conservation interpolation mapping file, namely map_{ocn_gridname}_TO_{atm_gridname}_aave.nc, through the gen_domain program. These files are: domain.lnd.{atm_gridname}_{ocn_gridname}.nc (mask and region information file of the land model on the atmospheric grid), domain.ocn.{atm_gridname}_{ocn_gridname}.nc (mask and region information file of the ocean model on the atmospheric grid), and domain.ocn.{ocn_gridname}.nc (independent domain definition file of the pure ocean grid). The specific implementation steps of the gen_domain program include: a) parsing the input mapping file and grid information, extracting the weight matrix and the coordinates, cell boundaries, masks (such as ocean / land markers), and cell areas of the ocean and atmospheric grids; b) copying the ocean... Ocean grid mask: Read or calculate (e.g., spherical polygon area) cell areas from the ocean grid file and record the latitude and longitude coordinates of the cell boundaries, saving it as the ocean grid domain file domain.ocn.{ocn_gridname}.nc; c) Map the ocean mask from the ocean grid to the atmospheric grid using conserved interpolation weights, marking which regions in the atmospheric grid need to exchange data with the ocean model, so that the coupler in the CESM system can determine the ocean-atmosphere exchange region, and save the result as the file domain.ocn.{atm_gridname}_{ocn_gridname}.nc; d) Read the original land mask from the atmospheric grid file, mark non-exchange regions such as glaciers and lakes, and adjust the cell areas to ensure that the land mask does not overlap with the ocean regions in domain.ocn.{atm_gridname}_{ocn_gridname}.nc, and save it as the file domain.lnd.{atm_gridname}_{ocn_gridname}.nc for use by the land model;

[0119] 6. The third detection unit 133 of the automatic detection module 13 judges the operation in step 5. If the execution is successful, it will end normally. If the execution fails, it will give an exception prompt C and exit the automatic execution program.

[0120] It should be noted that the weight mapping files in this embodiment include: atmospheric-to-ocean conservation interpolation mapping files, atmospheric-to-ocean bilinear interpolation mapping files, atmospheric-to-ocean polar correction interpolation mapping files, ocean-to-atmosphere conservation interpolation mapping files, and ocean-to-atmosphere bilinear interpolation mapping files; wherein, the domain file creation unit constructs, based on the ocean-to-atmosphere conservation interpolation mapping files, an independent domain definition file for the pure ocean grid, a mask and region information file for the ocean model on the atmospheric grid, and a mask and region information file for the land model on the atmospheric grid.

[0121] This invention significantly improves data preprocessing efficiency and reduces manual intervention based on an automatic generation module; at the same time, users do not need to manually write scripts, reducing the requirements for users' programming skills and improving the user experience; it also reduces human error, improves the reproducibility of results, and contributes to the reliability of scientific research.

[0122] Please refer to Figure 4 , Figure 4 for Figure 1 Functional block diagram of the automatic detection module. (Example) Figure 4 As shown, and please refer to Figure 1 The automatic detection module 13 includes:

[0123] The first detection unit 131 detects the correctness of the ocean and atmospheric horizontal grid files input to the ocean model input file automatic generation module and the grid coupling infrastructure file automatic generation module, including confirming whether the coordinate variables exist or exceed the limits and whether the dimensions are reasonable, and verifying whether they are in a valid SCRIP or ESMF format.

[0124] The second detection unit 132 performs anomaly detection on each step of the ocean model input file automatic generation module and performs data integrity detection on the ocean model input file, including confirming whether the data file variables, units and time ranges meet expectations, whether they are damaged or whether metadata is missing, and whether the variable dimensions are consistent.

[0125] The third detection unit 133 performs anomaly detection on each step of the automatic generation module of the mesh coupled infrastructure file and checks and verifies the mesh coupled infrastructure file, including weight matrix check, mesh consistency analysis and consistency verification. When an anomaly is detected, it outputs an anomaly prompt and the output termination command, and terminates the automated execution program.

[0126] In this embodiment, the second detection unit 132 is built into the ocean mode input file automatic generation module; and / or the third detection unit 133 is built into the grid-coupled infrastructure file automatic generation module.

[0127] Specifically, the first detection unit 131 detects the correctness of the ocean and atmospheric horizontal grid files input to the ocean model input file automatic generation module 11 and the grid coupling infrastructure file automatic generation module 12, including confirming that its coordinate variables (such as grid_corner_lon, grid_corner_lat, grid_dims) exist or exceed the limits and that the dimensions are reasonable, and verifying whether it is a valid SCRIP or ESMF format to ensure the effective execution of subsequent modules;

[0128] The second detection unit 132, built into the ocean mode input file automatic generation module 11, performs anomaly detection for each step to ensure that it can successfully generate the files required for LICOM mode operation. In addition, it is also necessary to perform data integrity detection on the generated temperature and salinity initial field file, including confirming whether the data file variables, units and time ranges meet expectations, whether they are damaged or whether metadata is missing, and whether the variable dimensions are consistent.

[0129] Built into the automatic generation module for mapping and domain files, this module primarily checks and verifies the previously generated mapping files. This includes weight matrix checks (verifying the range, sparsity, and distribution of non-zero elements of weight values), grid consistency analysis (checking the mask, coverage, and area statistics of the source and target grids), conservation and consistency verification (ensuring the total error of conservation interpolation (such as area weighting) meets expectations), and metadata integrity checks (confirming the completeness of auxiliary information such as grid coordinates and area). For mappings with detected anomalies, an error message is displayed, and the automated execution program is terminated. This ensures that correct mapping files are generated before scientific experiments are conducted in the Earth Coupled System (CESM).

[0130] This invention can detect file anomalies in a timely manner through an automatic detection module, thereby reducing the error rate and improving the success rate of coupled systems.

[0131] Please refer to Figure 5 , Figure 5 This is a flowchart of the data preprocessing method of the present invention. Figure 5 As shown, this invention provides a data preprocessing method for a domestically developed ocean model geocoupled system. Specifically, for data preprocessing between the LICOM3 ocean model and the CESM geocoupled system, the data preprocessing method includes:

[0132] Automatic generation step S11 of ocean model input file: After receiving the first user instruction, generate an ocean model input file based on the original data file;

[0133] Automatic generation step S12 of mesh-coupled infrastructure file: After receiving the second user instruction, generate the mesh-coupled infrastructure file based on the original data file;

[0134] Automatic detection step S13: Detect whether there are any abnormalities in the original data file, the ocean model input file, and the grid-coupled infrastructure file. If there are any abnormalities, output a termination command.

[0135] In summary, this invention aims to address the inefficiencies, lack of automation, and poor user experience inherent in existing data preprocessing technologies for the current Earth-coupled System (CESM+LICOM3) scheme. Its beneficial effects are as follows:

[0136] (1) Through a carefully designed script, the initial temperature and salinity field (including horizontal and vertical stratification) and forcing field files required for the LICOM3 ocean model's own three-level grid were automatically generated with one click. This improvement simplifies the data preprocessing process of the LICOM ocean model, greatly reduces manual intervention, avoids human error, and improves the efficiency and accuracy of data generation.

[0137] (2) Given that the user specifies both the atmospheric grid and the LICOM3 ocean grid, the system can automatically generate relevant map and domain files simultaneously via script for simulation of the CESM system. This makes grid matching efficient and accurate, meeting the personalized needs of different users.

[0138] (3) An innovative automatic detection function has been introduced. The system can automatically detect each step of the above document processing and immediately issue a warning if any abnormality is found. This function not only saves time and effort in manually checking for errors, but also improves the reliability and stability of the data, thereby enhancing the simulation efficiency of the CESM coupled system.

[0139] In summary, through the above improvements, this invention effectively solves the problems of low efficiency, poor accuracy, insufficient adaptability, and lack of automatic detection in the existing technology, and provides a more efficient, reliable, and convenient data preprocessing tool for domestic marine numerical simulation research.

[0140] Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A data pre-processing device for a domestic ocean model earth coupling system, characterized in that, The data preprocessing device for coupling the LICOM3 ocean model and the CESM earth system includes: An ocean model input file automatic generation module that generates an ocean model input file based on an original data file after receiving a first user instruction; A grid coupling infrastructure file automatic generation module that generates a grid coupling infrastructure file based on the original data file after receiving a second user instruction; An automatic detection module that detects whether the original data file and the ocean model input file and the grid coupling infrastructure file have abnormalities, and outputs a termination instruction if there are abnormalities; The ocean model input file automatic generation module includes: A first reading and parsing unit that reads and parses user-set LICOM3 horizontal grid file input parameters, performs land point filling on the LICOM3 horizontal grid file to form a new horizontal grid file; An interpolation unit that performs interpolation processing on the original data file to obtain a plurality of first temporary files, and performs interpolation processing on temperature temporary files and salinity temporary files in the plurality of first temporary files to obtain two second temporary files; A merging unit that merges the two second temporary files to obtain a third temporary file; A transposition unit that performs north-south polar transposition on the third temporary file and the remaining first temporary files to obtain the ocean model input file, which includes a temperature-salinity initial field file and a forcing field file; A deletion unit that deletes all remaining temporary files and outputs the temperature-salinity initial field file and the forcing field file; The grid coupling infrastructure file includes a weight mapping file and a domain file, and the grid coupling infrastructure file automatic generation module includes: A second reading and parsing unit that reads and parses user-set CESM horizontal grid file input parameters to obtain atmospheric horizontal grid files, ocean horizontal grid files, atmospheric horizontal grid names, and ocean horizontal grid names; A weight mapping file creation unit that constructs the weight mapping file based on the atmospheric horizontal grid files, the ocean horizontal grid files, the atmospheric horizontal grid names, and the ocean horizontal grid names through an ESMF_RegridWeightGen tool; A domain file creation unit that generates the domain file corresponding to the horizontal resolution according to the weight mapping file through a gen_domain tool; The automatic detection module includes: A first detection unit that detects the correctness of the ocean and atmospheric horizontal grid files input into the ocean model input file automatic generation module and the grid coupling infrastructure file automatic generation module, including confirming whether the coordinate variables exist or are out of bounds and reasonable in dimension, and verifying whether they are legal SCRIP or ESMF formats; A second detection unit that performs abnormality detection on each step of the ocean model input file automatic generation module and data integrity detection on the ocean model input file, including confirming whether the data file variables, units, and time range meet expectations, whether they are damaged or metadata is missing, and whether the variable dimensions are consistent; The third detection unit detects abnormalities in each step of the grid coupling infrastructure file automatic generation module and checks and verifies the grid coupling infrastructure file, including weight matrix checking, grid consistency analysis and consistency verification, outputs an abnormality prompt and the output termination instruction when an abnormality is detected, and terminates the automatic execution program.

2. The data pre-processing apparatus of claim 1, wherein The interpolation unit performs horizontal bilinear interpolation on the original data file to remap the original data file to the specified horizontal grid of the new horizontal grid file, to obtain a plurality of first temporary files. The interpolation unit performs vertical interpolation on the temperature temporary file and the salinity temporary file respectively to convert the temperature temporary file and the salinity temporary file to the specified vertical levels, to obtain a plurality of second temporary files.

3. The data pre-processing apparatus of claim 1, wherein The weight mapping file creation unit comprises: a) defining the latitude and longitude coordinates, cell area, and mask of the input source grid and target grid; b) calculating the spatial intersection of the source grid and the target grid according to the input interpolation method, calculating the weight matrix for each target grid that overlaps with the source grid; c) storing the calculated weight matrix in sparse format; d) generating the weight mapping file containing the coordinates, area, and mask of the source / target grid, the index and weight value of the sparse matrix based on the weight matrix stored in sparse format.

4. The data pre-processing apparatus of claim 3, wherein The domain file creation unit comprises: a) parsing the weight mapping file and grid information to extract the weight matrix and the coordinates, cell boundary, mask, and cell area of the ocean and atmospheric grid; b) copying the ocean grid mask, reading or calculating the ocean cell area from the weight mapping file, and recording the latitude and longitude coordinates of the ocean cell boundary to obtain an independent definition domain file of the pure ocean grid; c) mapping the ocean mask from the ocean grid to the atmospheric grid by conservative interpolation weight, marking the area in the atmospheric grid that needs to exchange data with the ocean model to obtain the mask and area information file of the ocean model on the atmospheric grid for the CESM3 system to determine the ocean-atmosphere exchange area; d) reading the non-exchange area from the weight mapping file and adjusting the non-exchange area cell area to obtain the mask and area information file of the land model on the atmospheric grid.

5. The data pre-processing apparatus of claim 1, wherein The second detection unit is built in the ocean model input file automatic generation module; and / or the third detection unit is built in the grid coupling infrastructure file automatic generation module.

6. The data preprocessing device of claim 4, wherein the weight mapping file comprises: atmosphere-to-ocean conservative interpolation method mapping file, atmosphere-to-ocean bilinear interpolation method mapping file, atmosphere-to-ocean polar correction interpolation method mapping file, ocean-to-atmosphere conservative interpolation method mapping file, and ocean-to-atmosphere bilinear interpolation method mapping file; wherein the domain file creation unit constructs the independent definition domain file of the pure ocean grid, the mask and area information file of the ocean model on the atmospheric grid, and the mask and area information file of the land model on the atmospheric grid based on the ocean-to-atmosphere conservative interpolation method mapping file. ​ 7. A data pre-processing method for a domestic oceanic mode earth coupling system, characterized in that, The data preprocessing method between the LICOM3 ocean model and the CESM earth coupling system comprises: An ocean model input file automatic generation step of generating an ocean model input file based on an original data file after receiving a first user instruction; A grid coupling infrastructure file automatic generation step of generating a grid coupling infrastructure file based on the original data file after receiving a second user instruction; An automatic detection step of detecting whether the original data file and the ocean model input file and the grid coupling infrastructure file have abnormalities, and outputting a termination instruction if there are abnormalities; In the ocean model input file automatic generation step, after reading and analyzing user-set LICOM3 horizontal grid file input parameters, land point filling is performed on the LICOM3 horizontal grid file to form a new horizontal grid file; interpolation processing is performed on the original data file to obtain a plurality of first temporary files, interpolation processing is performed on temperature temporary files and salinity temporary files in the plurality of first temporary files to obtain two second temporary files; the two second temporary files are combined to obtain a third temporary file; after north-south polar transposition is performed on the third temporary file and the remaining first temporary files, the ocean model input file is obtained, the ocean model input file comprises a temperature-salinity initial field file and a forced field file; after all remaining temporary files are deleted, the temperature-salinity initial field file and the forced field file are outputted; The grid coupling infrastructure file comprises a weight mapping file and a domain file, and the grid coupling infrastructure file automatic generation step comprises: reading and analyzing user-set CESM horizontal grid file input parameters to obtain an atmospheric horizontal grid file, an ocean horizontal grid file, an atmospheric horizontal grid name, and an ocean horizontal grid name; the weight mapping file is constructed based on the atmospheric horizontal grid file, the ocean horizontal grid file, the atmospheric horizontal grid name, and the ocean horizontal grid name through an ESMF_RegridWeightGen tool; the domain file corresponding to the horizontal resolution is generated according to the weight mapping file through a gen_domain tool. The automatic detection step comprises: detecting the correctness of the ocean and atmospheric horizontal grid files input into the ocean model input file automatic generation module and the grid coupling infrastructure file automatic generation module, including confirming whether the coordinate variables exist or are out of bounds and reasonable in dimension, and verifying whether they are legal SCRIP or ESMF formats; performing abnormality detection on each step of the ocean model input file automatic generation module and data integrity detection on the ocean model input file, including confirming whether the data file variables, units and time range meet the expectations, whether they are damaged or metadata is missing, and whether the variable dimensions are consistent; performing abnormality detection on each step of the grid coupling infrastructure file automatic generation module and checking and verifying the grid coupling infrastructure file, including weight matrix checking, grid consistency analysis and consistency verification, outputting an abnormality prompt and the output termination instruction when an abnormality is detected, and terminating the automatic execution program.

Citation Information

Patent Citations

  • Method and system for generating ocean field mode value based on air-sea coupling mode

    CN114722593A

  • Ocean environment data generation method and system based on ROMS

    CN116776591A