-
Notifications
You must be signed in to change notification settings - Fork 171
cam6_3_027: Bug fixes for WACCMX #382
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
Conversation
modified: Externals.cfg
modified: cime_config/testdefs/testlist_cam.xml
new file: cime_config/testdefs/testmods_dirs/cam/outfrq3s_edyngrid_160x193/shell_commands
new file: cime_config/testdefs/testmods_dirs/cam/outfrq3s_edyngrid_160x193/user_nl_cam
new file: cime_config/testdefs/testmods_dirs/cam/outfrq3s_edyngrid_160x193/user_nl_clm
new file: cime_config/testdefs/testmods_dirs/cam/outfrq3s_edyngrid_320x385/shell_commands
new file: cime_config/testdefs/testmods_dirs/cam/outfrq3s_edyngrid_320x385/user_nl_cam
new file: cime_config/testdefs/testmods_dirs/cam/outfrq3s_edyngrid_320x385/user_nl_clm
modified: src/ionosphere/waccmx/edyn_mudcom.F90
modified: src/ionosphere/waccmx/edyn_solve.F90
modified: bld/namelist_files/namelist_defaults_cam.xml
modified: src/dynamics/se/dyn_comp.F90
modified: src/utils/physconst.F90
…g xlrg restart files
modified: src/physics/cam/physpkg.F90
modified: src/physics/cam/waccmx_phys_intr.F90
modified: src/physics/waccmx/ion_electron_temp.F90
modified: src/utils/cam_map_utils.F90
nusbaume
left a comment
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.
Looks good to me! Just a couple optional requests to change the log output, and one question related to possibly skipping a file read.
| if (masterproc) write(iulog,*) 'ion_electron_temp_inidat: Not able to read temperature from IC file.' & | ||
| //' Set TElec to NaN' |
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.
Would it make sense to add to this message stating that both TElec and TIon will be set to phys_state%t, which I assume is the neutral temperature?
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.
That would make sense.
| call infld( 'T',ncid_ini,dim1name, 'lev', dim2name, 1, pcols, 1, pver, begchunk, endchunk, & | ||
| tI, found, gridname='physgrid') | ||
| endif | ||
| if (found) then |
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.
If initialized_TiTe is false (i.e. neither the election temperatures nor neutral temperatures were found above) , then should one even bother trying to read in the ion temperatures, given that they will be overwritten by ion_electron_temp_timestep_init anyways?
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.
Agree.
| if (found) then | ||
| call pbuf_set_field(pbuf2d, index_ti, tI) | ||
| else | ||
| if (masterproc) write(iulog,*) 'ion_electron_temp_inidat: Not able to read temperature from IC file.' & |
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.
Would it make sense to add to this message stating that both TElec and TIon will be set to phys_state%t, which I assume is the neutral temperature?
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.
Makes sense.
gold2718
left a comment
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.
I have a couple of comments and questions but nothing that looks like it needs fixing (but please look at the question in election_ion_temp.F90).
|
|
||
| ! | ||
| fileSize = product(filelens) | ||
| fileSize = product( int(filelens,kind=iMap) ) |
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.
Ooh, nice catch!
| water_species_in_air_num = 0 | ||
| do i = 1, num_names_max | ||
| if (.not. LEN(TRIM(dry_air_species(i)))==0) then | ||
| if ((.not. LEN(TRIM(dry_air_species(i)))==0).and.(TRIM(dry_air_species(i))/='N2')) then |
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.
@jtruesdal, @PeterHjortLauritzen,
Have you had a chance to review the changes in this module?
Also, the logic could be cleaner (including use of the LEN_TRIM Fortran intrinsic:
| if ((.not. LEN(TRIM(dry_air_species(i)))==0).and.(TRIM(dry_air_species(i))/='N2')) then | |
| if ((LEN_TRIM(dry_air_species(i)) > 0) .and. (TRIM(dry_air_species(i)) /= 'N2')) then |
There are other places in this module where LEN(TRIM(xx)) should be replaced with LEN_TRIM(xx).
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.
Yes I have reviewed the code and I am happy with it. @gold2718 Do you have ideas for a cleaner implementation?
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.
@PeterHjortLauritzen just checking if you took a look at the fvitt changes to physconst and approve them (PR #382)?
| call pbuf_set_field(phys_buffer_chunk,index_te,phys_state(lchnk)%t(:ncol,:),start=(/1,1/), kount=(/ncol,pver/)) | ||
| call pbuf_set_field(phys_buffer_chunk,index_ti,phys_state(lchnk)%t(:ncol,:),start=(/1,1/), kount=(/ncol,pver/)) |
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.
At line 278, the pbuf_set_field calls are within a if (index_te>0) then block. Why not here?
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.
cacraigucar
left a comment
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.
When cam6_3_026 is tagged, please merge your code forward. At that point, I will verify that the cime version is okay and submit my approval. I've tentatively slated this PR for cam6_3_027.
|
Accidently posted here. Removed comment.
|
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.
@jtruesdal yes I approve. Just had some clarifying questions
| if (masterproc) then | ||
| write(iulog, *) "Dry air composition ",TRIM(dry_air_species(i)),& | ||
| icnst,thermodynamic_active_species_idx(icnst),& | ||
| icnst, -1,& |
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.
Did you mean to write "icnst -1" to log file?
| water_species_in_air_num = 0 | ||
| do i = 1, num_names_max | ||
| if (.not. LEN(TRIM(dry_air_species(i)))==0) then | ||
| if ((.not. LEN(TRIM(dry_air_species(i)))==0).and.(TRIM(dry_air_species(i))/='N2')) then |
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.
Yes I have reviewed the code and I am happy with it. @gold2718 Do you have ideas for a cleaner implementation?
cacraigucar
left a comment
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.
Post merge approval of Externals.cfg not being changed.
Misc bug fixes for WACCMX:
fixes #363
fixes #376
fixes #377
fixes #379