Skip to content

add cdeps prefix to the cdeps data component module names#31

Merged
binli2337 merged 5 commits into
NOAA-EMC:developfrom
junwang-noaa:modulenames
Jun 9, 2021
Merged

add cdeps prefix to the cdeps data component module names#31
binli2337 merged 5 commits into
NOAA-EMC:developfrom
junwang-noaa:modulenames

Conversation

@junwang-noaa
Copy link
Copy Markdown
Collaborator

@junwang-noaa junwang-noaa commented Jun 3, 2021

Description of changes

The PR changes the cdeps data component module name from xxx_comp_nuopc to cdeps_dxxx_comp_nuopc, Those names are unique, so the issue with using same module name in the UFS or other model will be resolved.

Specific notes

CDEPS Issues Fixed (include github issue #): no c

Are there dependencies on other component PRs

  • CIME (list): the file names are not changed to avoid make file change, but the FRONT model name defined in NEMS driver will need to point to cdeps_dxxx_comp_nuopc, instead of xxx_comp_nuopc.
  • CDEPS (list): no other change in CDEPS

Are changes expected to change answers?

  • bit for bit
  • different at roundoff level
  • more substantial

Any User Interface Changes (namelist or namelist defaults changes)?

  • Yes
  • No

Testing performed:

  • (required) aux_cdeps
    • machines and compilers:
    • details (e.g. failed tests):
  • (optional) CESM prealpha test
    • machines and compilers
    • details (e.g. failed tests):

Hashes used for testing:

@junwang-noaa
Copy link
Copy Markdown
Collaborator Author

The UFS DATM test passes with this PR and the UFS #PR 611 ( line https://github.com/ufs-community/ufs-weather-model/pull/611/files#diff-a2e8c35f304291c60982542bf57cd54220347ddf28cacdb8b5c7bb90c9d2a7aaR30 needs to set DISABLE_FoX to public.

@uturuncoglu
Copy link
Copy Markdown
Collaborator

@junwang-noaa I think we need to test this with CESM also. Let me try to test and see what happens in CESM side. Did you run at least a couple application with this branch? CMEPS could also fail but I am not sure.

@junwang-noaa
Copy link
Copy Markdown
Collaborator Author

@uturuncoglu Would you please try the changes to see if it solves the issues in HAFS? No script changes required. I assume it will work with: FV3+HYCOM, DATM+MOM6+CICE6 and FV3+DOCN+MOM6+CICE6. Please let me know if you still have issues. Thanks

@junwang-noaa
Copy link
Copy Markdown
Collaborator Author

junwang-noaa commented Jun 3, 2021

@uturuncoglu On CIME side, I think your need to update the FRONT models in make files, it needs to use: cdeps_dxxx_comp_nuopc, instead xxx_comp_nuopc. Thanks for testing in CIME.

@uturuncoglu
Copy link
Copy Markdown
Collaborator

@junwang-noaa Sure. My Orion account is expired last week and Arun is working on it. So, I am trying to move my development to Cheyenne but I don't have run directories for HAFS in there. So, it might take little bit time for me to test it.

@DeniseWorthen
Copy link
Copy Markdown
Collaborator

@uturuncoglu Let me know if you want me to transfer something from Orion to Cheyenne.

@uturuncoglu
Copy link
Copy Markdown
Collaborator

@DeniseWorthen That would be great, could you access to following directory /work/noaa/gmtb/tufuk/RUN/AtmOcnWav

@uturuncoglu
Copy link
Copy Markdown
Collaborator

@DeniseWorthen i am not sure you could access or not to gmtb group.

@uturuncoglu
Copy link
Copy Markdown
Collaborator

@uturuncoglu On CIME side, I think your need to update the FRONT models in make files, it needs to use: cdeps_dxxx_comp_nuopc, instead xxx_comp_nuopc. Thanks for testing in CIME.

I checked the CMEPS side and it seems that it is expecting certain names in drivers/cime/esm.F90. I need to discuss possible solution for it with Jim and Mariana before going forward and make the changes because this could effect CESM regression tests. I'll update you about it.

Copy link
Copy Markdown

@aerorahul aerorahul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code changes look good.
I have one suggestion that could make this less repetitive.

Comment thread datm/atm_comp_nuopc.F90 Outdated
character(*) ,parameter :: F00 = "('(atm_comp_nuopc) ',8a)"
character(*) ,parameter :: F01 = "('(atm_comp_nuopc) ',a,2x,i8)"
character(*) ,parameter :: F02 = "('(atm_comp_nuopc) ',a,l6)"
character(len=*),parameter :: subname='(cdeps_datm_comp_nuopc):(InitializeAdvertise) '
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can this not just be:

character(len=*),parameter :: subname= trim(modName) // ':(InitializeAdvertise) '

and so on for the rest?

@mvertens
Copy link
Copy Markdown

mvertens commented Jun 3, 2021

@uturuncoglu - can you please run this by @jedwards4b as to what other changes need to be made for this to be compatible with cesm. It would be great to be using the same code in both systems moving forwards.

@junwang-noaa
Copy link
Copy Markdown
Collaborator Author

@uturuncoglu On CIME side, I think your need to update the FRONT models in make files, it needs to use: cdeps_dxxx_comp_nuopc, instead xxx_comp_nuopc. Thanks for testing in CIME.

I checked the CMEPS side and it seems that it is expecting certain names in drivers/cime/esm.F90. I need to discuss possible solution for it with Jim and Mariana before going forward and make the changes because this could effect CESM regression tests. I'll update you about it.

I see this may have conflict in CIME, but it looks to me the CIME config only allows one component for ATM (other components too), using different front model name allows us to use two models for ATM (e.g. turn on both hycom and docn as OCN model in HAFS to cover differrent regions).

@uturuncoglu
Copy link
Copy Markdown
Collaborator

@mvertens sure. I'll check with Jim.

@jedwards4b
Copy link
Copy Markdown

The name of these interface modules is intentionally the same for a given component and changing them will have serious consequences in cime. I agree with @junwang-noaa point that their may be an application that wants to use for example dlnd and clm or docn and pop at the same time thus requiring a change of this nature, however I think that we need to proceed with caution.

Copy link
Copy Markdown

@jedwards4b jedwards4b left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change will not work in cime without several other coordinated changes.

@junwang-noaa
Copy link
Copy Markdown
Collaborator Author

@uturuncoglu My understanding is that we do need both HYCOM and docn turned on in HAFS, please correct me if this is not the case.

@DeniseWorthen
Copy link
Copy Markdown
Collaborator

@DeniseWorthen That would be great, could you access to following directory /work/noaa/gmtb/tufuk/RUN/AtmOcnWav

@uturuncoglu I not sure everything transferred (there are a lot of sym-links in this directory) but you can check here:

/glade/scratch/worthen/AtmOcnWav

@mvertens
Copy link
Copy Markdown

mvertens commented Jun 3, 2021 via email

@uturuncoglu
Copy link
Copy Markdown
Collaborator

@uturuncoglu My understanding is that we do need both HYCOM and docn turned on in HAFS, please correct me if this is not the case.

Yes, but this is just a case. The solution needs to be generic as much as possible to cover other data components

@mvertens
Copy link
Copy Markdown

mvertens commented Jun 3, 2021 via email

@uturuncoglu
Copy link
Copy Markdown
Collaborator

@DeniseWorthen I think that links are not copied. If you don't mind, could you also copy AtmWav directory? Iy could contain the directories like log.* and model output. So, you could skip them.

@binli2337
Copy link
Copy Markdown

binli2337 commented Jun 3, 2021

@junwang-noaa I have made some test runs on Hera. The code changes are good.

@uturuncoglu
Copy link
Copy Markdown
Collaborator

uturuncoglu commented Jun 3, 2021

@junwang-noaa it seems that the best way to make it work in the short term is to use CESMCOUPLED CPP flag (we are already using it for PIO initialization) rather than renaming the modules for all the applications. This approach allow us to use new names with UFS but old ones with CESM until all the CESM components are ready for the transition. Please let me know what do you think? As @aerorahul suggested, we could define module as a variable or maybe there could be a macro definition in the CPP region like #define MODULE_NAME cdeps_datm_comp_nuopc. I did not test this approach but it could help to use only one CESMCOUPLED CPP flag at the beginning and end of the file.

@jedwards4b
Copy link
Copy Markdown

Can you also consider reducing the redundancy in the module name before we get too far along?
How about cdeps_datm_comp (drop the _nuopc).

@DeniseWorthen
Copy link
Copy Markdown
Collaborator

@DeniseWorthen I think that links are not copied. If you don't mind, could you also copy AtmWav directory? Iy could contain the directories like log.* and model output. So, you could skip them.

@uturuncoglu I put the AtmWav directory in /glade/scratch/worthen/ also.

@junwang-noaa
Copy link
Copy Markdown
Collaborator Author

@uturuncoglu Sure, let's use "CESMCOUPLED" since it is already in the code. Otherwise we have to introduce a new CPP flag MODULE_NAM.
@jedwards4b I can reduce the module name to: cdeps_cxxx_comp without "_nuopc"

@uturuncoglu
Copy link
Copy Markdown
Collaborator

@DeniseWorthen Thanks. I hope this will bring the remaining files and I could run the model.

@junwang-noaa
Copy link
Copy Markdown
Collaborator Author

@uturuncoglu @jedwards4b @aerorahul The code is updated.

Copy link
Copy Markdown
Collaborator

@uturuncoglu uturuncoglu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that there will be a follow-up PR for NEMS and CMEPS. Right? @junwang-noaa Let me test also with CESM first before merging it. I'll update you about it soon.

@uturuncoglu
Copy link
Copy Markdown
Collaborator

@jedwards4b i am trying to run tests with updated CDEPS using latest CESM tag and CDEPS is failing. I just wonder if it is related with the changes in this PR or just the version of the CDEPS because it seems that the version used in this PR is ahead of the version used under CESM. Here is the log file /glade/scratch/turuncu/ERS_Ld7_Vnuopc.f19_g17.B1850.cheyenne_intel.allactive-defaultio.20210604_100302_88f2pw/bld/CDEPS.bldlog.210604-100310

@jedwards4b
Copy link
Copy Markdown

jedwards4b commented Jun 4, 2021 via email

@uturuncoglu
Copy link
Copy Markdown
Collaborator

@jedwards4b I could see -DCESMCOUPLED in the build log. I am not sure why it is not working.

@junwang-noaa
Copy link
Copy Markdown
Collaborator Author

@uturuncoglu Do you have "CESMCOUPLED" defined in CIME? cdeps_datm_comp will show up only when the CESMCOUPLED is undefined.

@junwang-noaa
Copy link
Copy Markdown
Collaborator Author

@uturuncoglu Also the HAFS associated ufs-weather-model PR#611 and PR#615 are planned with a commit date 6/8 if all the tests pass. If you need more time for testing, please let us know, we have to push them to the week of 6/14 as we have code commit tutorial scheduled after 6/8.

@uturuncoglu
Copy link
Copy Markdown
Collaborator

@junwang-noaa we are looking into the issue. I'll let you know about it.

@jedwards4b
Copy link
Copy Markdown

cmake is creating a dependency file that includes cdeps_datm_comp.mod even when CESMCOUPLED is defined.

@uturuncoglu
Copy link
Copy Markdown
Collaborator

@junwang-noaa we are still looking for the solution of the issue in the CESM side. @jedwards4b will look at it more detailed next week. So, please hold this PR until we have more information or solve the issue.

@junwang-noaa
Copy link
Copy Markdown
Collaborator Author

OK. Please let us know when the issue is resolved.

@jedwards4b
Copy link
Copy Markdown

@junwang-noaa @uturuncoglu I have a fix and have opened a PR to Jun's fork.
junwang-noaa#1

@uturuncoglu
Copy link
Copy Markdown
Collaborator

@jedwards4b that is great. Do you want me to run CESM regression tests with the combined PR?

@jedwards4b
Copy link
Copy Markdown

jedwards4b commented Jun 7, 2021 via email

@uturuncoglu
Copy link
Copy Markdown
Collaborator

@junwang-noaa the issue in CESM side is fixed after @jedwards4b PR. So, if you merge his PR (junwang-noaa#1) to this branch. This changes will be fine. BTW, do you have any time estimate for other changes in the build to reflect the changes in CDEPS. This is critical for me to continue to work on HAFS side.

add cdeps prefix to the cdeps data component module names
@junwang-noaa
Copy link
Copy Markdown
Collaborator Author

@uturuncoglu we have timing log for the compile jobs in the regression test. I can check the total time change when compiling datm_cdeps_control_cfsr test with this branch and when compiling the same test from develop branch. Please let me know if that is what you need.

@uturuncoglu
Copy link
Copy Markdown
Collaborator

@junwang-noaa Sorry for confusion. Actually, I am not asking the run time differences. I mean this change requires follow-up PRs in build, CMEPS and also NEMS. Right? So, do you have any estimate to finish those PRs. It is not too urgent but it would be nice to know to plan the work on HAFS side.

@binli2337
Copy link
Copy Markdown

@junwang-noaa @uturuncoglu I will merge this PR to the develop branch if there are no additional updates. Thanks!

@uturuncoglu
Copy link
Copy Markdown
Collaborator

@binli2337 that is fine for me. Thanks.

@junwang-noaa
Copy link
Copy Markdown
Collaborator Author

junwang-noaa commented Jun 8, 2021 via email

@binli2337 binli2337 merged commit 8d1f357 into NOAA-EMC:develop Jun 9, 2021
@uturuncoglu
Copy link
Copy Markdown
Collaborator

@junwang-noaa Sure, i'll prepare the required follow-up PR/s and let you know.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants