Skip to content
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

cleanup cpl - clm5 - datm - rtm water isotope flags #2

Open
bandre-ucar opened this issue Jul 27, 2016 · 0 comments
Open

cleanup cpl - clm5 - datm - rtm water isotope flags #2

bandre-ucar opened this issue Jul 27, 2016 · 0 comments

Comments

@bandre-ucar
Copy link
Contributor

Summary of Issue:

Mariana had suggestions for code cleanup of the water isotopes flags for the clm5 - coupler - datm - rtm interaction. See below.

Expected behavior and actual behavior:

This should be an answer preserving cleanup.

Details

Hi Ben,

1) datm:
I think that we do not need a wiso_datm in datm

 !isotopic forcing
   if(wiso_datm) then
     kshum_16O = mct_aVect_indexRA(a2x,'Sa_shum_16O')
     kshum_18O = mct_aVect_indexRA(a2x,'Sa_shum_18O')
     kshum_HDO = mct_aVect_indexRA(a2x,'Sa_shum_HDO')
     krc_18O   = mct_aVect_indexRA(a2x,'Faxa_rainc_18O')
     krc_HDO   = mct_aVect_indexRA(a2x,'Faxa_rainc_HDO')
     krl_18O   = mct_aVect_indexRA(a2x,'Faxa_rainl_18O')
     krl_HDO   = mct_aVect_indexRA(a2x,'Faxa_rainl_HDO')
     ksc_18O   = mct_aVect_indexRA(a2x,'Faxa_snowc_18O')
     ksc_HDO   = mct_aVect_indexRA(a2x,'Faxa_snowc_HDO')
     ksl_18O   = mct_aVect_indexRA(a2x,'Faxa_snowl_18O')
     ksl_HDO   = mct_aVect_indexRA(a2x,'Faxa_snowl_HDO')
 endif

could be replaced iwth 

kshum_16O = mct_aVect_indexRA(a2x,'Sa_shum_16O', perrWith='quiet')

and then you can have below
! isotopic forcing
! For tracer specific humidity, lnd_import_mct expects a delta, so just keep the delta from the input file - TW
if (index_kshum_160 /= 0) then
     a2x%rAttr(kshum_16O,n) = avstrm%rAttr(srh_16O,n)
end if

etc.

This mimics what we did in rtm yesterday. This also elimates the need to have a separate wiso_datm namelist variable 
that must be consistent with what you expect from the coupler.

I think the same thing can hold in clm - you will not need wiso_clm.
I also think the same thing holds for rtm - you will not need wiso_runoff.

I think that removing these namelists in favor of listening to nonzero field indices from the coupler will simplify the extensibility of the system.
The only namelist that is needed in the system is in seq_flds_mod and is flds_wiso.

Once these wiso_* flags are removed, the config_component.xml files for clm, rtm and datm should be cleanedup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant