-
Notifications
You must be signed in to change notification settings - Fork 0
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
Update snow table implementation and add SNICAR SSP Tables #5
Conversation
I will rebase tomorrow with your latest changes. This updates the snow table initialization and adds various SNICAR SSP table options including reading in a file in the icepack driver and passing it into Icepack. I have tested the various options, the SNICAR science aborts during timestepping, but the tables seem to read fine for default (no table), snicartest (5x5 table) and snicar (5x1471) tables. I have also verified that the default setup with the new snow table initialization is also bit-for-bit for a few tests I've run. We can catch up more tomorrow depending whether what you want me to merge and if you want any changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AWESOME! extremely helpful.
|
||
endif ! dEdd | ||
call icepack_init_radiation() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so far icepack_init_radiation is only needed for dEdd, so this sectioncould be called inside the endif statement immediately above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
icepack_init_radiation calls the data_dEdd_3band which is called all the time right now. My preference would be that the icepack_init_radiation call be always called and then the if tests be inside that subroutine. That provides extensibility in the future for the icepack_init_radiation call if other stuff needs to be initialized for non-dEdd options. What I'll do is add an "if dEdd" around the data_dEdd_3band call in the subroutine and check that doesn't break anything.
call icedrv_system_abort(file=__FILE__,line=__LINE__) | ||
endif | ||
|
||
do i = 1, nx |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch
!------------------- | ||
! SNICAR SSP table | ||
!------------------- | ||
if (present(snw_ssp_table_in) ) snw_ssp_table = snw_ssp_table_in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should all of this table allocation code have an 'if (dEdd_snicar)' wrap around it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It probably doesn't matter, but I would say no. I think anytime a user passes something into icepack_parameters, it should be set that way inside icepack, even if it's not needed. Adding "if" will just increase complexity and if something is setup improperly, will be harder to debug.
@@ -100,6 +101,23 @@ module icedrv_forcing | |||
trest, & ! restoring time scale (sec) | |||
trestore ! restoring time scale (days) | |||
|
|||
! SNICAR snow grain single-scattering properties (SSP) for | |||
! direct (drc) and diffuse (dfs) shortwave incidents |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change the comment (dr) and (df)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do.
What needs to be done to fix the conflicts? I'll work on this, this afternoon, and would like to update to this version before I start. |
Let me rebase my PR and I'll also address your comments. If you can give me a couple hours, I should have it all sorted out, maybe sooner. |
ok, thanks |
Add calls to icepack_init_radiation to icepack driver
Add some SNICAR SSP table checks, aborts, etc
new namelist variables and options. Add new namelist to icepack_in. Add snicar and snicartest options. Minor updates to namelist output
I am running a small test suite now, but I think it should be OK. There are a number of things to do
|
Test results are below. baseline codes pass bit-for-bit except for intel with optimization. debug option is bit-for-bit for intel. All the snicar cases fail with a "Picard solver non-convergence". This is expected. I will run a fuller test suite to check bit-for-bit with the current baseline.
|
It's on my list. I'm keeping the lower level names from the MPAS-SI implementation for now, for my own sanity, but plan to change them to the higher-level, more intuitive names.
I can look at this. Haven't paid much attention to the snow model portion of the code changes, yet.
Eeeek! This might be my mistake in transferring code from MPAS-SI to Icepack -- I'll double check. If I remember correctly, the order listed in netCDF headers is backwards from that in the code. Is that true, and if so, is that the problem? |
Is this ready to merge, and then I can continue working on all these issues? |
I tried to figure out whether the netcdf dump was definitely giving me information in "C" order or "Fortran" order and to be honest, it's a little unclear. I looked into that and wasn't sure. That could definitely be it and maybe it is. I'll interrogate the data after it's read into the code to confirm. If that's the case, then we should be OK. But there is still a question where the "test" table data says,
which is backwards. But since nmbrad=nspint=5 in this case, it won't affect the table. The question is whether the data order is correct or whether the index order is correct in the table. If the data order is correct, then we can just flip the indices (for clarity) and leave the data alone. If the data is backwards, then we need to flip the data around in the data statement. Partly, I assumed the netcdf and "test" data were done in the same way which is why I raised the flag in general. But it could just be that the "test" data has the indices reversed, playing no role in the science. |
You can merge and I'll continue to test. |
In the original code: so the reshape functions in the code should be to (/nSnowGrainRadiusSNICAR,nSpectralIntervalsSNICAR/) I think you already know this, I'm just catching up |
Update to Consortium Main Aug 17, 2022
Update snow table implementation and add SNICAR SSP Tables