Jack's MCSP modifications#1501
Conversation
|
@KaiHuang94 thanks for bringing this in. I have two high level requests. There needs to be a way to shut off the mcsp in zm_conv_intr so that you're not calling the init phase and run phase (zm_conv_mcsp_tend) even if all the do_mcsp_x flags are false. The second request is to help us understand what this PR has to do with SCREAM. We certainly don't want these IFDEF SCREAM lines in the CAM code base, as SCREAM will not be pulling from the CAM code base. It's probably fine to have small things like order of operation changes to make the porting to SCREAM easier. We'll probably need to take these decisions to accommodate SCREAM on a case by case basis. Also, a more naive question -- is the Fortran version of SCREAM going to be deprecated in favor of the Kokos C++ version, and therefore anything done here to accommodate SCREAM is unnecessary? |
|
Adding on a third high level point -- I'm not sure it's wise to put the MCSP driver in CAM. It should be CCPP'ized and brought into https://github.com/ESCOMP/atmospheric_physics/tree/main/schemes/zhang_mcfarlane. If that can't be done at this stage due to time constraints, we need a plan for eventually bringing it into atmospheric physics, since CAM will eventually be sunset once CAM-SIMA has all the necessary functionality. |
|
Thank you @KaiHuang94 for submitting the PR. Minor "cosmetic" code request; please remove identifier comments in the code like : (in addition to the #ifdef's) |
|
…csp_tend so that no calculations will be done if mcsp coefficients are all zero. Test runs are underway.
@adamrher @PeterHjortLauritzen @chihchen24 The modifications according to the above suggestions were done and have passed two test runs with MCSP turned on and turned off by default. Please see the updated version for details. |
|
I have moved this to "draft" since I've heard it is being reworked. Please move it out draft when you are ready for us to review it |
The code is ready for review. Can you please show me how to move it out draft? |
At the very bottom of this PR, there is a button which say "Ready for review". Click that and it will move it out of draft |
| !=================================================================================================== | ||
|
|
||
| subroutine mcsp_intr_init() | ||
| use MCSP, only: MCSP_init |
There was a problem hiding this comment.
This code does not compile as it is missing this MCSP module which contains MCSP_init and MCSP_run. Please provide this module in this PR or modify the code so they are not called. Please also run a test to make sure this compiles and runs on derecho.
There was a problem hiding this comment.
@KaiHuang94 following up -- can you try to resolve Cheryl's issue? It seems that you are missing a MCSP module. Can you get this to compile and run and push those changes?
|
Hi Adam and Cheryl,
I’m really sorry for my late response. I’ve been taking parental leave for my newborn baby recently and has limited time checking my email.
I’m cc’ing Jack here for this.
-Jack,
Can you please take a look at the code when you have time? I can do a quick git push once the code is modified
and ready.
The original code for this PR is stored at /glade/u/home/huangkai/mcsp_PR/. I did a quick diff between the mcps_intr.F90 there and under /glade/u/home/cchen/cam6_4_142/mcsp/mcsp/ and found no differences, but I could be wrong…
Thanks,
-Kai
---------------------------------------------------------
Kai Huang
Scientist IV
Climate and Global Dynamics
National Center for Atmospheric Research
Boulder, CO
My work hours may not be your work hours. Please do not feel obliged to reply to this email outside of your normal working hours.
From: Adam Herrington ***@***.***>
Date: Tuesday, June 23, 2026 at 10:47 AM
To: ESCOMP/CAM ***@***.***>
Cc: Kai Huang ***@***.***>, Mention ***@***.***>
Subject: Re: [ESCOMP/CAM] Jack's MCSP modifications (PR #1501)
@adamrher commented on this pull request.
________________________________
In src/physics/cam/mcsp_intr.F90<#1501 (comment)>:
+ if (ierr /= 0) call endrun("mcsp_readnl: FATAL: mpi_bcast: MCSP_uwind_coeff")
+ call mpi_bcast(MCSP_vwind_coeff, 1, mpi_real8, masterprocid, mpicom, ierr)
+ if (ierr /= 0) call endrun("mcsp_readnl: FATAL: mpi_bcast: MCSP_vwind_coeff")
+ call mpi_bcast(MCSP_storm_speed_pref, 1, mpi_real8, masterprocid, mpicom, ierr)
+ if (ierr /= 0) call endrun("mcsp_readnl: FATAL: mpi_bcast: MCSP_storm_speed_pref")
+ call mpi_bcast(MCSP_conv_depth_min, 1, mpi_real8, masterprocid, mpicom, ierr)
+ if (ierr /= 0) call endrun("mcsp_readnl: FATAL: mpi_bcast: MCSP_conv_depth_min")
+ call mpi_bcast(mcsp_shear_min, 1, mpi_real8, masterprocid, mpicom, ierr)
+ if (ierr /= 0) call endrun("mcsp_readnl: FATAL: mpi_bcast: mcsp_shear_min")
+
+end subroutine mcsp_readnl
+
+!===================================================================================================
+
+subroutine mcsp_intr_init()
+ use MCSP, only: MCSP_init
@KaiHuang94<https://github.com/KaiHuang94> following up -- can you try to resolve Cheryl's issue? It seems that you are missing a MCSP module. Can you get this to compile and run and push those changes?
—
Reply to this email directly, view it on GitHub<#1501?email_source=notifications&email_token=ANB6TFIPSX4A4GVEEBIUNHT5BKYAJA5CNFSNUABKM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UKJSXM2LFO4XTINJVGUZTIMRUGY2KM4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLDGN5XXIZLSL5RWY2LDNM#discussion_r3461426044>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ANB6TFIPFVCZSD33CC3M74T5BKYAJAVCNFSNUABFKJSXA33TNF2G64TZHMZDANBYGQ2DGNBRHNEXG43VMU5TIMBWGA4DCOJVGU22C5QC>.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS<https://github.com/notifications/mobile/ios/ANB6TFJ7COICS352ZOBESTD5BKYAJA5CNFSNUABKM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UKJSXM2LFO4XTINJVGUZTIMRUGY2KM4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJKTGN5XXIZLSL5UW64Y> and Android<https://github.com/notifications/mobile/android/ANB6TFJ6DMMNSJPIFIWR44D5BKYAJA5CNFSNUABKM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UKJSXM2LFO4XTINJVGUZTIMRUGY2KM4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLTGN5XXIZLSL5QW4ZDSN5UWI>. Download it today!
You are receiving this because you were mentioned.
|
Add the optional MCSP to CAM7. It is turned off by default.
Closes #1474 issue.