-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mapping between cube-sphere grid and latitude and longitude #2694
Comments
Hi @beiduqiu, do you mean regridding the inputs to the run resolution or the outputs to lat-lon? Is there a specific thing you are trying to do in the simulation, such as print lat and lon coordinates for an (I,J,L) cell? |
Please also see this feature in gcpy: geoschem/gcpy#277 added by @yantosca |
Hi, I’m currently working on workload prediction and load balancing for GCHP. My goal is to estimate the workload for each column using source data, such as meteorology or Hemco data. However, I’ve noticed that the source data is assigned based on lat-lon grids, whereas the simulation uses cubed-sphere grids. To address this, I’m looking to build a mapping between the source data and the KPP steps for each column. At the moment, I only have a mapping between (columns, KPP steps for each column). To achieve my goal, I need to establish a mapping between lat-lon grids and columns. Would you have any advice or suggestions on how to efficiently construct this mapping or insights into relevant tools that could assist in this process? I believe if I can print the lat-lon address for an (I,J,L) will be very helpful. |
Hmm, I'm not quite following. The input data, e.g. meteorology, is regridded upon MAPL read to the cubed-sphere grid. You can output this data on cubed-sphere rather than look at lat-lon. Or perhaps I am misunderstanding? If you would like to print lat-lon you can see it from State_Grid parameters: geos-chem/Headers/state_grid_mod.F90 Lines 32 to 97 in b0e03cc
The mapping itself is done via ESMF. You can get the regridding weights and mapping using GCPy (see earlier comment from @msulprizio) |
Tagging @sdeastham |
I think your answer is what's needed @lizziel - happy to jump in if I can help though! |
Thanks for your reply @lizziel . However, I still have some questions about the GCHP mode. I would like to confirm my understanding of the data sources used in GCHP simulations and clarify a few points regarding data handling and grid mapping: Understanding of Simulation Data: Handling Missing Emission Data: Grid_State Values in fullchem_mod: Mapping Between Lat-Lon Grid and Cube-Sphere Grid: Initial Settings for Emission Data: |
I don't think the input data can be generalized in this way. Our meteorology is a combination of hourly and 3-hourly, time-averaged, constant and instantaneous, 2D and 3D. By "Chemistry data" do you mean data in the Chem_Inputs folder? These are not all constant. For example, LAI is dynamic.
GCHP uses the nearest year available for missing emissions. This is set in ExtData.rc at the top of the file, with
I assumed the state_grid variables were set for GCHP, at least the global ones. Did you try
The mechanics of the mapping within GCHP is done in MAPL/ESMF. If there is a GCHP array you want in both cubed-sphere and lat-lon then the most efficient approach I think is to create a diagnostic for it and output that at both lat-lon and cubed-sphere. If you want input data on cubed-sphere instead of the native lat-lon you could output that from the model as well, on either grid. In general, you can output diagnostics as time-averaged or instantaneous and specify the grid. All of that is done within configuration file HISTORY.rc. That being said, the best approach really depends on exactly what you are trying to do, what problem you are trying to solve. |
Thanks for the quick response, @lizziel. I’m working on building a mapping between the input data and the workload for each column. My goal is to leverage reinforcement learning to predict the workload from the source data before the simulation starts. The challenge is that the source data is provided in a lat-lon format, while in GCHP, I only have access to the workload for each column which is in the cubed-sphere grid. I need to identify which parts of the source data correspond to specific columns in the chemistry computation. Would you have any suggestions on how to approach this mapping or any relevant resources I could explore? Any relevant resources or guidance would be greatly appreciated.
|
If you need a map prior to running GCHP then I recommend using the ESMF tools to either regrid the file or simply get the mapping weights. Note that the problem is not just different grids (cubed-sphere vs lat-lon) but also different resolutions. You will need to be able to create the mapping on the fly and ESMF can do this. You can develop your own tools in python to regrid the data directly or use GCPy, which likely needs some modification since we focus only on regridding restart files which are in a different cubed-sphere file format. A few resources for offline regridding and mapping weight generation:
Are you using machine learning? I would think any deep learning algorithm would be able to incorporate the grid differences into its model without the need for manual mapping. |
Your name
Zifan WANG
Your affiliation
Washington University in Saint Louis
Please provide a clear and concise description of your question or discussion topic.
Hi, I am trying to find the mapping between the cube-sphere grid in the simulation such as (6,24,24) for C24 resolution and the latitude and longitude in the simulation data. Could you tell me how this mapping can be done in GCHP or point out the location in the source code that does this mapping?
The text was updated successfully, but these errors were encountered: