Fix minor issues in documentation, key_ CPPs, bfbcomp return codes#532
Conversation
quickstart documentation points to porting (CICE-Consortium#529) check additional return codes in the bfbcomp tool (CICE-Consortium#524) fix undefined variable in ice_init output (CICE-Consortium#520) add documentation about aliases (CICE-Consortium#523) remove key_ CPPS, can be handled by passing communicator thru interface (CICE-Consortium#498)
eclare108213
left a comment
There was a problem hiding this comment.
In the new aliases section of the documentation, I think it should be made clear that these aliases are not automatically set up, and the user would need to copy them into one of their own scripts. (Right?)
There was a problem hiding this comment.
Thanks for these @apcraig. I left a few comments below, but the rest looks good.
|
|
||
| Software requirements are noted in this :ref:`software` section. | ||
|
|
||
| Porting information can be found in the :ref:`porting` section and a special porting section for personal computers is in the :ref:`laptop` section. |
There was a problem hiding this comment.
Porting was already mentioned in the paragraph below the shell example. Maybe we should clean up that paragraph also ? I think linking to the Porting and Laptop sections here makes sense.
There was a problem hiding this comment.
I have cleaned up the quick start. For some reason, readthedocs isn't showing the latest, but I have confirmed offline that the file changes show in the PR diff are working in sphinx and I assume they'll show up when the PR is merged.
| alias cdcase 'cd `\grep "setenv ICE_CASEDIR" cice.settings | awk "{print "\$"NF}"`' | ||
|
|
||
| - When the run scripts are submitted, the current **ice_in**, **cice.settings**, and **env.[machine]** files are copied from the case directory into the run directory. Users should generally not edit files in the run directory as these are overwritten when following the standard workflow. **cice.settings** can be sourced to establish the case values in the login shell. | ||
| - Some useful alias can be found in the :ref:`aliases` section |
There was a problem hiding this comment.
| - Some useful alias can be found in the :ref:`aliases` section | |
| - Some useful aliases can be found in the :ref:`aliases` section |
| Useful aliases | ||
| ------------------- | ||
|
|
||
| This section provides a list of some potentially useful aliases that leverage the CICE |
There was a problem hiding this comment.
| This section provides a list of some potentially useful aliases that leverage the CICE | |
| This section provides a list of some potentially useful shell aliases that leverage the CICE |
|
|
||
| The current **ice_in**, **cice.settings**, and **env.[machine]** files are copied from | ||
| the case directory into the run directory when the model is run. Users can create aliases | ||
| leveraging the variables in these files. Aliases like the following can be established |
There was a problem hiding this comment.
| leveraging the variables in these files. Aliases like the following can be established | |
| leveraging the variables in these files. Aliases like the following can be established by copying them to one's shell startup files |
There was a problem hiding this comment.
Everyone has their own style to usage in their home shell. I prefer to avoid telling people how to work. My thought here is that we should (at most) demonstrate some possible aliases without encouraging them or micro managing how people work.
There was a problem hiding this comment.
I understand that, but some users (I'm thinking students) might not know at all how they should use these aliases. By mentioning "shell startup files", it at least gives them something they can Google to learn how to do it. More advanced users that want to work differently can just disregard that sentence and do as they please.
There was a problem hiding this comment.
I'm updated this section a bit and I think it's clearer. Thanks for the feedback.
| alias cice_rundir='cice_var ICE_RUNDIR' | ||
| # open a tcsh shell and source env.* and cice.settings (useful for launching CICE in a debugger) | ||
| alias cice_shell='tcsh -c "cice_env; tcsh"' | ||
|
|
There was a problem hiding this comment.
The cdcase, cdrun and cice_rundir aliases as written above need the following shell function:
| # Print the value of a CICE variable ($1) from cice.settings | |
| cice_var() { | |
| \grep "setenv $1" cice.settings | awk "{print "\$"3}" | |
| } |
There was a problem hiding this comment.
I didn't notice that. I just cut and paste some of the aliases. Personally, I think these aliases are a bit complicated for many users. But I will try to fix this.
There was a problem hiding this comment.
Well, users do not have to understand how the aliases work to benefit from them :)
There was a problem hiding this comment.
I added the cice_var alias to the documentation.
| #if defined key_oasis3 || key_oasis3mct | ||
| use cpl_oasis3 | ||
| #endif | ||
|
|
||
| #if defined key_oasis4 | ||
| use cpl_oasis4 | ||
| #endif | ||
|
|
||
| #if defined key_iomput | ||
| use lib_mpp, only: mpi_comm_opa ! MPP library | ||
| #endif | ||
|
|
There was a problem hiding this comment.
OK, so basically these use statements would have to be in the drivers instead, and the communicator passed to init_communicate by argument. I don't know why it was not made that way in the first place, but I think this is a good change that cleans up the code.
Thanks. I'll update my code next time I rebase the branch where I'm working on coupling with NEMO.
There was a problem hiding this comment.
That's correct. I'm actually surprised anyone is using the key_ cpps. I thought that was obsolete by now. If not, we probably need to make sure we call this out in our release notes for Oasis users.
There was a problem hiding this comment.
Yes, it definitely should be in the release notes. Also, key_iomput is not OASIS-related, it's plain NEMO. We use it at CMC although we do not use OASIS.
There was a problem hiding this comment.
Thanks @phil-blain, very interesting. Do you agree it's reasonable and appropriate to remove these cpps and force users to pass the comm thru the interface?
|
@eclare108213, I think the items mentioned have been addressed if you want to take another review. Happy to make additional changes. |
In 066070e (Fix minor issues in documentation, key_ CPPs, bfbcomp return codes (CICE-Consortium#532), 2020-11-23), the 'ice_communicate' module was updated to remove CPP macros relating to the OASIS coupler (key_oasis*) and to the NEMO ocean model (key_iomput). These CPPs were used to make the correct MPI communicator accessible to the 'init_communicate' subroutine. However, that subroutine already accepts an optional MPI communicator as argument and it was deemed cleaner to require the driver layer to explicitely pass the communicator instead of making it accessible through 'use' statements. Update the 'hadgem3' driver, used for coupling with NEMO, to explicitely pass the NEMO MPI communicator 'mpi_comm_opa' to 'init_communicate'.
In 066070e (Fix minor issues in documentation, key_ CPPs, bfbcomp return codes (CICE-Consortium#532), 2020-11-23), the 'ice_communicate' module was updated to remove CPP macros relating to the OASIS coupler (key_oasis*) and to the NEMO ocean model (key_iomput). These CPPs were used to make the correct MPI communicator accessible to the 'init_communicate' subroutine. However, that subroutine already accepts an optional MPI communicator as argument and it was deemed cleaner to require the driver layer to explicitely pass the communicator instead of making it accessible through 'use' statements. Update the 'hadgem3' driver, used for coupling with NEMO, to explicitely pass the NEMO MPI communicator 'mpi_comm_opa' to 'init_communicate'.
In 066070e (Fix minor issues in documentation, key_ CPPs, bfbcomp return codes (CICE-Consortium#532), 2020-11-23), the 'ice_communicate' module was updated to remove CPP macros relating to the OASIS coupler (key_oasis*) and to the NEMO ocean model (key_iomput). These CPPs were used to make the correct MPI communicator accessible to the 'init_communicate' subroutine. However, that subroutine already accepts an optional MPI communicator as argument and it was deemed cleaner to require the driver layer to explicitely pass the communicator instead of making it accessible through 'use' statements. Update the 'hadgem3' driver, used for coupling with NEMO, to explicitely pass the NEMO MPI communicator 'mpi_comm_opa' to 'init_communicate'.
* drivers/hadgem3: add missing 'subname' and use existing 'subname's * drivers/hadgem3/CICE_InitMod: update 'init_lvl' call Add the required 'iblk' argument. * drivers/hadgem3/CICE_RunMod: remove uneeded 'dt' arguments The subroutines 'prep_radiation', 'zsal_diags', 'bgc_diags' and 'hbrine_diags' do not take a 'dt' argument anymore, so remove it. * drivers/hadgem3/CICE_RunMod: get 'Lsub' from Icepack * drivers/hadgem3/CICE_RunMod: remove 'da_state_update' subroutine This subroutine is inside an 'ICE_DA' CPP, which is not used in any configuration. Remove it. * drivers/hadgem3/CICE_RunMod: remove stray '+' This '+' sign was copy-pasted there in error in 29b99b6 (CICE: Floe size distribution (#382), 2019-12-07). Remove it. * drivers/hadgem3: remove obsolete 'check_finished_file' subroutine Remove the call to 'check_finished_file' as well as the definition of the subroutine, as the 'hadgem3' driver is not used on machine 'bering' and it's unclear if machine 'bering' still exists. * drivers/hadgem3: fix cice_init so it calls 'count_tracers' This was forgotten back in 8b0ae03 (Refactor tracer initialization (#235), 2018-11-16) * drivers/hadgem3/CICE_RunMod: add call to 'save_init' The hadgem3 driver was not updated when 'save_init' was added in 83686a3 (Implement box model test from 2001 JCP paper (#151), 2018-10-22). As this subroutine is necessary to ensure proper initialization of the model, add it now. * drivers/hadgem3/CICE_RunMod: tweak loop indices in 'coupling_prep' Other drivers use 'ilo,ihi' and 'jlo,jhi' here. Do the same. * drivers/hagdem3: update driver to new time manager * drivers/hadgem3: pass 'mpi_comm_opa' explicitely to init_communicate In 066070e (Fix minor issues in documentation, key_ CPPs, bfbcomp return codes (#532), 2020-11-23), the 'ice_communicate' module was updated to remove CPP macros relating to the OASIS coupler (key_oasis*) and to the NEMO ocean model (key_iomput). These CPPs were used to make the correct MPI communicator accessible to the 'init_communicate' subroutine. However, that subroutine already accepts an optional MPI communicator as argument and it was deemed cleaner to require the driver layer to explicitely pass the communicator instead of making it accessible through 'use' statements. Update the 'hadgem3' driver, used for coupling with NEMO, to explicitely pass the NEMO MPI communicator 'mpi_comm_opa' to 'init_communicate'. * drivers: add 'nemo_concepts' driver Historically the 'hadgem3' driver has been used when compiling a single NEMO-CICE executable at ECCC. Going forward, all driver-level adjustements will be done in our own driver, 'nemo_concepts', 'CONCEPTS' being the name of the multi-departmental collaboration around using the NEMO ocean model. Copy CICE_InitMod, CICE_RunMod and CICE_FinalMod from the 'hadgem3' directory to a new 'nemo_concepts' directory under 'drivers/direct'. The following commits will clean up this new driver and port over some in-house adjustments. * drivers/nemo_concepts: remove unused 'writeout_finished_file' subroutine This subroutine was only called on machine 'bering', which is not an ECCC machine and probably does not exist anymore anyway. Remove it. * drivers/nemo_concepts: call 'scale_fluxes' with 'aice_init' Since 'merge_fluxes' is called with aice_init, it is more consistent to also call 'scale_fluxes', in 'coupling_prep' with 'aice_init' instead of 'aice'. Copy this in-house change to the new 'nemo_concepts' driver.
PR checklist
Fix minor issues in documentation, key_ CPPs, bfbcomp return codes
apcraig
full test suite run on cheyenne, all bit-for-bit. https://github.com/CICE-Consortium/Test-Results/wiki/cice_by_hash_forks#af9bf583ab138b3854460172ca249d237574fd98
This PR addresses a handful of minor updates defined by the following issues
quickstart documentation points to porting (#529)
check additional return codes in the bfbcomp tool (#524)
fix undefined variable in ice_init output (#520)
add documentation about aliases (#523)
remove key_ CPPS, can be handled by passing communicator thru interface (#498)