Skip to content

moving nest physics and type changes#14

Closed
RongqianYang-NOAA wants to merge 7 commits into
hafs-community:feature/hafsv211_mn_landfrom
RongqianYang-NOAA:hafsv211_mn_land
Closed

moving nest physics and type changes#14
RongqianYang-NOAA wants to merge 7 commits into
hafs-community:feature/hafsv211_mn_landfrom
RongqianYang-NOAA:hafsv211_mn_land

Conversation

@RongqianYang-NOAA
Copy link
Copy Markdown

Description

Changes made to moving nest physics (snow related fields) and types.

@RongqianYang-NOAA RongqianYang-NOAA marked this pull request as draft October 14, 2025 14:09
Comment thread ccpp/data/GFS_typedefs.F90
0.5*GFS_sfcprop%dzsno(k) )/ GFS_sfcprop%snowd(im)/1000.0)*( GFS_sfcprop%stc(im,1)- GFS_sfcprop%tgxy(im))

GFS_sfcprop%snliqxy(im,k) = 0.0
GFS_sfcprop%snicexy(im,k) = 1.0 * GFS_sfcprop%dzsno(k) * GFS_sfcprop%weasd(im)/GFS_sfcprop%snowd(im)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

isn't this going to be overwritten by the lines below?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Yes. These lines are from the old code and should be removed (including the line for GFS_sfcprop%zsnsoxy (im,k)= mn_phys%zsnsoxy(i,j,k) ).

call mn_var_shift_data(mn_phys%snicexy, interp_type, wt_h, Atm(child_grid_num)%neststruct%ind_h, &
delta_i_c, delta_j_c, x_refine, y_refine, is_fine_pe, nest_domain, position, GFS_control%lsnow_lsm_lbound, GFS_control%lsnow_lsm_ubound)
call mn_var_shift_data(mn_phys%snliqxy, interp_type, wt_h, Atm(child_grid_num)%neststruct%ind_h, &

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

is anything changed here?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

No. Nothing changed. You meant the addition of blank line?

! (/0.0, 0.0, 0.0, 0.1,0.4,1.0,2.0/) -- 3 snow levels, 4 soil levels
! TODO make this more flexible for number of snow and soil levels
!do k = GFS_control%lsnow_lsm_lbound, GFS_control%lsoil

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

remove these blank line additions

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Will do that.

@RongqianYang-NOAA
Copy link
Copy Markdown
Author

Are you suggesting to remove 'dzsno' and 'dzsnso' from the GFS_typedefs and make necessary changes in the moving physics module?

Clean up the old code and remove redundant blank lines.
if (GFS_sfcprop%snowd(im) == 0.0 .and. GFS_sfcprop%weasd(im) /= 0.0 ) then ! use weasd to set snowd, in case
GFS_sfcprop%snowd(im) = GFS_sfcprop%weasd(im)/10.0 !snowd is snwdph in mm. divide by 10.
endif

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

do we want to do this for all grids? this seems like it will reset all the snow layering even for grids that were not created during the move

dzs = [0.1,0.3,0.6,1.0] ! 4 layer soil thickness
porosity = [0.339,0.421,0.434,0.476,0.484,0.439,0.404,0.464, \
0.465,0.406,0.468,0.468,0.439,1.000,0.200,0.421, \
0.468,0.200,0.339]
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I assume \ needs to be replaced by &. Also, can you use []? I never have used anything other than ()

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I guess starting in Fortran 2003 you can use []

GFS_sfcprop%snliqxy(im,k) = mn_phys%snliqxy(i,j,k)
GFS_sfcprop%tsnoxy(im,k) = mn_phys%tsnoxy(i,j,k)
do k = 1, GFS_control%lsoil
GFS_sfcprop%smc(im,k) = min(mn_phys%smc(i,j,k),porosity(GFS_sfcprop%stype(im))-0.01)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

to avoid confusion, I would replace mn_phys%smc(i,j,k) with GFS_sfcprop%smc(im,k)

so that it's clear that all we are doing is limiting the existing soil moisture and liquid

delta_i_c, delta_j_c, x_refine, y_refine, is_fine_pe, nest_domain, position)
call mn_var_shift_data(mn_phys%smoiseq, interp_type, wt_h, Atm(child_grid_num)%neststruct%ind_h, &
delta_i_c, delta_j_c, x_refine, y_refine, is_fine_pe, nest_domain, position, GFS_control%lsoil)
<<<<<<< HEAD
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

there is a conflict that needs to be resolved

mn_phys%leading_edge(isd+3:isd+5, :) = .True.
endif
if (ioffset .eq. -1) then
mn_phys%leading_edge(ied-5:isd-3, :) = .True.
Copy link
Copy Markdown

@barlage barlage Nov 3, 2025

Choose a reason for hiding this comment

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

@wramstrom asking a question here without really understanding, but are these indicies correct? should they both be ied? Same below for the joffset .eq. -1 block, both should be jed?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@barlage I have updated this so it should now be correct -- thanks for catching this.

@RongqianYang-NOAA RongqianYang-NOAA deleted the hafsv211_mn_land branch November 20, 2025 17:00
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.

3 participants