Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix the number of 2d fields nsfcprop2d #419

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 20 additions & 10 deletions io/FV3GFS_io.F90
Original file line number Diff line number Diff line change
Expand Up @@ -175,15 +175,25 @@ subroutine FV3GFS_GFS_checksum (Model, GFS_Data, Atm_block)

ntr = size(GFS_Data(1)%Statein%qgrs,3)

nsfcprop2d = 93
if (Model%lsm == Model%lsm_noahmp) then
nsfcprop2d = 156
nsfcprop2d = nsfcprop2d + 49
if (Model%use_cice_alb) then
nsfcprop2d = nsfcprop2d + 4
endif
elseif (Model%lsm == Model%lsm_ruc) then
nsfcprop2d = 125
nsfcprop2d = nsfcprop2d + 4 + 12
if (Model%rdlai) then
nsfcprop2d = nsfcprop2d + 1
endif
else
nsfcprop2d = 107
if (Model%use_cice_alb) then
nsfcprop2d = nsfcprop2d + 4
endif
endif

if (Model%nstf_name(1) > 0) then
nsfcprop2d = nsfcprop2d + 16
endif

allocate (temp2d(isc:iec,jsc:jec,nsfcprop2d+Model%ntot3d+Model%nctp))
Expand Down Expand Up @@ -316,14 +326,14 @@ subroutine FV3GFS_GFS_checksum (Model, GFS_Data, Atm_block)
temp2d(i,j,92) = GFS_Data(nb)%Sfcprop%emis_ice(ix)
temp2d(i,j,93) = GFS_Data(nb)%Sfcprop%sncovr_ice(ix)

idx_opt = 93
idx_opt = 94
if (Model%use_cice_alb .or. Model%lsm == Model%lsm_ruc) then
temp2d(i,j,idx_opt+1) = GFS_Data(nb)%Sfcprop%albdirvis_ice(ix)
temp2d(i,j,idx_opt+2) = GFS_Data(nb)%Sfcprop%albdirnir_ice(ix)
temp2d(i,j,idx_opt+3) = GFS_Data(nb)%Sfcprop%albdifvis_ice(ix)
temp2d(i,j,idx_opt+4) = GFS_Data(nb)%Sfcprop%albdifnir_ice(ix)
temp2d(i,j,idx_opt) = GFS_Data(nb)%Sfcprop%albdirvis_ice(ix)
temp2d(i,j,idx_opt+1) = GFS_Data(nb)%Sfcprop%albdirnir_ice(ix)
temp2d(i,j,idx_opt+2) = GFS_Data(nb)%Sfcprop%albdifvis_ice(ix)
temp2d(i,j,idx_opt+3) = GFS_Data(nb)%Sfcprop%albdifnir_ice(ix)
idx_opt = idx_opt + 4
endif
idx_opt = idx_opt + 5

if (Model%lsm == Model%lsm_noahmp) then
temp2d(i,j,idx_opt) = GFS_Data(nb)%Sfcprop%snowxy(ix)
Expand Down Expand Up @@ -390,7 +400,7 @@ subroutine FV3GFS_GFS_checksum (Model, GFS_Data, Atm_block)
temp2d(i,j,idx_opt+9) = GFS_Data(nb)%Sfcprop%sfalb_lnd(ix)
temp2d(i,j,idx_opt+10) = GFS_Data(nb)%Sfcprop%sfalb_lnd_bck(ix)
temp2d(i,j,idx_opt+11) = GFS_Data(nb)%Sfcprop%sfalb_ice(ix)
idx_opt = idx_opt + 11
idx_opt = idx_opt + 12
if (Model%rdlai) then
temp2d(i,j,idx_opt+1) = GFS_Data(nb)%Sfcprop%xlaixy(ix)
idx_opt = idx_opt + 1
Expand Down