Not sure what you mean by alpha_ai. The code for computing albsni is as follows:
if (f_albsni (1:1) /= 'x') &
call accum_hist_field(n_albsni, iblk, &
(awtvdr*alvdr(:,:,iblk) &
+ awtidr*alidr(:,:,iblk) &
+ awtvdf*alvdf(:,:,iblk) &
+ awtidf*alidf(:,:,iblk))*workb(:,:), a2D)
Where workb is a temporary array for storing the ice area. The awt terms are the weights to turn these into a broadband albedo. There could possibly be a bug in the code that backs out the Zenith angle dependence in the monthly mean.
if (avail_hist_fields(n)%vname(1:6) == 'albsni') then
do j = jlo, jhi
do i = ilo, ihi
if (tmask(i,j,iblk)) then
ravgctz = c0
if (albcnt(i,j,iblk,ns) > puny) &
ravgctz = c1/albcnt(i,j,iblk,ns)
if (f_albsni (1:1) /= 'x' .and. n_albsni(ns) /= 0) &
a2D(i,j,n_albsni(ns),iblk) = &
a2D(i,j,n_albsni(ns),iblk)*avgct(ns)*ravgctz
endif
enddo ! i
enddo ! j
endif
where albcnt is the number of timesteps when the sun is above the horizon. We will have to look into this.
Hi, dbailey.
I have another question.
We notice that for the varible 'albcnt',
Not sure what you mean by alpha_ai. The code for computing albsni is as follows:
if (f_albsni (1:1) /= 'x') &
call accum_hist_field(n_albsni, iblk, &
(awtvdr*alvdr(:,:,iblk) &
+ awtidr*alidr(:,:,iblk) &
+ awtvdf*alvdf(:,:,iblk) &
+ awtidf*alidf(:,:,iblk))*workb(:,:), a2D)
Where workb is a temporary array for storing the ice area. The awt terms are the weights to turn these into a broadband albedo. There could possibly be a bug in the code that backs out the Zenith angle dependence in the monthly mean.
if (avail_hist_fields(n)%vname(1:6) == 'albsni') then
do j = jlo, jhi
do i = ilo, ihi
if (tmask(i,j,iblk)) then
ravgctz = c0
if (albcnt(i,j,iblk,ns) > puny) &
ravgctz = c1/albcnt(i,j,iblk,ns)
if (f_albsni (1:1) /= 'x' .and. n_albsni(ns) /= 0) &
a2D(i,j,n_albsni(ns),iblk) = &
a2D(i,j,n_albsni(ns),iblk)*avgct(ns)*ravgctz
endif
enddo ! i
enddo ! j
endif
where albcnt is the number of timesteps when the sun is above the horizon. We will have to look into this.
Hi, Dbailey,
I have another question.
The variable albcnt accumulates with the increase of time step when the sun is above the horizon. Here is the code:
do iblk = 1,nblocks
do j = 1, ny_block
do i = 1, nx_block
cszn = c0
netsw = swvdr(i,j,iblk)+swidr(i,j,iblk)+swvdf(i,j,iblk)+swidf(i,j,iblk)
if (netsw > puny) cszn = c1
do n = 1, nstreams
albcnt(i,j,iblk,n) = albcnt(i,j,iblk,n) + cszn
enddo
enddo
enddo
enddo
I notice that the last dimension of albcnt is the counter of streams. But I don't find there is any differences between
arrays with different streams, such as albcnt(:,:,:,1) and albcnt(:,:,:,2). It seems that they add up the same value
under the same conditions if time step increases when sun is above the horizon. I know they have to be different for
different streams and the output also proves this. And the same is true for some other variables, such as a2D, replaced
with name 'field' in the following code.
do iblk = 1,nblocks
do ns = 1, nstreams
idns = id(ns)
if (idns > 0) then
this_block = get_block(blocks_ice(iblk),iblk)
ilo = this_block%ilo
ihi = this_block%ihi
jlo = this_block%jlo
jhi = this_block%jhi
do j = jlo, jhi
do i = ilo, ihi
if (tmask(i,j,iblk)) then
field(i,j,idns, iblk) = field(i,j,idns, iblk) + field_accum(i,j)
endif
enddo
enddo
endif
enddo
enddo
So how do arrays in different dimensions of stream become different?
And for albedo abnormal, we have confirmed it that there is nothing wrong with albedo variables
in hourly output frequency. That is, something wrong happens when doing daily mean or monthly mean.
We will appreciate it if you can help us find and repair the bug.
Look forward to your reply.
Best wishes.
Sincerely,
Cao