Draft
Conversation
This reverts commit 28e0530.
untested code for lonlat2phys regrid
- Work in progress - UNet runs once successfully. Generating fluxes from the inputs. - Fluxes need to be double checked - Currently we do not compute tendencies - This will be done in a subsequent commit
ma595
reviewed
Oct 31, 2025
| ! Create an ESMF_mesh for the physics decomposition | ||
| physics_grid_mesh = ESMF_MeshCreate(trim(grid_file), ESMF_FILEFORMAT_ESMFMESH, & | ||
| elementDistgrid=dist_grid_2d, rc=rc) | ||
| call check_esmf_error(rc, subname//'ESMF_MeshCreate') |
Collaborator
There was a problem hiding this comment.
For future README updates - this error is thrown as grid_file is unset.
As Tom suggests, the following is required in the user_nl_cam file.
! for regridding
cam_physics_mesh = '$ATM_DOMAIN_MESH'
Fix output to initialise tends output earlier for Unet global model
ma595
reviewed
Nov 28, 2025
| do col = 1, ncol | ||
| forcing(col,1) = -1*(flux(col,2) - flux(col,1))/(pmid(col,2) - pmid(col,1)) | ||
| do level = 2, pver-1 | ||
| forcing(col,level) = (flux(col,level+1) - flux(col,level-1)) / (pmid(col,level)*(log(pmid(col,level+1)) - log(pmid(col,level-1)))) |
Collaborator
There was a problem hiding this comment.
Looks like we might be missing a sign here @TomMelt. It's possible you haven't rebased off main?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
work in progress
This PR adds the UNet model into CAM and modifies the setup so that the single column, or UNet can be selected via appropriate namelist configuration (See README.md for more info)
TODO:
This branch is based on Francis Vitt's work here