ufs-community / ccpp-physics

UFS fork for CCPP
Other
3 stars 32 forks source link

TO DISCUSS: Feature/gfdlmpv3 #195

Open dustinswales opened 3 months ago

dustinswales commented 3 months ago

This PR is intended to supersede #162

@RuiyuSun I refactored to code so that GFDL v1 and v3 share as much common code as possible.

I introduced a new module, module_gfdlmp_parm, which is configured for either v1 or v3, and referenced by a shared fv_sat_adj.F90.

All of the configuration info is stored in a DDT in module_gfdlmp_parm, with default values in the same location as before, the modulegfdl### files. After the GFDLMP namelist is read in the type is set. (Having this info gathered in a DDT allows us to make the DDT a CCPP interstitial, which would be handy if we had scheme-to-scheme dependencies that we wanted to pass around)

I also removed the imp_physics_gfdl_v3 flag. GFDL v1 and v3 have their own distinct namelists, so there is no need to have another switch to distinguish v1/v3. The only differences to run with GFDLv1 or v3 are:

RuiyuSun commented 3 months ago

@dustinswales This is great and thanks!! I agree that the scheme name in SDF and different namelist name are enough to distinguish the two versions of the scheme. So I think it is good idea to remove the imp_physics_gfdl_v3 flag. Did you forget to remove the flag in the gfdl_cloud_microphysics_v3.F90 file?

What is next?

dustinswales commented 3 months ago

@RuiyuSun Good call. I just removed the flag from the scheme.

Next we need to test that the RTs that use GFDLMP v1 are unchanged (I can do this next week). I can't speak to how the v3 results should differ wrt v1 (I will leave this piece to you)

RuiyuSun commented 3 months ago

@RuiyuSun Good call. I just removed the flag from the scheme.

Next we need to test that the RTs that use GFDLMP v1 are unchanged (I can do this next week). I can't speak to how the v3 results should differ wrt v1 (I will leave this piece to you)

@dustinswales Sounds good.

RuiyuSun commented 3 months ago

@dustinswales How do I check out this code? Thanks!

dustinswales commented 3 months ago

@dustinswales How do I check out this code? Thanks!

git clone --recursive --branch feature/gfdlmpv3 https://github.com/dustinswales/ufs-weather-model.git

grantfirl commented 3 months ago

@dustinswales @RuiyuSun This isn't yet ready to be put in the merge queue, correct?

grantfirl commented 3 months ago

@dustinswales @RuiyuSun Does this supercede #162 so that it can be closed?

dustinswales commented 3 months ago

@grantfirl Yes. #162 can be closed. More changes coming to this PR in the coming days.

grantfirl commented 2 months ago

@dustinswales @RuiyuSun Will you let us know when this is ready to review and test?