-
Notifications
You must be signed in to change notification settings - Fork 446
Revive spectral mesh coupling in driver-moab #7787
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
Draft
rljacob
wants to merge
29
commits into
master
Choose a base branch
from
iulian787/spectral_sep_moab
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
+1,180
−328
Conversation
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
Remove setting of xao Av. Loop bound is no longer set by MCT and debugger was complaining.
Use correct temporary array sizes for ice and ocean instead of the maximum. Requires one more temp array. Also use a logical to allocate them just once.
need to add ext tags fix data atm too
for _ext tags, we need more methods to retrieve data Or maybe we will go back to dual mesh, and then dual mesh will be like any other FV mesh on coupler side the _ext tags use about twice as much memory while the dual mesh would be more optimal
they are a relic from the past we were supporting atm spectral to ocean projection, using tempestremap moved to pg2 mesh, so spectral will be used only in monogrid scenarions there should be no mapping in spectral cases (ne4np4, for exanple) All grids are related to atm np4 gll points; either dual mesh, or culled dual mesh on coupler side (land) atm will be on coupler side just point cloud (migrated from comp side, directly)
it may be left 0 for spectral case; no maps, so no aream to read from anywhere
in general, aream for lnd is projected from atm in same grid cases, spectral (monogrid), do not need to project anymore
atm will be type 2 on coupler side, when atm_pg_active is false it cannot be used for any map read or compute, it can be only monogrid case there are still differences shown with MOABCOMP, so something is still not right
the utilities in shr_moab_mod.F90 need to know if spectral atm is involved; then, instead of cells, use vertices nb and tags
the only coupler instance that uses vertices for primary data is the atm in spectral case anoter fix needed is for regular pg2 case; not working anymore
not sure yet when
spectral mesh will not be instanced at all for pure spectral; it is not used at all right now only in the pgx case the spectral mesh is instanced and that is just because it is easier to instance all meshes, not just pgx FV mesh maybe it should be cleaned out completely
when writing history files, the global size needs to be the number of global vertices, for spectral case ( atm_pg_active false)
ngv is the number of global vertices for the imoab app it is used only for spectral case the other calls iMOAB_GetGlobalInfo need the number of cells, not the number of vertices
introduce mb_scm_land logical it is false, except when land is identified as scm (lnd_nx and lnd_ny are both 1) it is turn on if needed in lnd moab cx init it will trigger land migrate of PC cloud, not a read from domain file also, Sa2l map will involve type vertex for land history and restart for land still have to be fixed
problem appeared for conus, debug mode case: SMS_D_Ln5.conusx4v1pg2_r05_IcoswISC30E3r5.F2010.chrysalis_gnu euler formula assumes there is only one connected region, when number of edges is computed HSFC does not guarantee that, especially for RRM meshes select arbitrarily 3 as more connected regions could be possible we could actually allocate much more, nedges_c to be number of quads * 4 Also, when skip match needs to be checked first, before mapid triggered in debug mode only
matrices o2x_am, used for atm merge, should not be retrieved if ocean is not active similar for ice, and xao fluxes
Ops involving a2x_rm in prep_rof_mrg_moab should only happen when rof_heat is true.
Add areafact_samegrid to component_init_areacor_moab and when its true, set the area correction factors to 1. As done in driver-mct.
Add more handling of single column mode for land.
Also check for single column model when land mb id is passed in and set ent_type appropriately.
In single_column case, zero out Si_snowh to match eam history with driver-mct
Set ent_type correctly for scm land
Set ent_type correctly with land is in single column mode for section that zeros river variables.
Use single_column and scm_multcol to determine if mb_scm_land should be set. DP case will not have land_nx=land_ny=1
Set mbGridType to 0 for mlnid. Some code was moved for the scm case which broke the calculation that was here.
Make sure areas are initialized in areacor by moving the iMOAB_GetDouble call that does it outside of the if(.not.samegrid) block. aream is needed later.
xao_am, l2x_am, i2x_am, and o2x_am are only set using GetDouble if the corresponding model is present. For at least o2x_am, it was still used in a merge even if not present. So 0 those arrays if the corresponding moab app id is not set. This zero's the Faoo_h2otemp field for the moab coupler.
'Fall_' fluxes that are not merged have to be set to 0 in MOAB when there's no land model. Otherwise they will keep the default value. Found while testing the aquaplanet case and dust fluxes were -1e+10
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.
No description provided.