Skip to content

Commit

Permalink
Merge pull request #6 from apcraig/sspoutput
Browse files Browse the repository at this point in the history
Update ssp data for dEdd_snicar
  • Loading branch information
eclare108213 authored Aug 26, 2022
2 parents 258f623 + e569c4c commit 1d6eaa6
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 25 deletions.
27 changes: 18 additions & 9 deletions columnphysics/icepack_shortwave.F90
Original file line number Diff line number Diff line change
Expand Up @@ -194,53 +194,56 @@ subroutine icepack_init_radiation
allocate(ssp_sasymmdr(nspint_5bd,nmbrad_snicar)) ! snow asymmetry factor, direct
allocate(ssp_sasymmdf(nspint_5bd,nmbrad_snicar)) ! snow asymmetry factor, diffuse

! tcraig, these data statements are not consistent with the array index order
! reshape from nmbrad,nspint to nspint,nmbrad with order = 2,1

ssp_snwextdr = reshape((/ &
46.27374983, 24.70286257, 6.54918455, 2.6035624, 1.196168, &
46.56827715, 24.81790668, 6.56181227, 2.60604155, 1.19682614, &
46.76114033, 24.90468677, 6.56950323, 2.60780948, 1.19737512, &
46.9753992, 24.9495155, 6.57687695, 2.60937383, 1.19774008, &
47.48598349, 25.14100194, 6.59708024, 2.61372576, 1.19897351 /), &
(/nspint_5bd,nmbrad_snicar/))
(/nmbrad_snicar,nspint_5bd/), order=(/ 2, 1 /))

ssp_snwextdf = reshape((/ &
46.26936158, 24.70165487, 6.54903637, 2.60353051, 1.19615825, &
46.56628244, 24.81707286, 6.56164279, 2.60601584, 1.1968169, &
46.75501968, 24.90175807, 6.5693214, 2.60775795, 1.19736237, &
46.95368476, 24.94497414, 6.57612007, 2.60924059, 1.19770981, &
47.29620774, 25.0713585, 6.5891698, 2.61198929, 1.19850197 /), &
(/nspint_5bd,nmbrad_snicar/))
(/nmbrad_snicar,nspint_5bd/), order=(/ 2, 1 /))

ssp_snwalbdr = reshape((/ &
0.99999581, 0.99999231, 0.99997215, 0.99993093, 0.99985157, &
0.99987892, 0.99978212, 0.99923115, 0.99817946, 0.99628374, &
0.99909682, 0.99835523, 0.99418008, 0.98592085, 0.97062632, &
0.99308867, 0.98972448, 0.97261528, 0.93947995, 0.88207117, &
0.93322249, 0.89645776, 0.75765643, 0.6272883, 0.55435033 /), &
(/nspint_5bd,nmbrad_snicar/))
(/nmbrad_snicar,nspint_5bd/), order=(/ 2, 1 /))

ssp_snwalbdf = reshape((/ &
0.99999586, 0.9999924, 0.99997249, 0.99993178, 0.9998534, &
0.99988441, 0.99979202, 0.99926745, 0.99826865, 0.99647135, &
0.99910997, 0.99837683, 0.99426171, 0.98610431, 0.97097643, &
0.99476731, 0.9916114, 0.97441209, 0.94127464, 0.88440735, &
0.9419837, 0.90613207, 0.77042376, 0.63887161, 0.5566098 /), &
(/nspint_5bd,nmbrad_snicar/))
(/nmbrad_snicar,nspint_5bd/), order=(/ 2, 1 /))

ssp_sasymmdr = reshape((/ &
0.88503036, 0.88778473, 0.89049023, 0.89112501, 0.89136157, &
0.88495225, 0.88905367, 0.89315385, 0.89433673, 0.8950027, &
0.88440201, 0.88928256, 0.89503166, 0.89762648, 0.90045378, &
0.88590371, 0.89350221, 0.90525156, 0.91314567, 0.92157748, &
0.9033537, 0.91778261, 0.94615574, 0.96323447, 0.97167644 /), &
(/nspint_5bd,nmbrad_snicar/))
(/nmbrad_snicar,nspint_5bd/), order=(/ 2, 1 /))

ssp_sasymmdf = reshape((/ &
0.88500571, 0.88773868, 0.89042496, 0.8910553, 0.89128949, &
0.88495225, 0.88905367, 0.89315385, 0.89433673, 0.8950027 , &
0.88441433, 0.88929133, 0.89500611, 0.89756091, 0.90035504, &
0.88495554, 0.89201556, 0.90204619, 0.90914885, 0.91769988, &
0.89620237, 0.90998944, 0.94126152, 0.96209938, 0.9726631 /), &
(/nspint_5bd,nmbrad_snicar/))
(/nmbrad_snicar,nspint_5bd/), order=(/ 2, 1 /))

else
call icepack_warnings_setabort(.true.,__FILE__,__LINE__)
Expand All @@ -260,11 +263,17 @@ subroutine icepack_init_radiation
return
endif

write(warnstr,*) subname, ' nmbrad_snicar = ',nmbrad_snicar
write(warnstr,'(2a,i8)') subname, ' nmbrad_snicar = ',nmbrad_snicar
call icepack_warnings_add(warnstr)
write(warnstr,'(2a,i8)') subname, ' nspint = ',nspint_5bd
call icepack_warnings_add(warnstr)
write(warnstr,'(2a,i5,a,i5,a,g14.7)') subname, ' ssp_snwextdr(',1, ',',1, ') = ',ssp_snwextdr(1,1)
call icepack_warnings_add(warnstr)
write(warnstr,'(2a,i5,a,i5,a,g14.7)') subname, ' ssp_snwextdr(',nspint_5bd,',',1, ') = ',ssp_snwextdr(nspint_5bd,1)
call icepack_warnings_add(warnstr)
write(warnstr,*) subname, ' nspint = ',nspint_5bd
write(warnstr,'(2a,i5,a,i5,a,g14.7)') subname, ' ssp_snwextdr(',1, ',',nmbrad_snicar,') = ',ssp_snwextdr(1,nmbrad_snicar)
call icepack_warnings_add(warnstr)
write(warnstr,*) subname, ' ssp_snwextdr(1,1) = ',ssp_snwextdr(1,1)
write(warnstr,'(2a,i5,a,i5,a,g14.7)') subname, ' ssp_snwextdr(',nspint_5bd,',',nmbrad_snicar,') = ',ssp_snwextdr(nspint_5bd,nmbrad_snicar)
call icepack_warnings_add(warnstr)

endif
Expand Down
46 changes: 30 additions & 16 deletions configuration/driver/icedrv_forcing.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1291,23 +1291,37 @@ subroutine init_snicarssptable

write(nu_diag,*) subname,' '
write(nu_diag,*) subname,' Successfully initialized SNICAR SSP tables:'
write(nu_diag,*) subname,' ssp_filename = ',trim(ssp_filename)
write(nu_diag,*) subname,' SSP N spectral int = ',nspint
write(nu_diag,*) subname,' SSP N snow grain rad = ',nsrad
write(nu_diag,*) subname,' ssp_filename = ',trim(ssp_filename)
write(nu_diag,*) subname,' SSP N spectral int, m1 = ',nspint
write(nu_diag,*) subname,' SSP N snow grain rad, m2 = ',nsrad
write(nu_diag,*) subname,' Data at first index '
write(nu_diag,*) subname,' ssp_snwextdr(1,1) = ',ssp_snwextdr(1,1)
write(nu_diag,*) subname,' ssp_snwextdf(1,1) = ',ssp_snwextdf(1,1)
write(nu_diag,*) subname,' ssp_snwalbdr(1,1) = ',ssp_snwalbdr(1,1)
write(nu_diag,*) subname,' ssp_snwalbdf(1,1) = ',ssp_snwalbdf(1,1)
write(nu_diag,*) subname,' ssp_sasymmdr(1,1) = ',ssp_sasymmdr(1,1)
write(nu_diag,*) subname,' ssp_sasymmdf(1,1) = ',ssp_sasymmdf(1,1)
write(nu_diag,*) subname,' Data at final index '
write(nu_diag,*) subname,' ssp_snwextdr(max,max) = ',ssp_snwextdr(nspint,nsrad)
write(nu_diag,*) subname,' ssp_snwextdf(max,max) = ',ssp_snwextdf(nspint,nsrad)
write(nu_diag,*) subname,' ssp_snwalbdr(max,max) = ',ssp_snwalbdr(nspint,nsrad)
write(nu_diag,*) subname,' ssp_snwalbdf(max,max) = ',ssp_snwalbdf(nspint,nsrad)
write(nu_diag,*) subname,' ssp_sasymmdr(max,max) = ',ssp_sasymmdr(nspint,nsrad)
write(nu_diag,*) subname,' ssp_sasymmdf(max,max) = ',ssp_sasymmdf(nspint,nsrad)
write(nu_diag,*) subname,' ssp_snwextdr(1,1) = ',ssp_snwextdr(1,1)
write(nu_diag,*) subname,' ssp_snwextdf(1,1) = ',ssp_snwextdf(1,1)
write(nu_diag,*) subname,' ssp_snwalbdr(1,1) = ',ssp_snwalbdr(1,1)
write(nu_diag,*) subname,' ssp_snwalbdf(1,1) = ',ssp_snwalbdf(1,1)
write(nu_diag,*) subname,' ssp_sasymmdr(1,1) = ',ssp_sasymmdr(1,1)
write(nu_diag,*) subname,' ssp_sasymmdf(1,1) = ',ssp_sasymmdf(1,1)
write(nu_diag,*) subname,' Data at ',nspint,',1 index '
write(nu_diag,*) subname,' ssp_snwextdr(m1,1) = ',ssp_snwextdr(nspint,1)
write(nu_diag,*) subname,' ssp_snwextdf(m1,1) = ',ssp_snwextdf(nspint,1)
write(nu_diag,*) subname,' ssp_snwalbdr(m1,1) = ',ssp_snwalbdr(nspint,1)
write(nu_diag,*) subname,' ssp_snwalbdf(m1,1) = ',ssp_snwalbdf(nspint,1)
write(nu_diag,*) subname,' ssp_sasymmdr(m1,1) = ',ssp_sasymmdr(nspint,1)
write(nu_diag,*) subname,' ssp_sasymmdf(m1,1) = ',ssp_sasymmdf(nspint,1)
write(nu_diag,*) subname,' Data at 1,',nsrad,' index '
write(nu_diag,*) subname,' ssp_snwextdr(1,m2) = ',ssp_snwextdr(1,nsrad)
write(nu_diag,*) subname,' ssp_snwextdf(1,m2) = ',ssp_snwextdf(1,nsrad)
write(nu_diag,*) subname,' ssp_snwalbdr(1,m2) = ',ssp_snwalbdr(1,nsrad)
write(nu_diag,*) subname,' ssp_snwalbdf(1,m2) = ',ssp_snwalbdf(1,nsrad)
write(nu_diag,*) subname,' ssp_sasymmdr(1,m2) = ',ssp_sasymmdr(1,nsrad)
write(nu_diag,*) subname,' ssp_sasymmdf(1,m2) = ',ssp_sasymmdf(1,nsrad)
write(nu_diag,*) subname,' Data at ',nspint,nsrad,' index '
write(nu_diag,*) subname,' ssp_snwextdr(m1,m2) = ',ssp_snwextdr(nspint,nsrad)
write(nu_diag,*) subname,' ssp_snwextdf(m1,m2) = ',ssp_snwextdf(nspint,nsrad)
write(nu_diag,*) subname,' ssp_snwalbdr(m1,m2) = ',ssp_snwalbdr(nspint,nsrad)
write(nu_diag,*) subname,' ssp_snwalbdf(m1,m2) = ',ssp_snwalbdf(nspint,nsrad)
write(nu_diag,*) subname,' ssp_sasymmdr(m1,m2) = ',ssp_sasymmdr(nspint,nsrad)
write(nu_diag,*) subname,' ssp_sasymmdf(m1,m2) = ',ssp_sasymmdf(nspint,nsrad)

call icepack_init_parameters( &
ssp_snwextdr_in = ssp_snwextdr, ssp_snwextdf_in = ssp_snwextdf, &
Expand Down

0 comments on commit 1d6eaa6

Please sign in to comment.